wmi_unified.h 2.0 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929369303693136932369333693436935369363693736938369393694036941369423694336944369453694636947369483694936950369513695236953369543695536956369573695836959369603696136962369633696436965369663696736968369693697036971369723697336974369753697636977369783697936980369813698236983369843698536986369873698836989369903699136992369933699436995369963699736998369993700037001370023700337004370053700637007370083700937010370113701237013370143701537016370173701837019370203702137022370233702437025370263702737028370293703037031370323703337034370353703637037370383703937040370413704237043370443704537046370473704837049370503705137052370533705437055370563705737058370593706037061370623706337064370653706637067370683706937070370713707237073370743707537076370773707837079370803708137082370833708437085370863708737088370893709037091370923709337094370953709637097370983709937100371013710237103371043710537106371073710837109371103711137112371133711437115371163711737118371193712037121371223712337124371253712637127371283712937130371313713237133371343713537136371373713837139371403714137142371433714437145371463714737148371493715037151371523715337154371553715637157371583715937160371613716237163371643716537166371673716837169371703717137172371733717437175371763717737178371793718037181371823718337184371853718637187371883718937190371913719237193371943719537196371973719837199372003720137202372033720437205372063720737208372093721037211372123721337214372153721637217372183721937220372213722237223372243722537226372273722837229372303723137232372333723437235372363723737238372393724037241372423724337244372453724637247372483724937250372513725237253372543725537256372573725837259372603726137262372633726437265372663726737268372693727037271372723727337274372753727637277372783727937280372813728237283372843728537286372873728837289372903729137292372933729437295372963729737298372993730037301373023730337304373053730637307373083730937310373113731237313373143731537316373173731837319373203732137322373233732437325373263732737328373293733037331373323733337334373353733637337373383733937340373413734237343373443734537346373473734837349373503735137352373533735437355373563735737358373593736037361373623736337364373653736637367373683736937370373713737237373373743737537376373773737837379373803738137382373833738437385373863738737388373893739037391373923739337394373953739637397373983739937400374013740237403374043740537406374073740837409374103741137412374133741437415374163741737418374193742037421374223742337424374253742637427374283742937430374313743237433374343743537436374373743837439374403744137442374433744437445374463744737448374493745037451374523745337454374553745637457374583745937460374613746237463374643746537466374673746837469374703747137472374733747437475374763747737478374793748037481374823748337484374853748637487374883748937490374913749237493374943749537496374973749837499375003750137502375033750437505375063750737508375093751037511375123751337514375153751637517375183751937520375213752237523375243752537526375273752837529375303753137532375333753437535375363753737538375393754037541375423754337544375453754637547375483754937550375513755237553375543755537556375573755837559375603756137562375633756437565375663756737568375693757037571375723757337574375753757637577375783757937580375813758237583375843758537586375873758837589375903759137592375933759437595375963759737598375993760037601376023760337604376053760637607376083760937610376113761237613376143761537616376173761837619376203762137622376233762437625376263762737628376293763037631376323763337634376353763637637376383763937640376413764237643376443764537646376473764837649376503765137652376533765437655376563765737658376593766037661376623766337664376653766637667376683766937670376713767237673376743767537676376773767837679376803768137682376833768437685376863768737688376893769037691376923769337694376953769637697376983769937700377013770237703377043770537706377073770837709377103771137712377133771437715377163771737718377193772037721377223772337724377253772637727377283772937730377313773237733377343773537736377373773837739377403774137742377433774437745377463774737748377493775037751377523775337754377553775637757377583775937760377613776237763377643776537766377673776837769377703777137772377733777437775377763777737778377793778037781377823778337784377853778637787377883778937790377913779237793377943779537796377973779837799378003780137802378033780437805378063780737808378093781037811378123781337814378153781637817378183781937820378213782237823378243782537826378273782837829378303783137832378333783437835378363783737838378393784037841378423784337844378453784637847378483784937850378513785237853378543785537856378573785837859378603786137862378633786437865378663786737868378693787037871378723787337874378753787637877378783787937880378813788237883378843788537886378873788837889378903789137892378933789437895378963789737898378993790037901379023790337904379053790637907379083790937910379113791237913379143791537916379173791837919379203792137922379233792437925379263792737928379293793037931379323793337934379353793637937379383793937940379413794237943379443794537946379473794837949379503795137952379533795437955379563795737958379593796037961379623796337964379653796637967379683796937970379713797237973379743797537976379773797837979379803798137982379833798437985379863798737988379893799037991379923799337994379953799637997379983799938000380013800238003380043800538006380073800838009380103801138012380133801438015380163801738018380193802038021380223802338024380253802638027380283802938030380313803238033380343803538036380373803838039380403804138042380433804438045380463804738048380493805038051380523805338054380553805638057380583805938060380613806238063380643806538066380673806838069380703807138072380733807438075380763807738078380793808038081380823808338084380853808638087380883808938090380913809238093380943809538096380973809838099381003810138102381033810438105381063810738108381093811038111381123811338114381153811638117381183811938120381213812238123381243812538126381273812838129381303813138132381333813438135381363813738138381393814038141381423814338144381453814638147381483814938150381513815238153381543815538156381573815838159381603816138162381633816438165381663816738168381693817038171381723817338174381753817638177381783817938180381813818238183381843818538186381873818838189381903819138192381933819438195381963819738198381993820038201382023820338204382053820638207382083820938210382113821238213382143821538216382173821838219382203822138222382233822438225382263822738228382293823038231382323823338234382353823638237382383823938240382413824238243382443824538246382473824838249382503825138252382533825438255382563825738258382593826038261382623826338264382653826638267382683826938270382713827238273382743827538276382773827838279382803828138282382833828438285382863828738288382893829038291382923829338294382953829638297382983829938300383013830238303383043830538306383073830838309383103831138312383133831438315383163831738318383193832038321383223832338324383253832638327383283832938330383313833238333383343833538336383373833838339383403834138342383433834438345383463834738348383493835038351383523835338354383553835638357383583835938360383613836238363383643836538366383673836838369383703837138372383733837438375383763837738378383793838038381383823838338384383853838638387383883838938390383913839238393383943839538396383973839838399384003840138402384033840438405384063840738408384093841038411384123841338414384153841638417384183841938420384213842238423384243842538426384273842838429384303843138432384333843438435384363843738438384393844038441384423844338444384453844638447384483844938450384513845238453384543845538456384573845838459384603846138462384633846438465384663846738468384693847038471384723847338474384753847638477384783847938480384813848238483384843848538486384873848838489384903849138492384933849438495384963849738498384993850038501385023850338504385053850638507385083850938510385113851238513385143851538516385173851838519385203852138522385233852438525385263852738528385293853038531385323853338534385353853638537385383853938540385413854238543385443854538546385473854838549385503855138552385533855438555385563855738558385593856038561385623856338564385653856638567385683856938570385713857238573385743857538576385773857838579385803858138582385833858438585385863858738588385893859038591385923859338594385953859638597385983859938600386013860238603386043860538606386073860838609386103861138612386133861438615386163861738618386193862038621386223862338624386253862638627386283862938630386313863238633386343863538636386373863838639386403864138642386433864438645386463864738648386493865038651386523865338654386553865638657386583865938660386613866238663386643866538666386673866838669386703867138672386733867438675386763867738678386793868038681386823868338684386853868638687386883868938690386913869238693386943869538696386973869838699387003870138702387033870438705387063870738708387093871038711387123871338714387153871638717387183871938720387213872238723387243872538726387273872838729387303873138732387333873438735387363873738738387393874038741387423874338744387453874638747387483874938750387513875238753387543875538756387573875838759387603876138762387633876438765387663876738768387693877038771387723877338774387753877638777387783877938780387813878238783387843878538786387873878838789387903879138792387933879438795387963879738798387993880038801388023880338804388053880638807388083880938810388113881238813388143881538816388173881838819388203882138822388233882438825388263882738828388293883038831388323883338834388353883638837388383883938840388413884238843388443884538846388473884838849388503885138852388533885438855388563885738858388593886038861388623886338864388653886638867388683886938870388713887238873388743887538876388773887838879388803888138882388833888438885388863888738888388893889038891388923889338894388953889638897388983889938900389013890238903389043890538906389073890838909389103891138912389133891438915389163891738918389193892038921389223892338924389253892638927389283892938930389313893238933389343893538936389373893838939389403894138942389433894438945389463894738948389493895038951389523895338954389553895638957389583895938960389613896238963389643896538966389673896838969389703897138972389733897438975389763897738978389793898038981389823898338984389853898638987389883898938990389913899238993389943899538996389973899838999390003900139002390033900439005390063900739008390093901039011390123901339014390153901639017390183901939020390213902239023390243902539026390273902839029390303903139032390333903439035390363903739038390393904039041390423904339044390453904639047390483904939050390513905239053390543905539056390573905839059390603906139062390633906439065390663906739068390693907039071390723907339074390753907639077390783907939080390813908239083390843908539086390873908839089390903909139092390933909439095390963909739098390993910039101391023910339104391053910639107391083910939110391113911239113391143911539116391173911839119391203912139122391233912439125391263912739128391293913039131391323913339134391353913639137391383913939140391413914239143391443914539146391473914839149391503915139152391533915439155391563915739158391593916039161391623916339164391653916639167391683916939170391713917239173391743917539176391773917839179391803918139182391833918439185391863918739188391893919039191391923919339194391953919639197391983919939200392013920239203392043920539206392073920839209392103921139212392133921439215392163921739218392193922039221392223922339224392253922639227392283922939230392313923239233392343923539236392373923839239392403924139242392433924439245392463924739248392493925039251392523925339254392553925639257392583925939260392613926239263392643926539266392673926839269392703927139272392733927439275392763927739278392793928039281392823928339284392853928639287392883928939290392913929239293392943929539296392973929839299393003930139302393033930439305393063930739308393093931039311393123931339314393153931639317393183931939320393213932239323393243932539326393273932839329393303933139332393333933439335393363933739338393393934039341393423934339344393453934639347393483934939350393513935239353393543935539356393573935839359393603936139362393633936439365393663936739368393693937039371393723937339374393753937639377393783937939380393813938239383393843938539386393873938839389393903939139392393933939439395393963939739398393993940039401394023940339404394053940639407394083940939410394113941239413394143941539416394173941839419394203942139422394233942439425394263942739428394293943039431394323943339434394353943639437394383943939440394413944239443394443944539446394473944839449394503945139452394533945439455394563945739458394593946039461394623946339464394653946639467394683946939470394713947239473394743947539476394773947839479394803948139482394833948439485394863948739488394893949039491394923949339494394953949639497394983949939500395013950239503395043950539506395073950839509395103951139512395133951439515395163951739518395193952039521395223952339524395253952639527395283952939530395313953239533395343953539536395373953839539395403954139542395433954439545395463954739548395493955039551395523955339554395553955639557395583955939560395613956239563395643956539566395673956839569395703957139572395733957439575395763957739578395793958039581395823958339584395853958639587395883958939590395913959239593395943959539596395973959839599396003960139602396033960439605396063960739608396093961039611396123961339614396153961639617396183961939620396213962239623396243962539626396273962839629396303963139632396333963439635396363963739638396393964039641396423964339644396453964639647396483964939650396513965239653396543965539656396573965839659396603966139662396633966439665396663966739668396693967039671396723967339674396753967639677396783967939680396813968239683396843968539686396873968839689396903969139692396933969439695396963969739698396993970039701397023970339704397053970639707397083970939710397113971239713397143971539716397173971839719397203972139722397233972439725397263972739728397293973039731397323973339734397353973639737397383973939740397413974239743397443974539746397473974839749397503975139752397533975439755397563975739758397593976039761397623976339764397653976639767397683976939770397713977239773397743977539776397773977839779397803978139782397833978439785397863978739788397893979039791397923979339794397953979639797397983979939800398013980239803398043980539806398073980839809398103981139812398133981439815398163981739818398193982039821398223982339824398253982639827398283982939830398313983239833398343983539836398373983839839398403984139842398433984439845398463984739848398493985039851398523985339854398553985639857398583985939860398613986239863398643986539866398673986839869398703987139872398733987439875398763987739878398793988039881398823988339884398853988639887398883988939890398913989239893398943989539896398973989839899399003990139902399033990439905399063990739908399093991039911399123991339914399153991639917399183991939920399213992239923399243992539926399273992839929399303993139932399333993439935399363993739938399393994039941399423994339944399453994639947399483994939950399513995239953399543995539956399573995839959399603996139962399633996439965399663996739968399693997039971399723997339974399753997639977399783997939980399813998239983399843998539986399873998839989399903999139992399933999439995399963999739998399994000040001400024000340004400054000640007400084000940010400114001240013400144001540016400174001840019400204002140022400234002440025400264002740028400294003040031400324003340034400354003640037400384003940040400414004240043400444004540046400474004840049400504005140052400534005440055400564005740058400594006040061400624006340064400654006640067400684006940070400714007240073400744007540076400774007840079400804008140082400834008440085400864008740088400894009040091400924009340094400954009640097400984009940100401014010240103401044010540106401074010840109401104011140112401134011440115401164011740118401194012040121401224012340124401254012640127401284012940130401314013240133401344013540136401374013840139401404014140142401434014440145401464014740148401494015040151401524015340154401554015640157401584015940160401614016240163401644016540166401674016840169401704017140172401734017440175401764017740178401794018040181401824018340184401854018640187401884018940190401914019240193401944019540196401974019840199402004020140202402034020440205402064020740208402094021040211402124021340214402154021640217402184021940220402214022240223402244022540226402274022840229402304023140232402334023440235402364023740238402394024040241402424024340244402454024640247402484024940250402514025240253402544025540256402574025840259402604026140262402634026440265402664026740268402694027040271402724027340274402754027640277402784027940280402814028240283402844028540286402874028840289402904029140292402934029440295402964029740298402994030040301403024030340304403054030640307403084030940310403114031240313403144031540316403174031840319403204032140322403234032440325403264032740328403294033040331403324033340334403354033640337403384033940340403414034240343403444034540346403474034840349403504035140352403534035440355403564035740358403594036040361403624036340364403654036640367403684036940370403714037240373403744037540376403774037840379403804038140382403834038440385403864038740388403894039040391403924039340394403954039640397403984039940400404014040240403404044040540406404074040840409404104041140412404134041440415404164041740418404194042040421404224042340424404254042640427404284042940430404314043240433404344043540436404374043840439404404044140442404434044440445404464044740448404494045040451404524045340454404554045640457404584045940460404614046240463404644046540466404674046840469404704047140472404734047440475404764047740478404794048040481404824048340484404854048640487404884048940490404914049240493404944049540496404974049840499405004050140502405034050440505405064050740508405094051040511405124051340514405154051640517405184051940520405214052240523405244052540526405274052840529405304053140532405334053440535405364053740538405394054040541405424054340544405454054640547405484054940550405514055240553405544055540556405574055840559405604056140562405634056440565405664056740568405694057040571405724057340574405754057640577405784057940580405814058240583405844058540586405874058840589405904059140592405934059440595405964059740598405994060040601406024060340604406054060640607406084060940610406114061240613406144061540616406174061840619406204062140622406234062440625406264062740628406294063040631406324063340634406354063640637406384063940640406414064240643406444064540646406474064840649406504065140652406534065440655406564065740658406594066040661406624066340664406654066640667406684066940670406714067240673406744067540676406774067840679406804068140682406834068440685406864068740688406894069040691406924069340694406954069640697406984069940700407014070240703407044070540706407074070840709407104071140712407134071440715407164071740718407194072040721407224072340724407254072640727407284072940730407314073240733407344073540736407374073840739407404074140742407434074440745407464074740748407494075040751407524075340754407554075640757407584075940760407614076240763407644076540766407674076840769407704077140772407734077440775407764077740778407794078040781407824078340784407854078640787407884078940790407914079240793407944079540796407974079840799408004080140802408034080440805408064080740808408094081040811408124081340814408154081640817408184081940820408214082240823408244082540826408274082840829408304083140832408334083440835408364083740838408394084040841408424084340844408454084640847408484084940850408514085240853408544085540856408574085840859408604086140862408634086440865408664086740868408694087040871408724087340874408754087640877408784087940880408814088240883408844088540886408874088840889408904089140892408934089440895408964089740898408994090040901409024090340904409054090640907409084090940910409114091240913409144091540916409174091840919409204092140922409234092440925409264092740928409294093040931409324093340934409354093640937409384093940940409414094240943409444094540946409474094840949409504095140952409534095440955409564095740958409594096040961409624096340964409654096640967409684096940970409714097240973409744097540976409774097840979409804098140982409834098440985409864098740988409894099040991409924099340994409954099640997409984099941000410014100241003410044100541006410074100841009410104101141012410134101441015410164101741018410194102041021410224102341024410254102641027410284102941030410314103241033410344103541036410374103841039410404104141042410434104441045410464104741048410494105041051410524105341054410554105641057410584105941060410614106241063410644106541066410674106841069410704107141072410734107441075410764107741078410794108041081410824108341084410854108641087410884108941090410914109241093410944109541096410974109841099411004110141102411034110441105411064110741108411094111041111411124111341114411154111641117411184111941120411214112241123411244112541126411274112841129411304113141132411334113441135411364113741138411394114041141411424114341144411454114641147411484114941150411514115241153411544115541156411574115841159411604116141162411634116441165411664116741168411694117041171411724117341174411754117641177411784117941180411814118241183411844118541186411874118841189411904119141192411934119441195411964119741198411994120041201412024120341204412054120641207412084120941210412114121241213412144121541216412174121841219412204122141222412234122441225412264122741228412294123041231412324123341234412354123641237412384123941240412414124241243412444124541246412474124841249412504125141252412534125441255412564125741258412594126041261412624126341264412654126641267412684126941270412714127241273412744127541276412774127841279412804128141282412834128441285412864128741288412894129041291412924129341294412954129641297412984129941300413014130241303413044130541306413074130841309413104131141312413134131441315413164131741318413194132041321413224132341324413254132641327413284132941330413314133241333413344133541336413374133841339413404134141342413434134441345413464134741348413494135041351413524135341354413554135641357413584135941360413614136241363413644136541366413674136841369413704137141372413734137441375413764137741378413794138041381413824138341384413854138641387413884138941390413914139241393413944139541396413974139841399414004140141402414034140441405414064140741408414094141041411414124141341414414154141641417414184141941420414214142241423414244142541426414274142841429414304143141432414334143441435414364143741438414394144041441414424144341444414454144641447414484144941450414514145241453414544145541456414574145841459414604146141462414634146441465414664146741468414694147041471414724147341474414754147641477414784147941480414814148241483414844148541486414874148841489414904149141492414934149441495414964149741498414994150041501415024150341504415054150641507415084150941510415114151241513415144151541516415174151841519415204152141522415234152441525415264152741528415294153041531415324153341534415354153641537415384153941540415414154241543415444154541546415474154841549415504155141552415534155441555415564155741558415594156041561415624156341564415654156641567415684156941570415714157241573415744157541576415774157841579415804158141582415834158441585415864158741588415894159041591415924159341594415954159641597415984159941600416014160241603416044160541606416074160841609416104161141612416134161441615416164161741618416194162041621416224162341624416254162641627416284162941630416314163241633416344163541636416374163841639416404164141642416434164441645416464164741648416494165041651416524165341654416554165641657416584165941660416614166241663416644166541666416674166841669416704167141672416734167441675416764167741678416794168041681416824168341684416854168641687416884168941690416914169241693416944169541696416974169841699417004170141702417034170441705417064170741708417094171041711417124171341714417154171641717417184171941720417214172241723417244172541726417274172841729417304173141732417334173441735417364173741738417394174041741417424174341744417454174641747417484174941750417514175241753417544175541756417574175841759417604176141762417634176441765417664176741768417694177041771417724177341774417754177641777417784177941780417814178241783417844178541786417874178841789417904179141792417934179441795417964179741798417994180041801418024180341804418054180641807418084180941810418114181241813418144181541816418174181841819418204182141822418234182441825418264182741828418294183041831418324183341834418354183641837418384183941840418414184241843418444184541846418474184841849418504185141852418534185441855418564185741858418594186041861418624186341864418654186641867418684186941870418714187241873418744187541876418774187841879418804188141882418834188441885418864188741888418894189041891418924189341894418954189641897418984189941900419014190241903419044190541906419074190841909419104191141912419134191441915419164191741918419194192041921419224192341924419254192641927419284192941930419314193241933419344193541936419374193841939419404194141942419434194441945419464194741948419494195041951419524195341954419554195641957419584195941960419614196241963419644196541966419674196841969419704197141972419734197441975419764197741978419794198041981419824198341984419854198641987419884198941990419914199241993419944199541996419974199841999420004200142002420034200442005420064200742008420094201042011420124201342014420154201642017420184201942020420214202242023420244202542026420274202842029420304203142032420334203442035420364203742038420394204042041420424204342044420454204642047420484204942050420514205242053420544205542056420574205842059420604206142062420634206442065420664206742068420694207042071420724207342074420754207642077420784207942080420814208242083420844208542086420874208842089420904209142092420934209442095420964209742098420994210042101421024210342104421054210642107421084210942110421114211242113421144211542116421174211842119421204212142122421234212442125421264212742128421294213042131421324213342134421354213642137421384213942140421414214242143421444214542146421474214842149421504215142152421534215442155421564215742158421594216042161421624216342164421654216642167421684216942170421714217242173421744217542176421774217842179421804218142182421834218442185421864218742188421894219042191421924219342194421954219642197421984219942200422014220242203422044220542206422074220842209422104221142212422134221442215422164221742218422194222042221422224222342224422254222642227422284222942230422314223242233422344223542236422374223842239422404224142242422434224442245422464224742248422494225042251422524225342254422554225642257422584225942260422614226242263422644226542266422674226842269422704227142272422734227442275422764227742278422794228042281422824228342284422854228642287422884228942290422914229242293422944229542296422974229842299423004230142302423034230442305423064230742308423094231042311423124231342314423154231642317423184231942320423214232242323423244232542326423274232842329423304233142332423334233442335423364233742338423394234042341423424234342344423454234642347423484234942350423514235242353423544235542356423574235842359423604236142362423634236442365423664236742368423694237042371423724237342374423754237642377423784237942380423814238242383423844238542386423874238842389423904239142392423934239442395423964239742398423994240042401424024240342404424054240642407424084240942410424114241242413424144241542416424174241842419424204242142422424234242442425424264242742428424294243042431424324243342434424354243642437424384243942440424414244242443424444244542446424474244842449424504245142452424534245442455424564245742458424594246042461424624246342464424654246642467424684246942470424714247242473424744247542476424774247842479424804248142482424834248442485424864248742488424894249042491424924249342494424954249642497424984249942500425014250242503425044250542506425074250842509425104251142512425134251442515425164251742518425194252042521425224252342524425254252642527425284252942530425314253242533425344253542536425374253842539425404254142542425434254442545425464254742548425494255042551425524255342554425554255642557425584255942560425614256242563425644256542566425674256842569425704257142572425734257442575425764257742578425794258042581425824258342584425854258642587425884258942590425914259242593425944259542596425974259842599426004260142602426034260442605426064260742608426094261042611426124261342614426154261642617426184261942620426214262242623426244262542626426274262842629426304263142632426334263442635426364263742638426394264042641426424264342644426454264642647426484264942650426514265242653426544265542656426574265842659426604266142662426634266442665426664266742668426694267042671426724267342674426754267642677426784267942680426814268242683426844268542686426874268842689426904269142692426934269442695426964269742698426994270042701427024270342704427054270642707427084270942710427114271242713427144271542716427174271842719427204272142722427234272442725427264272742728427294273042731427324273342734427354273642737427384273942740427414274242743427444274542746427474274842749427504275142752427534275442755427564275742758427594276042761427624276342764427654276642767427684276942770427714277242773427744277542776427774277842779427804278142782427834278442785427864278742788427894279042791427924279342794427954279642797427984279942800428014280242803428044280542806428074280842809428104281142812428134281442815428164281742818428194282042821428224282342824428254282642827428284282942830428314283242833428344283542836428374283842839428404284142842428434284442845428464284742848428494285042851428524285342854428554285642857428584285942860428614286242863428644286542866428674286842869428704287142872428734287442875428764287742878428794288042881428824288342884428854288642887428884288942890428914289242893428944289542896428974289842899429004290142902429034290442905429064290742908429094291042911429124291342914429154291642917429184291942920429214292242923429244292542926429274292842929429304293142932429334293442935429364293742938429394294042941429424294342944429454294642947429484294942950429514295242953429544295542956429574295842959429604296142962429634296442965429664296742968429694297042971429724297342974429754297642977429784297942980429814298242983429844298542986429874298842989429904299142992429934299442995429964299742998429994300043001430024300343004430054300643007430084300943010430114301243013430144301543016430174301843019430204302143022430234302443025430264302743028430294303043031430324303343034430354303643037430384303943040430414304243043430444304543046430474304843049430504305143052430534305443055430564305743058430594306043061430624306343064430654306643067430684306943070430714307243073430744307543076430774307843079430804308143082430834308443085430864308743088430894309043091430924309343094430954309643097430984309943100431014310243103431044310543106431074310843109431104311143112431134311443115431164311743118431194312043121431224312343124431254312643127431284312943130431314313243133431344313543136431374313843139431404314143142431434314443145431464314743148431494315043151431524315343154431554315643157431584315943160431614316243163431644316543166431674316843169431704317143172431734317443175431764317743178431794318043181431824318343184431854318643187431884318943190431914319243193431944319543196431974319843199432004320143202432034320443205432064320743208432094321043211432124321343214432154321643217432184321943220432214322243223432244322543226432274322843229432304323143232432334323443235432364323743238432394324043241432424324343244432454324643247432484324943250432514325243253432544325543256432574325843259432604326143262432634326443265432664326743268432694327043271432724327343274432754327643277432784327943280432814328243283432844328543286432874328843289432904329143292432934329443295432964329743298432994330043301433024330343304433054330643307433084330943310433114331243313433144331543316433174331843319433204332143322433234332443325433264332743328433294333043331433324333343334433354333643337433384333943340433414334243343433444334543346433474334843349433504335143352433534335443355433564335743358433594336043361433624336343364433654336643367433684336943370433714337243373433744337543376433774337843379433804338143382433834338443385433864338743388433894339043391433924339343394433954339643397433984339943400434014340243403434044340543406434074340843409434104341143412434134341443415434164341743418434194342043421434224342343424434254342643427434284342943430434314343243433434344343543436434374343843439434404344143442434434344443445434464344743448434494345043451434524345343454434554345643457434584345943460434614346243463434644346543466434674346843469434704347143472434734347443475434764347743478434794348043481434824348343484434854348643487434884348943490434914349243493434944349543496434974349843499435004350143502435034350443505435064350743508435094351043511435124351343514435154351643517435184351943520435214352243523435244352543526435274352843529435304353143532435334353443535435364353743538435394354043541435424354343544435454354643547435484354943550435514355243553435544355543556435574355843559435604356143562435634356443565435664356743568435694357043571435724357343574435754357643577435784357943580435814358243583435844358543586435874358843589435904359143592435934359443595435964359743598435994360043601436024360343604436054360643607436084360943610436114361243613436144361543616436174361843619436204362143622436234362443625436264362743628436294363043631436324363343634436354363643637436384363943640436414364243643436444364543646436474364843649436504365143652436534365443655436564365743658436594366043661436624366343664436654366643667436684366943670436714367243673436744367543676436774367843679436804368143682436834368443685436864368743688436894369043691436924369343694436954369643697436984369943700437014370243703437044370543706437074370843709437104371143712437134371443715437164371743718437194372043721437224372343724437254372643727437284372943730437314373243733437344373543736437374373843739437404374143742437434374443745437464374743748437494375043751437524375343754437554375643757437584375943760437614376243763437644376543766437674376843769437704377143772437734377443775437764377743778437794378043781437824378343784437854378643787437884378943790437914379243793437944379543796437974379843799438004380143802438034380443805438064380743808438094381043811438124381343814438154381643817438184381943820438214382243823438244382543826438274382843829438304383143832438334383443835438364383743838438394384043841438424384343844438454384643847438484384943850438514385243853438544385543856438574385843859438604386143862438634386443865438664386743868438694387043871438724387343874438754387643877438784387943880438814388243883438844388543886438874388843889438904389143892438934389443895438964389743898438994390043901439024390343904439054390643907439084390943910439114391243913439144391543916439174391843919439204392143922439234392443925439264392743928439294393043931439324393343934439354393643937439384393943940439414394243943439444394543946439474394843949439504395143952439534395443955439564395743958439594396043961439624396343964439654396643967439684396943970439714397243973439744397543976439774397843979439804398143982439834398443985439864398743988439894399043991439924399343994439954399643997439984399944000440014400244003440044400544006440074400844009440104401144012440134401444015440164401744018440194402044021440224402344024440254402644027440284402944030440314403244033440344403544036440374403844039440404404144042440434404444045440464404744048440494405044051440524405344054440554405644057440584405944060440614406244063440644406544066440674406844069440704407144072440734407444075440764407744078440794408044081440824408344084440854408644087440884408944090440914409244093440944409544096440974409844099441004410144102441034410444105441064410744108441094411044111441124411344114441154411644117441184411944120441214412244123441244412544126441274412844129441304413144132441334413444135441364413744138441394414044141441424414344144441454414644147441484414944150441514415244153441544415544156441574415844159441604416144162441634416444165441664416744168441694417044171441724417344174441754417644177441784417944180441814418244183441844418544186441874418844189441904419144192441934419444195441964419744198441994420044201442024420344204442054420644207442084420944210442114421244213442144421544216442174421844219442204422144222442234422444225442264422744228442294423044231442324423344234442354423644237442384423944240442414424244243442444424544246442474424844249442504425144252442534425444255442564425744258442594426044261442624426344264442654426644267442684426944270442714427244273442744427544276442774427844279442804428144282442834428444285442864428744288442894429044291442924429344294442954429644297442984429944300443014430244303443044430544306443074430844309443104431144312443134431444315443164431744318443194432044321443224432344324443254432644327443284432944330443314433244333443344433544336443374433844339443404434144342443434434444345443464434744348443494435044351443524435344354443554435644357443584435944360443614436244363443644436544366443674436844369443704437144372443734437444375443764437744378443794438044381443824438344384443854438644387443884438944390443914439244393443944439544396443974439844399444004440144402444034440444405444064440744408444094441044411444124441344414444154441644417444184441944420444214442244423444244442544426444274442844429444304443144432444334443444435444364443744438444394444044441444424444344444444454444644447444484444944450444514445244453444544445544456444574445844459444604446144462444634446444465444664446744468444694447044471444724447344474444754447644477444784447944480444814448244483444844448544486444874448844489444904449144492444934449444495444964449744498444994450044501445024450344504445054450644507445084450944510445114451244513445144451544516445174451844519445204452144522445234452444525445264452744528445294453044531445324453344534445354453644537445384453944540445414454244543445444454544546445474454844549445504455144552445534455444555445564455744558445594456044561445624456344564445654456644567445684456944570445714457244573445744457544576445774457844579445804458144582445834458444585445864458744588445894459044591445924459344594445954459644597445984459944600446014460244603446044460544606446074460844609446104461144612446134461444615446164461744618446194462044621446224462344624446254462644627446284462944630446314463244633446344463544636446374463844639446404464144642446434464444645446464464744648446494465044651446524465344654446554465644657446584465944660446614466244663446644466544666446674466844669446704467144672446734467444675446764467744678446794468044681446824468344684446854468644687446884468944690446914469244693446944469544696446974469844699447004470144702447034470444705447064470744708447094471044711447124471344714447154471644717447184471944720447214472244723447244472544726447274472844729447304473144732447334473444735447364473744738447394474044741447424474344744447454474644747447484474944750447514475244753447544475544756447574475844759447604476144762447634476444765447664476744768447694477044771447724477344774447754477644777447784477944780447814478244783447844478544786447874478844789447904479144792447934479444795447964479744798447994480044801448024480344804448054480644807448084480944810448114481244813448144481544816448174481844819448204482144822448234482444825448264482744828448294483044831448324483344834448354483644837448384483944840448414484244843448444484544846448474484844849448504485144852448534485444855448564485744858448594486044861448624486344864448654486644867448684486944870448714487244873448744487544876448774487844879448804488144882448834488444885448864488744888448894489044891448924489344894448954489644897448984489944900449014490244903449044490544906449074490844909449104491144912449134491444915449164491744918449194492044921449224492344924449254492644927449284492944930449314493244933449344493544936449374493844939449404494144942449434494444945449464494744948449494495044951449524495344954449554495644957449584495944960449614496244963449644496544966449674496844969449704497144972449734497444975449764497744978449794498044981449824498344984449854498644987449884498944990449914499244993449944499544996449974499844999450004500145002450034500445005450064500745008450094501045011450124501345014450154501645017450184501945020450214502245023450244502545026450274502845029450304503145032450334503445035450364503745038450394504045041450424504345044450454504645047450484504945050450514505245053450544505545056450574505845059450604506145062450634506445065450664506745068450694507045071450724507345074450754507645077450784507945080450814508245083450844508545086450874508845089450904509145092450934509445095450964509745098450994510045101451024510345104451054510645107451084510945110451114511245113451144511545116451174511845119451204512145122451234512445125451264512745128451294513045131451324513345134451354513645137451384513945140451414514245143451444514545146451474514845149451504515145152451534515445155451564515745158451594516045161451624516345164451654516645167451684516945170451714517245173451744517545176451774517845179451804518145182451834518445185451864518745188451894519045191451924519345194451954519645197451984519945200452014520245203452044520545206452074520845209452104521145212452134521445215452164521745218452194522045221452224522345224452254522645227452284522945230452314523245233452344523545236452374523845239452404524145242452434524445245452464524745248452494525045251452524525345254452554525645257452584525945260452614526245263452644526545266452674526845269452704527145272452734527445275452764527745278452794528045281452824528345284452854528645287452884528945290452914529245293452944529545296452974529845299453004530145302453034530445305453064530745308453094531045311453124531345314453154531645317453184531945320453214532245323453244532545326453274532845329453304533145332453334533445335453364533745338453394534045341453424534345344453454534645347453484534945350453514535245353453544535545356453574535845359453604536145362453634536445365453664536745368453694537045371453724537345374453754537645377453784537945380453814538245383453844538545386453874538845389453904539145392453934539445395453964539745398453994540045401454024540345404454054540645407454084540945410454114541245413454144541545416454174541845419454204542145422454234542445425454264542745428454294543045431454324543345434454354543645437454384543945440454414544245443454444544545446454474544845449454504545145452454534545445455454564545745458454594546045461454624546345464454654546645467454684546945470454714547245473454744547545476454774547845479454804548145482454834548445485454864548745488454894549045491454924549345494454954549645497454984549945500455014550245503455044550545506455074550845509455104551145512455134551445515455164551745518455194552045521455224552345524455254552645527455284552945530455314553245533455344553545536455374553845539455404554145542455434554445545455464554745548455494555045551455524555345554455554555645557455584555945560455614556245563455644556545566455674556845569455704557145572455734557445575455764557745578455794558045581455824558345584455854558645587455884558945590455914559245593455944559545596455974559845599456004560145602456034560445605456064560745608456094561045611456124561345614456154561645617456184561945620456214562245623456244562545626456274562845629456304563145632456334563445635456364563745638456394564045641456424564345644456454564645647456484564945650456514565245653456544565545656456574565845659456604566145662456634566445665456664566745668456694567045671456724567345674456754567645677456784567945680456814568245683456844568545686456874568845689456904569145692456934569445695456964569745698456994570045701457024570345704457054570645707457084570945710457114571245713457144571545716457174571845719457204572145722457234572445725457264572745728457294573045731457324573345734457354573645737457384573945740457414574245743457444574545746457474574845749457504575145752457534575445755457564575745758457594576045761457624576345764457654576645767457684576945770457714577245773457744577545776457774577845779457804578145782457834578445785457864578745788457894579045791457924579345794457954579645797457984579945800458014580245803458044580545806458074580845809458104581145812458134581445815458164581745818458194582045821458224582345824458254582645827458284582945830458314583245833458344583545836458374583845839458404584145842458434584445845458464584745848458494585045851458524585345854458554585645857458584585945860458614586245863458644586545866458674586845869458704587145872458734587445875458764587745878458794588045881458824588345884458854588645887458884588945890458914589245893458944589545896458974589845899459004590145902459034590445905459064590745908459094591045911459124591345914459154591645917459184591945920459214592245923459244592545926459274592845929459304593145932459334593445935459364593745938459394594045941459424594345944459454594645947459484594945950459514595245953459544595545956459574595845959459604596145962459634596445965459664596745968459694597045971459724597345974459754597645977459784597945980459814598245983459844598545986459874598845989459904599145992459934599445995459964599745998459994600046001460024600346004460054600646007460084600946010460114601246013460144601546016460174601846019460204602146022460234602446025460264602746028460294603046031460324603346034460354603646037460384603946040460414604246043460444604546046460474604846049460504605146052460534605446055460564605746058460594606046061460624606346064460654606646067460684606946070460714607246073460744607546076460774607846079460804608146082460834608446085460864608746088460894609046091460924609346094460954609646097460984609946100461014610246103461044610546106461074610846109461104611146112461134611446115461164611746118461194612046121461224612346124461254612646127461284612946130461314613246133461344613546136461374613846139461404614146142461434614446145461464614746148461494615046151461524615346154461554615646157461584615946160461614616246163461644616546166461674616846169461704617146172461734617446175461764617746178461794618046181461824618346184461854618646187461884618946190461914619246193461944619546196461974619846199462004620146202462034620446205462064620746208462094621046211462124621346214462154621646217462184621946220462214622246223462244622546226462274622846229462304623146232462334623446235462364623746238462394624046241462424624346244462454624646247462484624946250462514625246253462544625546256462574625846259462604626146262462634626446265462664626746268462694627046271462724627346274462754627646277462784627946280462814628246283462844628546286462874628846289462904629146292462934629446295462964629746298462994630046301463024630346304463054630646307463084630946310463114631246313463144631546316463174631846319463204632146322463234632446325463264632746328463294633046331463324633346334463354633646337463384633946340463414634246343463444634546346463474634846349463504635146352463534635446355463564635746358463594636046361463624636346364463654636646367463684636946370463714637246373463744637546376463774637846379463804638146382463834638446385463864638746388463894639046391463924639346394463954639646397463984639946400464014640246403464044640546406464074640846409464104641146412464134641446415464164641746418464194642046421464224642346424464254642646427464284642946430464314643246433464344643546436464374643846439464404644146442464434644446445464464644746448464494645046451464524645346454464554645646457464584645946460464614646246463464644646546466464674646846469464704647146472464734647446475464764647746478464794648046481464824648346484464854648646487464884648946490464914649246493464944649546496464974649846499465004650146502465034650446505465064650746508465094651046511465124651346514465154651646517465184651946520465214652246523465244652546526465274652846529465304653146532465334653446535465364653746538465394654046541465424654346544465454654646547465484654946550465514655246553465544655546556465574655846559465604656146562465634656446565465664656746568465694657046571465724657346574465754657646577465784657946580465814658246583465844658546586465874658846589465904659146592465934659446595465964659746598465994660046601466024660346604466054660646607466084660946610466114661246613466144661546616466174661846619466204662146622466234662446625466264662746628466294663046631466324663346634466354663646637466384663946640466414664246643466444664546646466474664846649466504665146652466534665446655466564665746658466594666046661466624666346664466654666646667466684666946670466714667246673466744667546676466774667846679466804668146682466834668446685466864668746688466894669046691466924669346694466954669646697466984669946700467014670246703467044670546706467074670846709467104671146712467134671446715467164671746718467194672046721467224672346724467254672646727467284672946730467314673246733467344673546736467374673846739467404674146742467434674446745467464674746748467494675046751467524675346754467554675646757467584675946760467614676246763467644676546766467674676846769467704677146772467734677446775467764677746778467794678046781467824678346784467854678646787467884678946790467914679246793467944679546796467974679846799468004680146802468034680446805468064680746808468094681046811468124681346814468154681646817468184681946820468214682246823468244682546826468274682846829468304683146832468334683446835468364683746838468394684046841468424684346844468454684646847468484684946850468514685246853468544685546856468574685846859468604686146862468634686446865468664686746868468694687046871468724687346874468754687646877468784687946880468814688246883468844688546886468874688846889468904689146892468934689446895468964689746898468994690046901469024690346904469054690646907469084690946910469114691246913469144691546916469174691846919469204692146922469234692446925469264692746928469294693046931469324693346934469354693646937469384693946940469414694246943469444694546946469474694846949469504695146952469534695446955469564695746958469594696046961469624696346964469654696646967469684696946970469714697246973469744697546976469774697846979469804698146982469834698446985469864698746988469894699046991469924699346994469954699646997469984699947000470014700247003470044700547006470074700847009470104701147012470134701447015470164701747018470194702047021470224702347024470254702647027470284702947030470314703247033470344703547036470374703847039470404704147042470434704447045470464704747048470494705047051470524705347054470554705647057470584705947060470614706247063470644706547066470674706847069470704707147072470734707447075470764707747078470794708047081470824708347084470854708647087470884708947090470914709247093470944709547096470974709847099471004710147102471034710447105471064710747108471094711047111471124711347114471154711647117471184711947120471214712247123471244712547126471274712847129471304713147132471334713447135471364713747138471394714047141471424714347144471454714647147471484714947150471514715247153471544715547156471574715847159471604716147162471634716447165471664716747168471694717047171471724717347174471754717647177471784717947180471814718247183471844718547186471874718847189471904719147192471934719447195471964719747198471994720047201472024720347204472054720647207472084720947210472114721247213472144721547216472174721847219472204722147222472234722447225472264722747228472294723047231472324723347234472354723647237472384723947240472414724247243472444724547246472474724847249472504725147252472534725447255472564725747258472594726047261472624726347264472654726647267472684726947270472714727247273472744727547276472774727847279472804728147282472834728447285472864728747288472894729047291472924729347294472954729647297472984729947300473014730247303473044730547306473074730847309473104731147312473134731447315473164731747318473194732047321473224732347324473254732647327473284732947330473314733247333473344733547336473374733847339473404734147342473434734447345473464734747348473494735047351473524735347354473554735647357473584735947360473614736247363473644736547366473674736847369473704737147372473734737447375473764737747378473794738047381473824738347384473854738647387473884738947390473914739247393473944739547396473974739847399474004740147402474034740447405474064740747408474094741047411474124741347414474154741647417474184741947420474214742247423474244742547426474274742847429474304743147432474334743447435474364743747438474394744047441474424744347444474454744647447474484744947450474514745247453474544745547456474574745847459474604746147462474634746447465474664746747468474694747047471474724747347474474754747647477474784747947480474814748247483474844748547486474874748847489474904749147492474934749447495474964749747498474994750047501475024750347504475054750647507475084750947510475114751247513475144751547516475174751847519475204752147522475234752447525475264752747528475294753047531475324753347534475354753647537475384753947540475414754247543475444754547546475474754847549475504755147552475534755447555475564755747558475594756047561475624756347564475654756647567475684756947570475714757247573475744757547576475774757847579475804758147582475834758447585475864758747588475894759047591475924759347594475954759647597475984759947600476014760247603476044760547606476074760847609476104761147612476134761447615476164761747618476194762047621476224762347624476254762647627476284762947630476314763247633476344763547636476374763847639476404764147642476434764447645476464764747648476494765047651476524765347654476554765647657476584765947660476614766247663476644766547666476674766847669476704767147672476734767447675476764767747678476794768047681476824768347684476854768647687476884768947690476914769247693476944769547696476974769847699477004770147702477034770447705477064770747708477094771047711477124771347714477154771647717477184771947720477214772247723477244772547726477274772847729477304773147732477334773447735477364773747738477394774047741477424774347744477454774647747477484774947750477514775247753477544775547756477574775847759477604776147762477634776447765477664776747768477694777047771477724777347774477754777647777477784777947780477814778247783477844778547786477874778847789477904779147792477934779447795477964779747798477994780047801478024780347804478054780647807478084780947810478114781247813478144781547816478174781847819478204782147822478234782447825478264782747828478294783047831478324783347834478354783647837478384783947840478414784247843478444784547846478474784847849478504785147852478534785447855478564785747858478594786047861478624786347864478654786647867478684786947870478714787247873478744787547876478774787847879478804788147882478834788447885478864788747888478894789047891478924789347894478954789647897478984789947900479014790247903479044790547906479074790847909479104791147912479134791447915479164791747918479194792047921479224792347924479254792647927479284792947930479314793247933479344793547936479374793847939479404794147942479434794447945479464794747948479494795047951479524795347954479554795647957479584795947960479614796247963479644796547966479674796847969479704797147972479734797447975479764797747978479794798047981479824798347984479854798647987479884798947990479914799247993479944799547996479974799847999480004800148002480034800448005480064800748008480094801048011480124801348014480154801648017480184801948020480214802248023480244802548026480274802848029480304803148032480334803448035480364803748038480394804048041480424804348044480454804648047480484804948050480514805248053480544805548056480574805848059480604806148062480634806448065480664806748068480694807048071480724807348074480754807648077480784807948080480814808248083480844808548086480874808848089480904809148092480934809448095480964809748098480994810048101481024810348104481054810648107481084810948110481114811248113481144811548116481174811848119481204812148122481234812448125481264812748128481294813048131481324813348134481354813648137481384813948140481414814248143481444814548146481474814848149481504815148152481534815448155481564815748158481594816048161481624816348164481654816648167481684816948170481714817248173481744817548176481774817848179481804818148182481834818448185481864818748188481894819048191481924819348194481954819648197481984819948200482014820248203482044820548206482074820848209482104821148212482134821448215482164821748218482194822048221482224822348224482254822648227482284822948230482314823248233482344823548236482374823848239482404824148242482434824448245482464824748248482494825048251482524825348254482554825648257482584825948260482614826248263482644826548266482674826848269482704827148272482734827448275482764827748278482794828048281482824828348284482854828648287482884828948290482914829248293482944829548296482974829848299483004830148302483034830448305483064830748308483094831048311483124831348314483154831648317483184831948320483214832248323483244832548326483274832848329483304833148332483334833448335483364833748338483394834048341483424834348344483454834648347483484834948350483514835248353483544835548356483574835848359483604836148362483634836448365483664836748368483694837048371483724837348374483754837648377483784837948380483814838248383483844838548386483874838848389483904839148392483934839448395483964839748398483994840048401484024840348404484054840648407484084840948410484114841248413484144841548416484174841848419484204842148422484234842448425484264842748428484294843048431484324843348434484354843648437484384843948440484414844248443484444844548446484474844848449484504845148452484534845448455484564845748458484594846048461484624846348464484654846648467484684846948470484714847248473484744847548476484774847848479484804848148482484834848448485484864848748488484894849048491484924849348494484954849648497484984849948500485014850248503485044850548506485074850848509485104851148512485134851448515485164851748518485194852048521485224852348524485254852648527485284852948530485314853248533485344853548536485374853848539485404854148542485434854448545485464854748548485494855048551485524855348554485554855648557485584855948560485614856248563485644856548566485674856848569485704857148572485734857448575485764857748578485794858048581485824858348584485854858648587485884858948590485914859248593485944859548596485974859848599486004860148602486034860448605486064860748608486094861048611486124861348614486154861648617486184861948620486214862248623486244862548626486274862848629486304863148632486334863448635486364863748638486394864048641486424864348644486454864648647486484864948650486514865248653486544865548656486574865848659486604866148662486634866448665486664866748668486694867048671486724867348674486754867648677486784867948680486814868248683486844868548686486874868848689486904869148692486934869448695486964869748698486994870048701487024870348704487054870648707487084870948710487114871248713487144871548716487174871848719487204872148722487234872448725487264872748728487294873048731487324873348734487354873648737487384873948740487414874248743487444874548746487474874848749487504875148752487534875448755487564875748758487594876048761487624876348764487654876648767487684876948770487714877248773487744877548776487774877848779487804878148782487834878448785487864878748788487894879048791487924879348794487954879648797487984879948800488014880248803488044880548806488074880848809488104881148812488134881448815488164881748818488194882048821488224882348824488254882648827488284882948830488314883248833488344883548836488374883848839488404884148842488434884448845488464884748848488494885048851488524885348854488554885648857488584885948860488614886248863488644886548866488674886848869488704887148872488734887448875488764887748878488794888048881488824888348884488854888648887488884888948890488914889248893488944889548896488974889848899489004890148902489034890448905489064890748908489094891048911489124891348914489154891648917489184891948920489214892248923489244892548926489274892848929489304893148932489334893448935489364893748938489394894048941489424894348944489454894648947489484894948950489514895248953489544895548956489574895848959489604896148962489634896448965489664896748968489694897048971489724897348974489754897648977489784897948980489814898248983489844898548986489874898848989489904899148992
  1. /*
  2. * Copyright (c) 2010-2021 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  6. *
  7. *
  8. * Permission to use, copy, modify, and/or distribute this software for
  9. * any purpose with or without fee is hereby granted, provided that the
  10. * above copyright notice and this permission notice appear in all
  11. * copies.
  12. *
  13. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  14. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  15. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  16. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  17. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  18. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  19. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  20. * PERFORMANCE OF THIS SOFTWARE.
  21. */
  22. /*
  23. * This file was originally distributed by Qualcomm Atheros, Inc.
  24. * under proprietary terms before Copyright ownership was assigned
  25. * to the Linux Foundation.
  26. */
  27. /**
  28. * @addtogroup WMIAPI
  29. *@{
  30. */
  31. /** @file
  32. * This file specifies the WMI interface for the Software Architecture.
  33. *
  34. * It includes definitions of all the commands and events. Commands are messages
  35. * from the host to the target. Events and Replies are messages from the target
  36. * to the host.
  37. *
  38. * Ownership of correctness in regards to WMI commands
  39. * belongs to the host driver and the target is not required to validate
  40. * parameters for value, proper range, or any other checking.
  41. *
  42. * Guidelines for extending this interface are below.
  43. *
  44. * 1. Add new WMI commands ONLY within the specified range - 0x9000 - 0x9fff
  45. * 2. Use ONLY A_UINT32 type for defining member variables within WMI command/event
  46. * structures. Do not use A_UINT8, A_UINT16, A_BOOL or enum types within these structures.
  47. * 3. DO NOT define bit fields within structures. Implement bit fields using masks
  48. * if necessary. Do not use the programming language's bit field definition.
  49. * 4. Define macros for encode/decode of A_UINT8, A_UINT16 fields within the A_UINT32
  50. * variables. Use these macros for set/get of these fields. Try to use this to
  51. * optimize the structure without bloating it with A_UINT32 variables for every lower
  52. * sized field.
  53. * 5. Do not use PACK/UNPACK attributes for the structures as each member variable is
  54. * already 4-byte aligned by virtue of being a A_UINT32 type.
  55. * 6. Comment each parameter part of the WMI command/event structure by using the
  56. * 2 stars at the beginning of C comment instead of one star to enable HTML document
  57. * generation using Doxygen.
  58. *
  59. */
  60. #ifndef _WMI_UNIFIED_H_
  61. #define _WMI_UNIFIED_H_
  62. #ifdef __cplusplus
  63. extern "C" {
  64. #endif
  65. #include <wlan_defs.h>
  66. #include <wmi_services.h>
  67. /*
  68. * Include the defs of vendor-specific messages (or possibly dummy defs
  69. * if there are no actual vendor-specific message defs).
  70. */
  71. #include <wmi_unified_vendor.h>
  72. /* WMI_VAR_LEN_ARRAY1:
  73. * This macro is for converting the definition of existing variable-length
  74. * arrays within TLV structs of the form "type name[1];" to use the form
  75. * "type name[];" while ensuring that the length of the TLV struct is
  76. * unmodified by the conversion.
  77. * In general, any new variable-length structs should simply use
  78. * "type name[];" directly, rather than using WMI_VAR_LEN_ARRAY1.
  79. * However, if there's a legitimate reason to make the new variable-length
  80. * struct appear to not have a variable length, WMI_VAR_LEN_ARRAY1 can be
  81. * used for this purpose.
  82. */
  83. #if !defined(__KERNEL__)
  84. #define WMI_DUMMY_ZERO_LEN_FIELD A_UINT32 dummy_zero_len_field[0]
  85. #else
  86. /*
  87. * Certain build settings of the Linux kernel don't allow zero-element
  88. * arrays, and C++ doesn't allow zero-length empty structs.
  89. * Confirm that there's no build that combines kernel with C++.
  90. */
  91. #ifdef __cplusplus
  92. #error unsupported combination of kernel and C plus plus
  93. #endif
  94. #define WMI_DUMMY_ZERO_LEN_FIELD struct {} dummy_zero_len_field
  95. #endif
  96. #if defined(__WINDOWS__)
  97. #define WMI_VAR_LEN_ARRAY1(type, name) type name[1]
  98. #else
  99. #define WMI_VAR_LEN_ARRAY1(type, name) \
  100. union { \
  101. type name ## __first_elem; \
  102. struct { \
  103. WMI_DUMMY_ZERO_LEN_FIELD; \
  104. type name[]; \
  105. }; \
  106. }
  107. #endif
  108. #define ATH_MAC_LEN 6 /**< length of MAC in bytes */
  109. #define WMI_EVENT_STATUS_SUCCESS 0 /* Success return status to host */
  110. #define WMI_EVENT_STATUS_FAILURE 1 /* Failure return status to host */
  111. #define MAX_TX_RATE_VALUES 10 /*Max Tx Rates*/
  112. #define MAX_RSSI_VALUES 10 /*Max Rssi values*/
  113. #define WMI_MAX_CHAINS 8
  114. #define WMI_MAX_CHAINS_FOR_AOA_RCC 2
  115. #define WMI_MAX_ADDRESS_SPACE 10
  116. #define MAX_AOA_PHASEDELTA 31 /* 62 gain values */
  117. #define MAX_20MHZ_SEGMENTS 16 /* 320 MHz / 20 MHz = 16 (20 MHz subbands) */
  118. /* The WLAN_MAX_AC macro cannot be changed without breaking
  119. WMI compatibility. */
  120. /* The maximum value of access category */
  121. #define WLAN_MAX_AC 4
  122. #define WMI_MAX_PN_LEN 8
  123. #define MAX_NUM_CQI_USERS_IN_STANDALONE_SND 3
  124. /*
  125. * These don't necessarily belong here; but as the MS/SM macros require
  126. * ar6000_internal.h to be included, it may not be defined as yet.
  127. */
  128. #define WMI_F_MS(_v, _f) \
  129. (((_v) & (_f)) >> (_f##_S))
  130. /*
  131. * This breaks the "good macro practice" of only referencing each
  132. * macro field once (to avoid things like field++ from causing issues.)
  133. */
  134. #define WMI_F_RMW(_var, _v, _f) \
  135. do { \
  136. (_var) &= ~(_f); \
  137. (_var) |= (((_v) << (_f##_S)) & (_f)); \
  138. } while (0)
  139. #define WMI_GET_BITS(_val,_index,_num_bits) \
  140. (((_val) >> (_index)) & (((A_UINT32) 1 << (_num_bits)) - 1))
  141. #define WMI_SET_BITS(_var,_index,_num_bits,_val) do { \
  142. (_var) &= ~((((A_UINT32) 1 << (_num_bits)) - 1) << (_index)); \
  143. (_var) |= (((_val) & (((A_UINT32) 1 << (_num_bits)) - 1)) << (_index)); \
  144. } while (0)
  145. #define WMI_APPEND_TWO_SET_BITS(var, lsb_index, lsb_num_bits, msb_index, msb_num_bits, val) \
  146. do { \
  147. WMI_SET_BITS(var, lsb_index, lsb_num_bits, val); \
  148. WMI_SET_BITS(var, msb_index, msb_num_bits, (val >> lsb_num_bits)); \
  149. } while(0)
  150. #define WMI_APPEND_TWO_GET_BITS(var, lsb_index, lsb_num_bits, msb_index, msb_num_bits, val) \
  151. do { \
  152. (var) = WMI_GET_BITS(val, lsb_index, lsb_num_bits); \
  153. (var) |= (WMI_GET_BITS(val, msb_index, msb_num_bits) << lsb_num_bits); \
  154. } while(0)
  155. /*
  156. * Below GET/SET BITS_ARRAY_LEN32_BYTES macros can be used when
  157. * reading/writing bits which are spread across array_len32 entries.
  158. * These can be used to GET/SET maximum of 32 bits only,
  159. * also array_len32 length should be limited to maximum of 32.
  160. */
  161. #define WMI_GET_BITS_ARRAY_LEN32_BYTES(var, _arrayp, _index, _num_bits) \
  162. do { \
  163. A_UINT8 i; \
  164. for (i = 0; i < _num_bits; i++) { \
  165. (var) |= (WMI_GET_BITS(_arrayp[(_index+i) / 32], ((_index+i) % 32), 1) << i); \
  166. } \
  167. } while(0)
  168. #define WMI_SET_BITS_ARRAY_LEN32_BYTES(_arrayp, _index, _num_bits, val) \
  169. do { \
  170. A_UINT8 i; \
  171. for (i = 0; i < _num_bits; i++) { \
  172. WMI_SET_BITS(_arrayp[(_index+i) / 32], ((_index+i) % 32), 1, (val >> i)); \
  173. } \
  174. } while(0)
  175. /**
  176. * A packed array is an array where each entry in the array is less than
  177. * or equal to 16 bits, and the entries are stuffed into an A_UINT32 array.
  178. * For example, if each entry in the array is 11 bits, then you can stuff
  179. * an array of 4 11-bit values into an array of 2 A_UINT32 values.
  180. * The first 2 11-bit values will be stored in the first A_UINT32,
  181. * and the last 2 11-bit values will be stored in the second A_UINT32.
  182. */
  183. #define WMI_PACKED_ARR_SIZE(num_entries,bits_per_entry) \
  184. (((num_entries) / (32 / (bits_per_entry))) + \
  185. (((num_entries) % (32 / (bits_per_entry))) ? 1 : 0))
  186. #define WMI_RETURN_STRING(str) case ((str)): return (A_UINT8 *)(# str);
  187. static INLINE A_UINT32 wmi_packed_arr_get_bits(A_UINT32 *arr,
  188. A_UINT32 entry_index, A_UINT32 bits_per_entry)
  189. {
  190. A_UINT32 entries_per_uint = (32 / bits_per_entry);
  191. A_UINT32 uint_index = (entry_index / entries_per_uint);
  192. A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
  193. A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
  194. A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
  195. return (arr[uint_index] >> start_bit_in_uint) &
  196. (((A_UINT32) 1 << bits_per_entry) - 1);
  197. }
  198. static INLINE void wmi_packed_arr_set_bits(A_UINT32 *arr, A_UINT32 entry_index,
  199. A_UINT32 bits_per_entry, A_UINT32 val)
  200. {
  201. A_UINT32 entries_per_uint = (32 / bits_per_entry);
  202. A_UINT32 uint_index = (entry_index / entries_per_uint);
  203. A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
  204. A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
  205. A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
  206. arr[uint_index] &=
  207. ~((((A_UINT32) 1 << bits_per_entry) - 1) << start_bit_in_uint);
  208. arr[uint_index] |=
  209. ((val & (((A_UINT32) 1 << bits_per_entry) - 1)) << start_bit_in_uint);
  210. }
  211. /** macro to convert MAC address from WMI word format to char array */
  212. #define WMI_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr,c_macaddr) do { \
  213. (c_macaddr)[0] = (((pwmi_mac_addr)->mac_addr31to0) >> 0) & 0xff; \
  214. (c_macaddr)[1] = (((pwmi_mac_addr)->mac_addr31to0) >> 8) & 0xff; \
  215. (c_macaddr)[2] = (((pwmi_mac_addr)->mac_addr31to0) >> 16) & 0xff; \
  216. (c_macaddr)[3] = (((pwmi_mac_addr)->mac_addr31to0) >> 24) & 0xff; \
  217. (c_macaddr)[4] = (((pwmi_mac_addr)->mac_addr47to32) >> 0) & 0xff; \
  218. (c_macaddr)[5] = (((pwmi_mac_addr)->mac_addr47to32) >> 8) & 0xff; \
  219. } while (0)
  220. /** macro to convert MAC address from char array to WMI word format */
  221. #define WMI_CHAR_ARRAY_TO_MAC_ADDR(c_macaddr,pwmi_mac_addr) do { \
  222. (pwmi_mac_addr)->mac_addr31to0 = \
  223. (((A_UINT32)(c_macaddr)[0] << 0) | \
  224. ((A_UINT32)(c_macaddr)[1] << 8) | \
  225. ((A_UINT32)(c_macaddr)[2] << 16) | \
  226. ((A_UINT32)(c_macaddr)[3] << 24)); \
  227. (pwmi_mac_addr)->mac_addr47to32 = ((c_macaddr)[4] | ((c_macaddr)[5] << 8));\
  228. } while (0)
  229. /** macro to convert generic hash of 6 bytes from WMI word format to char array */
  230. #define WMI_GENERIC_HASH_TO_CHAR_ARRAY(pwmi_generic_hash,c_generic_hash) do { \
  231. (c_generic_hash)[0] = (((pwmi_generic_hash)->generic_hash31to0) >> 0) & 0xff; \
  232. (c_generic_hash)[1] = (((pwmi_generic_hash)->generic_hash31to0) >> 8) & 0xff; \
  233. (c_generic_hash)[2] = (((pwmi_generic_hash)->generic_hash31to0) >> 16) & 0xff; \
  234. (c_generic_hash)[3] = (((pwmi_generic_hash)->generic_hash31to0) >> 24) & 0xff; \
  235. (c_generic_hash)[4] = (((pwmi_generic_hash)->generic_hash47to32) >> 0) & 0xff; \
  236. (c_generic_hash)[5] = (((pwmi_generic_hash)->generic_hash47to32) >> 8) & 0xff; \
  237. } while (0)
  238. /** macro to convert generic hash from char array to WMI word format */
  239. #define WMI_CHAR_ARRAY_TO_GENERIC_HASH(c_generic_hash,pwmi_generic_hash) do { \
  240. (pwmi_generic_hash)->generic_hash31to0 = \
  241. (((A_UINT32)(c_generic_hash)[0] << 0) | \
  242. ((A_UINT32)(c_generic_hash)[1] << 8) | \
  243. ((A_UINT32)(c_generic_hash)[2] << 16) | \
  244. ((A_UINT32)(c_generic_hash)[3] << 24)); \
  245. (pwmi_generic_hash)->generic_hash47to32 = \
  246. ((c_generic_hash)[4] | ((c_generic_hash)[5] << 8)); \
  247. } while (0)
  248. /*
  249. * The below function declarations are for implementations on some
  250. * platforms of the above macros, but in function form, to save code
  251. * memory by avoiding macro-inlining of a non-trivial amount of code.
  252. * These function versions of the above macros may not be available
  253. * on all host and target platforms.
  254. */
  255. void wmi_mac_addr_to_char_array(wmi_mac_addr *pwmi_mac_addr, A_UINT8 *c_macaddr);
  256. void wmi_char_array_to_mac_addr(A_UINT8 *c_macaddr, wmi_mac_addr *pwmi_mac_addr);
  257. /*
  258. * wmi command groups.
  259. */
  260. typedef enum {
  261. /* 0 to 2 are reserved */
  262. WMI_GRP_START = 0x3,
  263. WMI_GRP_SCAN = WMI_GRP_START, /* 0x3 */
  264. WMI_GRP_PDEV, /* 0x4 */
  265. WMI_GRP_VDEV, /* 0x5 */
  266. WMI_GRP_PEER, /* 0x6 */
  267. WMI_GRP_MGMT, /* 0x7 */
  268. WMI_GRP_BA_NEG, /* 0x8 */
  269. WMI_GRP_STA_PS, /* 0x9 */
  270. WMI_GRP_DFS, /* 0xa */
  271. WMI_GRP_ROAM, /* 0xb */
  272. WMI_GRP_OFL_SCAN, /* 0xc */
  273. WMI_GRP_P2P, /* 0xd */
  274. WMI_GRP_AP_PS, /* 0xe */
  275. WMI_GRP_RATE_CTRL, /* 0xf */
  276. WMI_GRP_PROFILE, /* 0x10 */
  277. WMI_GRP_SUSPEND, /* 0x11 */
  278. WMI_GRP_BCN_FILTER, /* 0x12 */
  279. WMI_GRP_WOW, /* 0x13 */
  280. WMI_GRP_RTT, /* 0x14 */
  281. WMI_GRP_SPECTRAL, /* 0x15 */
  282. WMI_GRP_STATS, /* 0x16 */
  283. WMI_GRP_ARP_NS_OFL, /* 0x17 */
  284. WMI_GRP_NLO_OFL, /* 0x18 */
  285. WMI_GRP_GTK_OFL, /* 0x19 */
  286. WMI_GRP_CSA_OFL, /* 0x1a */
  287. WMI_GRP_CHATTER, /* 0x1b */
  288. WMI_GRP_TID_ADDBA, /* 0x1c */
  289. WMI_GRP_MISC, /* 0x1d */
  290. WMI_GRP_GPIO, /* 0x1e */
  291. WMI_GRP_FWTEST, /* 0x1f */
  292. WMI_GRP_TDLS, /* 0x20 */
  293. WMI_GRP_RESMGR, /* 0x21 */
  294. WMI_GRP_STA_SMPS, /* 0x22 */
  295. WMI_GRP_WLAN_HB, /* 0x23 */
  296. WMI_GRP_RMC, /* 0x24 */
  297. WMI_GRP_MHF_OFL, /* 0x25 */
  298. WMI_GRP_LOCATION_SCAN, /* 0x26 */
  299. WMI_GRP_OEM, /* 0x27 */
  300. WMI_GRP_NAN, /* 0x28 */
  301. WMI_GRP_COEX, /* 0x29 */
  302. WMI_GRP_OBSS_OFL, /* 0x2a */
  303. WMI_GRP_LPI, /* 0x2b */
  304. WMI_GRP_EXTSCAN, /* 0x2c */
  305. WMI_GRP_DHCP_OFL, /* 0x2d */
  306. WMI_GRP_IPA, /* 0x2e */
  307. WMI_GRP_MDNS_OFL, /* 0x2f */
  308. WMI_GRP_SAP_OFL, /* 0x30 */
  309. WMI_GRP_OCB, /* 0x31 */
  310. WMI_GRP_SOC, /* 0x32 */
  311. WMI_GRP_PKT_FILTER, /* 0x33 */
  312. WMI_GRP_MAWC, /* 0x34 */
  313. WMI_GRP_PMF_OFFLOAD, /* 0x35 */
  314. WMI_GRP_BPF_OFFLOAD, /* 0x36 Berkeley Packet Filter */
  315. WMI_GRP_NAN_DATA, /* 0x37 */
  316. WMI_GRP_PROTOTYPE, /* 0x38 */
  317. WMI_GRP_MONITOR, /* 0x39 */
  318. WMI_GRP_REGULATORY, /* 0x3a */
  319. WMI_GRP_HW_DATA_FILTER, /* 0x3b */
  320. WMI_GRP_WLM, /* 0x3c WLAN Latency Manager */
  321. WMI_GRP_11K_OFFLOAD, /* 0x3d */
  322. WMI_GRP_TWT, /* 0x3e TWT (Target Wake Time) for STA and AP */
  323. WMI_GRP_MOTION_DET, /* 0x3f */
  324. WMI_GRP_SPATIAL_REUSE, /* 0x40 */
  325. WMI_GRP_ESP, /* 0x41 Estimate Service Parameters (802.11mc) */
  326. WMI_GRP_HPCS_PULSE, /* 0x42 */
  327. WMI_GRP_AUDIO, /* 0x43 */
  328. WMI_GRP_CFR_CAPTURE, /* 0x44 */
  329. WMI_GRP_ATM, /* 0x45 ATM (Air Time Management group) */
  330. WMI_GRP_VENDOR, /* 0x46 vendor specific group */
  331. WMI_GRP_LATENCY, /* 0x47 TID/AC level latency config */
  332. WMI_GRP_MLO, /* 0x48 MLO(Multiple Link Operation) management */
  333. WMI_GRP_SAWF, /* 0x49 SAWF (Service Aware WiFi) */
  334. WMI_GRP_QUIET_OFL, /* 0x4a Quiet offloads */
  335. WMI_GRP_ODD, /* 0x4b ODD */
  336. WMI_GRP_TDMA, /* 0x4c TDMA */
  337. WMI_GRP_MANUAL_UL_TRIG /* 0x4d Manual UL OFDMA Trigger */
  338. } WMI_GRP_ID;
  339. #define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  340. #define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  341. /**
  342. * Command IDs and commange events
  343. */
  344. typedef enum {
  345. /** initialize the wlan sub system */
  346. WMI_INIT_CMDID = 0x1,
  347. /* Scan specific commands */
  348. /** start scan request to FW */
  349. WMI_START_SCAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SCAN),
  350. /** stop scan request to FW */
  351. WMI_STOP_SCAN_CMDID,
  352. /** full list of channels as defined by the regulatory that will be used by scanner */
  353. WMI_SCAN_CHAN_LIST_CMDID,
  354. /** overwrite default priority table in scan scheduler */
  355. WMI_SCAN_SCH_PRIO_TBL_CMDID,
  356. /** This command to adjust the priority and min.max_rest_time
  357. * of an on ongoing scan request.
  358. */
  359. WMI_SCAN_UPDATE_REQUEST_CMDID,
  360. /** set OUI to be used in probe request if enabled */
  361. WMI_SCAN_PROB_REQ_OUI_CMDID,
  362. /** config adaptive dwell scan */
  363. WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID,
  364. /** Only applicable to DBS capable product */
  365. WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID,
  366. /* PDEV(physical device) specific commands */
  367. /** set regulatorty ctl id used by FW to determine the exact ctl power limits */
  368. WMI_PDEV_SET_REGDOMAIN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PDEV),
  369. /** set channel. mainly used for supporting monitor mode */
  370. WMI_PDEV_SET_CHANNEL_CMDID,
  371. /** set pdev specific parameters */
  372. WMI_PDEV_SET_PARAM_CMDID,
  373. /** enable packet log */
  374. WMI_PDEV_PKTLOG_ENABLE_CMDID,
  375. /** disable packet log*/
  376. WMI_PDEV_PKTLOG_DISABLE_CMDID,
  377. /** set wmm parameters */
  378. WMI_PDEV_SET_WMM_PARAMS_CMDID,
  379. /** set HT cap ie that needs to be carried probe requests HT/VHT channels */
  380. WMI_PDEV_SET_HT_CAP_IE_CMDID,
  381. /** set VHT cap ie that needs to be carried on probe requests on VHT channels */
  382. WMI_PDEV_SET_VHT_CAP_IE_CMDID,
  383. /** Command to send the DSCP-to-TID map to the target */
  384. WMI_PDEV_SET_DSCP_TID_MAP_CMDID,
  385. /** set quiet ie parameters. primarily used in AP mode */
  386. WMI_PDEV_SET_QUIET_MODE_CMDID,
  387. /** Enable/Disable Green AP Power Save */
  388. WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
  389. /** get TPC config for the current operating channel */
  390. WMI_PDEV_GET_TPC_CONFIG_CMDID,
  391. /** set the base MAC address for the physical device before a VDEV is created.
  392. * For firmware that doesn't support this feature and this command, the pdev
  393. * MAC address will not be changed. */
  394. WMI_PDEV_SET_BASE_MACADDR_CMDID,
  395. /* eeprom content dump , the same to bdboard data */
  396. WMI_PDEV_DUMP_CMDID,
  397. /* set LED configuration */
  398. WMI_PDEV_SET_LED_CONFIG_CMDID,
  399. /* Get Current temperature of chip in Celcius degree*/
  400. WMI_PDEV_GET_TEMPERATURE_CMDID,
  401. /* Set LED flashing behavior */
  402. WMI_PDEV_SET_LED_FLASHING_CMDID,
  403. /** Enable/Disable Smart Antenna */
  404. WMI_PDEV_SMART_ANT_ENABLE_CMDID,
  405. /** Set Smart Antenna RX antenna*/
  406. WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
  407. /** Override the antenna switch table */
  408. WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
  409. /** Override the CTL table */
  410. WMI_PDEV_SET_CTL_TABLE_CMDID,
  411. /** Override the array gain table */
  412. WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID,
  413. /** FIPS test mode command */
  414. WMI_PDEV_FIPS_CMDID,
  415. /** get CCK ANI level */
  416. WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID,
  417. /** get OFDM ANI level */
  418. WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID,
  419. /** NF Cal Power dBr/dBm */
  420. WMI_PDEV_GET_NFCAL_POWER_CMDID,
  421. /** TxPPDU TPC */
  422. WMI_PDEV_GET_TPC_CMDID,
  423. /** Set to enable MIB stats collection */
  424. WMI_MIB_STATS_ENABLE_CMDID,
  425. /** Set preferred channel list for DBS Mgr */
  426. WMI_PDEV_SET_PCL_CMDID,
  427. /** Set HW mode. Eg: single MAC, DBS & SBS, see soc_hw_mode_t for values */
  428. WMI_PDEV_SET_HW_MODE_CMDID,
  429. /** Set DFS, SCAN modes and other FW configurations */
  430. WMI_PDEV_SET_MAC_CONFIG_CMDID,
  431. /** Set per band and per pdev antenna chains */
  432. WMI_PDEV_SET_ANTENNA_MODE_CMDID,
  433. /** Periodic channel stats request command */
  434. WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID,
  435. /** WMI command for power debug framework */
  436. WMI_PDEV_WAL_POWER_DEBUG_CMDID,
  437. /** set per-AC rx reorder timeouts */
  438. WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID,
  439. /** WMI command for WOW gpio and type */
  440. WMI_PDEV_SET_WAKEUP_CONFIG_CMDID,
  441. /* Get current ANT's per chain's RSSI info */
  442. WMI_PDEV_GET_ANTDIV_STATUS_CMDID,
  443. /** WMI command for getting Chip Power Stats */
  444. WMI_PDEV_GET_CHIP_POWER_STATS_CMDID,
  445. /** set stats reporting thresholds - see WMI_REPORT_STATS_EVENTID */
  446. WMI_PDEV_SET_STATS_THRESHOLD_CMDID,
  447. /** vdev restart request for multiple vdevs */
  448. WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID,
  449. /** Pdev update packet routing command */
  450. WMI_PDEV_UPDATE_PKT_ROUTING_CMDID,
  451. /** Get Calibration data version details */
  452. WMI_PDEV_CHECK_CAL_VERSION_CMDID,
  453. /** Set Diversity Gain */
  454. WMI_PDEV_SET_DIVERSITY_GAIN_CMDID,
  455. /** Get chain RSSI and antena index command */
  456. WMI_PDEV_DIV_GET_RSSI_ANTID_CMDID,
  457. /** get bss chan info */
  458. WMI_PDEV_BSS_CHAN_INFO_REQUEST_CMDID,
  459. /** update pmk cache info */
  460. WMI_PDEV_UPDATE_PMK_CACHE_CMDID,
  461. /** update fils HLP */
  462. WMI_PDEV_UPDATE_FILS_HLP_PKT_CMDID,
  463. /** update ctltable request **/
  464. WMI_PDEV_UPDATE_CTLTABLE_REQUEST_CMDID,
  465. /** Command to set beacon OUI **/
  466. WMI_PDEV_CONFIG_VENDOR_OUI_ACTION_CMDID,
  467. /** enable/disable per-AC tx queue optimizations */
  468. WMI_PDEV_SET_AC_TX_QUEUE_OPTIMIZED_CMDID,
  469. /** enable/disable rx promiscuous mode */
  470. WMI_PDEV_SET_RX_FILTER_PROMISCUOUS_CMDID,
  471. /* set a generic direct DMA ring config */
  472. WMI_PDEV_DMA_RING_CFG_REQ_CMDID,
  473. /* enable/disable Action frame response as HE TB PPDU */
  474. WMI_PDEV_HE_TB_ACTION_FRM_CMDID,
  475. /** filter packet log based on MAC address */
  476. WMI_PDEV_PKTLOG_FILTER_CMDID,
  477. /** wmi command for setting rogue ap configuration */
  478. WMI_PDEV_SET_RAP_CONFIG_CMDID,
  479. /** Specify DSM filters along with disallow bssid filters */
  480. WMI_PDEV_DSM_FILTER_CMDID,
  481. /** enable/disable periodic frame injection */
  482. WMI_PDEV_FRAME_INJECT_CMDID,
  483. /*
  484. * Pdev level command to:
  485. * a) solicit @WMI_TBTTOFFSET_EXT_UPDATE_EVENTID having TBTT in qtime
  486. * domain for all active vdevs or
  487. * b) update one pdevs tbtt offset to another pdev for use in
  488. * RNR TBTT offset calculation.
  489. */
  490. WMI_PDEV_TBTT_OFFSET_SYNC_CMDID,
  491. /** Bss color bitmap for SRG based spatial reuse feature */
  492. WMI_PDEV_SET_SRG_BSS_COLOR_BITMAP_CMDID,
  493. /** Partial BSSID bitmap for SRG based spatial reuse feature */
  494. WMI_PDEV_SET_SRG_PARTIAL_BSSID_BITMAP_CMDID,
  495. /** OBSS color enable bitmap for SRG based spatial reuse feature */
  496. WMI_PDEV_SET_SRG_OBSS_COLOR_ENABLE_BITMAP_CMDID,
  497. /** OBSS BSSID enable bitmap for SRG based spatial reuse feature */
  498. WMI_PDEV_SET_SRG_OBSS_BSSID_ENABLE_BITMAP_CMDID,
  499. /** OBSS color enable bitmap for NON_SRG based spatial reuse feature */
  500. WMI_PDEV_SET_NON_SRG_OBSS_COLOR_ENABLE_BITMAP_CMDID,
  501. /** OBSS BSSID enable bitmap for NON_SRG based spatial reuse feature */
  502. WMI_PDEV_SET_NON_SRG_OBSS_BSSID_ENABLE_BITMAP_CMDID,
  503. /** TPC stats display command */
  504. WMI_PDEV_GET_TPC_STATS_CMDID,
  505. /** ENABLE/DISABLE Duration based tx mode selection */
  506. WMI_PDEV_ENABLE_DURATION_BASED_TX_MODE_SELECTION_CMDID,
  507. /* Get DPD status from HALPHY */
  508. WMI_PDEV_GET_DPD_STATUS_CMDID,
  509. /* Set bios sar table */
  510. WMI_PDEV_SET_BIOS_SAR_TABLE_CMDID,
  511. /* Set bios geo table */
  512. WMI_PDEV_SET_BIOS_GEO_TABLE_CMDID,
  513. /* Get Calibration status from HALPHY */
  514. WMI_PDEV_GET_HALPHY_CAL_STATUS_CMDID,
  515. /* Set HALPHY CAL bitmap */
  516. WMI_PDEV_SET_HALPHY_CAL_BMAP_CMDID,
  517. /* WMI cmd to set a single vdev param for multiple vdevs */
  518. WMI_PDEV_MULTIPLE_VDEV_SET_PARAM_CMDID,
  519. /* Configure MEC AGING TIMER */
  520. WMI_PDEV_MEC_AGING_TIMER_CONFIG_CMDID,
  521. /* Set bios interface table */
  522. WMI_PDEV_SET_BIOS_INTERFACE_CMDID,
  523. WMI_PDEV_FIPS_EXTEND_CMDID,
  524. WMI_PDEV_FIPS_MODE_SET_CMDID,
  525. WMI_PDEV_FEATURESET_CMDID,
  526. /** tag as Filter Pass category and the filters set for FP mode */
  527. WMI_PDEV_MESH_RX_FILTER_ENABLE_CMDID,
  528. /* WMI cmd to set Target rate to power table */
  529. WMI_PDEV_SET_TGTR2P_TABLE_CMDID,
  530. /* WMI cmd to set RF path for PHY */
  531. WMI_PDEV_SET_RF_PATH_CMDID,
  532. /** WSI stats info WMI command */
  533. WMI_PDEV_WSI_STATS_INFO_CMDID,
  534. /*
  535. * WMI cmd to Enable LED blink based on Tx+Rx Data Rate
  536. * and download LED ON/OFF Rate table
  537. */
  538. WMI_PDEV_ENABLE_LED_BLINK_DOWNLOAD_TABLE_CMDID,
  539. /** WMI Command to enable wifi radar */
  540. WMI_PDEV_ENABLE_WIFI_RADAR_CMDID,
  541. /* WMI Command to enable xLNA */
  542. WMI_PDEV_ENABLE_XLNA_CMDID,
  543. /**
  544. * WMI cmd to set custom TX power backoff value per band/chain/MCS to PHY.
  545. */
  546. WMI_PDEV_SET_CUSTOM_TX_POWER_PER_MCS_CMDID,
  547. /* VDEV (virtual device) specific commands */
  548. /** vdev create */
  549. WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VDEV),
  550. /** vdev delete */
  551. WMI_VDEV_DELETE_CMDID,
  552. /** vdev start request */
  553. WMI_VDEV_START_REQUEST_CMDID,
  554. /** vdev restart request (RX only, NO TX, used for CAC period)*/
  555. WMI_VDEV_RESTART_REQUEST_CMDID,
  556. /** vdev up request */
  557. WMI_VDEV_UP_CMDID,
  558. /** vdev stop request */
  559. WMI_VDEV_STOP_CMDID,
  560. /** vdev down request */
  561. WMI_VDEV_DOWN_CMDID,
  562. /* set a vdev param */
  563. WMI_VDEV_SET_PARAM_CMDID,
  564. /* set a key (used for setting per peer unicast and per vdev multicast) */
  565. WMI_VDEV_INSTALL_KEY_CMDID,
  566. /* wnm sleep mode command */
  567. WMI_VDEV_WNM_SLEEPMODE_CMDID,
  568. WMI_VDEV_WMM_ADDTS_CMDID,
  569. WMI_VDEV_WMM_DELTS_CMDID,
  570. WMI_VDEV_SET_WMM_PARAMS_CMDID,
  571. WMI_VDEV_SET_GTX_PARAMS_CMDID,
  572. WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID,
  573. WMI_VDEV_PLMREQ_START_CMDID,
  574. WMI_VDEV_PLMREQ_STOP_CMDID,
  575. /* TSF timestamp action for specified vdev */
  576. WMI_VDEV_TSF_TSTAMP_ACTION_CMDID,
  577. /** set the additional IEs in probe requests for scan or
  578. * assoc req etc for frames FW locally generates */
  579. WMI_VDEV_SET_IE_CMDID,
  580. WMI_VDEV_RATEMASK_CMDID,
  581. /** ATF VDEV REQUEST commands. */
  582. WMI_VDEV_ATF_REQUEST_CMDID,
  583. /** Command to send the DSCP-to-TID map to the target for VAP */
  584. WMI_VDEV_SET_DSCP_TID_MAP_CMDID,
  585. /* Configure filter for Neighbor Rx Pkt (smart mesh selective listening) */
  586. WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID,
  587. /** set quiet ie parameters. primarily used in AP mode */
  588. WMI_VDEV_SET_QUIET_MODE_CMDID,
  589. /** To set custom aggregation size for per vdev */
  590. WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID,
  591. /* DISA feature: Encrypt-decrypt data request */
  592. WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID,
  593. /** Command to enable mac randomizaton **/
  594. WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID,
  595. /** WMI commands related to dbg arp stats */
  596. WMI_VDEV_SET_ARP_STAT_CMDID,
  597. WMI_VDEV_GET_ARP_STAT_CMDID,
  598. /** get tx power for the current vdev */
  599. WMI_VDEV_GET_TX_POWER_CMDID,
  600. /* limit STA offchannel activity */
  601. WMI_VDEV_LIMIT_OFFCHAN_CMDID,
  602. /** To set custom software retries per-AC for vdev */
  603. WMI_VDEV_SET_CUSTOM_SW_RETRY_TH_CMDID,
  604. /** To set chainmask configuration for vdev */
  605. WMI_VDEV_CHAINMASK_CONFIG_CMDID,
  606. WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID,
  607. /* request LTE-Coex info */
  608. WMI_VDEV_GET_MWS_COEX_INFO_CMDID,
  609. /** delete all peer (excluding bss peer) */
  610. WMI_VDEV_DELETE_ALL_PEER_CMDID,
  611. /* To set bss max idle time related parameters */
  612. WMI_VDEV_BSS_MAX_IDLE_TIME_CMDID,
  613. /** Indicates FW to trigger Audio sync */
  614. WMI_VDEV_AUDIO_SYNC_TRIGGER_CMDID,
  615. /** Gives Qtimer value to FW */
  616. WMI_VDEV_AUDIO_SYNC_QTIMER_CMDID,
  617. /** Preferred channel list for each vdev */
  618. WMI_VDEV_SET_PCL_CMDID,
  619. /** VDEV_GET_BIG_DATA_CMD IS DEPRECATED - DO NOT USE */
  620. WMI_VDEV_GET_BIG_DATA_CMDID,
  621. /** Get per vdev BIG DATA stats phase 2 */
  622. WMI_VDEV_GET_BIG_DATA_P2_CMDID,
  623. /** set TPC PSD/non-PSD power */
  624. WMI_VDEV_SET_TPC_POWER_CMDID,
  625. /** IGMP OFFLOAD */
  626. WMI_VDEV_IGMP_OFFLOAD_CMDID,
  627. /** Enable/Disable Intra Bss for each vdev */
  628. WMI_VDEV_ENABLE_DISABLE_INTRA_BSS_CMDID,
  629. /* set vdev mu sniffer param */
  630. WMI_VDEV_SET_MU_SNIF_CMDID,
  631. /** ICMP OFFLOAD */
  632. WMI_VDEV_ICMP_OFFLOAD_CMDID,
  633. /** Update vdev mac address */
  634. WMI_VDEV_UPDATE_MAC_ADDR_CMDID,
  635. /* WMI cmd to perform operation on multiple peer based on subcmd type */
  636. WMI_VDEV_MULTIPLE_PEER_GROUP_CMDID,
  637. /** Set LTF key seed which will be further used to derive LTF keys */
  638. WMI_VDEV_SET_LTF_KEY_SEED_CMDID,
  639. WMI_VDEV_PN_MGMT_RX_FILTER_CMDID,
  640. /** Enable SR prohibit feature for TIDs of vdev */
  641. WMI_VDEV_PARAM_ENABLE_SR_PROHIBIT_CMDID,
  642. /** pause vdev's Tx, Rx, or both for a specific duration */
  643. WMI_VDEV_PAUSE_CMDID,
  644. /** WMI Command to set status of CSA event from HOST */
  645. WMI_CSA_EVENT_STATUS_INDICATION_CMDID,
  646. /** Request to firmware to probe scheduler modes */
  647. WMI_VDEV_SCHED_MODE_PROBE_REQ_CMDID,
  648. /** Connect request on the vdev */
  649. WMI_VDEV_OOB_CONNECTION_REQ_CMDID,
  650. /**
  651. * WMI command to inform the target of the AP's operating bandwidth
  652. * (only applicable for STA vdev)
  653. */
  654. WMI_VDEV_REPORT_AP_OPER_BW_CMDID,
  655. /* peer specific commands */
  656. /** create a peer */
  657. WMI_PEER_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PEER),
  658. /** delete a peer */
  659. WMI_PEER_DELETE_CMDID,
  660. /** flush specific tid queues of a peer */
  661. WMI_PEER_FLUSH_TIDS_CMDID,
  662. /** set a parameter of a peer */
  663. WMI_PEER_SET_PARAM_CMDID,
  664. /** set peer to associated state. will cary all parameters determined during assocication time */
  665. WMI_PEER_ASSOC_CMDID,
  666. /**add a wds (4 address) entry. used only for testing WDS feature on AP products */
  667. WMI_PEER_ADD_WDS_ENTRY_CMDID,
  668. /**remove wds (4 address) entry. used only for testing WDS feature on AP products */
  669. WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
  670. /** set up mcast group info for multicast to unicast conversion */
  671. WMI_PEER_MCAST_GROUP_CMDID,
  672. /** request peer info from FW. FW shall respond with PEER_INFO_EVENTID */
  673. WMI_PEER_INFO_REQ_CMDID,
  674. /** request the estimated link speed for the peer. FW shall respond with
  675. * WMI_PEER_ESTIMATED_LINKSPEED_EVENTID.
  676. */
  677. WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID,
  678. /** Set the conditions to report peer justified rate to driver
  679. * The justified rate means the user-rate is justified by PER.
  680. */
  681. WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID,
  682. /** update a wds (4 address) entry */
  683. WMI_PEER_UPDATE_WDS_ENTRY_CMDID,
  684. /** add a proxy sta entry */
  685. WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID,
  686. /** Set Smart Antenna TX antenna */
  687. WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
  688. /** Set Smart Antenna TX train info */
  689. WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
  690. /** Set SA node config options */
  691. WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
  692. /** ATF PEER REQUEST commands */
  693. WMI_PEER_ATF_REQUEST_CMDID,
  694. /** bandwidth fairness (BWF) peer configuration request command */
  695. WMI_PEER_BWF_REQUEST_CMDID,
  696. /** rx reorder queue setup for peer/tid */
  697. WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
  698. /** rx reorder queue remove for peer/tid */
  699. WMI_PEER_REORDER_QUEUE_REMOVE_CMDID,
  700. /** specify a limit for rx A-MPDU block size */
  701. WMI_PEER_SET_RX_BLOCKSIZE_CMDID,
  702. /** request peer antdiv info from FW. FW shall respond with PEER_ANTDIV_INFO_EVENTID */
  703. WMI_PEER_ANTDIV_INFO_REQ_CMDID,
  704. /*
  705. * The WMI_PEER_OPER_MODE_CHANGE_EVENTID def was originally mistakenly
  706. * placed here, amongst the CMDID defs.
  707. * The WMI_PEER_OPER_MODE_CHANGE_EVENTID def has been moved to the
  708. * EVENTID section, but to preserve backwards compatibility, the value
  709. * here that had been used for WMI_PEER_OPER_MODE_CHANGE_EVENTID
  710. * is kept reserved/deprecated.
  711. *
  712. * This WMI_PEER_RESERVED0_CMDID value can be replaced with an actual
  713. * WMI peer event message ID, though it will be simpler to instead add
  714. * new WMI_PEER CMDID defs at the end of the WMI_GRP_PEER WMI_CMD_GRP.
  715. */
  716. WMI_PEER_RESERVED0_CMDID,
  717. /** Peer/Tid/Msduq threshold update */
  718. WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID,
  719. /** TID specific configurations per peer of type
  720. * wmi_peer_tid_configurations_cmd_fixed_param
  721. */
  722. WMI_PEER_TID_CONFIGURATIONS_CMDID,
  723. /** Peer configuration for Channel Frequency Response (CFR) capture
  724. * of type wmi_peer_cfr_capture_cmd.
  725. *
  726. * On targets that do not use the direct DMA framework,
  727. * completion of the CFR capture is communicated through
  728. * HTT_T2H_MSG_TYPE_CFR_DUMP_COMPL_IND.
  729. * Such targets will set WMI_SERVICE_CFR_CAPTURE_IND_MSG_TYPE_1
  730. * in WMI Service Ready.
  731. *
  732. * On targets that use direct DMA, completion of CFR capture is
  733. * communicated through WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID
  734. * using module ID WMI_DMA_RING_CONFIG_MODULE_RTT.
  735. * Such targets will set WMI_SERVICE_CFR_CAPTURE_IND_EVT_TYPE_1
  736. * in WMI Service Ready and enumerate WMI_DMA_RING_CONFIG_MODULE_RTT
  737. * in the dma_ring_caps entry of WMI_SERVICE_READY_EXT_EVENTID.
  738. * Additional MAC metadata is provided in WMI_PEER_CFR_CAPTURE_EVENTID.
  739. */
  740. WMI_PEER_CFR_CAPTURE_CMDID,
  741. /** WMI command related to AP channel width switching */
  742. WMI_PEER_CHAN_WIDTH_SWITCH_CMDID,
  743. /** WMI command to fetch current tx PN for the peer */
  744. WMI_PEER_TX_PN_REQUEST_CMDID,
  745. /** unmap response with peer ids */
  746. WMI_PEER_UNMAP_RESPONSE_CMDID,
  747. /** WMI command for per-peer configuration of VLAN header operations
  748. * during TX and RX
  749. */
  750. WMI_PEER_CONFIG_VLAN_CMDID,
  751. /** WMI command for per-peer configuration of PPE DS */
  752. WMI_PEER_CONFIG_PPE_DS_CMDID,
  753. /** Enable/Disable Intra Bss for the peer */
  754. WMI_PEER_ENABLE_DISABLE_INTRA_BSS_CMDID,
  755. WMI_PEER_RX_PN_REQUEST_CMDID,
  756. /* Mac addr based filtering*/
  757. WMI_PEER_TX_FILTER_CMDID,
  758. /** flush specific tid queues of a peer */
  759. WMI_PEER_FLUSH_POLICY_CMDID,
  760. /* Set disabled scheduler modes for one or more peers */
  761. WMI_PEER_SCHED_MODE_DISABLE_CMDID,
  762. /* Group SET cmd for PEERS */
  763. WMI_PEER_BULK_SET_CMDID,
  764. /* WMI command to setup reorder queue for multiple TIDs */
  765. WMI_PEER_MULTIPLE_REORDER_QUEUE_SETUP_CMDID,
  766. /* beacon/management specific commands */
  767. /** transmit beacon by reference . used for transmitting beacon on low latency interface like pcie */
  768. WMI_BCN_TX_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MGMT),
  769. /** transmit beacon by value */
  770. WMI_PDEV_SEND_BCN_CMDID,
  771. /** set the beacon template. used in beacon offload mode to setup the
  772. * the common beacon template with the FW to be used by FW to generate beacons */
  773. WMI_BCN_TMPL_CMDID,
  774. /** set beacon filter with FW */
  775. WMI_BCN_FILTER_RX_CMDID,
  776. /* enable/disable filtering of probe requests in the firmware */
  777. WMI_PRB_REQ_FILTER_RX_CMDID,
  778. /** transmit management frame by value. will be deprecated */
  779. WMI_MGMT_TX_CMDID,
  780. /** set the probe response template. used in beacon offload mode to setup the
  781. * the common probe response template with the FW to be used by FW to generate
  782. * probe responses */
  783. WMI_PRB_TMPL_CMDID,
  784. /** Transmit Mgmt frame by reference */
  785. WMI_MGMT_TX_SEND_CMDID,
  786. /** Transmit data frame by reference */
  787. WMI_OFFCHAN_DATA_TX_SEND_CMDID,
  788. /** transmit FILS Discovery frame by value */
  789. WMI_PDEV_SEND_FD_CMDID,
  790. /** Cmd to enable/disable offloaded beacons */
  791. WMI_BCN_OFFLOAD_CTRL_CMDID,
  792. /** Cmd to enable FW handling BSS color change notification from AP. */
  793. WMI_BSS_COLOR_CHANGE_ENABLE_CMDID,
  794. /** To configure Beacon offload quiet-ie params */
  795. WMI_VDEV_BCN_OFFLOAD_QUIET_CONFIG_CMDID,
  796. /** set FILS Discovery frame template for FW to generate FD frames */
  797. WMI_FD_TMPL_CMDID,
  798. /** Transmit QoS null Frame over wmi interface */
  799. WMI_QOS_NULL_FRAME_TX_SEND_CMDID,
  800. /** WMI CMD to receive the management filter criteria from the host for RX REO */
  801. WMI_MGMT_RX_REO_FILTER_CONFIGURATION_CMDID,
  802. /** commands to directly control ba negotiation directly from host. only used in test mode */
  803. /** turn off FW Auto addba mode and let host control addba */
  804. WMI_ADDBA_CLEAR_RESP_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BA_NEG),
  805. /** send add ba request */
  806. WMI_ADDBA_SEND_CMDID,
  807. WMI_ADDBA_STATUS_CMDID,
  808. /** send del ba */
  809. WMI_DELBA_SEND_CMDID,
  810. /** set add ba response will be used by FW to generate addba response*/
  811. WMI_ADDBA_SET_RESP_CMDID,
  812. /** send single VHT MPDU with AMSDU */
  813. WMI_SEND_SINGLEAMSDU_CMDID,
  814. /** Station power save specific config */
  815. /** enable/disable station powersave */
  816. WMI_STA_POWERSAVE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_PS),
  817. /** set station power save specific parameter */
  818. WMI_STA_POWERSAVE_PARAM_CMDID,
  819. /** set station mimo powersave mode */
  820. WMI_STA_MIMO_PS_MODE_CMDID,
  821. /** config station TX cycle percentage in a beacon interval */
  822. WMI_STA_TDCC_CONFIG_CMDID,
  823. /** DFS-specific commands */
  824. /** enable DFS (radar detection)*/
  825. WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DFS),
  826. /** disable DFS (radar detection)*/
  827. WMI_PDEV_DFS_DISABLE_CMDID,
  828. /** enable DFS phyerr/parse filter offload */
  829. WMI_DFS_PHYERR_FILTER_ENA_CMDID,
  830. /** enable DFS phyerr/parse filter offload */
  831. WMI_DFS_PHYERR_FILTER_DIS_CMDID,
  832. /** enable DFS phyerr processing offload */
  833. WMI_PDEV_DFS_PHYERR_OFFLOAD_ENABLE_CMDID,
  834. /** disable DFS phyerr processing offload */
  835. WMI_PDEV_DFS_PHYERR_OFFLOAD_DISABLE_CMDID,
  836. /** set ADFS channel config */
  837. WMI_VDEV_ADFS_CH_CFG_CMDID,
  838. /** abort ADFS off-channel-availability-check currently in progress */
  839. WMI_VDEV_ADFS_OCAC_ABORT_CMDID,
  840. /* Roaming specific commands */
  841. /** set roam scan mode */
  842. WMI_ROAM_SCAN_MODE = WMI_CMD_GRP_START_ID(WMI_GRP_ROAM),
  843. /** set roam scan RSSI threshold below which roam scan is enabled */
  844. WMI_ROAM_SCAN_RSSI_THRESHOLD,
  845. /** set roam scan period for periodic roam scan mode */
  846. WMI_ROAM_SCAN_PERIOD,
  847. /** set roam scan trigger RSSI change threshold */
  848. WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
  849. /** set roam AP profile */
  850. WMI_ROAM_AP_PROFILE,
  851. /** set channel list for roam scans */
  852. WMI_ROAM_CHAN_LIST,
  853. /** Stop scan command */
  854. WMI_ROAM_SCAN_CMD,
  855. /** roaming sme offload sync complete */
  856. WMI_ROAM_SYNCH_COMPLETE,
  857. /** set ric request element for 11r roaming */
  858. WMI_ROAM_SET_RIC_REQUEST_CMDID,
  859. /** Invoke roaming forcefully */
  860. WMI_ROAM_INVOKE_CMDID,
  861. /** roaming filter cmd to allow further filtering of roaming candidate */
  862. WMI_ROAM_FILTER_CMDID,
  863. /** set gateway ip, mac and retries for subnet change detection */
  864. WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID,
  865. /** configure thresholds for MAWC */
  866. WMI_ROAM_CONFIGURE_MAWC_CMDID,
  867. /** configure MultiBand Operation(refer WFA MBO spec) parameter */
  868. WMI_ROAM_SET_MBO_PARAM_CMDID, /* DEPRECATED */
  869. /** configure packet error rate threshold for triggering roaming */
  870. WMI_ROAM_PER_CONFIG_CMDID,
  871. /** configure BSS Transition Management (BTM) offload for roaming */
  872. WMI_ROAM_BTM_CONFIG_CMDID,
  873. /** Enable or Disable Fast Initial Link Setup (FILS) feature */
  874. WMI_ENABLE_FILS_CMDID,
  875. /** Request for roam scan stats */
  876. WMI_REQUEST_ROAM_SCAN_STATS_CMDID,
  877. /** Configure BSS load parameters for roam trigger */
  878. WMI_ROAM_BSS_LOAD_CONFIG_CMDID,
  879. /** Configure deauth roam trigger parameters */
  880. WMI_ROAM_DEAUTH_CONFIG_CMDID,
  881. /** Configure idle roam trigger parameters */
  882. WMI_ROAM_IDLE_CONFIG_CMDID,
  883. /**
  884. * WMI_ROAM_DSM_FILTER_CMDID is deprecated and should be unused,
  885. * but leave it reserved just to be safe.
  886. */
  887. DEPRECATED__WMI_ROAM_DSM_FILTER_CMDID,
  888. /** Enable or disable roaming triggers */
  889. WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON_CMDID,
  890. /** Pre-Authentication completion status command */
  891. WMI_ROAM_PREAUTH_STATUS_CMDID,
  892. /** Command to get roam scan channels list */
  893. WMI_ROAM_GET_SCAN_CHANNEL_LIST_CMDID,
  894. /** configure MLO parameters for roaming */
  895. WMI_ROAM_MLO_CONFIG_CMDID,
  896. /** set roam params **/
  897. WMI_ROAM_SET_PARAM_CMDID,
  898. /** Enable or Disable roam vendor control */
  899. WMI_ROAM_ENABLE_VENDOR_CONTROL_CMDID,
  900. /** Get firmware ini value */
  901. WMI_ROAM_GET_VENDOR_CONTROL_PARAM_CMDID,
  902. /** offload scan specific commands */
  903. /** set offload scan AP profile */
  904. WMI_OFL_SCAN_ADD_AP_PROFILE = WMI_CMD_GRP_START_ID(WMI_GRP_OFL_SCAN),
  905. /** remove offload scan AP profile */
  906. WMI_OFL_SCAN_REMOVE_AP_PROFILE,
  907. /** set offload scan period */
  908. WMI_OFL_SCAN_PERIOD,
  909. /* P2P specific commands */
  910. /**set P2P device info. FW will used by FW to create P2P IE to be carried in probe response
  911. * generated during p2p listen and for p2p discoverability */
  912. WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP_START_ID(WMI_GRP_P2P),
  913. /** enable/disable p2p discoverability on STA/AP VDEVs */
  914. WMI_P2P_DEV_SET_DISCOVERABILITY,
  915. /** set p2p ie to be carried in beacons generated by FW for GO */
  916. WMI_P2P_GO_SET_BEACON_IE,
  917. /** set p2p ie to be carried in probe response frames generated by FW for GO */
  918. WMI_P2P_GO_SET_PROBE_RESP_IE,
  919. /** set the vendor specific p2p ie data. FW will use this to parse the P2P NoA
  920. * attribute in the beacons/probe responses received.
  921. * Note: This command is currently used only for Apple P2P implementation.
  922. */
  923. WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
  924. /** set the configure of p2p find offload */
  925. WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID,
  926. /** set the vendor specific p2p ie data for p2p find offload using */
  927. WMI_P2P_DISC_OFFLOAD_APPIE_CMDID,
  928. /** set the BSSID/device name pattern of p2p find offload */
  929. WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID,
  930. /** set OppPS related parameters **/
  931. WMI_P2P_SET_OPPPS_PARAM_CMDID,
  932. /** set listen offload start related parameters */
  933. WMI_P2P_LISTEN_OFFLOAD_START_CMDID,
  934. /** set listen offload stop related parameters */
  935. WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID,
  936. /** set DFS master AP configuration */
  937. WMI_P2P_GO_DFS_AP_CONFIG_CMDID,
  938. /** AP power save specific config */
  939. /** set AP power save specific param */
  940. WMI_AP_PS_PEER_PARAM_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_AP_PS),
  941. /** set AP UAPSD coex specific param */
  942. WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
  943. /** set Enhanced Green AP param */
  944. WMI_AP_PS_EGAP_PARAM_CMDID,
  945. /** Rate-control specific commands */
  946. WMI_PEER_RATE_RETRY_SCHED_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RATE_CTRL),
  947. /** WLAN Profiling commands. */
  948. WMI_WLAN_PROFILE_TRIGGER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROFILE),
  949. WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
  950. WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
  951. WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
  952. WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
  953. /** Suspend resume command Ids */
  954. WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SUSPEND),
  955. WMI_PDEV_RESUME_CMDID,
  956. /* Beacon filter commands */
  957. /** add a beacon filter */
  958. WMI_ADD_BCN_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BCN_FILTER),
  959. /** remove a beacon filter */
  960. WMI_RMV_BCN_FILTER_CMDID,
  961. /* WOW Specific WMI commands*/
  962. /** add pattern for awake */
  963. WMI_WOW_ADD_WAKE_PATTERN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WOW),
  964. /** deleta a wake pattern */
  965. WMI_WOW_DEL_WAKE_PATTERN_CMDID,
  966. /** enable/deisable wake event */
  967. WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
  968. /** enable WOW */
  969. WMI_WOW_ENABLE_CMDID,
  970. /** host woke up from sleep event to FW. Generated in response to WOW Hardware event */
  971. WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
  972. /* IOAC add keep alive cmd. */
  973. WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID,
  974. /* IOAC del keep alive cmd. */
  975. WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID,
  976. /* IOAC add pattern for awake */
  977. WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID,
  978. /* IOAC deleta a wake pattern */
  979. WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID,
  980. /* D0-WOW enable or disable cmd */
  981. WMI_D0_WOW_ENABLE_DISABLE_CMDID,
  982. /* enable extend WoW */
  983. WMI_EXTWOW_ENABLE_CMDID,
  984. /* Extend WoW command to configure app type1 parameter */
  985. WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID,
  986. /* Extend WoW command to configure app type2 parameter */
  987. WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID,
  988. /* enable ICMPv6 Network advertisement filtering */
  989. WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID,
  990. /*
  991. * Set a pattern to match UDP packet in WOW mode.
  992. * If match, construct a tx frame in a local buffer
  993. * to send through the peer AP to the entity in the
  994. * IP network that sent the UDP packet to this STA.
  995. */
  996. WMI_WOW_UDP_SVC_OFLD_CMDID,
  997. /* configure WOW host wakeup PIN pattern */
  998. WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID,
  999. /* Set which action category should wake the host from suspend */
  1000. WMI_WOW_SET_ACTION_WAKE_UP_CMDID,
  1001. /*
  1002. * Set a pattern to match broadcast CoAP packet in WoW mode.
  1003. * If match and verify pass, cache the packet and then reply
  1004. * a unicast response in local with pre-configured packet.
  1005. */
  1006. WMI_WOW_COAP_ADD_PATTERN_CMDID,
  1007. /* Delete a pattern match broadcast CoAP packet */
  1008. WMI_WOW_COAP_DEL_PATTERN_CMDID,
  1009. /*
  1010. * Add a CoAP keepalive pattern to send a CoAP broadcast packet
  1011. * when configured timeout occurred.
  1012. */
  1013. WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMDID,
  1014. /* Delete a CoAP keepalive pattern */
  1015. WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMDID,
  1016. /* Host read the cached CoAP packets after resume */
  1017. WMI_WOW_COAP_GET_BUF_INFO_CMDID,
  1018. /* RTT measurement related cmd */
  1019. /** request to make an RTT measurement */
  1020. WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RTT),
  1021. /** request to report a tsf measurement */
  1022. WMI_RTT_TSF_CMDID,
  1023. /** RTT 11az PASN authentication status */
  1024. WMI_RTT_PASN_AUTH_STATUS_CMD,
  1025. /** RTT 11az PASN deauthentication cmd */
  1026. WMI_RTT_PASN_DEAUTH_CMD,
  1027. /** spectral scan command */
  1028. /** configure spectral scan */
  1029. WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SPECTRAL),
  1030. /** enable/disable spectral scan and trigger */
  1031. WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
  1032. /* F/W stats */
  1033. /** one time request for stats */
  1034. WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STATS),
  1035. /** Push MCC Adaptive Scheduler Stats to Firmware */
  1036. WMI_MCC_SCHED_TRAFFIC_STATS_CMDID,
  1037. /** one time request for txrx stats */
  1038. WMI_REQUEST_STATS_EXT_CMDID,
  1039. /* Link Layer stats */
  1040. /** Request for link layer stats */
  1041. WMI_REQUEST_LINK_STATS_CMDID,
  1042. /** Request for setting params to link layer stats */
  1043. WMI_START_LINK_STATS_CMDID,
  1044. /** Request to clear stats*/
  1045. WMI_CLEAR_LINK_STATS_CMDID,
  1046. /** Request for getting the Firmware Memory Dump */
  1047. WMI_GET_FW_MEM_DUMP_CMDID,
  1048. /** Request to flush of the buffered debug messages */
  1049. WMI_DEBUG_MESG_FLUSH_CMDID,
  1050. /** Cmd to configure the verbose level */
  1051. WMI_DIAG_EVENT_LOG_CONFIG_CMDID,
  1052. /** One time request for wlan stats */
  1053. WMI_REQUEST_WLAN_STATS_CMDID,
  1054. /** Request for getting RCPI of peer */
  1055. WMI_REQUEST_RCPI_CMDID,
  1056. /** One time request for peer stats info */
  1057. WMI_REQUEST_PEER_STATS_INFO_CMDID,
  1058. /** One time request for radio channel stats */
  1059. WMI_REQUEST_RADIO_CHAN_STATS_CMDID,
  1060. /** request for WLM (wlan latency manager) stats */
  1061. WMI_REQUEST_WLM_STATS_CMDID,
  1062. /** request for control path stats */
  1063. WMI_REQUEST_CTRL_PATH_STATS_CMDID,
  1064. /** unified request for LL stats and get station cmds */
  1065. WMI_REQUEST_UNIFIED_LL_GET_STA_CMDID,
  1066. /** request for thermal stats */
  1067. WMI_REQUEST_THERMAL_STATS_CMDID,
  1068. /** request for HALPHY stats through ctrl path */
  1069. WMI_REQUEST_HALPHY_CTRL_PATH_STATS_CMDID,
  1070. /** ARP OFFLOAD REQUEST*/
  1071. WMI_SET_ARP_NS_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL),
  1072. /** Proactive ARP Response Add Pattern Command*/
  1073. WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID,
  1074. /** Proactive ARP Response Del Pattern Command*/
  1075. WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID,
  1076. /** NS offload confid*/
  1077. WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NLO_OFL),
  1078. /** APFIND Config */
  1079. WMI_APFIND_CMDID,
  1080. /** Passpoint list config */
  1081. WMI_PASSPOINT_LIST_CONFIG_CMDID,
  1082. /** configure suppressing parameters for MAWC */
  1083. WMI_NLO_CONFIGURE_MAWC_CMDID,
  1084. /* GTK offload Specific WMI commands*/
  1085. WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GTK_OFL),
  1086. /* CSA offload Specific WMI commands*/
  1087. /** csa offload enable */
  1088. WMI_CSA_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CSA_OFL),
  1089. /** chan switch command */
  1090. WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
  1091. /* Chatter commands*/
  1092. /* Change chatter mode of operation */
  1093. WMI_CHATTER_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CHATTER),
  1094. /** chatter add coalescing filter command */
  1095. WMI_CHATTER_ADD_COALESCING_FILTER_CMDID,
  1096. /** chatter delete coalescing filter command */
  1097. WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID,
  1098. /** chatter coalecing query command */
  1099. WMI_CHATTER_COALESCING_QUERY_CMDID,
  1100. /**addba specific commands */
  1101. /** start the aggregation on this TID */
  1102. WMI_PEER_TID_ADDBA_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TID_ADDBA),
  1103. /** stop the aggregation on this TID */
  1104. WMI_PEER_TID_DELBA_CMDID,
  1105. /** set station mimo powersave method */
  1106. WMI_STA_DTIM_PS_METHOD_CMDID,
  1107. /** Configure the Station UAPSD AC Auto Trigger Parameters */
  1108. WMI_STA_UAPSD_AUTO_TRIG_CMDID,
  1109. /** Configure the Keep Alive Parameters */
  1110. WMI_STA_KEEPALIVE_CMDID,
  1111. /* Request ssn from target for a sta/tid pair */
  1112. WMI_BA_REQ_SSN_CMDID,
  1113. /* misc command group */
  1114. /** echo command mainly used for testing */
  1115. WMI_ECHO_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MISC),
  1116. /* !!IMPORTANT!!
  1117. * If you need to add a new WMI command to the WMI_GRP_MISC sub-group,
  1118. * please make sure you add it BEHIND WMI_PDEV_UTF_CMDID,
  1119. * as we MUST have a fixed value here to maintain compatibility between
  1120. * UTF and the ART2 driver
  1121. */
  1122. /** UTF WMI commands */
  1123. WMI_PDEV_UTF_CMDID,
  1124. /** set debug log config */
  1125. WMI_DBGLOG_CFG_CMDID,
  1126. /* QVIT specific command id */
  1127. WMI_PDEV_QVIT_CMDID,
  1128. /* Factory Testing Mode request command
  1129. * used for integrated chipsets */
  1130. WMI_PDEV_FTM_INTG_CMDID,
  1131. /* set and get keepalive parameters command */
  1132. WMI_VDEV_SET_KEEPALIVE_CMDID,
  1133. WMI_VDEV_GET_KEEPALIVE_CMDID,
  1134. /* For fw recovery test command */
  1135. WMI_FORCE_FW_HANG_CMDID,
  1136. /* Set Mcast/Bdcast filter */
  1137. WMI_SET_MCASTBCAST_FILTER_CMDID,
  1138. /** set thermal management params **/
  1139. WMI_THERMAL_MGMT_CMDID,
  1140. /** set host auto shutdown params **/
  1141. WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID,
  1142. /** set tpc chainmask config command */
  1143. WMI_TPC_CHAINMASK_CONFIG_CMDID,
  1144. /** set Antenna diversity command */
  1145. WMI_SET_ANTENNA_DIVERSITY_CMDID,
  1146. /** Set OCB Sched Request, deprecated */
  1147. WMI_OCB_SET_SCHED_CMDID,
  1148. /** Set RSSI monitoring config command */
  1149. WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID,
  1150. /** Enable/disable Large Receive Offload processing; provide cfg params */
  1151. WMI_LRO_CONFIG_CMDID,
  1152. /** transfer data from host to firmware to write flash */
  1153. WMI_TRANSFER_DATA_TO_FLASH_CMDID,
  1154. /** Command to enable/disable filtering of multicast IP with unicast mac */
  1155. WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID,
  1156. /** Command to control WISA mode */
  1157. WMI_VDEV_WISA_CMDID,
  1158. /** set debug log time stamp sync up with host */
  1159. WMI_DBGLOG_TIME_STAMP_SYNC_CMDID,
  1160. /** Command for host to set/delete multiple mcast filters */
  1161. WMI_SET_MULTIPLE_MCAST_FILTER_CMDID,
  1162. /** upload a requested section of data from firmware flash to host */
  1163. WMI_READ_DATA_FROM_FLASH_CMDID,
  1164. /* Thermal Throttling SET CONF commands */
  1165. WMI_THERM_THROT_SET_CONF_CMDID,
  1166. /* set runtime dpd recalibration params */
  1167. WMI_RUNTIME_DPD_RECAL_CMDID,
  1168. /* get TX power for input HALPHY parameters */
  1169. WMI_GET_TPC_POWER_CMDID,
  1170. /* Specify when to start monitoring for idle state */
  1171. WMI_IDLE_TRIGGER_MONITOR_CMDID,
  1172. /** set ELNA BYPASS status */
  1173. WMI_SET_ELNA_BYPASS_CMDID,
  1174. /** get ELNA BYPASS status */
  1175. WMI_GET_ELNA_BYPASS_CMDID,
  1176. /** get ANI level of the channels */
  1177. WMI_GET_CHANNEL_ANI_CMDID,
  1178. /** set OCL (One Chain Listen) mode */
  1179. WMI_SET_OCL_CMDID,
  1180. /** Consolidated params for pdev/vdev:
  1181. * Set multiple parameters at once for one pdev or vdev.
  1182. */
  1183. WMI_SET_MULTIPLE_PDEV_VDEV_PARAM_CMDID,
  1184. /* WMI cmd used to allocate HW scratch registers */
  1185. WMI_PMM_SCRATCH_REG_ALLOCATION_CMDID,
  1186. /* WMI cmd used to start/stop XGAP (XPAN Green AP) */
  1187. WMI_XGAP_ENABLE_CMDID,
  1188. /* H2T HPA message */
  1189. WMI_HPA_CMDID,
  1190. /* WMI comamnd for standalone sounding */
  1191. WMI_VDEV_STANDALONE_SOUND_CMDID,
  1192. /* WMI cmd used by host to send the switch response status to FW */
  1193. WMI_AUDIO_TRANSPORT_SWITCH_RESP_STATUS_CMDID,
  1194. /** WMI command to set active traffic type bitmap for a peer */
  1195. WMI_PEER_ACTIVE_TRAFFIC_MAP_CMDID,
  1196. /** WMI command to Request Opportunistic Power Mgmt (OPM) stats */
  1197. WMI_REQUEST_OPM_STATS_CMDID,
  1198. /** WMI command to Request SAP suspend/resume */
  1199. WMI_SET_AP_SUSPEND_RESUME_CMDID,
  1200. /** Unsynchronized Service Discovery */
  1201. WMI_USD_SERVICE_CMDID,
  1202. /* Offload 11k related requests */
  1203. WMI_11K_OFFLOAD_REPORT_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_11K_OFFLOAD),
  1204. /* invoke neighbor report from FW */
  1205. WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID,
  1206. /* GPIO Configuration */
  1207. WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GPIO),
  1208. WMI_GPIO_OUTPUT_CMDID,
  1209. /* Txbf configuration command */
  1210. WMI_TXBF_CMDID,
  1211. /* Antenna Controller, connected to wlan debug uart/GPIO. */
  1212. WMI_ANT_CONTROLLER_CMDID,
  1213. WMI_GPIO_STATE_REQ_CMDID,
  1214. /* FWTEST Commands */
  1215. WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_FWTEST),
  1216. /** set NoA descs **/
  1217. WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID,
  1218. /* UNIT Tests */
  1219. WMI_UNIT_TEST_CMDID,
  1220. /* set debug and tuning parameters */
  1221. WMI_FWTEST_CMDID,
  1222. /* Q-Boost configuration test commands */
  1223. WMI_QBOOST_CFG_CMDID,
  1224. /* Simulation Test command */
  1225. WMI_SIMULATION_TEST_CMDID,
  1226. /* WFA test config command */
  1227. WMI_WFA_CONFIG_CMDID,
  1228. /** TDLS Configuration */
  1229. /** enable/disable TDLS */
  1230. WMI_TDLS_SET_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDLS),
  1231. /** set tdls peer state */
  1232. WMI_TDLS_PEER_UPDATE_CMDID,
  1233. /** TDLS Offchannel control */
  1234. WMI_TDLS_SET_OFFCHAN_MODE_CMDID,
  1235. /** Resmgr Configuration */
  1236. /** Adaptive OCS is enabled by default in the FW. This command is used to
  1237. * disable FW based adaptive OCS.
  1238. */
  1239. WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RESMGR),
  1240. /** set the requested channel time quota for the home channels */
  1241. WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID,
  1242. /** set the requested latency for the home channels */
  1243. WMI_RESMGR_SET_CHAN_LATENCY_CMDID,
  1244. /** STA SMPS Configuration */
  1245. /** force SMPS mode */
  1246. WMI_STA_SMPS_FORCE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_SMPS),
  1247. /** set SMPS parameters */
  1248. WMI_STA_SMPS_PARAM_CMDID,
  1249. /* Wlan HB commands*/
  1250. /* enable/disable wlan HB */
  1251. WMI_HB_SET_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLAN_HB),
  1252. /* set tcp parameters for wlan HB */
  1253. WMI_HB_SET_TCP_PARAMS_CMDID,
  1254. /* set tcp pkt filter for wlan HB */
  1255. WMI_HB_SET_TCP_PKT_FILTER_CMDID,
  1256. /* set udp parameters for wlan HB */
  1257. WMI_HB_SET_UDP_PARAMS_CMDID,
  1258. /* set udp pkt filter for wlan HB */
  1259. WMI_HB_SET_UDP_PKT_FILTER_CMDID,
  1260. /* OIC ping keep alive */
  1261. WMI_HB_OIC_PING_OFFLOAD_PARAM_CMDID,
  1262. WMI_HB_OIC_PING_OFFLOAD_SET_ENABLE_CMDID,
  1263. /* WMI commands related to DHCP Lease Renew Offload **/
  1264. WMI_HB_DHCP_LEASE_RENEW_OFFLOAD_CMDID,
  1265. /** Wlan RMC commands*/
  1266. /** enable/disable RMC */
  1267. WMI_RMC_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RMC),
  1268. /** configure action frame period */
  1269. WMI_RMC_SET_ACTION_PERIOD_CMDID,
  1270. /** For debug/future enhancement purposes only,
  1271. * configures/finetunes RMC algorithms */
  1272. WMI_RMC_CONFIG_CMDID,
  1273. /** select manual leader */
  1274. WMI_RMC_SET_MANUAL_LEADER_CMDID,
  1275. /** WLAN MHF offload commands */
  1276. /** enable/disable MHF offload */
  1277. WMI_MHF_OFFLOAD_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MHF_OFL),
  1278. /** Plumb routing table for MHF offload */
  1279. WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID,
  1280. /*location scan commands*/
  1281. /*start batch scan*/
  1282. WMI_BATCH_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
  1283. /*stop batch scan*/
  1284. WMI_BATCH_SCAN_DISABLE_CMDID,
  1285. /*get batch scan result*/
  1286. WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID,
  1287. /* OEM related cmd */
  1288. WMI_OEM_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OEM),
  1289. WMI_OEM_REQUEST_CMDID, /* UNUSED */
  1290. /* OEM related cmd used for Low Power ranging */
  1291. WMI_LPI_OEM_REQ_CMDID,
  1292. WMI_OEM_DMA_RING_CFG_REQ_CMDID,
  1293. /** Command to handle OEM's opaque data */
  1294. WMI_OEM_DATA_CMDID,
  1295. /** Nan Request */
  1296. WMI_NAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN),
  1297. /** Command to handle OEM's NAN specific opaque data */
  1298. WMI_NAN_OEM_DATA_CMDID,
  1299. /** Modem power state command */
  1300. WMI_MODEM_POWER_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_COEX),
  1301. WMI_CHAN_AVOID_UPDATE_CMDID,
  1302. WMI_COEX_CONFIG_CMDID,
  1303. WMI_CHAN_AVOID_RPT_ALLOW_CMDID,
  1304. WMI_COEX_GET_ANTENNA_ISOLATION_CMDID,
  1305. WMI_SAR_LIMITS_CMDID,
  1306. WMI_SAR_GET_LIMITS_CMDID,
  1307. /** Dedicated BT Antenna Mode (DBAM) command */
  1308. WMI_COEX_DBAM_CMDID,
  1309. WMI_TAS_POWER_HISTORY_CMDID,
  1310. WMI_ESL_EGID_CMDID,
  1311. WMI_COEX_MULTIPLE_CONFIG_CMDID,
  1312. /**
  1313. * OBSS scan offload enable/disable commands
  1314. * OBSS scan enable CMD will send to FW after VDEV UP, if these conditions are true:
  1315. * 1. WMI_SERVICE_OBSS_SCAN is reported by FW in service ready,
  1316. * 2. STA connect to a 2.4 GHz ht20/ht40 AP,
  1317. * 3. AP enable 20/40 coexistence (OBSS_IE-74 can be found in beacon or association response)
  1318. * If OBSS parameters from beacon changed, also use enable CMD to update parameters.
  1319. * OBSS scan disable CMD will send to FW if have enabled when tearing down connection.
  1320. */
  1321. WMI_OBSS_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OBSS_OFL),
  1322. WMI_OBSS_SCAN_DISABLE_CMDID,
  1323. WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID,
  1324. /** LPI commands */
  1325. /** LPI mgmt snooping config command */
  1326. WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LPI),
  1327. /** LPI scan start command */
  1328. WMI_LPI_START_SCAN_CMDID,
  1329. /** LPI scan stop command */
  1330. WMI_LPI_STOP_SCAN_CMDID,
  1331. /** ExtScan commands */
  1332. WMI_EXTSCAN_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_EXTSCAN),
  1333. WMI_EXTSCAN_STOP_CMDID,
  1334. WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID,
  1335. WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID,
  1336. WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID,
  1337. WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID,
  1338. WMI_EXTSCAN_SET_CAPABILITIES_CMDID,
  1339. WMI_EXTSCAN_GET_CAPABILITIES_CMDID,
  1340. WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID,
  1341. WMI_EXTSCAN_CONFIGURE_MAWC_CMDID,
  1342. /** DHCP server offload commands */
  1343. WMI_SET_DHCP_SERVER_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DHCP_OFL),
  1344. /** IPA Offload features related commands */
  1345. WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_IPA),
  1346. /** mDNS responder offload commands */
  1347. WMI_MDNS_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MDNS_OFL),
  1348. WMI_MDNS_SET_FQDN_CMDID,
  1349. WMI_MDNS_SET_RESPONSE_CMDID,
  1350. WMI_MDNS_GET_STATS_CMDID,
  1351. WMI_MDNS_SET_STAIP_CMDID,
  1352. /* enable/disable AP Authentication offload */
  1353. WMI_SAP_OFL_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAP_OFL),
  1354. WMI_SAP_SET_BLACKLIST_PARAM_CMDID,
  1355. WMI_SAP_OBSS_DETECTION_CFG_CMDID,
  1356. /** Out-of-context-of-BSS (OCB) commands */
  1357. WMI_OCB_SET_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OCB),
  1358. WMI_OCB_SET_UTC_TIME_CMDID,
  1359. WMI_OCB_START_TIMING_ADVERT_CMDID,
  1360. WMI_OCB_STOP_TIMING_ADVERT_CMDID,
  1361. WMI_OCB_GET_TSF_TIMER_CMDID,
  1362. WMI_DCC_GET_STATS_CMDID,
  1363. WMI_DCC_CLEAR_STATS_CMDID,
  1364. WMI_DCC_UPDATE_NDL_CMDID,
  1365. /* System-On-Chip commands */
  1366. WMI_SOC_SET_PCL_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SOC),
  1367. WMI_SOC_SET_HW_MODE_CMDID,
  1368. WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID,
  1369. WMI_SOC_SET_ANTENNA_MODE_CMDID,
  1370. /** enable/disable TQM reset (SOC level) feature */
  1371. WMI_SOC_TQM_RESET_ENABLE_DISABLE_CMDID,
  1372. /*
  1373. * WMI Command to enable custom classification of packets in Tx path
  1374. * and specifiy packets of interest for classification.
  1375. */
  1376. WMI_SOC_TX_PACKET_CUSTOM_CLASSIFY_CMDID,
  1377. /* packet filter commands */
  1378. WMI_PACKET_FILTER_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PKT_FILTER),
  1379. WMI_PACKET_FILTER_ENABLE_CMDID,
  1380. /** Motion Aided WiFi Connectivity (MAWC) commands */
  1381. WMI_MAWC_SENSOR_REPORT_IND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MAWC),
  1382. /** WMI commands related to PMF 11w Offload */
  1383. WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PMF_OFFLOAD),
  1384. /** WMI commands related to pkt filter (BPF) offload */
  1385. WMI_BPF_GET_CAPABILITY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
  1386. WMI_BPF_GET_VDEV_STATS_CMDID,
  1387. WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID,
  1388. WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID,
  1389. WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID,
  1390. WMI_BPF_SET_VDEV_ENABLE_CMDID,
  1391. WMI_BPF_SET_VDEV_WORK_MEMORY_CMDID,
  1392. WMI_BPF_GET_VDEV_WORK_MEMORY_CMDID,
  1393. /** WMI commands related to monitor mode. */
  1394. WMI_MNT_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MONITOR),
  1395. /** WMI commands related to regulatory offload */
  1396. WMI_SET_CURRENT_COUNTRY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_REGULATORY),
  1397. WMI_11D_SCAN_START_CMDID,
  1398. WMI_11D_SCAN_STOP_CMDID,
  1399. WMI_SET_INIT_COUNTRY_CMDID,
  1400. WMI_AFC_CMDID,
  1401. /**
  1402. * Nan Data commands
  1403. * NDI - NAN Data Interface
  1404. * NDP - NAN Data Path
  1405. */
  1406. /* Commands in prototyping phase */
  1407. WMI_NDI_GET_CAP_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROTOTYPE),
  1408. WMI_NDP_INITIATOR_REQ_CMDID,
  1409. WMI_NDP_RESPONDER_REQ_CMDID,
  1410. WMI_NDP_END_REQ_CMDID,
  1411. WMI_NDP_CMDID,
  1412. /** WMI commands related to HW data filtering **/
  1413. WMI_HW_DATA_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_HW_DATA_FILTER),
  1414. /** WMI commands related to WLAN latency module **/
  1415. WMI_WLM_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLM),
  1416. /** WMI commands related to STA & AP TWT module **/
  1417. WMI_TWT_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TWT),
  1418. WMI_TWT_DISABLE_CMDID,
  1419. WMI_TWT_ADD_DIALOG_CMDID,
  1420. WMI_TWT_DEL_DIALOG_CMDID,
  1421. WMI_TWT_PAUSE_DIALOG_CMDID,
  1422. WMI_TWT_RESUME_DIALOG_CMDID,
  1423. WMI_TWT_BTWT_INVITE_STA_CMDID,
  1424. WMI_TWT_BTWT_REMOVE_STA_CMDID,
  1425. WMI_TWT_NUDGE_DIALOG_CMDID,
  1426. WMI_VDEV_SET_TWT_EDCA_PARAMS_CMDID, /* XPAN TWT */
  1427. WMI_VDEV_GET_TWT_SESSION_STATS_INFO_CMDID,
  1428. WMI_TWT_VDEV_CONFIG_CMDID,
  1429. /** WMI commands related to motion detection **/
  1430. WMI_MOTION_DET_CONFIG_PARAM_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MOTION_DET),
  1431. WMI_MOTION_DET_BASE_LINE_CONFIG_PARAM_CMDID,
  1432. WMI_MOTION_DET_START_STOP_CMDID,
  1433. WMI_MOTION_DET_BASE_LINE_START_STOP_CMDID,
  1434. /** WMI commands related to OBSS PD Spatial Reuse **/
  1435. WMI_PDEV_OBSS_PD_SPATIAL_REUSE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SPATIAL_REUSE),
  1436. WMI_PDEV_OBSS_PD_SPATIAL_REUSE_SET_DEF_OBSS_THRESH_CMDID,
  1437. /** WMI commands related to High Precision Clock Synchronization feature **/
  1438. WMI_HPCS_PULSE_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_HPCS_PULSE),
  1439. /** WMI commands related to Audio Frame aggregation feature **/
  1440. WMI_AUDIO_AGGR_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_AUDIO),
  1441. WMI_AUDIO_AGGR_ADD_GROUP_CMDID,
  1442. WMI_AUDIO_AGGR_DEL_GROUP_CMDID,
  1443. WMI_AUDIO_AGGR_SET_GROUP_RATE_CMDID,
  1444. WMI_AUDIO_AGGR_SET_GROUP_RETRY_CMDID,
  1445. WMI_AUDIO_AGGR_SET_GROUP_AUTO_RATE_CMDID,
  1446. WMI_AUDIO_AGGR_SET_GROUP_PROBE_CMDID,
  1447. WMI_AUDIO_AGGR_UPDATE_STA_GROUP_INFO_CMDID,
  1448. WMI_AUDIO_AGGR_GET_STATISTICS_CMDID,
  1449. WMI_AUDIO_AGGR_RESET_STATISTICS_CMDID,
  1450. WMI_AUDIO_AGGR_SET_RTSCTS_CONFIG_CMDID,
  1451. WMI_AUDIO_AGGR_SET_SCHED_METHOD_CMDID,
  1452. WMI_AUDIO_AGGR_GET_SCHED_METHOD_CMDID,
  1453. /** WMI commands related to Channel Frequency Response Capture **/
  1454. WMI_CFR_CAPTURE_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CFR_CAPTURE),
  1455. /** WMI commands related to Air Time Management feature **/
  1456. /** ATF SSID GROUPING REQUEST command */
  1457. WMI_ATF_SSID_GROUPING_REQUEST_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_ATM),
  1458. /** WMM ATF Configuration for groups */
  1459. WMI_ATF_GROUP_WMM_AC_CONFIG_REQUEST_CMDID,
  1460. /** ATF Peer Extended Request command */
  1461. WMI_PEER_ATF_EXT_REQUEST_CMDID,
  1462. /** Vendor Defined WMI commands **/
  1463. WMI_VENDOR_PDEV_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VENDOR),
  1464. WMI_VENDOR_VDEV_CMDID,
  1465. WMI_VENDOR_PEER_CMDID,
  1466. /** Further vendor cmd IDs can be added below **/
  1467. /** WMI commands specific to Tid level Latency config **/
  1468. /** VDEV Latency Config command */
  1469. WMI_VDEV_TID_LATENCY_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LATENCY),
  1470. /** TID Latency Request command */
  1471. WMI_PEER_TID_LATENCY_CONFIG_CMDID,
  1472. /** WMI commands specific to MLO **/
  1473. /** MLO link active / inactive Request command */
  1474. WMI_MLO_LINK_SET_ACTIVE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MLO),
  1475. /** WMI cmd used to indicate hw_links part of MLO */
  1476. WMI_MLO_SETUP_CMDID,
  1477. /** WMI cmd used for init synchronization of hw_links part of MLO */
  1478. WMI_MLO_READY_CMDID,
  1479. /** WMI cmd used for tearing down a hw_link part of MLO */
  1480. WMI_MLO_TEARDOWN_CMDID,
  1481. /** WMI cmd used to setup Tid to Link Mapping for a MLO Peer */
  1482. WMI_MLO_PEER_TID_TO_LINK_MAP_CMDID,
  1483. /** WMI cmd for dynamically deleting a link from a MLD VAP */
  1484. WMI_MLO_LINK_REMOVAL_CMDID,
  1485. /** WMI cmd used to setup Tid to Link Mapping for a MLO VAP */
  1486. WMI_MLO_AP_VDEV_TID_TO_LINK_MAP_CMDID,
  1487. /** WMI cmd used to get mlo link information */
  1488. WMI_MLO_VDEV_GET_LINK_INFO_CMDID,
  1489. /** WMI cmd used to set link BSS parameters */
  1490. WMI_MLO_LINK_SET_BSS_PARAMS_CMDID,
  1491. /** WMI cmd to confirm the status of link switch request handling */
  1492. WMI_MLO_LINK_SWITCH_CONF_CMDID,
  1493. /** WMI cmd to migrate the primary link peer */
  1494. WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID,
  1495. /** WMI cmd to recommand preferred link */
  1496. WMI_MLO_LINK_RECOMMENDATION_CMDID,
  1497. /** WMI commands specific to Service Aware WiFi (SAWF) */
  1498. /** configure or reconfigure the parameters for a service class */
  1499. WMI_SAWF_SVC_CLASS_CFG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAWF),
  1500. /** disable a service class */
  1501. WMI_SAWF_SVC_CLASS_DISABLE_CMDID,
  1502. /* WMI commands specific to ODD */
  1503. WMI_ODD_LIVEDUMP_REQUEST_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_ODD),
  1504. /* WMI commands specific to TDMA */
  1505. WMI_TDMA_SCHEDULE_REQUEST_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDMA),
  1506. /* WMI commands specific to manually-triggered UL */
  1507. /** WMI Command to set Manual SU UL OFDMA trigger parameters */
  1508. WMI_VDEV_SET_ULOFDMA_MANUAL_SU_TRIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MANUAL_UL_TRIG),
  1509. /** WMI Command to set Manual MU UL OFDMA trigger parameters */
  1510. WMI_VDEV_SET_ULOFDMA_MANUAL_MU_TRIG_CMDID,
  1511. } WMI_CMD_ID;
  1512. typedef enum {
  1513. /** WMI service is ready; after this event WMI messages can be sent/received */
  1514. WMI_SERVICE_READY_EVENTID = 0x1,
  1515. /** WMI is ready; after this event the wlan subsystem is initialized and can process commands. */
  1516. WMI_READY_EVENTID,
  1517. /** Specify what WMI services the target supports (for services beyond
  1518. * what fits in the WMI_SERVICE_READY_EVENT message's wmi_service_bitmap)
  1519. */
  1520. WMI_SERVICE_AVAILABLE_EVENTID,
  1521. /** Specify what numbers and kinds of interfaces (a.k.a. vdevs)
  1522. * the target supports
  1523. */
  1524. WMI_IFACE_COMBINATION_IND_EVENTID,
  1525. /** Scan specific events */
  1526. WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
  1527. /** Spectral scan FW params to host */
  1528. WMI_PDEV_SSCAN_FW_PARAM_EVENTID,
  1529. /** Spectral scan related event start/stop trigger to host */
  1530. WMI_SSCAN_EVT_MESSAGE_EVENTID,
  1531. /** Spectral scan capabilities advertisement */
  1532. WMI_SPECTRAL_CAPABILITIES_EVENTID,
  1533. /* PDEV specific events */
  1534. /** TPC config for the current operating channel */
  1535. WMI_PDEV_TPC_CONFIG_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
  1536. /** Channel stats event */
  1537. WMI_CHAN_INFO_EVENTID,
  1538. /** PHY Error specific WMI event */
  1539. WMI_PHYERR_EVENTID,
  1540. /** eeprom dump event */
  1541. WMI_PDEV_DUMP_EVENTID,
  1542. /** traffic pause event */
  1543. WMI_TX_PAUSE_EVENTID,
  1544. /** DFS radar event */
  1545. WMI_DFS_RADAR_EVENTID,
  1546. /** track L1SS entry and residency event */
  1547. WMI_PDEV_L1SS_TRACK_EVENTID,
  1548. /** Report current temperature of the chip in Celcius degree */
  1549. WMI_PDEV_TEMPERATURE_EVENTID,
  1550. /** Extension of WMI_SERVICE_READY msg with extra target capability info */
  1551. WMI_SERVICE_READY_EXT_EVENTID,
  1552. /** FIPS test mode event */
  1553. WMI_PDEV_FIPS_EVENTID,
  1554. /** Channel hopping avoidance */
  1555. WMI_PDEV_CHANNEL_HOPPING_EVENTID,
  1556. /** CCK ANI level event */
  1557. WMI_PDEV_ANI_CCK_LEVEL_EVENTID,
  1558. /** OFDM ANI level event */
  1559. WMI_PDEV_ANI_OFDM_LEVEL_EVENTID,
  1560. /** Tx PPDU params */
  1561. WMI_PDEV_TPC_EVENTID,
  1562. /** NF Cal Power in DBR/DBM for all channels */
  1563. WMI_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID,
  1564. /** SOC/PDEV events */
  1565. WMI_PDEV_SET_HW_MODE_RESP_EVENTID,
  1566. WMI_PDEV_HW_MODE_TRANSITION_EVENTID,
  1567. WMI_PDEV_SET_MAC_CONFIG_RESP_EVENTID,
  1568. /** Report ANT DIV feature's status */
  1569. WMI_PDEV_ANTDIV_STATUS_EVENTID,
  1570. /** Chip level Power stats */
  1571. WMI_PDEV_CHIP_POWER_STATS_EVENTID,
  1572. /** Power Save Failure Detected */
  1573. WMI_PDEV_CHIP_POWER_SAVE_FAILURE_DETECTED_EVENTID,
  1574. /* Event to report the switch count in csa of one or more VDEVs */
  1575. WMI_PDEV_CSA_SWITCH_COUNT_STATUS_EVENTID,
  1576. /** Report the caldata version to host */
  1577. WMI_PDEV_CHECK_CAL_VERSION_EVENTID,
  1578. /** Report chain RSSI and antenna index to host */
  1579. WMI_PDEV_DIV_RSSI_ANTID_EVENTID,
  1580. /** provide noise floor and cycle counts for a channel */
  1581. WMI_PDEV_BSS_CHAN_INFO_EVENTID,
  1582. /** Response received the ctl table to host */
  1583. WMI_PDEV_UPDATE_CTLTABLE_EVENTID,
  1584. WMI_PDEV_DMA_RING_CFG_RSP_EVENTID,
  1585. WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID,
  1586. /** WMI Event to deliver CTL Failsafe application */
  1587. WMI_PDEV_CTL_FAILSAFE_CHECK_EVENTID,
  1588. /* Event to report the switch count in BSS color of one or more VDEVs */
  1589. WMI_PDEV_CSC_SWITCH_COUNT_STATUS_EVENTID,
  1590. /* Event to send cold boot calibration data */
  1591. WMI_PDEV_COLD_BOOT_CAL_DATA_EVENTID,
  1592. /* Event to report a rogue ap info that is detected in fw */
  1593. WMI_PDEV_RAP_INFO_EVENTID,
  1594. WMI_CHAN_RF_CHARACTERIZATION_INFO_EVENTID,
  1595. /** 2nd extension of SERVICE_READY msg with extra target capability info */
  1596. WMI_SERVICE_READY_EXT2_EVENTID,
  1597. /**
  1598. * vdev restart response for multiple vdevs in response to
  1599. * MULTIPLE_VDEV_RESTART_REQUEST
  1600. */
  1601. WMI_PDEV_MULTIPLE_VDEV_RESTART_RESP_EVENTID,
  1602. /** WMI event in response to TPC STATS command */
  1603. WMI_PDEV_GET_TPC_STATS_EVENTID,
  1604. /* Event to get DPD status from HALPHY */
  1605. WMI_PDEV_GET_DPD_STATUS_EVENTID,
  1606. /* Event to get Calibration status from HALPHY */
  1607. WMI_PDEV_GET_HALPHY_CAL_STATUS_EVENTID,
  1608. /* Event to set halphy cal bitmap */
  1609. WMI_PDEV_SET_HALPHY_CAL_BMAP_EVENTID,
  1610. /* Event to get AOA phasedelta values from HALPHY */
  1611. WMI_PDEV_AOA_PHASEDELTA_EVENTID,
  1612. WMI_PDEV_FIPS_EXTEND_EVENTID,
  1613. /* Event to send packet log decode information */
  1614. WMI_PDEV_PKTLOG_DECODE_INFO_EVENTID,
  1615. /**
  1616. * RSSI dB to dBm conversion params info event
  1617. * sent to host after channel/bw/chainmask change per pdev.
  1618. */
  1619. WMI_PDEV_RSSI_DBM_CONVERSION_PARAMS_INFO_EVENTID,
  1620. /* Event to indicate Schedule tid queue suspended info */
  1621. WMI_PDEV_SCHED_TIDQ_SUSP_INFO_EVENTID,
  1622. /* Event to send target rate to power table update status */
  1623. WMI_PDEV_SET_TGTR2P_TABLE_EVENTID,
  1624. /* Event to indicate completion on RF path */
  1625. WMI_PDEV_SET_RF_PATH_RESP_EVENTID,
  1626. /* Event to get AOA phasedelta values for all gain tables from HALPHY */
  1627. WMI_PDEV_ENHANCED_AOA_PHASEDELTA_EVENTID,
  1628. /* Event to indicate the status of WiFi Radar calibration */
  1629. WMI_PDEV_WIFI_RADAR_CAL_COMPLETION_STATUS_EVENTID,
  1630. /* Event to indicate xLNA is enabled */
  1631. WMI_PDEV_ENABLE_XLNA_EVENTID,
  1632. /* VDEV specific events */
  1633. /** VDEV started event in response to VDEV_START request */
  1634. WMI_VDEV_START_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
  1635. /** vdev stopped event , generated in response to VDEV_STOP request */
  1636. WMI_VDEV_STOPPED_EVENTID,
  1637. /* Indicate the set key (used for setting per
  1638. * peer unicast and per vdev multicast)
  1639. * operation has completed */
  1640. WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
  1641. /* NOTE: WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID would be deprecated. Please
  1642. don't use this for any new implementations */
  1643. /* Firmware requests dynamic change to a specific beacon interval for a specific vdev ID in MCC scenario.
  1644. This request is valid only for vdevs operating in soft AP or P2P GO mode */
  1645. WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID,
  1646. /* Return the TSF timestamp of specified vdev */
  1647. WMI_VDEV_TSF_REPORT_EVENTID,
  1648. /* FW response to Host for vdev delete cmdid */
  1649. WMI_VDEV_DELETE_RESP_EVENTID,
  1650. /* DISA feature: FW response to Host with encrypted/decrypted 802.11 DISA frame */
  1651. WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_EVENTID,
  1652. /** event to report mac randomization success **/
  1653. WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_STATUS_EVENTID,
  1654. /* event for ARP stats collection */
  1655. WMI_VDEV_GET_ARP_STAT_EVENTID,
  1656. /** get tx power event in response to VDEV_GET_TX_POWER request */
  1657. WMI_VDEV_GET_TX_POWER_EVENTID,
  1658. WMI_VDEV_BCN_RECEPTION_STATS_EVENTID,
  1659. /* provide LTE-Coex state */
  1660. WMI_VDEV_GET_MWS_COEX_STATE_EVENTID,
  1661. /* provide LTE-Coex Dynamic Power Back-off info */
  1662. WMI_VDEV_GET_MWS_COEX_DPWB_STATE_EVENTID,
  1663. /* provide LTE-Coex TDM info */
  1664. WMI_VDEV_GET_MWS_COEX_TDM_STATE_EVENTID,
  1665. /* provide LTE-Coex IDRx info */
  1666. WMI_VDEV_GET_MWS_COEX_IDRX_STATE_EVENTID,
  1667. /* provide LTE-Coex antenna sharing info */
  1668. WMI_VDEV_GET_MWS_COEX_ANTENNA_SHARING_STATE_EVENTID,
  1669. /* Event to handle FW offloaded mgmt packets */
  1670. WMI_VDEV_MGMT_OFFLOAD_EVENTID,
  1671. /* FW response to Host for delete all peer cmdid */
  1672. WMI_VDEV_DELETE_ALL_PEER_RESP_EVENTID,
  1673. /** Indicates host to start/stop strobing for QTIMER periodically */
  1674. WMI_VDEV_AUDIO_SYNC_START_STOP_EVENTID,
  1675. /** Sends the final offset in the QTIMERs of both master and slave */
  1676. WMI_VDEV_AUDIO_SYNC_Q_MASTER_SLAVE_OFFSET_EVENTID,
  1677. /** VDEV_SEND_BIG_DATA_EVENT IS DEPRECATED - DO NOT USE */
  1678. WMI_VDEV_SEND_BIG_DATA_EVENTID,
  1679. /** send BIG DATA stats to host phase 2 */
  1680. WMI_VDEV_SEND_BIG_DATA_P2_EVENTID,
  1681. /** Latency related information received from beacon IE */
  1682. WMI_VDEV_BCN_LATENCY_EVENTID,
  1683. /** Disconnect request from FW */
  1684. WMI_VDEV_DISCONNECT_EVENTID,
  1685. /** Send Smart Monitor related params to host */
  1686. WMI_VDEV_SMART_MONITOR_EVENTID,
  1687. /** Send status of vdev mac address update request to host */
  1688. WMI_VDEV_UPDATE_MAC_ADDR_CONF_EVENTID,
  1689. /** event to report latency level honored by FW */
  1690. WMI_VDEV_LATENCY_LEVEL_EVENTID,
  1691. /** Result from firmware about completed scheduler probing */
  1692. WMI_VDEV_SCHED_MODE_PROBE_RESP_EVENTID,
  1693. /** Connect response */
  1694. WMI_VDEV_OOB_CONNECTION_RESP_EVENTID,
  1695. /* peer specific events */
  1696. /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */
  1697. WMI_PEER_STA_KICKOUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
  1698. /** Peer Info Event with data_rate, RSSI, tx_fail_cnt etc */
  1699. WMI_PEER_INFO_EVENTID,
  1700. /** Event indicating that TX fail count reaching threshold */
  1701. WMI_PEER_TX_FAIL_CNT_THR_EVENTID,
  1702. /* Return the estimate link speed for the Peer specified in the
  1703. * WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID command.
  1704. */
  1705. WMI_PEER_ESTIMATED_LINKSPEED_EVENTID,
  1706. /* Return the peer state
  1707. * WMI_PEER_SET_PARAM_CMDID, WMI_PEER_AUTHORIZE
  1708. */
  1709. WMI_PEER_STATE_EVENTID,
  1710. /* Peer Assoc Conf event to confirm fw had received PEER_ASSOC_CMD.
  1711. * After that, host will send Mx message.
  1712. * Otherwise, host will pause any Mx(STA:M2/M4) message
  1713. */
  1714. WMI_PEER_ASSOC_CONF_EVENTID,
  1715. /* FW response to Host for peer delete cmdid */
  1716. WMI_PEER_DELETE_RESP_EVENTID,
  1717. /** Valid rate code list for peer */
  1718. WMI_PEER_RATECODE_LIST_EVENTID,
  1719. WMI_WDS_PEER_EVENTID,
  1720. WMI_PEER_STA_PS_STATECHG_EVENTID,
  1721. /** Peer Ant Div Info Event with RSSI per chain, etc */
  1722. WMI_PEER_ANTDIV_INFO_EVENTID,
  1723. /*
  1724. * WMI_PEER_RESERVED_EVENTID
  1725. * These values are used for placeholders, to allow the subsequent
  1726. * WMI_PEER_OPER_MODE_CHANGE_EVENTID constant to have the same value
  1727. * as it had in its original location, when it was mistakenly placed
  1728. * amongst the WMI_PEER CMDID defs.
  1729. *
  1730. * These WMI_PEER_RESERVED values can be replaced with actual WMI peer
  1731. * event message IDs, though it will be simpler to instead add new
  1732. * WMI_PEER EVENTID defs at the end of the WMI_GRP_PEER WMI_EVT_GRP.
  1733. */
  1734. WMI_PEER_RESERVED0_EVENTID,
  1735. WMI_PEER_RESERVED1_EVENTID,
  1736. WMI_PEER_RESERVED2_EVENTID,
  1737. WMI_PEER_RESERVED3_EVENTID,
  1738. WMI_PEER_RESERVED4_EVENTID,
  1739. WMI_PEER_RESERVED5_EVENTID,
  1740. WMI_PEER_RESERVED6_EVENTID,
  1741. WMI_PEER_RESERVED7_EVENTID,
  1742. WMI_PEER_RESERVED8_EVENTID,
  1743. WMI_PEER_RESERVED9_EVENTID,
  1744. WMI_PEER_RESERVED10_EVENTID,
  1745. /** Peer operating mode change indication sent to host to update stats */
  1746. WMI_PEER_OPER_MODE_CHANGE_EVENTID,
  1747. /** report the current tx PN for the peer */
  1748. WMI_PEER_TX_PN_RESPONSE_EVENTID,
  1749. WMI_PEER_CFR_CAPTURE_EVENTID,
  1750. /* Peer Create Conf event to confirm fw had received WMI_PEER_CREATE_CMDID
  1751. * and status of WMI_PEER_CREATE_CMDID.
  1752. */
  1753. WMI_PEER_CREATE_CONF_EVENTID,
  1754. WMI_PEER_RX_PN_RESPONSE_EVENTID,
  1755. /* beacon/mgmt specific events */
  1756. /** RX management frame. the entire frame is carried along with the event. */
  1757. WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
  1758. /** software beacon alert event to Host requesting host to Queue a beacon for transmission
  1759. use only in host beacon mode */
  1760. WMI_HOST_SWBA_EVENTID,
  1761. /** beacon tbtt offset event indicating the tsf offset of the tbtt from the theoretical value.
  1762. tbtt offset is normally 0 and will be non zero if there are multiple VDEVs operating in
  1763. staggered beacon transmission mode */
  1764. WMI_TBTTOFFSET_UPDATE_EVENTID,
  1765. /** event after the first beacon is transmitted following
  1766. a change in the template.*/
  1767. WMI_OFFLOAD_BCN_TX_STATUS_EVENTID,
  1768. /** event after the first probe response is transmitted following
  1769. a change in the template.*/
  1770. WMI_OFFLOAD_PROB_RESP_TX_STATUS_EVENTID,
  1771. /** Event for Mgmt TX completion event */
  1772. WMI_MGMT_TX_COMPLETION_EVENTID,
  1773. /** Event for Mgmt TX bundle completion event */
  1774. WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID,
  1775. /** vdev_map used in WMI_TBTTOFFSET_UPDATE_EVENTID supports max 32 vdevs.
  1776. * Use this event if number of vdevs > 32.
  1777. */
  1778. WMI_TBTTOFFSET_EXT_UPDATE_EVENTID,
  1779. /** Event for offchan data TX completion event */
  1780. WMI_OFFCHAN_DATA_TX_COMPLETION_EVENTID,
  1781. /** software FILS Discovery Frame alert event to Host, requesting host to Queue an FD frame for transmission */
  1782. WMI_HOST_SWFDA_EVENTID,
  1783. /** software beacon alert event to Host requesting host to Queue a beacon for transmission.
  1784. * Used only in host beacon mode. */
  1785. WMI_HOST_SWBA_V2_EVENTID,
  1786. /** Event for QoS null frame TX completion */
  1787. WMI_QOS_NULL_FRAME_TX_COMPLETION_EVENTID,
  1788. /** WMI event for Firmware Consumed/Dropped Rx management frames indication */
  1789. WMI_MGMT_RX_FW_CONSUMED_EVENTID,
  1790. /** WMI event for indication to Host to reap the MGMT SRNG */
  1791. WMI_MGMT_SRNG_REAP_EVENTID,
  1792. /* ADDBA Related WMI Events*/
  1793. /** Indication the completion of the prior
  1794. WMI_PEER_TID_DELBA_CMDID(initiator) */
  1795. WMI_TX_DELBA_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
  1796. /** Indication the completion of the prior
  1797. *WMI_PEER_TID_ADDBA_CMDID(initiator) */
  1798. WMI_TX_ADDBA_COMPLETE_EVENTID,
  1799. /* Seq num returned from hw for a sta/tid pair */
  1800. WMI_BA_RSP_SSN_EVENTID,
  1801. /* Aggregation state requested by BTC */
  1802. WMI_AGGR_STATE_TRIG_EVENTID,
  1803. /** Roam event to trigger roaming on host */
  1804. WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
  1805. /** matching AP found from list of profiles */
  1806. WMI_PROFILE_MATCH,
  1807. /** roam synch event */
  1808. WMI_ROAM_SYNCH_EVENTID,
  1809. /** roam synch frame event */
  1810. WMI_ROAM_SYNCH_FRAME_EVENTID,
  1811. /** various roam scan stats */
  1812. WMI_ROAM_SCAN_STATS_EVENTID,
  1813. /** Blacklisted AP information event */
  1814. WMI_ROAM_BLACKLIST_EVENTID,
  1815. /** Roam Pre-Authentication start event */
  1816. WMI_ROAM_PREAUTH_START_EVENTID,
  1817. /** Roaming PMKID request event */
  1818. WMI_ROAM_PMKID_REQUEST_EVENTID,
  1819. /** roam stats */
  1820. WMI_ROAM_STATS_EVENTID,
  1821. /** Roam scan channels list */
  1822. WMI_ROAM_SCAN_CHANNEL_LIST_EVENTID,
  1823. /** Firmware roam capability information */
  1824. WMI_ROAM_CAPABILITY_REPORT_EVENTID,
  1825. /** Send AP frame content like beacon/probe resp etc.. */
  1826. WMI_ROAM_FRAME_EVENTID,
  1827. /** Send firmware ini value corresponding to param_id */
  1828. WMI_ROAM_GET_VENDOR_CONTROL_PARAM_EVENTID,
  1829. /** roam synch key event */
  1830. WMI_ROAM_SYNCH_KEY_EVENTID,
  1831. /** P2P disc found */
  1832. WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P),
  1833. /** send noa info to host when noa is changed for beacon tx offload enable */
  1834. WMI_P2P_NOA_EVENTID,
  1835. /** send p2p listen offload stopped event with different reason */
  1836. WMI_P2P_LISTEN_OFFLOAD_STOPPED_EVENTID,
  1837. /** send event to AP assisted P2P GO to change current DFS channel */
  1838. WMI_P2P_CLI_DFS_AP_BMISS_DETECTED_EVENTID,
  1839. /** Send EGAP Info to host */
  1840. WMI_AP_PS_EGAP_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AP_PS),
  1841. /* send pdev resume event to host after pdev resume. */
  1842. WMI_PDEV_RESUME_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SUSPEND),
  1843. /** WOW wake up host event.generated in response to WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID.
  1844. will cary wake reason */
  1845. WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
  1846. WMI_D0_WOW_DISABLE_ACK_EVENTID,
  1847. WMI_WOW_INITIAL_WAKEUP_EVENTID,
  1848. WMI_WOW_COAP_BUF_INFO_EVENTID,
  1849. /* RTT related event ID */
  1850. /** RTT measurement report */
  1851. WMI_RTT_MEASUREMENT_REPORT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
  1852. /** TSF measurement report */
  1853. WMI_TSF_MEASUREMENT_REPORT_EVENTID,
  1854. /** RTT error report */
  1855. WMI_RTT_ERROR_REPORT_EVENTID,
  1856. /** RTT 11az PASN peer create request */
  1857. WMI_RTT_PASN_PEER_CREATE_REQ_EVENTID,
  1858. /** RTT 11az PASN peer delete event */
  1859. WMI_RTT_PASN_PEER_DELETE_EVENTID,
  1860. /*STATS specific events*/
  1861. /** txrx stats event requested by host */
  1862. WMI_STATS_EXT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STATS),
  1863. /** FW iface link stats Event */
  1864. WMI_IFACE_LINK_STATS_EVENTID,
  1865. /** FW iface peer link stats Event */
  1866. WMI_PEER_LINK_STATS_EVENTID,
  1867. /** FW Update radio stats Event */
  1868. WMI_RADIO_LINK_STATS_EVENTID,
  1869. /** Firmware memory dump Complete event*/
  1870. WMI_UPDATE_FW_MEM_DUMP_EVENTID,
  1871. /** Event indicating the DIAG logs/events supported by FW */
  1872. WMI_DIAG_EVENT_LOG_SUPPORTED_EVENTID,
  1873. /** Instantaneous RSSI event */
  1874. WMI_INST_RSSI_STATS_EVENTID,
  1875. /** FW update tx power levels event */
  1876. WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID,
  1877. /** This event is used to report wlan stats to host.
  1878. * It is triggered under 3 conditions:
  1879. * (a) Periodic timer timed out, based on the period specified
  1880. * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
  1881. * (b) Whenever any of the (enabled) stats thresholds specified
  1882. * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
  1883. * within the current stats period.
  1884. * (c) In response to the one-time wlan stats request of
  1885. * WMI_REQUEST_WLAN_STATS_CMDID from host.
  1886. *
  1887. * If this event is triggered by condition a or b,
  1888. * the stats counters are cleared at the start of each period.
  1889. * But if it is triggered by condition c, stats counters won't be cleared.
  1890. */
  1891. WMI_REPORT_STATS_EVENTID,
  1892. /** Event indicating RCPI of the peer requested by host in the WMI_REQUEST_RCPI_CMDID */
  1893. WMI_UPDATE_RCPI_EVENTID,
  1894. /** This event is used to respond to WMI_REQUEST_PEER_STATS_INFO_CMDID
  1895. * and report peer stats info to host */
  1896. WMI_PEER_STATS_INFO_EVENTID,
  1897. /** This event is used to respond to WMI_REQUEST_RADIO_CHAN_STATS_CMDID
  1898. * and report radio channel stats to host */
  1899. WMI_RADIO_CHAN_STATS_EVENTID,
  1900. /** This event is used to respond to WMI_REQUEST_WLM_STATS_CMDID
  1901. * and report WLM (WLAN latency manager) stats info to host */
  1902. WMI_WLM_STATS_EVENTID,
  1903. /** This event is used to respond to WMI_REQUEST_CTRL_PATH_STATS_CMDID
  1904. * and report stats info to host */
  1905. WMI_CTRL_PATH_STATS_EVENTID,
  1906. /** This event is used to respond to
  1907. * WMI_REQUEST_HALPHY_CTRL_PATH_STATS_CMDID and report stats info to host
  1908. */
  1909. WMI_HALPHY_CTRL_PATH_STATS_EVENTID,
  1910. /** FW IPA link stats Event */
  1911. WMI_IPA_LINK_STATS_EVENTID,
  1912. /* NLO specific events */
  1913. /** NLO match event after the first match */
  1914. WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL),
  1915. /** NLO scan complete event */
  1916. WMI_NLO_SCAN_COMPLETE_EVENTID,
  1917. /** APFIND specific events */
  1918. WMI_APFIND_EVENTID,
  1919. /** passpoint network match event */
  1920. WMI_PASSPOINT_MATCH_EVENTID,
  1921. /** GTK offload stautus event requested by host */
  1922. WMI_GTK_OFFLOAD_STATUS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
  1923. /** GTK offload failed to rekey event */
  1924. WMI_GTK_REKEY_FAIL_EVENTID,
  1925. /* CSA handling event */
  1926. WMI_CSA_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
  1927. /* CSA IE received event */
  1928. WMI_CSA_IE_RECEIVED_EVENTID,
  1929. /*chatter query reply event*/
  1930. WMI_CHATTER_PC_QUERY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CHATTER),
  1931. /** DFS related events */
  1932. WMI_PDEV_DFS_RADAR_DETECTION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_DFS),
  1933. /** Indicate channel-availability-check completion event to host */
  1934. WMI_VDEV_DFS_CAC_COMPLETE_EVENTID,
  1935. /** Indicate off-channel-availability-check completion event to host */
  1936. WMI_VDEV_ADFS_OCAC_COMPLETE_EVENTID,
  1937. /** echo event in response to echo command */
  1938. WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
  1939. /* !!IMPORTANT!!
  1940. * If you need to add a new WMI event ID to the WMI_GRP_MISC sub-group,
  1941. * please make sure you add it BEHIND WMI_PDEV_UTF_EVENTID,
  1942. * as we MUST have a fixed value here to maintain compatibility between
  1943. * UTF and the ART2 driver
  1944. */
  1945. /** UTF specific WMI event */
  1946. WMI_PDEV_UTF_EVENTID,
  1947. /** event carries buffered debug messages */
  1948. WMI_DEBUG_MESG_EVENTID,
  1949. /** FW stats(periodic or on shot) */
  1950. WMI_UPDATE_STATS_EVENTID,
  1951. /** debug print message used for tracing FW code while debugging */
  1952. WMI_DEBUG_PRINT_EVENTID,
  1953. /** DCS wlan or non-wlan interference event
  1954. */
  1955. WMI_DCS_INTERFERENCE_EVENTID,
  1956. /** VI spoecific event */
  1957. WMI_PDEV_QVIT_EVENTID,
  1958. /** FW code profile data in response to profile request */
  1959. WMI_WLAN_PROFILE_DATA_EVENTID,
  1960. /* Factory Testing Mode request event
  1961. * used for integrated chipsets */
  1962. WMI_PDEV_FTM_INTG_EVENTID,
  1963. /* avoid list of frequencies .
  1964. */
  1965. WMI_WLAN_FREQ_AVOID_EVENTID,
  1966. /* Indicate the keepalive parameters */
  1967. WMI_VDEV_GET_KEEPALIVE_EVENTID,
  1968. /*Thermal Management event*/
  1969. WMI_THERMAL_MGMT_EVENTID,
  1970. /* Container for DIAG event and log data */
  1971. WMI_DIAG_DATA_CONTAINER_EVENTID,
  1972. /* host auto shutdown event */
  1973. WMI_HOST_AUTO_SHUTDOWN_EVENTID,
  1974. /*update mib counters together with WMI_UPDATE_STATS_EVENTID*/
  1975. WMI_UPDATE_WHAL_MIB_STATS_EVENTID,
  1976. /*update ht/vht info based on vdev (rx and tx NSS and preamble)*/
  1977. WMI_UPDATE_VDEV_RATE_STATS_EVENTID,
  1978. WMI_DIAG_EVENTID,
  1979. /** Set OCB Sched Response, deprecated */
  1980. WMI_OCB_SET_SCHED_EVENTID,
  1981. /** event to indicate the flush of the buffered debug messages is complete*/
  1982. WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID,
  1983. /** event to report mix/max RSSI breach events */
  1984. WMI_RSSI_BREACH_EVENTID,
  1985. /** event to report completion of data storage into flash memory */
  1986. WMI_TRANSFER_DATA_TO_FLASH_COMPLETE_EVENTID,
  1987. /** event to report SCPC calibrated data to host */
  1988. WMI_PDEV_UTF_SCPC_EVENTID,
  1989. /** event to provide requested data from the target's flash memory */
  1990. WMI_READ_DATA_FROM_FLASH_EVENTID,
  1991. /** event to report rx aggregation failure frame information */
  1992. WMI_REPORT_RX_AGGR_FAILURE_EVENTID,
  1993. /** event to upload a PKGID to host to identify chip for various products */
  1994. WMI_PKGID_EVENTID,
  1995. /* Thermal Throttling stats event id for every pdev and zones, etc */
  1996. WMI_THERM_THROT_STATS_EVENTID,
  1997. /* WMI UNIT TEST event */
  1998. WMI_UNIT_TEST_EVENTID,
  1999. /** event to report result of host configure SAR2 */
  2000. WMI_SAR2_RESULT_EVENTID,
  2001. /** event to get TX power per input HALPHY parameters */
  2002. WMI_GET_TPC_POWER_EVENTID,
  2003. /** event to provide MU-EDCA Parameters (to update host's beacon config) */
  2004. WMI_MUEDCA_PARAMS_CONFIG_EVENTID,
  2005. /** event to get ELNA BYPASS status */
  2006. WMI_GET_ELNA_BYPASS_EVENTID,
  2007. /** event to report ANI level of the channels */
  2008. WMI_GET_CHANNEL_ANI_EVENTID,
  2009. /* WMI event to available scratch registers */
  2010. WMI_PMM_AVAILABLE_SCRATCH_REG_EVENTID,
  2011. /* WMI event to scratch registers allocation */
  2012. WMI_PMM_SCRATCH_REG_ALLOCATION_COMPLETE_EVENTID,
  2013. /* WMI event to indicate Helath Monitor Infra init done */
  2014. WMI_HEALTH_MON_INIT_DONE_EVENTID,
  2015. /* WMI XGAP enable command response event ID */
  2016. WMI_XGAP_ENABLE_COMPLETE_EVENTID,
  2017. /* T2H HPA message */
  2018. WMI_HPA_EVENTID,
  2019. /* WMI standalone command complete Event */
  2020. WMI_VDEV_STANDALONE_SOUND_COMPLETE_EVENTID,
  2021. /* WMI evt to indicate switch type either to WLAN(XPAN) or non_WLAN(BLE) */
  2022. WMI_AUDIO_TRANSPORT_SWITCH_TYPE_EVENTID,
  2023. /** Usynchronized Service Discovery:
  2024. * Send USD event with USD mode status as success or fail.
  2025. */
  2026. WMI_USD_SERVICE_EVENTID,
  2027. /* GPIO Event */
  2028. WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
  2029. /** upload H_CV info WMI event
  2030. * to indicate uploaded H_CV info to host
  2031. */
  2032. WMI_UPLOADH_EVENTID,
  2033. /** capture H info WMI event
  2034. * to indicate captured H info to host
  2035. */
  2036. WMI_CAPTUREH_EVENTID,
  2037. /* hw RFkill */
  2038. WMI_RFKILL_STATE_CHANGE_EVENTID,
  2039. /* Smart Antenna Controller status */
  2040. WMI_SMARTANT_STATE_CHANGE_EVENTID,
  2041. WMI_GPIO_STATE_RES_EVENTID,
  2042. /* TDLS Event */
  2043. WMI_TDLS_PEER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TDLS),
  2044. /* Resmgr Event */
  2045. /* deliver the new channel time quota for home channels */
  2046. WMI_RESMGR_CHAN_TIME_QUOTA_CHANGED_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RESMGR),
  2047. /** STA SMPS Event */
  2048. /** force SMPS mode */
  2049. WMI_STA_SMPS_FORCE_MODE_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STA_SMPS),
  2050. /*location scan event*/
  2051. /*report the firmware's capability of batch scan*/
  2052. WMI_BATCH_SCAN_ENABLED_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
  2053. /*batch scan result*/
  2054. WMI_BATCH_SCAN_RESULT_EVENTID,
  2055. /* OEM Event */
  2056. WMI_OEM_CAPABILITY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OEM), /*DEPRECATED*/
  2057. WMI_OEM_MEASUREMENT_REPORT_EVENTID, /* DEPRECATED */
  2058. WMI_OEM_ERROR_REPORT_EVENTID, /* DEPRECATED */
  2059. WMI_OEM_RESPONSE_EVENTID,
  2060. WMI_OEM_DMA_RING_CFG_RSP_EVENTID,
  2061. WMI_OEM_DMA_BUF_RELEASE_EVENTID,
  2062. WMI_OEM_DATA_EVENTID,
  2063. /* NAN Event */
  2064. WMI_NAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN),
  2065. WMI_NAN_DISC_IFACE_CREATED_EVENTID,
  2066. WMI_NAN_DISC_IFACE_DELETED_EVENTID,
  2067. WMI_NAN_STARTED_CLUSTER_EVENTID,
  2068. WMI_NAN_JOINED_CLUSTER_EVENTID,
  2069. WMI_NAN_DMESG_EVENTID,
  2070. /** Event to deliver OEM's NAN specific opaque data */
  2071. WMI_NAN_OEM_DATA_EVENTID,
  2072. /* Coex Event */
  2073. WMI_COEX_REPORT_ANTENNA_ISOLATION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_COEX),
  2074. WMI_SAR_GET_LIMITS_EVENTID,
  2075. /** Dedicated BT Antenna Mode (DBAM) complete event */
  2076. WMI_COEX_DBAM_COMPLETE_EVENTID,
  2077. WMI_TAS_POWER_HISTORY_EVENTID,
  2078. /* LPI Event */
  2079. WMI_LPI_RESULT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LPI),
  2080. WMI_LPI_STATUS_EVENTID,
  2081. WMI_LPI_HANDOFF_EVENTID,
  2082. /* ExtScan events */
  2083. WMI_EXTSCAN_START_STOP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_EXTSCAN),
  2084. WMI_EXTSCAN_OPERATION_EVENTID,
  2085. WMI_EXTSCAN_TABLE_USAGE_EVENTID,
  2086. WMI_EXTSCAN_CACHED_RESULTS_EVENTID,
  2087. WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID,
  2088. WMI_EXTSCAN_HOTLIST_MATCH_EVENTID,
  2089. WMI_EXTSCAN_CAPABILITIES_EVENTID,
  2090. WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID,
  2091. /* mDNS offload events */
  2092. WMI_MDNS_STATS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MDNS_OFL),
  2093. /* SAP Authentication offload events */
  2094. WMI_SAP_OFL_ADD_STA_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SAP_OFL),
  2095. WMI_SAP_OFL_DEL_STA_EVENTID,
  2096. WMI_SAP_OBSS_DETECTION_REPORT_EVENTID,
  2097. /* OBSS Offloads events */
  2098. WMI_OBSS_COLOR_COLLISION_DETECTION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OBSS_OFL),
  2099. /** Out-of-context-of-bss (OCB) events */
  2100. WMI_OCB_SET_CONFIG_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OCB),
  2101. WMI_OCB_GET_TSF_TIMER_RESP_EVENTID,
  2102. WMI_DCC_GET_STATS_RESP_EVENTID,
  2103. WMI_DCC_UPDATE_NDL_RESP_EVENTID,
  2104. WMI_DCC_STATS_EVENTID,
  2105. /* System-On-Chip events */
  2106. WMI_SOC_SET_HW_MODE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SOC),
  2107. WMI_SOC_HW_MODE_TRANSITION_EVENTID,
  2108. WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID,
  2109. /** Motion Aided WiFi Connectivity (MAWC) events */
  2110. WMI_MAWC_ENABLE_SENSOR_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MAWC),
  2111. /** pkt filter (BPF) offload relevant events */
  2112. WMI_BPF_CAPABILIY_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
  2113. WMI_BPF_VDEV_STATS_INFO_EVENTID,
  2114. WMI_BPF_GET_VDEV_WORK_MEMORY_RESP_EVENTID,
  2115. /* RMC specific event */
  2116. /* RMC manual leader selected event */
  2117. WMI_RMC_NEW_LEADER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RMC),
  2118. /** WMI events related to regulatory offload */
  2119. WMI_REG_CHAN_LIST_CC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_REGULATORY),
  2120. WMI_11D_NEW_COUNTRY_EVENTID,
  2121. WMI_REG_CHAN_LIST_CC_EXT_EVENTID,
  2122. WMI_AFC_EVENTID,
  2123. WMI_REG_CHAN_LIST_CC_EXT2_EVENTID, /* DEPRECATED */
  2124. /** Events for TWT(Target Wake Time) of STA and AP */
  2125. WMI_TWT_ENABLE_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TWT),
  2126. WMI_TWT_DISABLE_COMPLETE_EVENTID,
  2127. WMI_TWT_ADD_DIALOG_COMPLETE_EVENTID,
  2128. WMI_TWT_DEL_DIALOG_COMPLETE_EVENTID,
  2129. WMI_TWT_PAUSE_DIALOG_COMPLETE_EVENTID,
  2130. WMI_TWT_RESUME_DIALOG_COMPLETE_EVENTID,
  2131. WMI_TWT_BTWT_INVITE_STA_COMPLETE_EVENTID,
  2132. WMI_TWT_BTWT_REMOVE_STA_COMPLETE_EVENTID,
  2133. WMI_TWT_SESSION_STATS_EVENTID,
  2134. WMI_TWT_NUDGE_DIALOG_COMPLETE_EVENTID,
  2135. WMI_TWT_NOTIFY_EVENTID,
  2136. WMI_TWT_ACK_EVENTID,
  2137. /** Events in Prototyping phase */
  2138. WMI_NDI_CAP_RSP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PROTOTYPE),
  2139. WMI_NDP_INITIATOR_RSP_EVENTID,
  2140. WMI_NDP_RESPONDER_RSP_EVENTID,
  2141. WMI_NDP_END_RSP_EVENTID,
  2142. WMI_NDP_INDICATION_EVENTID,
  2143. WMI_NDP_CONFIRM_EVENTID,
  2144. WMI_NDP_END_INDICATION_EVENTID,
  2145. WMI_WLAN_COEX_BT_ACTIVITY_EVENTID,
  2146. WMI_NDL_SCHEDULE_UPDATE_EVENTID,
  2147. WMI_NDP_EVENTID,
  2148. /** WMI events related to motion detection */
  2149. WMI_MOTION_DET_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MOTION_DET),
  2150. WMI_MOTION_DET_BASE_LINE_HOST_EVENTID,
  2151. /** WMI events related to Estimation of Service Parameters (802.11mc) */
  2152. WMI_ESP_ESTIMATE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ESP),
  2153. /** WMI events related to Audio Frame aggregation feature **/
  2154. WMI_AUDIO_AGGR_REPORT_STATISTICS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AUDIO),
  2155. WMI_AUDIO_AGGR_SCHED_METHOD_EVENTID,
  2156. /** Vendor defined WMI events **/
  2157. WMI_VENDOR_PDEV_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VENDOR),
  2158. WMI_VENDOR_VDEV_EVENTID,
  2159. WMI_VENDOR_PEER_EVENTID,
  2160. /** Further vendor event IDs can be added below **/
  2161. /** WMI event specific to MLO **/
  2162. /** MLO link active / inactive response event */
  2163. WMI_MLO_LINK_SET_ACTIVE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MLO),
  2164. /* Response event for MLO setup cmd */
  2165. WMI_MLO_SETUP_COMPLETE_EVENTID,
  2166. /* Response event for MLO teardown cmd */
  2167. WMI_MLO_TEARDOWN_COMPLETE_EVENTID,
  2168. /* Response event for Link Removal Cmd */
  2169. WMI_MLO_LINK_REMOVAL_EVENTID,
  2170. /* Response event for WMI_MLO_AP_VDEV_TID_TO_LINK_MAP_CMDID */
  2171. WMI_MLO_AP_VDEV_TID_TO_LINK_MAP_EVENTID,
  2172. /* Response event for WMI_MLO_VDEV_GET_LINK_INFO_CMDID */
  2173. WMI_MLO_VDEV_LINK_INFO_EVENTID,
  2174. /** request host to do T2LM neg to the un-disabled link */
  2175. WMI_MLO_LINK_DISABLE_REQUEST_EVENTID,
  2176. /** request host to switch to new link for specified vdev */
  2177. WMI_MLO_LINK_SWITCH_REQUEST_EVENTID,
  2178. /** Response event for WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID */
  2179. WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_EVENTID,
  2180. /** WMI Event to spcify reason for link state switch */
  2181. WMI_MLO_LINK_STATE_SWITCH_EVENTID,
  2182. /** WMI Event to sync link info to host */
  2183. WMI_MLO_LINK_INFO_SYNC_EVENTID,
  2184. /** WMI Event to announce host about the TLT update for TID */
  2185. WMI_MLO_TLT_SELECTION_FOR_TID_SPRAY_EVENTID,
  2186. /** WMI Event to send the status of T2LM configured */
  2187. WMI_MLO_PEER_TID_TO_LINK_MAP_EVENTID,
  2188. /* WMI event specific to Quiet handling */
  2189. WMI_QUIET_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_QUIET_OFL),
  2190. /* ODD events */
  2191. WMI_ODD_LIVEDUMP_RESPONSE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ODD),
  2192. /** WMI events specific to manually-triggered UL */
  2193. /**
  2194. * WMI Event to send Manual UL OFDMA Trigger frame status feedback to Host
  2195. */
  2196. WMI_MANUAL_UL_OFDMA_TRIG_FEEDBACK_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MANUAL_UL_TRIG),
  2197. /**
  2198. * WMI Event to send Manual UL OFDMA Trigger frame RX PPDU info to Host
  2199. */
  2200. WMI_MANUAL_UL_OFDMA_TRIG_RX_PEER_USERINFO_EVENTID,
  2201. } WMI_EVT_ID;
  2202. /* defines for OEM message sub-types */
  2203. #define WMI_OEM_CAPABILITY_REQ 0x01
  2204. #define WMI_OEM_CAPABILITY_RSP 0x02
  2205. #define WMI_OEM_MEASUREMENT_REQ 0x03
  2206. #define WMI_OEM_MEASUREMENT_RSP 0x04
  2207. #define WMI_OEM_ERROR_REPORT_RSP 0x05
  2208. #define WMI_OEM_NAN_MEAS_REQ 0x06
  2209. #define WMI_OEM_NAN_MEAS_RSP 0x07
  2210. #define WMI_OEM_NAN_PEER_INFO 0x08
  2211. #define WMI_OEM_CONFIGURE_LCR 0x09
  2212. #define WMI_OEM_CONFIGURE_LCI 0x0A
  2213. #define WMI_CHAN_LIST_TAG 0x1
  2214. #define WMI_SSID_LIST_TAG 0x2
  2215. #define WMI_BSSID_LIST_TAG 0x3
  2216. #define WMI_IE_TAG 0x4
  2217. #define WMI_SCAN_START_OFFSET_TAG 0x5
  2218. typedef struct {
  2219. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
  2220. /** primary 20 MHz channel frequency in mhz */
  2221. A_UINT32 mhz;
  2222. /** Center frequency 1 in MHz*/
  2223. A_UINT32 band_center_freq1;
  2224. /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
  2225. A_UINT32 band_center_freq2;
  2226. /** channel info described below */
  2227. A_UINT32 info;
  2228. /** contains min power, max power, reg power and reg class id. */
  2229. A_UINT32 reg_info_1;
  2230. /** contains antennamax, max bandwidth */
  2231. A_UINT32 reg_info_2;
  2232. } wmi_channel;
  2233. typedef enum {
  2234. WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
  2235. WMI_CHANNEL_CHANGE_CAUSE_CSA,
  2236. } wmi_channel_change_cause;
  2237. /** channel info consists of 6 bits of channel mode */
  2238. #define WMI_SET_CHANNEL_MODE(pwmi_channel,val) do { \
  2239. (pwmi_channel)->info &= 0xffffffc0; \
  2240. (pwmi_channel)->info |= (val); \
  2241. } while (0)
  2242. #define WMI_GET_CHANNEL_MODE(pwmi_channel) ((pwmi_channel)->info & 0x0000003f)
  2243. #define WMI_CHAN_FLAG_HT40_PLUS 6
  2244. #define WMI_CHAN_FLAG_PASSIVE 7
  2245. #define WMI_CHAN_ADHOC_ALLOWED 8
  2246. #define WMI_CHAN_AP_DISABLED 9
  2247. #define WMI_CHAN_FLAG_DFS 10
  2248. #define WMI_CHAN_FLAG_ALLOW_HT 11 /* HT is allowed on this channel */
  2249. #define WMI_CHAN_FLAG_ALLOW_VHT 12 /* VHT is allowed on this channel */
  2250. #define WMI_CHANNEL_CHANGE_CAUSE_CSA 13 /*Indicate reason for channel switch */
  2251. #define WMI_CHAN_FLAG_HALF_RATE 14 /* Indicates half rate channel */
  2252. #define WMI_CHAN_FLAG_QUARTER_RATE 15 /* Indicates quarter rate channel */
  2253. #define WMI_CHAN_FLAG_DFS_CFREQ2 16 /* Enable radar event reporting for sec80 in VHT80p80 */
  2254. #define WMI_CHAN_FLAG_ALLOW_HE 17 /* HE (11ax) is allowed on this channel */
  2255. #define WMI_CHAN_FLAG_PSC 18 /* Indicate it is a PSC (preferred scanning channel) */
  2256. #define WMI_CHAN_FLAG_NAN_DISABLED 19 /* Indicates that NAN operations are disabled on this channel */
  2257. #define WMI_CHAN_FLAG_STA_DFS 20 /* Indicates if STA should process radar signals */
  2258. #define WMI_CHAN_FLAG_ALLOW_EHT 21 /* EHT (11be) is allowed on this channel */
  2259. #define WMI_SET_CHANNEL_FLAG(pwmi_channel,flag) do { \
  2260. (pwmi_channel)->info |= ((A_UINT32) 1 << flag); \
  2261. } while (0)
  2262. #define WMI_GET_CHANNEL_FLAG(pwmi_channel,flag) \
  2263. (((pwmi_channel)->info & ((A_UINT32) 1 << flag)) >> flag)
  2264. #define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel,val) do { \
  2265. (pwmi_channel)->reg_info_1 &= 0xffffff00; \
  2266. (pwmi_channel)->reg_info_1 |= (val & 0xff); \
  2267. } while (0)
  2268. #define WMI_GET_CHANNEL_MIN_POWER(pwmi_channel) ((pwmi_channel)->reg_info_1 & 0xff)
  2269. #define WMI_SET_CHANNEL_MAX_POWER(pwmi_channel,val) do { \
  2270. (pwmi_channel)->reg_info_1 &= 0xffff00ff; \
  2271. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 8); \
  2272. } while (0)
  2273. #define WMI_GET_CHANNEL_MAX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 8) & 0xff)
  2274. #define WMI_SET_CHANNEL_REG_POWER(pwmi_channel,val) do { \
  2275. (pwmi_channel)->reg_info_1 &= 0xff00ffff; \
  2276. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 16); \
  2277. } while (0)
  2278. #define WMI_GET_CHANNEL_REG_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 16) & 0xff)
  2279. #define WMI_SET_CHANNEL_REG_CLASSID(pwmi_channel,val) do { \
  2280. (pwmi_channel)->reg_info_1 &= 0x00ffffff; \
  2281. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 24); \
  2282. } while (0)
  2283. #define WMI_GET_CHANNEL_REG_CLASSID(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 24) & 0xff)
  2284. #define WMI_SET_CHANNEL_ANTENNA_MAX(pwmi_channel,val) do { \
  2285. (pwmi_channel)->reg_info_2 &= 0xffffff00; \
  2286. (pwmi_channel)->reg_info_2 |= (val & 0xff); \
  2287. } while (0)
  2288. #define WMI_GET_CHANNEL_ANTENNA_MAX(pwmi_channel) ((pwmi_channel)->reg_info_2 & 0xff)
  2289. /* max tx power is in 1 dBm units */
  2290. #define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel,val) do { \
  2291. (pwmi_channel)->reg_info_2 &= 0xffff00ff; \
  2292. (pwmi_channel)->reg_info_2 |= ((val & 0xff) << 8); \
  2293. } while (0)
  2294. #define WMI_GET_CHANNEL_MAX_TX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_2)>>8) & 0xff)
  2295. /* max bw supported for each channel, enum wmi_channel_width as value */
  2296. #define WMI_SET_CHANNEL_MAX_BANDWIDTH(pwmi_channel,val) do { \
  2297. (pwmi_channel)->reg_info_2 &= 0xff00ffff; \
  2298. (pwmi_channel)->reg_info_2 |= ((val & 0xff) << 16); \
  2299. } while (0)
  2300. #define WMI_GET_CHANNEL_MAX_BANDWIDTH(pwmi_channel) ((((pwmi_channel)->reg_info_2) >> 16) & 0xff)
  2301. /** HT Capabilities*/
  2302. #define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
  2303. #define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
  2304. #define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
  2305. #define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
  2306. #define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
  2307. #define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
  2308. #define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
  2309. #define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
  2310. #define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
  2311. #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
  2312. #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
  2313. #define WMI_HT_CAP_HT40_SGI 0x0800
  2314. #define WMI_HT_CAP_RX_LDPC 0x1000 /* LDPC RX support */
  2315. #define WMI_HT_CAP_TX_LDPC 0x2000 /* LDPC TX support */
  2316. /* These macros should be used when we wish to advertise STBC support for
  2317. * only 1SS or 2SS or 3SS. */
  2318. #define WMI_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
  2319. #define WMI_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
  2320. #define WMI_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
  2321. #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
  2322. WMI_HT_CAP_HT20_SGI | \
  2323. WMI_HT_CAP_HT40_SGI | \
  2324. WMI_HT_CAP_TX_STBC | \
  2325. WMI_HT_CAP_RX_STBC | \
  2326. WMI_HT_CAP_LDPC | \
  2327. WMI_HT_CAP_TX_LDPC | \
  2328. WMI_HT_CAP_RX_LDPC)
  2329. /* WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
  2330. field. The fields not defined here are not supported, or reserved.
  2331. Do not change these masks and if you have to add new one follow the
  2332. bitmask as specified by 802.11ac draft.
  2333. */
  2334. #define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
  2335. #define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
  2336. #define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
  2337. #define WMI_VHT_CAP_CH_WIDTH_160MHZ 0x00000004
  2338. #define WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ 0x00000008
  2339. #define WMI_VHT_CAP_RX_LDPC 0x00000010
  2340. #define WMI_VHT_CAP_SGI_80MHZ 0x00000020
  2341. #define WMI_VHT_CAP_SGI_160MHZ 0x00000040
  2342. #define WMI_VHT_CAP_TX_STBC 0x00000080
  2343. #define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
  2344. #define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
  2345. #define WMI_VHT_CAP_SU_BFORMER 0x00000800
  2346. #define WMI_VHT_CAP_SU_BFORMEE 0x00001000
  2347. #define WMI_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
  2348. #define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
  2349. #define WMI_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
  2350. #define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
  2351. #define WMI_VHT_CAP_MU_BFORMER 0x00080000
  2352. #define WMI_VHT_CAP_MU_BFORMEE 0x00100000
  2353. #define WMI_VHT_CAP_TXOP_PS 0x00200000
  2354. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
  2355. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
  2356. #define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
  2357. #define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
  2358. #define WMI_VHT_EXTENDED_NSS_BW_MASK 0xC0000000
  2359. #define WMI_VHT_EXTENDED_NSS_BW_MASK_SHIFT 30
  2360. /* TEMPORARY:
  2361. * Preserve the incorrect old name as an alias for the correct new name
  2362. * until all references to the old name have been removed from all hosts
  2363. * and targets.
  2364. */
  2365. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT
  2366. /* These macros should be used when we wish to advertise STBC support for
  2367. * only 1SS or 2SS or 3SS. */
  2368. #define WMI_VHT_CAP_RX_STBC_1SS 0x00000100
  2369. #define WMI_VHT_CAP_RX_STBC_2SS 0x00000200
  2370. #define WMI_VHT_CAP_RX_STBC_3SS 0x00000300
  2371. /* TEMPORARY:
  2372. * Preserve the incorrect old name as an alias for the correct new name
  2373. * until all references to the old name have been removed from all hosts
  2374. * and targets.
  2375. */
  2376. #define WMI_vHT_CAP_RX_STBC_3SS WMI_VHT_CAP_RX_STBC_3SS
  2377. /* TEMPORARY:
  2378. * Spec does not have VHT TX LDPC capability bit. To Maintain backward
  2379. * compatibility due to previous incorrect definition, the value is moved
  2380. * from 0x4 to 0x0. No new use of WMI_VHT_CAP_TX_LDPC should be added.
  2381. */
  2382. #define WMI_VHT_CAP_TX_LDPC 0x0
  2383. #define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
  2384. WMI_VHT_CAP_SGI_80MHZ | \
  2385. WMI_VHT_CAP_TX_STBC | \
  2386. WMI_VHT_CAP_RX_STBC_MASK | \
  2387. WMI_VHT_CAP_RX_LDPC | \
  2388. WMI_VHT_CAP_TX_LDPC | \
  2389. WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
  2390. WMI_VHT_CAP_RX_FIXED_ANT | \
  2391. WMI_VHT_CAP_TX_FIXED_ANT)
  2392. /* Interested readers refer to Rx/Tx MCS Map definition as defined in
  2393. 802.11ac
  2394. */
  2395. #define WMI_VHT_MAX_MCS_EXT_SS_GET(vht_mcs_map, index) WMI_GET_BITS(vht_mcs_map, 16 + index, 1)
  2396. #define WMI_VHT_MAX_MCS_EXT_SS_SET(vht_mcs_map, index, value) WMI_SET_BITS(vht_mcs_map, 16 + index, 1, value)
  2397. /* Notification bit for Ext MCS 10/11 support */
  2398. #define WMI_VHT_MCS_NOTIFY_EXT_SS_GET(vht_mcs_map) WMI_GET_BITS(vht_mcs_map, 24, 1)
  2399. #define WMI_VHT_MCS_NOTIFY_EXT_SS_SET(vht_mcs_map, value) WMI_SET_BITS(vht_mcs_map, 24, 1, value)
  2400. #define WMI_VHT_MAX_MCS_4_SS_MASK(r,ss) ((3 & (r)) << (((ss) - 1) << 1))
  2401. #define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
  2402. #define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
  2403. /** 11ax capabilities */
  2404. #define WMI_HE_CAP_PPE_PRESENT 0x00000001
  2405. #define WMI_HE_CAP_TWT_RESPONDER_SUPPORT 0x00000002
  2406. #define WMI_HE_CAP_TWT_REQUESTER_SUPPORT 0x00000004
  2407. #define WMI_HE_FRAG_SUPPORT_MASK 0x00000018
  2408. #define WMI_HE_FRAG_SUPPORT_SHIFT 3
  2409. #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT 0x00000001
  2410. #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT 0x00000002
  2411. #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT 0x00000004
  2412. #define WMI_HE_CAP_RX_DL_OFDMA_SUPPORT 0x00000018
  2413. #define WMI_HE_CAP_RX_DL_MUMIMO_SUPPORT 0x00000030
  2414. #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT_GET(he_cap_info_dword1) \
  2415. WMI_GET_BITS(he_cap_info_dword1, 0, 1)
  2416. #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT_SET(he_cap_info_dword1, value) \
  2417. WMI_SET_BITS(he_cap_info_dword1, 0, 1, value)
  2418. #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT_GET(he_cap_info_dword1) \
  2419. WMI_GET_BITS(he_cap_info_dword1, 1, 1)
  2420. #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT_SET(he_cap_info_dword1, value) \
  2421. WMI_SET_BITS(he_cap_info_dword1, 1, 1, value)
  2422. #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT_GET(he_cap_info_dword1) \
  2423. WMI_GET_BITS(he_cap_info_dword1, 2, 1)
  2424. #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT_SET(he_cap_info_dword1, value) \
  2425. WMI_SET_BITS(he_cap_info_dword1, 2, 1, value)
  2426. #define WMI_HE_CAP_RX_DL_OFDMA_SUPPORT_GET(he_cap_info_dword1) \
  2427. WMI_GET_BITS(he_cap_info_dword1, 3, 2)
  2428. #define WMI_HE_CAP_RX_DL_OFDMA_SUPPORT_SET(he_cap_info_dword1, value) \
  2429. WMI_SET_BITS(he_cap_info_dword1, 3, 2, value)
  2430. #define WMI_HE_CAP_RX_DL_MUMIMO_SUPPORT_GET(he_cap_info_dword1) \
  2431. WMI_GET_BITS(he_cap_info_dword1, 5, 2)
  2432. #define WMI_HE_CAP_RX_DL_MUMIMO_SUPPORT_SET(he_cap_info_dword1, value) \
  2433. WMI_SET_BITS(he_cap_info_dword1, 5, 2, value)
  2434. /* Interested readers refer to Rx/Tx MCS Map definition as defined in 802.11ax
  2435. */
  2436. #define WMI_HE_MAX_MCS_4_SS_MASK(r,ss) ((3 & (r)) << (((ss) - 1) << 1))
  2437. /*
  2438. * index ranges from 0 to 15, and is used for checking if MCS 12/13 is enabled
  2439. * for a particular NSS.
  2440. * The lower 8 bits (indices 0-7) within the 16 bits indicate MCS 12/13
  2441. * enablement for BW <= 80MHz; the upper 8 bits (indices 8-15) within
  2442. * the 16 bits indicate MCS 12/13 enablement for BW > 80MHz.
  2443. * The 16 bits for the index values are within the upper bits (bits 31:16)
  2444. * of a 32-bit word.
  2445. */
  2446. #define WMI_HE_EXTRA_MCS_SS_GET(he_mcs_map_ext, index) \
  2447. WMI_GET_BITS(he_mcs_map_ext, 16 + index, 1)
  2448. #define WMI_HE_EXTRA_MCS_SS_SET(he_mcs_map_ext, index, value) \
  2449. WMI_SET_BITS(he_mcs_map_ext, 16 + index, 1, value)
  2450. /* fragmentation support field value */
  2451. enum {
  2452. WMI_HE_FRAG_SUPPORT_LEVEL0, /* No Fragmentation support */
  2453. WMI_HE_FRAG_SUPPORT_LEVEL1, /* support for fragments within a VHT single MPDU, no support for fragments within AMPDU */
  2454. WMI_HE_FRAG_SUPPORT_LEVEL2, /* support for up to 1 fragment per MSDU within a single A-MPDU */
  2455. WMI_HE_FRAG_SUPPORT_LEVEL3, /* support for multiple fragments per MSDU within an A-MPDU */
  2456. };
  2457. enum {
  2458. WMI_HE_RX_DL_OFDMA_SUPPORT_DEFAULT, /* Default */
  2459. WMI_HE_RX_DL_OFDMA_SUPPORT_DISABLE, /* RX DL OFDMA Support Disabled */
  2460. WMI_HE_RX_DL_OFDMA_SUPPORT_ENABLE, /* RX DL OFDMA Support Enabled */
  2461. WMI_HE_RX_DL_OFDMA_SUPPORT_INVALID, /* INVALID */
  2462. };
  2463. enum {
  2464. WMI_HE_RX_DL_MUMIMO_SUPPORT_DEFAULT, /* Default */
  2465. WMI_HE_RX_DL_MUMIMO_SUPPORT_DISABLE, /* RX DL MU-MIMO Support Disabled */
  2466. WMI_HE_RX_DL_MUMIMO_SUPPORT_ENABLE, /* RX DL MU-MIMO Support Enabled */
  2467. WMI_HE_RX_DL_MUMIMO_SUPPORT_INVALID, /* INVALID */
  2468. };
  2469. /** NOTE: This defs cannot be changed in the future without breaking WMI compatibility */
  2470. #define WMI_MAX_NUM_SS MAX_HE_NSS
  2471. #define WMI_MAX_NUM_RU MAX_HE_RU
  2472. /*
  2473. * Figure 8 554ae: -PPE Threshold Info field format
  2474. * we pack PPET16 and PPT8 for four RU's in one element of array.
  2475. *
  2476. * ppet16_ppet8_ru3_ru0 array element 0 holds:
  2477. * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
  2478. *rsvd |NSS1,RU4|NSS1,RU4|NSS1,RU3|NSS1,RU3|NSS1,RU2|NSS1,RU2|NSS1,RU1|NSS1,RU1|
  2479. *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
  2480. *
  2481. * ppet16_ppet8_ru3_ru0 array element 1 holds:
  2482. * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
  2483. *rsvd |NSS2,RU4|NSS2,RU4|NSS2,RU3|NSS2,RU3|NSS2,RU2|NSS2,RU2|NSS2,RU1|NSS2,RU1|
  2484. *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
  2485. *
  2486. * etc.
  2487. */
  2488. /*
  2489. * Note that in these macros, "ru" is one-based, not zero-based, while
  2490. * nssm1 is zero-based.
  2491. */
  2492. #define WMI_SET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
  2493. do { \
  2494. ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) & 3) * 6)); \
  2495. ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet & 7) << (((ru-1) & 3) * 6)); \
  2496. } while (0)
  2497. #define WMI_GET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1) \
  2498. ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) & 3) * 6)) & 7)
  2499. #define WMI_SET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
  2500. do { \
  2501. ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) & 3) * 6 + 3)); \
  2502. ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1) & 3) * 6 + 3)); \
  2503. } while (0)
  2504. #define WMI_GET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1) \
  2505. ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) & 3) * 6 + 3)) & 7)
  2506. typedef struct _wmi_ppe_threshold {
  2507. A_UINT32 numss_m1; /** NSS - 1*/
  2508. union {
  2509. A_UINT32 ru_count; /** RU COUNT OBSOLETE to be removed after few versions */
  2510. A_UINT32 ru_mask; /** RU index mask */
  2511. };
  2512. A_UINT32 ppet16_ppet8_ru3_ru0[WMI_MAX_NUM_SS]; /** ppet8 and ppet16 for max num ss */
  2513. /**************************************************
  2514. * As this struct is embedded inside other structs,
  2515. * it cannot be expanded without breaking backwards
  2516. * compatibility. Do not add new fields here.
  2517. **************************************************/
  2518. } wmi_ppe_threshold;
  2519. #define WMI_MAX_EHTCAP_MAC_SIZE 2
  2520. #define WMI_MAX_EHTCAP_PHY_SIZE 3
  2521. /*
  2522. * 0 – index indicated EHT-MCS map for 20Mhz only sta (4 bytes valid)
  2523. * 1 – index for <= 80MHz bw (only 3 bytes are valid and other is reserved)
  2524. * 2 – index for == 160Mhz bw (only 3 bytes are valid and other is reserved)
  2525. * 3 – index for == 320Mhz bw (only 3 bytes are valid and other is reserved)
  2526. */
  2527. enum {
  2528. WMI_EHT_SUPP_MCS_20MHZ_ONLY,
  2529. WMI_EHT_SUPP_MCS_LE_80MHZ,
  2530. WMI_EHT_SUPP_MCS_160MHZ,
  2531. WMI_EHT_SUPP_MCS_320MHZ,
  2532. };
  2533. #define WMI_MAX_EHT_SUPP_MCS_2G_SIZE 2
  2534. #define WMI_MAX_EHT_SUPP_MCS_5G_SIZE 4
  2535. /* WMI_SYS_CAPS_* refer to the capabilities that system support
  2536. */
  2537. #define WMI_SYS_CAP_ENABLE 0x00000001
  2538. #define WMI_SYS_CAP_TXPOWER 0x00000002
  2539. /*
  2540. * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions.
  2541. * Bits 5:0 are reserved
  2542. */
  2543. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS (28)
  2544. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS (24)
  2545. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS (20)
  2546. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS (16)
  2547. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS (12)
  2548. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS (8)
  2549. #define WMI_DBS_HW_MODE_DBS_MODE_BITPOS (7)
  2550. #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS (6)
  2551. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  2552. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  2553. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  2554. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  2555. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  2556. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  2557. #define WMI_DBS_HW_MODE_DBS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
  2558. #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
  2559. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \
  2560. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value)
  2561. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \
  2562. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value)
  2563. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \
  2564. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value)
  2565. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \
  2566. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value)
  2567. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \
  2568. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value)
  2569. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \
  2570. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value)
  2571. #define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value) \
  2572. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_DBS_MODE_BITPOS, 1, value)
  2573. #define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value) \
  2574. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value)
  2575. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \
  2576. ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  2577. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \
  2578. ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  2579. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \
  2580. ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  2581. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \
  2582. ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  2583. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \
  2584. ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  2585. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \
  2586. ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  2587. #define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode) \
  2588. ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
  2589. #define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode) \
  2590. ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
  2591. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS (31)
  2592. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS (30)
  2593. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS (29)
  2594. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS (28)
  2595. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS (27)
  2596. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
  2597. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
  2598. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
  2599. #define WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
  2600. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
  2601. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \
  2602. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value)
  2603. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(scan_cfg, value) \
  2604. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS, 1, value)
  2605. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(scan_cfg, value) \
  2606. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS, 1, value)
  2607. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_SET(scan_cfg, value) \
  2608. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS, 1, value)
  2609. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_SET(scan_cfg, value) \
  2610. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS, 1, value)
  2611. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_cfg) \
  2612. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
  2613. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_cfg) \
  2614. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
  2615. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_cfg) \
  2616. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
  2617. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_GET(scan_cfg) \
  2618. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
  2619. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_GET(scan_cfg) \
  2620. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
  2621. #define WMI_DBS_FW_MODE_CFG_DBS_BITPOS (31)
  2622. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS (30)
  2623. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS (29)
  2624. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS (28)
  2625. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS (27)
  2626. #define WMI_DBS_FW_MODE_CFG_ASYNC_SBS_BITPOS (26)
  2627. #define WMI_DBS_FW_MODE_CFG_DBS_MASK ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
  2628. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
  2629. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
  2630. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_MASK ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS)
  2631. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_MASK ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS)
  2632. #define WMI_DBS_FW_MODE_CFG_ASYNC_SBS_MASK ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_ASYNC_SBS_BITPOS)
  2633. #define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \
  2634. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value)
  2635. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(fw_mode, value) \
  2636. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS, 1, value)
  2637. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_SET(fw_mode, value) \
  2638. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS, 1, value)
  2639. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_SET(fw_mode, value) \
  2640. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS, 1, value)
  2641. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_SET(fw_mode, value) \
  2642. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS, 1, value)
  2643. #define WMI_DBS_FW_MODE_CFG_ASYNC_SBS_SET(fw_mode, value) \
  2644. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_ASYNC_SBS_BITPOS, 1, value)
  2645. #define WMI_DBS_FW_MODE_CFG_DBS_GET(fw_mode) \
  2646. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
  2647. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_mode) \
  2648. ((fw_mode & WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
  2649. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_GET(fw_mode) \
  2650. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
  2651. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_GET(fw_mode) \
  2652. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS)
  2653. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_GET(fw_mode) \
  2654. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS)
  2655. #define WMI_DBS_FW_MODE_CFG_ASYNC_SBS_GET(fw_mode) \
  2656. ((fw_mode & WMI_DBS_FW_MODE_CFG_ASYNC_SBS_MASK) >> WMI_DBS_FW_MODE_CFG_ASYNC_SBS_BITPOS)
  2657. /** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */
  2658. typedef struct _wmi_abi_version {
  2659. A_UINT32 abi_version_0; /** WMI Major and Minor versions */
  2660. A_UINT32 abi_version_1; /** WMI change revision */
  2661. A_UINT32 abi_version_ns_0; /** ABI version namespace first four dwords */
  2662. A_UINT32 abi_version_ns_1; /** ABI version namespace second four dwords */
  2663. A_UINT32 abi_version_ns_2; /** ABI version namespace third four dwords */
  2664. A_UINT32 abi_version_ns_3; /** ABI version namespace fourth four dwords */
  2665. } wmi_abi_version;
  2666. /*
  2667. * maximum number of memory requests allowed from FW.
  2668. */
  2669. #define WMI_MAX_MEM_REQS 16
  2670. /* !!NOTE!!:
  2671. * This HW_BD_INFO_SIZE cannot be changed without breaking compatibility.
  2672. * Please don't change it.
  2673. */
  2674. #define HW_BD_INFO_SIZE 5
  2675. /**
  2676. * PDEV ID to identify the physical device,
  2677. * value 0 reserved for SOC level commands/event
  2678. */
  2679. #define WMI_PDEV_ID_SOC 0 /* SOC level, applicable to all PDEVs */
  2680. #define WMI_PDEV_ID_1ST 1 /* first pdev (pdev 0) */
  2681. #define WMI_PDEV_ID_2ND 2 /* second pdev (pdev 1) */
  2682. #define WMI_PDEV_ID_3RD 3 /* third pdev (pdev 2) */
  2683. /*
  2684. * Enum regarding which BDF elements are provided in which elements of the
  2685. * wmi_service_ready_event_fixed_param.hw_bd_info[] array
  2686. */
  2687. typedef enum {
  2688. BDF_VERSION = 0,
  2689. REF_DESIGN_ID = 1,
  2690. CUSTOMER_ID = 2,
  2691. PROJECT_ID = 3,
  2692. BOARD_DATA_REV = 4,
  2693. } wmi_hw_bd_info_e;
  2694. /*
  2695. * Macros to get/set BDF details within the
  2696. * wmi_service_ready_event_fixed_param.hw_bd_info[] array
  2697. */
  2698. #define WMI_GET_BDF_VERSION(hw_bd_info) ((hw_bd_info)[BDF_VERSION])
  2699. #define WMI_GET_REF_DESIGN(hw_bd_info) ((hw_bd_info)[REF_DESIGN_ID])
  2700. #define WMI_GET_CUSTOMER_ID(hw_bd_info) ((hw_bd_info)[CUSTOMER_ID])
  2701. #define WMI_GET_PROJECT_ID(hw_bd_info) ((hw_bd_info)[PROJECT_ID])
  2702. #define WMI_GET_BOARD_DATA_REV(hw_bd_info) ((hw_bd_info)[BOARD_DATA_REV])
  2703. #define WMI_SET_BDF_VERSION(hw_bd_info, val) ((hw_bd_info)[BDF_VERSION] = (val))
  2704. #define WMI_SET_REF_DESIGN(hw_bd_info, val) ((hw_bd_info)[REF_DESIGN_ID] = (val))
  2705. #define WMI_SET_CUSTOMER_ID(hw_bd_info, val) ((hw_bd_info)[CUSTOMER_ID] = (val))
  2706. #define WMI_SET_PROJECT_ID(hw_bd_info, val) ((hw_bd_info)[PROJECT_ID] = (val))
  2707. #define WMI_SET_BOARD_DATA_REV(hw_bd_info, val) ((hw_bd_info)[BOARD_DATA_REV] = (val))
  2708. /*
  2709. * Enum to indicate which Tx power capability is provided in which element of
  2710. * hw_tx_power_signed
  2711. */
  2712. typedef enum {
  2713. WMI_HW_MIN_TX_POWER_SIGNED = 0,
  2714. WMI_HW_MAX_TX_POWER_SIGNED = 1,
  2715. WMI_HW_TX_POWER_CAPS_MAX,
  2716. } wmi_hw_tx_power_caps;
  2717. /**
  2718. * The following struct holds optional payload for
  2719. * wmi_service_ready_event_fixed_param,e.g., 11ac pass some of the
  2720. * device capability to the host.
  2721. */
  2722. typedef struct {
  2723. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_READY_EVENT */
  2724. A_UINT32 fw_build_vers; /* firmware build number */
  2725. wmi_abi_version fw_abi_vers;
  2726. A_UINT32 phy_capability; /* WMI_PHY_CAPABILITY */
  2727. A_UINT32 max_frag_entry; /* Maximum number of frag table entries that SW will populate less 1 */
  2728. A_UINT32 num_rf_chains;
  2729. /* The following field is only valid for service type WMI_SERVICE_11AC */
  2730. A_UINT32 ht_cap_info; /* WMI HT Capability */
  2731. A_UINT32 vht_cap_info; /* VHT capability info field of 802.11ac */
  2732. A_UINT32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
  2733. A_UINT32 hw_min_tx_power;
  2734. A_UINT32 hw_max_tx_power;
  2735. /* sys_cap_info:
  2736. * bits 1:0 - RXTX LED + RFKILL enable flags (see WMI_LEDRFKILL_FLAGS)
  2737. * bits 31:2 - reserved (must be set to zero)
  2738. */
  2739. A_UINT32 sys_cap_info;
  2740. A_UINT32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
  2741. /** Max beacon and Probe Response IE offload size (includes
  2742. * optional P2P IEs) */
  2743. A_UINT32 max_bcn_ie_size;
  2744. /*
  2745. * request to host to allocate a chuck of memory and pss it down to FW via WM_INIT.
  2746. * FW uses this as FW extesnsion memory for saving its data structures. Only valid
  2747. * for low latency interfaces like PCIE where FW can access this memory directly (or)
  2748. * by DMA.
  2749. */
  2750. A_UINT32 num_mem_reqs;
  2751. /* Max No. scan channels target can support
  2752. * If FW is too old and doesn't indicate this number, host side value will default to
  2753. * 0, and host will take the original compatible value (62) for future scan channel
  2754. * setup.
  2755. */
  2756. A_UINT32 max_num_scan_channels;
  2757. /* Hardware board specific ID. Values defined in enum WMI_HWBOARD_ID.
  2758. * Default 0 means that hw_bd_info[] is invalid (legacy board).
  2759. */
  2760. A_UINT32 hw_bd_id;
  2761. A_UINT32 hw_bd_info[HW_BD_INFO_SIZE]; /* Board specific information. Invalid if hw_hd_id is zero. */
  2762. /*
  2763. * Number of MACs supported, i.e. a DBS-capable device will return 2
  2764. */
  2765. A_UINT32 max_supported_macs;
  2766. /*
  2767. * FW sub-feature capabilities to be used in concurrence with wmi_service_bitmap
  2768. */
  2769. A_UINT32 wmi_fw_sub_feat_caps; /* values from enum WMI_FW_SUB_FEAT_CAPS */
  2770. /*
  2771. * Number of Dual Band Simultaneous (DBS) hardware modes
  2772. */
  2773. A_UINT32 num_dbs_hw_modes;
  2774. /*
  2775. * txrx_chainmask
  2776. * [7:0] - 2G band tx chain mask
  2777. * [15:8] - 2G band rx chain mask
  2778. * [23:16] - 5G band tx chain mask
  2779. * [31:24] - 5G band rx chain mask
  2780. *
  2781. */
  2782. A_UINT32 txrx_chainmask;
  2783. /*
  2784. * default Dual Band Simultaneous (DBS) hardware mode
  2785. */
  2786. A_UINT32 default_dbs_hw_mode_index;
  2787. /*
  2788. * Number of msdu descriptors target would use
  2789. */
  2790. A_UINT32 num_msdu_desc;
  2791. /* This ready_event_fixed_param TLV is followed by the below TLVs:
  2792. * HAL_REG_CAPABILITIES hal_reg_capabilities;
  2793. * A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
  2794. * wlan_host_mem_req mem_reqs[];
  2795. * A_UINT32 wlan_dbs_hw_mode_list[];
  2796. */
  2797. } wmi_service_ready_event_fixed_param;
  2798. typedef enum {
  2799. WMI_RXTX_LED_ENABLE = 0x00000001,
  2800. WMI_RFKILL_ENABLE = 0x00000002,
  2801. } WMI_LEDRFKILL_FLAGS;
  2802. #define WMI_SERVICE_SEGMENT_BM_SIZE32 4 /* 4x A_UINT32 = 128 bits */
  2803. typedef struct {
  2804. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_service_available_event_fixed_param */
  2805. /*
  2806. * The wmi_service_segment offset field specifies the position within the
  2807. * logical bitmap of WMI service flags at which the WMI service flags
  2808. * specified within this message begin.
  2809. * Since the first 128 WMI service flags are specified within the
  2810. * wmi_service_bitmap field of the WMI_SERVICE_READY_EVENT message,
  2811. * the wmi_service_segment_offset value is expected to be 128 or more.
  2812. */
  2813. A_UINT32 wmi_service_segment_offset;
  2814. A_UINT32 wmi_service_segment_bitmap[WMI_SERVICE_SEGMENT_BM_SIZE32];
  2815. /*
  2816. * This TLV is followed by the below TLVs:
  2817. * A_UINT32 wmi_service_ext_bitmap[]
  2818. * The wmi_service_ext_bitmap covers WMI service flags at the offset where
  2819. * wmi_service_available_event_fixed_param.wmi_service_segment_bitmap
  2820. * leaves off.
  2821. * For example, if
  2822. * wmi_service_available_event_fixed_param.wmi_service_segment_offset
  2823. * is 128, then
  2824. * wmi_service_available_event_fixed_param.wmi_service_segment_bitmap
  2825. * will cover WMI service flags
  2826. * 128 to (128 + WMI_SERVICE_SEGMENT_BM_SIZE32 * 32) = 128 to 256
  2827. * and wmi_service_ext_bitmap will cover WMI service flags starting at 256.
  2828. */
  2829. } wmi_service_available_event_fixed_param;
  2830. /*
  2831. * HDL version GET/SET APIs
  2832. */
  2833. #define WMI_HDL_VERSION_BITPOS 0
  2834. #define WMI_HDL_VERSION_NUM_BITS 10
  2835. #define WMI_HDL_VERSION_GET(dword) WMI_GET_BITS(dword, WMI_HDL_VERSION_BITPOS, WMI_HDL_VERSION_NUM_BITS)
  2836. #define WMI_HDL_VERSION_SET(dword, value) WMI_SET_BITS(dword, WMI_HDL_VERSION_BITPOS, WMI_HDL_VERSION_NUM_BITS, value)
  2837. typedef struct {
  2838. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_EXT_READY_EVENT */
  2839. /* which WMI_DBS_CONC_SCAN_CFG setting the FW is initialized with */
  2840. A_UINT32 default_conc_scan_config_bits;
  2841. /* which WMI_DBS_FW_MODE_CFG setting the FW is initialized with */
  2842. A_UINT32 default_fw_config_bits;
  2843. wmi_ppe_threshold ppet;
  2844. A_UINT32 he_cap_info; /* see section 8.4.2.213 from draft r8 of 802.11ax; see WMI_HE_FRAG_SUPPORT enum */
  2845. /*
  2846. * An HT STA shall not allow transmission of more than one MPDU start
  2847. * within the time limit described in the MPDU maximum density field.
  2848. */
  2849. A_UINT32 mpdu_density; /* units are microseconds */
  2850. /*
  2851. * Maximum no of BSSID based RX filters host can program
  2852. * Value 0 means FW hasn't given any limit to host.
  2853. */
  2854. A_UINT32 max_bssid_rx_filters;
  2855. /*
  2856. * Extended FW build version information:
  2857. * bits 9:0 -> HDL version info
  2858. * bits 12:10 -> CRM sub ID MSbs (refer to WMI_SVC_RDY_CRM_SUB_ID_GET/SET)
  2859. * bits 27:13 -> reserved
  2860. * bits 31:28 -> CRM sub ID LSbs (refer to WMI_SVC_RDY_CRM_SUB_ID_GET/SET)
  2861. */
  2862. A_UINT32 fw_build_vers_ext;
  2863. /* max_nlo_ssids - dynamically negotiated maximum number of SSIDS for NLO
  2864. * This limit is the maximum number of SSIDs that can be configured in the
  2865. * target for Network List Offload (i.e. scanning for a preferred network).
  2866. * If this value is 0x0, the target supports WMI_NLO_MAX_SSIDS (16).
  2867. * If this value is non-zero, the host should send back in the
  2868. * WMI_INIT message's wmi_resource_config.max_nlo_ssids a value that
  2869. * is equal to or less than the target capability limit reported here.
  2870. */
  2871. A_UINT32 max_nlo_ssids;
  2872. /* ref to section 8.4.2.48 Multiple BSSID element
  2873. * The Max BSSID Indicator field contains a value assigned to n,
  2874. * where 2^n is the maximum number of BSSIDs
  2875. */
  2876. A_UINT32 max_bssid_indicator;
  2877. /* 2nd DWORD of HE MAC Capabilities */
  2878. A_UINT32 he_cap_info_ext;
  2879. /**************************************************************************
  2880. * DON'T ADD ANY FURTHER FIELDS HERE -
  2881. * It would cause the size of the READY_EXT message within some targets
  2882. * to exceed the size of the buffer used for the message.
  2883. **************************************************************************/
  2884. /*
  2885. * A variable-length TLV array of wmi_chan_rf_characterization_info will
  2886. * follow this fixed_param TLV, containing rx characterization info for
  2887. * primary channels.
  2888. * WMI_CHAN_RF_CHARACTERIZATION_INFO wmi_chan_rf_characterization_info[];
  2889. */
  2890. } wmi_service_ready_ext_event_fixed_param;
  2891. #define WMI_SVC_RDY_CRM_SUB_ID_LSBS_INDEX 28
  2892. #define WMI_SVC_RDY_CRM_SUB_ID_LSBS_NUM_BITS 4
  2893. #define WMI_SVC_RDY_CRM_SUB_ID_MSBS_INDEX 10
  2894. #define WMI_SVC_RDY_CRM_SUB_ID_MSBS_NUM_BITS 3
  2895. #define WMI_SVC_RDY_CRM_SUB_ID_GET(var, val) \
  2896. WMI_APPEND_TWO_GET_BITS( \
  2897. var, \
  2898. WMI_SVC_RDY_CRM_SUB_ID_LSBS_INDEX, \
  2899. WMI_SVC_RDY_CRM_SUB_ID_LSBS_NUM_BITS, \
  2900. WMI_SVC_RDY_CRM_SUB_ID_MSBS_INDEX, \
  2901. WMI_SVC_RDY_CRM_SUB_ID_MSBS_NUM_BITS, \
  2902. val)
  2903. #define WMI_SVC_RDY_CRM_SUB_ID_SET(var, val) \
  2904. WMI_APPEND_TWO_SET_BITS( \
  2905. var, \
  2906. WMI_SVC_RDY_CRM_SUB_ID_LSBS_INDEX, \
  2907. WMI_SVC_RDY_CRM_SUB_ID_LSBS_NUM_BITS, \
  2908. WMI_SVC_RDY_CRM_SUB_ID_MSBS_INDEX, \
  2909. WMI_SVC_RDY_CRM_SUB_ID_MSBS_NUM_BITS, \
  2910. val)
  2911. /*
  2912. * regdb version GET/SET APIs
  2913. */
  2914. #define WMI_REG_DB_VERSION_MAJOR_BITPOS 0
  2915. #define WMI_REG_DB_VERSION_MINOR_BITPOS 8
  2916. #define WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS 16
  2917. #define WMI_BDF_REG_DB_VERSION_MINOR_BITPOS 24
  2918. #define WMI_REG_DB_VERSION_NUM_BITS 8
  2919. #define WMI_REG_DB_VERSION_MAJOR_GET(dword) \
  2920. WMI_GET_BITS(dword, WMI_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
  2921. #define WMI_REG_DB_VERSION_MAJOR_SET(dword, value) \
  2922. WMI_SET_BITS(dword, WMI_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
  2923. #define WMI_REG_DB_VERSION_MINOR_GET(dword) \
  2924. WMI_GET_BITS(dword, WMI_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
  2925. #define WMI_REG_DB_VERSION_MINOR_SET(dword, value) \
  2926. WMI_SET_BITS(dword, WMI_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
  2927. #define WMI_BDF_REG_DB_VERSION_MAJOR_GET(dword) \
  2928. WMI_GET_BITS(dword, WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
  2929. #define WMI_BDF_REG_DB_VERSION_MAJOR_SET(dword, value) \
  2930. WMI_SET_BITS(dword, WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
  2931. #define WMI_BDF_REG_DB_VERSION_MINOR_GET(dword) \
  2932. WMI_GET_BITS(dword, WMI_BDF_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
  2933. #define WMI_BDF_REG_DB_VERSION_MINOR_SET(dword, value) \
  2934. WMI_SET_BITS(dword, WMI_BDF_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
  2935. #define WMI_REG_DB_VERSION_SET(dword, reg_db_ver_major, reg_db_ver_minor, bdf_reg_db_ver_major, bdf_reg_db_ver_minor) \
  2936. do { \
  2937. WMI_REG_DB_VERSION_MAJOR_SET(dword, reg_db_ver_major); \
  2938. WMI_REG_DB_VERSION_MINOR_SET(dword, reg_db_ver_minor); \
  2939. WMI_BDF_REG_DB_VERSION_MAJOR_SET(dword, bdf_reg_db_ver_major); \
  2940. WMI_BDF_REG_DB_VERSION_MINOR_SET(dword, bdf_reg_db_ver_minor); \
  2941. } while (0)
  2942. #define WMI_HW_MIN_TX_POWER_BITPOS 0
  2943. #define WMI_HW_MAX_TX_POWER_BITPOS 16
  2944. #define WMI_HW_MIN_TX_POWER_GET(dword) \
  2945. ((A_INT16) WMI_GET_BITS(dword, WMI_HW_MIN_TX_POWER_BITPOS, 16))
  2946. #define WMI_HW_MIN_TX_POWER_SET(dword, value) \
  2947. WMI_SET_BITS(dword, WMI_HW_MIN_TX_POWER_BITPOS, 16, value)
  2948. #define WMI_HW_MAX_TX_POWER_GET(dword) \
  2949. ((A_INT16) WMI_GET_BITS(dword, WMI_HW_MAX_TX_POWER_BITPOS, 16))
  2950. #define WMI_HW_MAX_TX_POWER_SET(dword, value) \
  2951. WMI_SET_BITS(dword, WMI_HW_MAX_TX_POWER_BITPOS, 16, value)
  2952. #define WMI_MAX_USER_PER_PPDU_UL_OFDMA_GET(dword) \
  2953. WMI_GET_BITS(dword, 0, 16)
  2954. #define WMI_MAX_USER_PER_PPDU_UL_OFDMA_SET(dword, value) \
  2955. WMI_SET_BITS(dword, 0, 16, value)
  2956. #define WMI_MAX_USER_PER_PPDU_DL_OFDMA_GET(dword) \
  2957. WMI_GET_BITS(dword, 16, 16)
  2958. #define WMI_MAX_USER_PER_PPDU_DL_OFDMA_SET(dword, value) \
  2959. WMI_SET_BITS(dword, 16, 16, value)
  2960. #define WMI_MAX_USER_PER_PPDU_UL_MUMIMO_GET(dword) \
  2961. WMI_GET_BITS(dword, 0, 16)
  2962. #define WMI_MAX_USER_PER_PPDU_UL_MUMIMO_SET(dword, value) \
  2963. WMI_SET_BITS(dword, 0, 16, value)
  2964. #define WMI_MAX_USER_PER_PPDU_DL_MUMIMO_GET(dword) \
  2965. WMI_GET_BITS(dword, 16, 16)
  2966. #define WMI_MAX_USER_PER_PPDU_DL_MUMIMO_SET(dword, value) \
  2967. WMI_SET_BITS(dword, 16, 16, value)
  2968. #define WMI_TARGET_CAP_FLAGS_RX_PEER_METADATA_VERSION_GET(target_cap_flags) \
  2969. WMI_GET_BITS(target_cap_flags, 0, 2)
  2970. #define WMI_TARGET_CAP_FLAGS_RX_PEER_METADATA_VERSION_SET(target_cap_flags, value) \
  2971. WMI_SET_BITS(target_cap_flags, 0, 2, value)
  2972. #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_2GHZ_GET(target_cap_flags) \
  2973. WMI_GET_BITS(target_cap_flags, 2, 1)
  2974. #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_2GHZ_SET(target_cap_flags, value) \
  2975. WMI_SET_BITS(target_cap_flags, 2, 1, value)
  2976. #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_2GHZ_GET(target_cap_flags) \
  2977. WMI_GET_BITS(target_cap_flags, 3, 1)
  2978. #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_2GHZ_SET(target_cap_flags, value) \
  2979. WMI_SET_BITS(target_cap_flags, 3, 1, value)
  2980. #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_5GHZ_GET(target_cap_flags) \
  2981. WMI_GET_BITS(target_cap_flags, 4, 1)
  2982. #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_5GHZ_SET(target_cap_flags, value) \
  2983. WMI_SET_BITS(target_cap_flags, 4, 1, value)
  2984. #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_5GHZ_GET(target_cap_flags) \
  2985. WMI_GET_BITS(target_cap_flags, 5, 1)
  2986. #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_5GHZ_SET(target_cap_flags, value) \
  2987. WMI_SET_BITS(target_cap_flags, 5, 1, value)
  2988. #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_6GHZ_GET(target_cap_flags) \
  2989. WMI_GET_BITS(target_cap_flags, 6, 1)
  2990. #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_6GHZ_SET(target_cap_flags, value) \
  2991. WMI_SET_BITS(target_cap_flags, 6, 1, value)
  2992. #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_6GHZ_GET(target_cap_flags) \
  2993. WMI_GET_BITS(target_cap_flags, 7, 1)
  2994. #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_6GHZ_SET(target_cap_flags, value) \
  2995. WMI_SET_BITS(target_cap_flags, 7, 1, value)
  2996. #define WMI_TARGET_CAP_MAX_ML_BSS_NUM_GET(target_cap_flags) \
  2997. WMI_GET_BITS(target_cap_flags, 8, 3)
  2998. #define WMI_TARGET_CAP_MAX_ML_BSS_NUM_SET(target_cap_flags, value) \
  2999. WMI_SET_BITS(target_cap_flags, 8, 3, value)
  3000. #define WMI_TARGET_CAP_CONCURRENCE_SUPPORT_GET(target_cap_flags) \
  3001. WMI_GET_BITS(target_cap_flags, 11, 2)
  3002. #define WMI_TARGET_CAP_CONCURRENCE_SUPPORT_SET(target_cap_flags, value) \
  3003. WMI_SET_BITS(target_cap_flags, 11, 2, value)
  3004. #define WMI_TARGET_CAP_MULTIPASS_SAP_SUPPORT_GET(target_cap_flags) \
  3005. WMI_GET_BITS(target_cap_flags, 13, 1)
  3006. #define WMI_TARGET_CAP_MULTIPASS_SAP_SUPPORT_SET(target_cap_flags, value) \
  3007. WMI_SET_BITS(target_cap_flags, 13, 1, value)
  3008. /* ML FULL monitor mode */
  3009. #define WMI_TARGET_CAP_ML_MONITOR_MODE_SUPPORT_GET(target_cap_flags) \
  3010. WMI_GET_BITS(target_cap_flags, 14, 1)
  3011. #define WMI_TARGET_CAP_ML_MONITOR_MODE_SUPPORT_SET(target_cap_flags, value) \
  3012. WMI_SET_BITS(target_cap_flags, 14, 1, value)
  3013. #define WMI_TARGET_CAP_QDATA_TX_LCE_FILTER_SUPPORT_GET(target_cap_flags) \
  3014. WMI_GET_BITS(target_cap_flags, 15, 1)
  3015. #define WMI_TARGET_CAP_QDATA_TX_LCE_FILTER_SUPPORT_SET(target_cap_flags, value)\
  3016. WMI_SET_BITS(target_cap_flags, 15, 1, value)
  3017. #define WMI_TARGET_CAP_MPDU_STATS_PER_TX_NSS_SUPPORT_GET(target_cap_flags) \
  3018. WMI_GET_BITS(target_cap_flags, 16, 1)
  3019. #define WMI_TARGET_CAP_MPDU_STATS_PER_TX_NSS_SUPPORT_SET(target_cap_flags, value)\
  3020. WMI_SET_BITS(target_cap_flags, 16, 1, value)
  3021. /*
  3022. * wmi_htt_msdu_idx_to_htt_msdu_qtype GET/SET APIs
  3023. */
  3024. #define WMI_HTT_MSDUQ_IDX_TO_MSDUQ_QTYPE_INDEX_GET(index_and_type) \
  3025. WMI_GET_BITS(index_and_type, 0, 8)
  3026. #define WMI_HTT_MSDUQ_IDX_TO_MSDUQ_QTYPE_INDEX_SET(index_and_type, value) \
  3027. WMI_SET_BITS(index_and_type, 0, 8, value)
  3028. #define WMI_HTT_MSDUQ_IDX_TO_MSDUQ_QTYPE_TYPE_GET(index_and_type) \
  3029. WMI_GET_BITS(index_and_type, 8, 8)
  3030. #define WMI_HTT_MSDUQ_IDX_TO_MSDUQ_QTYPE_TYPE_SET(index_and_type, value) \
  3031. WMI_SET_BITS(index_and_type, 8, 8, value)
  3032. typedef struct {
  3033. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_htt_msdu_idx_to_htt_msdu_qtype.*/
  3034. /**
  3035. * index_and_type
  3036. *
  3037. * [7:0] : htt_msduq_index
  3038. * [15:8] : htt_msduq_type
  3039. * [31:16] : reserved
  3040. */
  3041. A_UINT32 index_and_type;
  3042. } wmi_htt_msdu_idx_to_htt_msdu_qtype;
  3043. typedef enum {
  3044. WMI_AFC_FEATURE_6G_DEPLOYMENT_UNSPECIFIED = 0,
  3045. WMI_AFC_FEATURE_6G_DEPLOYMENT_INDOOR_ONLY = 1,
  3046. WMI_AFC_FEATURE_6G_DEPLOYMENT_OUTDOOR_ONLY = 2,
  3047. } WMI_AFC_FEATURE_6G_DEPLOYMENT_TYPE;
  3048. typedef enum {
  3049. WMI_BDF_VERSION_CHECK_DISABLED = 0,
  3050. /* WMI_BDF_VERSION_CHECK_GOOD:
  3051. * BDF version is matched with FW.
  3052. */
  3053. WMI_BDF_VERSION_CHECK_GOOD = 1,
  3054. /* WMI_BDF_VERSION_TEMPLATE_TOO_OLD:
  3055. * BDF template version is older than the oldest version supported by FW.
  3056. */
  3057. WMI_BDF_VERSION_TEMPLATE_TOO_OLD = 2,
  3058. /* WMI_BDF_VERSION_TEMPLATE_TOO_NEW:
  3059. * BDF template version is newer than the newest version supported by FW.
  3060. */
  3061. WMI_BDF_VERSION_TEMPLATE_TOO_NEW = 3,
  3062. /* WMI_BDF_VERSION_FW_TOO_OLD:
  3063. * FW version is older than the major version supported by BDF.
  3064. */
  3065. WMI_BDF_VERSION_FW_TOO_OLD = 4,
  3066. /* WMI_BDF_VERSION_FW_TOO_NEW:
  3067. * FW version is newer than the minor version supported by BDF.
  3068. */
  3069. WMI_BDF_VERSION_FW_TOO_NEW = 5,
  3070. } wmi_bdf_version_status_type;
  3071. typedef struct {
  3072. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_service_ready_ext2_event_fixed_param.*/
  3073. /*
  3074. * regDB Version to be sent to Host on WMI service ready ext2 event.
  3075. * [7:0] - regDbVersionMajor
  3076. * [15:8] - regDbVersionMinor
  3077. * [23:16] - bdfRegDbVersionMajor
  3078. * [31:24] - bdfRegDbVersionMinor
  3079. * The WMI_*REG_DB_VERSION_[MAJOR,MINOR]_[SET,GET] macros are used to
  3080. * access these bitfields.
  3081. */
  3082. A_UINT32 reg_db_version;
  3083. /* Min & Max Tx power (in dBm) supported in 2.4 GHz band
  3084. * [15:0] - Min Tx Power in 2.4 GHz band
  3085. * [31:16] - Max Tx Power in 2.4 GHz band
  3086. * WMI_HW_[MIN,MAX]_TX_POWER_[GET,SET] macros are used to access
  3087. * these bitfields.
  3088. * If Min Tx Power = Max Tx Power = 0 means Min Tx Power & Max Tx Power
  3089. * are not specified.
  3090. */
  3091. A_UINT32 hw_min_max_tx_power_2g;
  3092. /* Min & Max Tx power (in dBm) supported in 5 GHz band
  3093. * [15:0] - Min Tx Power in 5 GHz band
  3094. * [31:16] - Max Tx Power in 5 GHz band
  3095. * WMI_HW_[MIN,MAX]_TX_POWER_[GET,SET] macros are used to access
  3096. * these bitfields.
  3097. * If Min Tx Power = Max Tx Power = 0 means Min Tx Power & Max Tx Power
  3098. * are not specified.
  3099. */
  3100. A_UINT32 hw_min_max_tx_power_5g;
  3101. /*
  3102. * Number of peers supported per WMI_PEER_CHAN_WIDTH_SWITCH_CMDID
  3103. * 0 - not enabled
  3104. */
  3105. A_UINT32 chwidth_num_peer_caps;
  3106. /*
  3107. * Whether preamble puncturing is supported by FW, and if so, for which
  3108. * bandwidths. The possible values for this field are listed below.
  3109. * 0: preamble puncturing is not supported
  3110. * 80: puncturing supported within channels of at least 80 MHz bandwidth
  3111. * 160: puncturing supported within channels of at least 160 MHz bandwidth
  3112. * 320: puncturing supported within 320 MHz channels
  3113. */
  3114. A_UINT32 preamble_puncture_bw;
  3115. /*
  3116. * [15:0] - ULOFDMA Refer WMI_MAX_USER_PER_PPDU_UL_OFDMA_GET & SET
  3117. * [31:16] - DLOFDMA Refer WMI_MAX_USER_PER_PPDU_DL_OFDMA_GET & SET
  3118. * If max_user_per_ppdu_ofdma == 0 the UL/DL max users are unspecified.
  3119. */
  3120. A_UINT32 max_user_per_ppdu_ofdma;
  3121. /*
  3122. * [15:0] - ULMUMIMO Refer WMI_MAX_USER_PER_PPDU_UL_MUMIMO_GET & SET
  3123. * [31:16] - DLMUMIMO Refer WMI_MAX_USER_PER_PPDU_DL_MUMIMO_GET & SET
  3124. * If max_user_per_ppdu_mumimo == 0 the UL/DL max users are unspecified.
  3125. */
  3126. A_UINT32 max_user_per_ppdu_mumimo;
  3127. /**
  3128. * @brief target_cap_flags - flags containing information about target capabilities.
  3129. * Bits 1:0
  3130. * Rx peer metadata version number used by target
  3131. * 0-> legacy case
  3132. * 1-> MLO support
  3133. * 2,3-> reserved
  3134. * Refer to WMI_TARGET_CAP_FLAGS_PEER_METADATA_VERSION macros.
  3135. * Bit 2 - UL MUMIMO Rx support on 2.4 GHz (AP Mode)
  3136. * Bit 3 - UL MUMIMO Tx support on 2.4 GHz (STA Mode)
  3137. * Bit 4 - UL MUMIMO Rx support on 5 GHz (AP Mode)
  3138. * Bit 5 - UL MUMIMO Tx support on 5 GHz (STA Mode)
  3139. * Bit 6 - UL MUMIMO Rx support on 6 GHz (AP Mode)
  3140. * Bit 7 - UL MUMIMO Tx support on 6 GHz (STA Mode)
  3141. * Bits 10:8 - max ML BSS number supported, range [0-7]
  3142. * Bits 12:11 concurrence support capability
  3143. * Bit11 - [ML-STA + SL-STA] 0: not supported; 1:supported
  3144. * Bit12 - [ML-STA + SL-SAP] 0: not supported; 1:supported
  3145. * Bit 13 - Support for multipass SAP
  3146. * Bit 14 - Support for ML monitor mode
  3147. * Bit 15 - Support for Qdata Tx LCE filter installation
  3148. * Bit 16 - Support for MPDU stats per tx Nss capability
  3149. * Bits 31:17 - Reserved
  3150. */
  3151. A_UINT32 target_cap_flags;
  3152. /* EHT MAC Capabilities: total WMI_MAX_EHTCAP_MAC_SIZE*A_UINT32 bits
  3153. * those bits actually are max mac capabilities = cap_mac_2g | cap_mac_5g
  3154. * The actual cap mac info per mac (2g/5g) in the TLV -- WMI_MAC_PHY_CAPABILITIES_EXT
  3155. */
  3156. A_UINT32 eht_cap_mac_info[WMI_MAX_EHTCAP_MAC_SIZE];
  3157. /* Following this struct are the TLV's:
  3158. * WMI_DMA_RING_CAPABILITIES;
  3159. * wmi_spectral_bin_scaling_params;
  3160. * WMI_MAC_PHY_CAPABILITIES_EXT; <-- EHT mac capabilities and phy capabilities info
  3161. * WMI_HAL_REG_CAPABILITIES_EXT2;
  3162. * wmi_nan_capabilities;
  3163. * WMI_SCAN_RADIO_CAPABILITIES_EXT2;
  3164. */
  3165. /*
  3166. * Max number of LinkView peers supported by target
  3167. */
  3168. A_UINT32 max_num_linkview_peers;
  3169. /*
  3170. * Max number of msduq's per TID per peer supported by target,
  3171. * defines LinkView peers number
  3172. */
  3173. A_UINT32 max_num_msduq_supported_per_tid;
  3174. /*
  3175. * Number of peers support default flowqs
  3176. */
  3177. A_UINT32 default_num_msduq_supported_per_tid;
  3178. /*
  3179. * Indoor/Outdoor specification for AFC support -
  3180. * refer to WMI_AFC_FEATURE_6G_DEPLOYMENT_TYPE enum
  3181. */
  3182. A_UINT32 afc_deployment_type;
  3183. /*
  3184. * Board data check report. Please see wmi_hw_bd_status_type enum values.
  3185. */
  3186. A_UINT32 hw_bd_status;
  3187. /*
  3188. * max block ack window size FW supports for tx.
  3189. */
  3190. A_UINT32 tx_aggr_ba_win_size_max;
  3191. /*
  3192. * max block ack window size FW supports for rx.
  3193. */
  3194. A_UINT32 rx_aggr_ba_win_size_max;
  3195. /*
  3196. * max link number per STA MLD FW supports.
  3197. */
  3198. A_UINT32 num_max_mlo_link_per_ml_bss_supp;
  3199. /*
  3200. * max link number per SAP MLD FW supports.
  3201. */
  3202. A_UINT32 num_max_mlo_link_per_ml_sap_supp;
  3203. /* Followed by next TLVs:
  3204. * WMI_DMA_RING_CAPABILITIES dma_ring_caps[];
  3205. * wmi_spectral_bin_scaling_params wmi_bin_scaling_params[];
  3206. * WMI_MAC_PHY_CAPABILITIES_EXT mac_phy_caps[];
  3207. * WMI_HAL_REG_CAPABILITIES_EXT2 hal_reg_caps[];
  3208. * wmi_nan_capabilities nan_cap;
  3209. * WMI_SCAN_RADIO_CAPABILITIES_EXT2 wmi_scan_radio_caps[];
  3210. * wmi_htt_msdu_idx_to_htt_msdu_qtype htt_msdu_idx_to_qtype_map[];
  3211. * wmi_dbs_or_sbs_cap_ext dbs_or_sbs_cap_ext;
  3212. * A_INT32 hw_tx_power_signed[WMI_HW_TX_POWER_CAPS_MAX];
  3213. * wmi_aux_dev_capabilities aux_dev_caps[];
  3214. */
  3215. } wmi_service_ready_ext2_event_fixed_param;
  3216. typedef struct {
  3217. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_rf_characterization_info_event_fixed_param */
  3218. /*
  3219. * A variable-length TLV array of wmi_chan_rf_characterization_info will
  3220. * follow this fixed_param TLV, containing rx characterization info for
  3221. * primary channels.
  3222. * WMI_CHAN_RF_CHARACTERIZATION_INFO wmi_chan_rf_characterization_info[];
  3223. */
  3224. } wmi_chan_rf_characterization_info_event_fixed_param;
  3225. typedef enum {
  3226. WMI_FW_STA_RTT_INITR = 0x00000001,
  3227. WMI_FW_STA_RTT_RESPR = 0x00000002,
  3228. WMI_FW_P2P_CLI_RTT_INITR = 0x00000004,
  3229. WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008,
  3230. WMI_FW_P2P_GO_RTT_INITR = 0x00000010,
  3231. WMI_FW_P2P_GO_RTT_RESPR = 0x00000020,
  3232. WMI_FW_AP_RTT_INITR = 0x00000040,
  3233. WMI_FW_AP_RTT_RESPR = 0x00000080,
  3234. WMI_FW_NAN_RTT_INITR = 0x00000100,
  3235. WMI_FW_NAN_RTT_RESPR = 0x00000200,
  3236. WMI_FW_SCAN_DBS_POLICY = 0x00000400,
  3237. /*
  3238. * New fw sub feature capabilities before
  3239. * WMI_FW_MAX_SUB_FEAT_CAP
  3240. */
  3241. WMI_FW_MAX_SUB_FEAT_CAP = 0x80000000,
  3242. } WMI_FW_SUB_FEAT_CAPS;
  3243. typedef enum {
  3244. WMI_HWBD_NONE = 0, /* No hw board information is given */
  3245. WMI_HWBD_QCA6174 = 1, /* Rome(AR6320) */
  3246. WMI_HWBD_QCA2582 = 2, /* Killer 1525*/
  3247. } WMI_HWBD_ID;
  3248. #define ATH_BD_DATA_REV_MASK 0x000000FF
  3249. #define ATH_BD_DATA_REV_SHIFT 0
  3250. #define ATH_BD_DATA_PROJ_ID_MASK 0x0000FF00
  3251. #define ATH_BD_DATA_PROJ_ID_SHIFT 8
  3252. #define ATH_BD_DATA_CUST_ID_MASK 0x00FF0000
  3253. #define ATH_BD_DATA_CUST_ID_SHIFT 16
  3254. #define ATH_BD_DATA_REF_DESIGN_ID_MASK 0xFF000000
  3255. #define ATH_BD_DATA_REF_DESIGN_ID_SHIFT 24
  3256. #define SET_BD_DATA_REV(bd_data_ver, value) \
  3257. ((bd_data_ver) &= ~ATH_BD_DATA_REV_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REV_SHIFT))
  3258. #define GET_BD_DATA_REV(bd_data_ver) \
  3259. (((bd_data_ver) & ATH_BD_DATA_REV_MASK) >> ATH_BD_DATA_REV_SHIFT)
  3260. #define SET_BD_DATA_PROJ_ID(bd_data_ver, value) \
  3261. ((bd_data_ver) &= ~ATH_BD_DATA_PROJ_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_PROJ_ID_SHIFT))
  3262. #define GET_BD_DATA_PROJ_ID(bd_data_ver) \
  3263. (((bd_data_ver) & ATH_BD_DATA_PROJ_ID_MASK) >> ATH_BD_DATA_PROJ_ID_SHIFT)
  3264. #define SET_BD_DATA_CUST_ID(bd_data_ver, value) \
  3265. ((bd_data_ver) &= ~ATH_BD_DATA_CUST_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_CUST_ID_SHIFT))
  3266. #define GET_BD_DATA_CUST_ID(bd_data_ver) \
  3267. (((bd_data_ver) & ATH_BD_DATA_CUST_ID_MASK) >> ATH_BD_DATA_CUST_ID_SHIFT)
  3268. #define SET_BD_DATA_REF_DESIGN_ID(bd_data_ver, value) \
  3269. ((bd_data_ver) &= ~ATH_BD_DATA_REF_DESIGN_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REF_DESIGN_ID_SHIFT))
  3270. #define GET_BD_DATA_REF_DESIGN_ID(bd_data_ver) \
  3271. (((bd_data_ver) & ATH_BD_DATA_REF_DESIGN_ID_MASK) >> ATH_BD_DATA_REF_DESIGN_ID_SHIFT)
  3272. #ifdef ROME_LTE_COEX_FREQ_AVOID
  3273. typedef struct {
  3274. A_UINT32 start_freq; /* start frequency, not channel center freq */
  3275. A_UINT32 end_freq; /* end frequency */
  3276. } avoid_freq_range_desc;
  3277. typedef struct {
  3278. /* bad channel range count, multi range is allowed, 0 means all channel clear */
  3279. A_UINT32 num_freq_ranges;
  3280. /* multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc */
  3281. avoid_freq_range_desc avd_freq_range[];
  3282. } wmi_wlan_avoid_freq_ranges_event;
  3283. #endif
  3284. /** status consists of upper 16 bits fo A_STATUS status and lower 16 bits of module ID that returned status */
  3285. #define WLAN_INIT_STATUS_SUCCESS 0x0
  3286. #define WLAN_INIT_STATUS_GEN_FAILED 0x1
  3287. #define WLAN_GET_INIT_STATUS_REASON(status) ((status) & 0xffff)
  3288. #define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
  3289. typedef A_UINT32 WLAN_INIT_STATUS;
  3290. typedef struct {
  3291. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ready_event_fixed_param */
  3292. wmi_abi_version fw_abi_vers;
  3293. /*
  3294. * mac_addr is always filled; in addition, there can be a mac_addr_list
  3295. * TLV following this fixed_param TLV to specify additional MAC addresses,
  3296. * for cases where the target specifies one MAC address per pdev
  3297. * (so the host can treat the pdevs within the target as separately
  3298. * as possible) rather than one MAC address for the whole SOC.
  3299. */
  3300. wmi_mac_addr mac_addr;
  3301. A_UINT32 status;
  3302. A_UINT32 num_dscp_table;
  3303. /* num_extra_mac_addr -
  3304. * how many additional MAC addresses besides the above mac_addr
  3305. * are provided in the subsequent mac_addr_list TLV
  3306. */
  3307. A_UINT32 num_extra_mac_addr;
  3308. /*
  3309. * Total number of "real" peers (remote peers of an AP vdev,
  3310. * BSS peer of a STA vdev, TDLS peer of a STA vdev) that FW supports.
  3311. * If 0, then Host can use param_tlv->resource_config->num_peers as
  3312. * total number of peers.
  3313. */
  3314. A_UINT32 num_total_peers;
  3315. /*
  3316. * Number of extra peers that Firmware adds.
  3317. * These are self peers and/or other FW only peers that don't represent
  3318. * a 802.11 transceiver, but instead are used for convenience, e.g. to
  3319. * provide a pseudo-peer object for an AP vdev's bcast/mcast tx queues,
  3320. * to allow each tx queue to belong to a peer object.
  3321. * Peer ID can be up to num_total_peers + num_extra_peers.
  3322. */
  3323. A_UINT32 num_extra_peers;
  3324. /*
  3325. * max_ast_index - max AST index that Firmware can generate
  3326. * max_ast_index = (ast_table_size-1), ast_table_size is dynamically chosen
  3327. * based on num_peers configuration from Host. Hence Host needs to know the
  3328. * max_ast_index that Firmware can generate.
  3329. * A 0x0 value for max_ast_index means the target has not specified a limit.
  3330. */
  3331. A_UINT32 max_ast_index;
  3332. /* pktlog_defs_checksum:
  3333. * checksum computed from the definitions of the enums and structs
  3334. * used within pktlog traces.
  3335. * This pktlog defs checksum needs to be embedded into pktlog trace files
  3336. * (specifically in ath_pktlog_bufhdr.version).
  3337. *
  3338. * If pktlog_defs_checksum is zero then it is invalid; it should be ignored
  3339. * and ath_pktlog_bufhdr.magic_num needs to be PKTLOG_MAGIC_NUM_LEGACY
  3340. * (i.e. 7735225).
  3341. *
  3342. * If pktlog_defs_checksum is non-zero then it is valid, and the host
  3343. * should put it into the pktlog trace file header and set
  3344. * ath_pktlog_bufhdr.magic_num as PKTLOG_MAGIC_NUM_VERSION_IS_CHECKSUM
  3345. * (i.e. 2453506), to indicate that the file header version field contains
  3346. * a checksum.
  3347. */
  3348. A_UINT32 pktlog_defs_checksum;
  3349. /*
  3350. * max_onchip_ast_index - max AST index that Firmware can generate
  3351. * max_onchip_ast_index = (ast_table_size-1), where ast_table_size is
  3352. * dynamically chosen based on num_peers configuration from Host.
  3353. * Hence Host needs to know the max_onchip_ast_index that Firmware can
  3354. * generate.
  3355. * A 0x0 value for max_onchip_ast_index means the target has not specified
  3356. * a limit.
  3357. */
  3358. A_UINT32 max_onchip_ast_index;
  3359. /*
  3360. * The maximum number of LinkView peers can be supported onsite of target,
  3361. * based on proposed by the host configuration,
  3362. * total number of available resources, configured peers number,
  3363. * number of MSDUQs per LinkView peer's TID.
  3364. * Target can reduce proposed by WMI_INIT_CMDID number, depending on
  3365. * the target's resources availability.
  3366. */
  3367. A_UINT32 num_of_linkview_peers;
  3368. /* Total number of "real" max_active_vdevs that FW supports. */
  3369. A_UINT32 num_max_active_vdevs;
  3370. /*
  3371. * This fixed_param TLV is followed by these additional TLVs:
  3372. * mac_addr_list[num_extra_mac_addr];
  3373. */
  3374. } wmi_ready_event_fixed_param;
  3375. typedef struct {
  3376. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resource_config */
  3377. /**
  3378. * @brief num_vdev - number of virtual devices (VAPs) to support
  3379. */
  3380. A_UINT32 num_vdevs;
  3381. /**
  3382. * @brief num_peers - number of peer nodes to support
  3383. */
  3384. A_UINT32 num_peers;
  3385. /*
  3386. * @brief In offload mode target supports features like WOW, chatter and other
  3387. * protocol offloads. In order to support them some functionalities like
  3388. * reorder buffering, PN checking need to be done in target. This determines
  3389. * maximum number of peers supported by target in offload mode
  3390. */
  3391. A_UINT32 num_offload_peers;
  3392. /* @brief Number of reorder buffers available for doing target based reorder
  3393. * Rx reorder buffering
  3394. */
  3395. A_UINT32 num_offload_reorder_buffs;
  3396. /**
  3397. * @brief num_peer_keys - number of keys per peer
  3398. */
  3399. A_UINT32 num_peer_keys;
  3400. /**
  3401. * @brief num_peer_tids - number of TIDs to provide storage for per peer.
  3402. */
  3403. A_UINT32 num_tids;
  3404. /**
  3405. * @brief ast_skid_limit - max skid for resolving hash collisions
  3406. * @details
  3407. * The address search table is sparse, so that if two MAC addresses
  3408. * result in the same hash value, the second of these conflicting
  3409. * entries can slide to the next index in the address search table,
  3410. * and use it, if it is unoccupied. This ast_skid_limit parameter
  3411. * specifies the upper bound on how many subsequent indices to search
  3412. * over to find an unoccupied space.
  3413. */
  3414. A_UINT32 ast_skid_limit;
  3415. /**
  3416. * @brief tx_chain_mask - the nominal chain mask for transmit
  3417. * @details
  3418. * The chain mask may be modified dynamically, e.g. to operate AP tx with
  3419. * a reduced number of chains if no clients are associated.
  3420. * This configuration parameter specifies the nominal chain-mask that
  3421. * should be used when not operating with a reduced set of tx chains.
  3422. */
  3423. A_UINT32 tx_chain_mask;
  3424. /**
  3425. * @brief rx_chain_mask - the nominal chain mask for receive
  3426. * @details
  3427. * The chain mask may be modified dynamically, e.g. for a client to use
  3428. * a reduced number of chains for receive if the traffic to the client
  3429. * is low enough that it doesn't require downlink MIMO or antenna
  3430. * diversity.
  3431. * This configuration parameter specifies the nominal chain-mask that
  3432. * should be used when not operating with a reduced set of rx chains.
  3433. */
  3434. A_UINT32 rx_chain_mask;
  3435. /**
  3436. * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
  3437. * @details
  3438. * Each WMM access class (voice, video, best-effort, background) will
  3439. * have its own timeout value to dictate how long to wait for missing
  3440. * rx MPDUs to arrive before flushing subsequent MPDUs that have already
  3441. * been received.
  3442. * This parameter specifies the timeout in milliseconds for each class .
  3443. * NOTE: the number of class (defined as 4) cannot be
  3444. * changed in the future without breaking WMI compatibility.
  3445. */
  3446. A_UINT32 rx_timeout_pri[4];
  3447. /**
  3448. * @brief rx_decap mode - what mode the rx should decap packets to
  3449. * @details
  3450. * MAC can decap to RAW (no decap), native wifi or Ethernet types
  3451. * THis setting also determines the default TX behavior, however TX
  3452. * behavior can be modified on a per VAP basis during VAP init
  3453. */
  3454. A_UINT32 rx_decap_mode;
  3455. /**
  3456. * @brief scan_max_pending_req - what is the maximum scan requests than can be queued
  3457. */
  3458. A_UINT32 scan_max_pending_req;
  3459. /**
  3460. * @brief maximum VDEV that could use BMISS offload
  3461. */
  3462. A_UINT32 bmiss_offload_max_vdev;
  3463. /**
  3464. * @brief maximum VDEV that could use offload roaming
  3465. */
  3466. A_UINT32 roam_offload_max_vdev;
  3467. /**
  3468. * @brief maximum AP profiles that would push to offload roaming
  3469. */
  3470. A_UINT32 roam_offload_max_ap_profiles;
  3471. /**
  3472. * @brief num_mcast_groups - how many groups to use for mcast->ucast conversion
  3473. * @details
  3474. * The target's WAL maintains a table to hold information regarding which
  3475. * peers belong to a given multicast group, so that if multicast->unicast
  3476. * conversion is enabled, the target can convert multicast tx frames to a
  3477. * series of unicast tx frames, to each peer within the multicast group.
  3478. * This num_mcast_groups configuration parameter tells the target how
  3479. * many multicast groups to provide storage for within its multicast
  3480. * group membership table.
  3481. */
  3482. A_UINT32 num_mcast_groups;
  3483. /**
  3484. * @brief num_mcast_table_elems - size to alloc for the mcast membership table
  3485. * @details
  3486. * This num_mcast_table_elems configuration parameter tells the target
  3487. * how many peer elements it needs to provide storage for in its
  3488. * multicast group membership table.
  3489. * These multicast group membership table elements are shared by the
  3490. * multicast groups stored within the table.
  3491. */
  3492. A_UINT32 num_mcast_table_elems;
  3493. /**
  3494. * @brief mcast2ucast_mode - whether/how to do multicast->unicast conversion
  3495. * @details
  3496. * This configuration parameter specifies whether the target should
  3497. * perform multicast --> unicast conversion on transmit, and if so,
  3498. * what to do if it finds no entries in its multicast group membership
  3499. * table for the multicast IP address in the tx frame.
  3500. * Configuration value:
  3501. * 0 -> Do not perform multicast to unicast conversion.
  3502. * 1 -> Convert multicast frames to unicast, if the IP multicast address
  3503. * from the tx frame is found in the multicast group membership
  3504. * table. If the IP multicast address is not found, drop the frame.
  3505. * 2 -> Convert multicast frames to unicast, if the IP multicast address
  3506. * from the tx frame is found in the multicast group membership
  3507. * table. If the IP multicast address is not found, transmit the
  3508. * frame as multicast.
  3509. */
  3510. A_UINT32 mcast2ucast_mode;
  3511. /**
  3512. * @brief tx_dbg_log_size - how much memory to allocate for a tx PPDU dbg log
  3513. * @details
  3514. * This parameter controls how much memory the target will allocate to
  3515. * store a log of tx PPDU meta-information (how large the PPDU was,
  3516. * when it was sent, whether it was successful, etc.)
  3517. */
  3518. A_UINT32 tx_dbg_log_size;
  3519. /**
  3520. * @brief num_wds_entries - how many AST entries to be allocated for WDS
  3521. */
  3522. A_UINT32 num_wds_entries;
  3523. /**
  3524. * @brief dma_burst_size - MAC DMA burst size, e.g., on Peregrine on PCI
  3525. * this limit can be 0 -default, 1 256B
  3526. */
  3527. A_UINT32 dma_burst_size;
  3528. /**
  3529. * @brief mac_aggr_delim - Fixed delimiters to be inserted after every MPDU
  3530. * to account for interface latency to avoid underrun.
  3531. */
  3532. A_UINT32 mac_aggr_delim;
  3533. /**
  3534. * @brief rx_skip_defrag_timeout_dup_detection_check
  3535. * @details
  3536. * determine whether target is responsible for detecting duplicate
  3537. * non-aggregate MPDU and timing out stale fragments.
  3538. *
  3539. * A-MPDU reordering is always performed on the target.
  3540. *
  3541. * 0: target responsible for frag timeout and dup checking
  3542. * 1: host responsible for frag timeout and dup checking
  3543. */
  3544. A_UINT32 rx_skip_defrag_timeout_dup_detection_check;
  3545. /**
  3546. * @brief vow_config - Configuration for VoW : No of Video Nodes to be supported
  3547. * and Max no of descriptors for each Video link (node).
  3548. */
  3549. A_UINT32 vow_config;
  3550. /**
  3551. * @brief maximum VDEV that could use GTK offload
  3552. */
  3553. A_UINT32 gtk_offload_max_vdev;
  3554. /**
  3555. * @brief num_msdu_desc - Number of msdu descriptors target should use
  3556. */
  3557. A_UINT32 num_msdu_desc; /* Number of msdu desc */
  3558. /**
  3559. * @brief max_frag_entry - Max. number of Tx fragments per MSDU
  3560. * @details
  3561. * This parameter controls the max number of Tx fragments per MSDU.
  3562. * This is sent by the target as part of the WMI_SERVICE_READY event
  3563. * and is overridden by the OS shim as required.
  3564. */
  3565. A_UINT32 max_frag_entries;
  3566. /**
  3567. * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS
  3568. * @brief num_msdu_desc - Number of vdev that can support beacon offload
  3569. */
  3570. A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */
  3571. /**
  3572. * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev
  3573. * @details
  3574. * Each TDLS enabled vdev can track outgoing transmits/RSSI/rates to/of
  3575. * peers in a connection tracking table for possible TDLS link creation
  3576. * or deletion. This controls the number of tracked peers per vdev.
  3577. */
  3578. A_UINT32 num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */
  3579. /**
  3580. * @brief beacon_tx_offload_max_vdev - Number of maximum beaconing vaps at any time.
  3581. */
  3582. A_UINT32 beacon_tx_offload_max_vdev;
  3583. A_UINT32 num_multicast_filter_entries;
  3584. A_UINT32 num_wow_filters; /*host can configure the number of wow filters*/
  3585. /**
  3586. * @brief num_keep_alive_pattern - Num of keep alive patterns configured
  3587. * from host.
  3588. */
  3589. A_UINT32 num_keep_alive_pattern;
  3590. /**
  3591. * @brief keep_alive_pattern_size - keep alive pattern size.
  3592. */
  3593. A_UINT32 keep_alive_pattern_size;
  3594. /**
  3595. * @brief max_tdls_concurrent_sleep_sta - Number of tdls sleep sta supported
  3596. * @details
  3597. * Each TDLS STA can become a sleep STA independently. This parameter
  3598. * mentions how many such sleep STAs can be supported concurrently.
  3599. */
  3600. A_UINT32 max_tdls_concurrent_sleep_sta;
  3601. /**
  3602. * @brief max_tdls_concurrent_buffer_sta - Number of tdls buffer sta supported
  3603. * @details
  3604. * Each TDLS STA can become a buffer STA independently. This parameter
  3605. * mentions how many such buffer STAs can be supported concurrently.
  3606. */
  3607. A_UINT32 max_tdls_concurrent_buffer_sta;
  3608. /**
  3609. * @brief wmi_send_separate - host configures fw to send the wmi separately
  3610. */
  3611. A_UINT32 wmi_send_separate;
  3612. /**
  3613. * @brief num_ocb_vdevs - Number of vdevs used for OCB support
  3614. */
  3615. A_UINT32 num_ocb_vdevs;
  3616. /**
  3617. * @brief num_ocb_channels - The supported number of simultaneous OCB channels
  3618. */
  3619. A_UINT32 num_ocb_channels;
  3620. /**
  3621. * @brief num_ocb_schedules - The supported number of OCB schedule segments
  3622. */
  3623. A_UINT32 num_ocb_schedules;
  3624. /**
  3625. * @brief specific configuration from host, such as per platform configuration
  3626. */
  3627. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_S 0
  3628. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_M 0x1
  3629. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_S 1
  3630. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_M 0x2
  3631. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_S 2
  3632. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_M 0x4
  3633. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_S 3
  3634. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_M 0x8
  3635. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_S 4
  3636. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_M 0x10
  3637. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_S 5
  3638. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_M 0x20
  3639. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_S 6
  3640. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_M 0x40
  3641. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_S 7
  3642. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_M 0x80
  3643. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_S 8
  3644. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_M 0x100
  3645. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_S 9
  3646. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_M 0x200
  3647. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_S 10
  3648. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_M 0x400
  3649. #define WMI_RSRC_CFG_FLAG_TX_PPDU_STATS_ENABLE_S 11
  3650. #define WMI_RSRC_CFG_FLAG_TX_PPDU_STATS_ENABLE_M 0x800
  3651. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_S 12
  3652. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_M 0x1000
  3653. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_S 13
  3654. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_M 0x2000
  3655. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_S 14
  3656. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_M 0x4000
  3657. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_S 15
  3658. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_M 0x8000
  3659. /*
  3660. * If the AC override valid bit is set then this field will specify the
  3661. * access category to use for EAPOL frames
  3662. * 0 - WMM_AC_BE
  3663. * 1 - WMM_AC_BK
  3664. * 2 - WMM_AC_VI
  3665. * 3 - WMM_AC_VO
  3666. */
  3667. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_S 16
  3668. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_M 0x30000
  3669. /*
  3670. * If TX_ACK_RSSI is set, then the target should populate the ack_rssi
  3671. * field within the WMI_MGMT_TX_COMPLETION_EVENT message, the ack_rssi
  3672. * TLV within the WMI_MGMT_TX_BUNDLE_COMPLETION_EVENT message, and the
  3673. * "MSDU ACK RSSI" array within the HTT_T2H TX_COMPL_IND message.
  3674. */
  3675. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_S 18
  3676. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_M 0x40000
  3677. /*
  3678. * If HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN is set, the host will not
  3679. * include the HTC header length in the payload length for all HTT_H2T
  3680. * messages.
  3681. * Otherwise, only when sending HTT_H2T_MSG_TYPE_TX_FRM message,
  3682. * payload length includes HTC header length. Other HTT_H2T messages'
  3683. * payload length does not include HTC header length.
  3684. * The host will only set this HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN flag
  3685. * if the target has set the WMI_SERVICE_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN
  3686. * flag to indicate its support for this option.
  3687. */
  3688. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_S 19
  3689. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_M 0x80000
  3690. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_S 20
  3691. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_M 0x100000
  3692. /*
  3693. * If this HTT_PEER_STATS is set, then the target should use the
  3694. * the HTT_T2H_MSG_TYPE_PEER_STATS_IND message to upload peer stats;
  3695. * else the target should avoid sending the PEER_STATS_IND message.
  3696. */
  3697. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_S 21
  3698. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_M 0x200000
  3699. /*
  3700. * If this BIT is set, then the target should use peer_tid_ext to analyze
  3701. * per peer per tid extended configurations
  3702. */
  3703. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_S 22
  3704. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_M 0x400000
  3705. /*
  3706. * If the VIDEO_OVER_WIFI_ENABLE flag is set, the target will use a
  3707. * series of algorithmic adjustments to optimize Video performance
  3708. * by reducing latency, reducing latency jitter, and minimizing
  3709. * dropped packets.
  3710. */
  3711. #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_S 23
  3712. #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_M 0x800000
  3713. /*
  3714. * If the THREE_WAY_COEX_CONFIG_LEGACY flag is set, the target will use
  3715. * the configuration parameters given by Host driver to WLAN FW and
  3716. * apply them along with the existing CoEx Weights Override logic to
  3717. * prioritize the WLAN-BT-Zigbee packets accordingly.
  3718. *
  3719. * The host shall only set the THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT
  3720. * RSRC_CFG flag if the target has set the WMI_SERVICE
  3721. * THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT flag.
  3722. *
  3723. * The logic to send GPM to BT-SOC with BT-ZB priorities remains the same.
  3724. */
  3725. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_S 24
  3726. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_M 0x1000000
  3727. /*
  3728. * If the THREE_WAY_COEX_CONFIG_OVERRIDE flag is set, the target will use
  3729. * the configuration parameters given by Host driver to WLAN FW and
  3730. * apply them by OVERRIDing the existing CoEx Weights Override logic to
  3731. * prioritize the WLAN-BT-Zigbee packets accordingly.
  3732. *
  3733. * The host shall only set the THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT
  3734. * RSRC_CFG flag if the target has set the WMI_SERVICE
  3735. * THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT flag.
  3736. *
  3737. * The logic to send GPM to BT-SOC with BT-ZB priorities remains the same.
  3738. */
  3739. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_S 25
  3740. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_M 0x2000000
  3741. /*
  3742. * If the TX_COMPLETION_TX_TSF64 flag is set, the target should
  3743. * populate the htt_tx_compl_ind_append_tx_tsf64 array within the
  3744. * HTT_T2H TX_COMPL_IND message.
  3745. */
  3746. #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_S 26
  3747. #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_M 0x4000000
  3748. /*
  3749. * If this BIT is set, then the target should support Packet capture(SMART MU FR)
  3750. */
  3751. #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_S 27
  3752. #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_M 0x8000000
  3753. /*
  3754. * If this BIT is set, then target should support BSS Max Idle period.
  3755. */
  3756. #define WMI_RSRC_CFG_FLAG_BSS_MAX_IDLE_TIME_SUPPORT_S 28
  3757. #define WMI_RSRC_CFG_FLAG_BSS_MAX_IDLE_TIME_SUPPORT_M 0x10000000
  3758. /*
  3759. * If this bit is set, then target should use the audio sync feature.
  3760. * Host should only set this bit if the target has indicated via the
  3761. * WMI_SERVICE_AUDIO_SYNC_SUPPORT flag that it supports audio sync.
  3762. */
  3763. #define WMI_RSRC_CFG_FLAG_AUDIO_SYNC_SUPPORT_S 29
  3764. #define WMI_RSRC_CFG_FLAG_AUDIO_SYNC_SUPPORT_M 0x20000000
  3765. /*
  3766. * If this BIT is set, then the target should disable IPA
  3767. */
  3768. #define WMI_RSRC_CFG_FLAG_IPA_DISABLE_S 30
  3769. #define WMI_RSRC_CFG_FLAG_IPA_DISABLE_M 0x40000000
  3770. /*
  3771. * If this bit is set, target should use the PCIe GEN switching feature.
  3772. */
  3773. #define WMI_RSRC_CFG_FLAG_PCIE_GEN_SWITCH_CAPABLITY_S 31
  3774. #define WMI_RSRC_CFG_FLAG_PCIE_GEN_SWITCH_CAPABLITY_M 0x80000000
  3775. A_UINT32 flag1;
  3776. /** @brief smart_ant_cap - Smart Antenna capabilities information
  3777. * @details
  3778. * 1 - Smart antenna is enabled.
  3779. * 0 - Smart antenna is disabled.
  3780. * In future this can contain smart antenna specific capabilities.
  3781. */
  3782. A_UINT32 smart_ant_cap;
  3783. /**
  3784. * User can configure the buffers allocated for each AC (BE, BK, VI, VO)
  3785. * during init
  3786. */
  3787. A_UINT32 BK_Minfree;
  3788. A_UINT32 BE_Minfree;
  3789. A_UINT32 VI_Minfree;
  3790. A_UINT32 VO_Minfree;
  3791. /**
  3792. * @brief alloc_frag_desc_for_data_pkt . Controls data packet fragment
  3793. * descriptor memory allocation.
  3794. * 1 - Allocate fragment descriptor memory for data packet in firmware.
  3795. * If host wants to transmit data packet at its desired rate,
  3796. * this field must be set.
  3797. * 0 - Don't allocate fragment descriptor for data packet.
  3798. */
  3799. A_UINT32 alloc_frag_desc_for_data_pkt;
  3800. /** how much space to allocate for NDP NS (neighbor solicitation) specs */
  3801. A_UINT32 num_ns_ext_tuples_cfg;
  3802. /**
  3803. * size (in bytes) of the buffer the FW shall allocate per vdev
  3804. * firmware can dynamic allocate memory (or disable)
  3805. * packet filtering feature.
  3806. * 0 - fw chooses its default value
  3807. * -1 (0XFFFFFFFF) - disable APF
  3808. */
  3809. A_UINT32 bpf_instruction_size;
  3810. /**
  3811. * Maximum no of BSSID based RX filters host would program
  3812. * Value 0 means host doesn't given any limit to FW.
  3813. */
  3814. A_UINT32 max_bssid_rx_filters;
  3815. /**
  3816. * Use PDEV ID instead of MAC ID, added for backward compatibility with older host
  3817. * which is using MAC ID. 1 means PDEV ID, 0 means MAC ID.
  3818. */
  3819. A_UINT32 use_pdev_id;
  3820. /** Maximum number of scan clients whose DBS scan duty cycle can be configured */
  3821. A_UINT32 max_num_dbs_scan_duty_cycle;
  3822. /** Maximum number of Multi group key to support */
  3823. A_UINT32 max_num_group_keys;
  3824. union {
  3825. A_UINT32 peer_map_unmap_v2_support; /* old name */
  3826. /**
  3827. * HTT peer map/unmap format support (map 4bits and unmap 4bits)
  3828. * 0x00 -> host use default map/unmap only.
  3829. * 0x01 -> legacy value that is interpreted the same as 0x22.
  3830. * 0x22 -> host supports HTT peer map/unmap v2 format; the target is
  3831. * allowed but not required to use peer map/unmap v2 format.
  3832. * 0x32 -> host supports HTT peer map v3 format; the target is
  3833. * allowed but not required to use peer map v3 format and
  3834. * peer unmap v2 format.
  3835. */
  3836. A_UINT32 peer_map_unmap_versions;
  3837. };
  3838. /** Sched config params for all pdevs
  3839. * These tx scheduling configuration parameters are currently only
  3840. * used for internal testing purposes; therefore the non-default
  3841. * values for this field are not currently documented.
  3842. * For regular use, this field should be set to 0x0.
  3843. */
  3844. A_UINT32 sched_params;
  3845. /* Number of MAC on which AP TWT feature is supported */
  3846. A_UINT32 twt_ap_pdev_count;
  3847. /* Max no of STA with which TWT sessions can be formed by the AP */
  3848. A_UINT32 twt_ap_sta_count;
  3849. /* max_nlo_ssids - dynamically negotiated maximum number of SSIDS for NLO
  3850. * This parameter provides the final specification for the maximum number
  3851. * of SSIDs for the target to support for Network List Offload's scanning
  3852. * for preferred networks.
  3853. * This wmi_resource_config.max_nlo_ssids must be <= the max_nlo_ssids
  3854. * field from the target's WMI_SERVICE_READY_EXT_EVENT message.
  3855. * (If the target didn't provide a max_nlo_ssids field in the
  3856. * WMI_SERVICE_READY_EXT message, or if the SERVICE_READY_EXT msg's
  3857. * max_nlo_ssids value was 0x0, the target doesn't support dynamic
  3858. * negotiation of max NLO SSIDs, and WMI_NLO_MAX_SSIDS (=16) applies.)
  3859. * If this wmi_resource_config.max_nlo_ssids field is absent or 0x0,
  3860. * the host does not support dynamic negotiation of max NLO SSIDs.
  3861. * In such a case, the target will respond as follows:
  3862. * If the target supports at least WMI_NLO_MAX_SSIDS, the target will
  3863. * use the statically-configured WMI_NLO_MAX_SSIDS value.
  3864. * If the target supports less than WMI_NLO_MAX_SSIDS, the target will
  3865. * abort its boot-up, due to receiving an invalid/unsupported
  3866. * configuration specification.
  3867. */
  3868. A_UINT32 max_nlo_ssids;
  3869. /**
  3870. * num_packet_filters: the num that host requests fw to support for
  3871. * pktfilter in total, then firmware can dynamic allocate
  3872. * memory(or disable) pktfilter feature.
  3873. *
  3874. * 0 - fw chooses its default value.
  3875. * -1(0XFFFFFFFF)- disable pktfilter.
  3876. */
  3877. A_UINT32 num_packet_filters;
  3878. /**
  3879. * num_max_sta_vdevs: the max num for the sta vdevs
  3880. * fw will use it to config the memory of offload features that
  3881. * are only for sta vdevs.
  3882. * p2p client should be included.
  3883. *
  3884. * 0 - fw chooses its default value: 'num_vdevs' of this structure.
  3885. */
  3886. A_UINT32 num_max_sta_vdevs;
  3887. /* ref to section 8.4.2.48 Multiple BSSID element
  3888. * The Max BSSID Indicator field contains a value assigned to n,
  3889. * where 2^n is the maximum number of BSSIDs
  3890. */
  3891. A_UINT32 max_bssid_indicator;
  3892. /** @brief ul_resp_config - Configures the 11ax uplink ofdma feature on STA.
  3893. * I.e. sending uplink response to a trigger frame sent by AP.
  3894. * @details
  3895. * 0 - fw default behavior, based on chipset
  3896. * 1 - UL_RESP is disabled.
  3897. * 2 - UL_RESP is enabled.
  3898. * other - reserved.
  3899. */
  3900. A_UINT32 ul_resp_config;
  3901. /* msdu_flow_override_config0 - contains AST enable bitmask
  3902. * AST0 is unconditionally enabled, unless the MSDU flow override feature
  3903. * is entirely disabled.
  3904. * AST1 through AST3 are conditionally enabled, based on bits 0-2 in
  3905. * msdu_flow_override_config0.
  3906. * If all three bits are 0, no msdu flow override feature at all in FW.
  3907. *
  3908. * The WMI_MSDU_FLOW_AST_ENABLE_GET and WMI_MSDU_FLOW_AST_ENABLE_SET
  3909. * macros are used to read and write these bitfields.
  3910. */
  3911. A_UINT32 msdu_flow_override_config0;
  3912. /* msdu_flow_override_config1:
  3913. * Bits 3:0 - AST0_FLOW_MASK(4)
  3914. * Bits 7:4 - AST1_FLOW_MASK(4)
  3915. * Bits 11:8 - AST2_FLOW_MASK(4)
  3916. * Bits 15:12 - AST3_FLOW_MASK(4)
  3917. * Bits 23:16 - TID_VALID_HI_PRI (8)
  3918. * Bits 31:24 - TID_VALID_LOW_PRI (8)
  3919. *
  3920. * The macros
  3921. * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET
  3922. * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET
  3923. * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET
  3924. * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET
  3925. * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET
  3926. * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET
  3927. * are used to read and write these bitfields.
  3928. */
  3929. A_UINT32 msdu_flow_override_config1;
  3930. /** @brief flags2 - contains flags used for the following purposes:
  3931. * Configure 11ax uplink ofdma/MU-MIMO feature in FW, when chipsets
  3932. * are brought up in Repeater/STA mode.
  3933. *
  3934. * @details
  3935. * Bits 3:0
  3936. * Enable UL MU-OFDMA/MIMO for PDEVs WIFI0, WIFI1, WIFI2
  3937. * This flags should only be set when a pdev has STA VAP
  3938. * in repeater/self-organizing-network modes.
  3939. * E.g. to enable UL RESP for 5G and 2G radios, value shall be
  3940. * 0b00000000000000000000000000000011 = 0x3.
  3941. * Host shall use UCI config for a radio to populate this value,
  3942. * each radio entry shall have "config re_ul_resp 1" value set.
  3943. * Hence this can be configured dynamically.
  3944. *
  3945. * Refer to the below WMI_RSRC_CFG_FLAGS2_RE_ULRESP_PDEV_CFG_GET/SET
  3946. * macros.
  3947. * Bits 5:4
  3948. * HTT rx peer metadata version number that host supports.
  3949. * Firmware initially sends the target supported version number
  3950. * as part of service_ready_ext2 message.
  3951. * Host can ack the version number that it is using as part of
  3952. * this message.
  3953. * 0-> legacy case
  3954. * 1-> MLO support
  3955. * 2-3-> Reserved
  3956. * Refer to the WMI_RSRC_CFG_FLAGS2_RX_PEER_METADATA_VERSION macros.
  3957. * Bit 6 - is_sap_connected_d3wow_enabled
  3958. * Enable D3WoW for SAP w/ clients connected
  3959. * 0-> disable the feature
  3960. * 1-> enable the feature
  3961. * Refer to the WMI_RSRC_CFG_FLAGS2_IS_SAP_CONNECTED_D3WOW_ENABLED
  3962. * GET/SET macros.
  3963. * Bit 7 - is_go_connected_d3wow_enabled
  3964. * Enable D3WoW for GO w/ clients connected
  3965. * 0-> disable the feature
  3966. * 1-> enable the feature
  3967. * Refer to the WMI_RSRC_CFG_FLAGS2_IS_GO_CONNECTED_D3WOW_ENABLED
  3968. * GET/SET macros.
  3969. * Bit 8 - enable_dynamic_pcie_gen_speed_switch
  3970. * enable dynamic pcie gen speed switch
  3971. * 0-> disable the feature
  3972. * 1-> enable the feature
  3973. * Refer to the WMI_RSRC_CFG_FLAGS2_IS_DYNAMIC_PCIE_GEN_SPEED_SWITCH_ENABLED
  3974. * GET/SET macros.
  3975. * Bit 9 - calc_next_dtim_count
  3976. * 0 -> disable calculation of DTIM count for MBSSID_NON_TX_VAP
  3977. * 1 -> Used by some hosts to indicate calculation of DTIM count
  3978. * for MBSSID_NON_TX_VAP
  3979. * Refer to WMI_RSRC_CFG_FLAGS2_CALC_NEXT_DTIM_COUNT_GET/SET macros.
  3980. *
  3981. * Bit 10 - arp_ac_override_valid
  3982. * 0 -> arp_ac_override field is invalid
  3983. * 1 -> arp_ac_override field is valid
  3984. * Refer to WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_VALID_GET/SET macros.
  3985. * Bit 12:11 - arp_ac_override
  3986. * If the AC override valid bit is set then this field will specify the
  3987. * access category to use for ARP frames
  3988. * 0 - WMM_AC_BE
  3989. * 1 - WMM_AC_BK
  3990. * 2 - WMM_AC_VI
  3991. * 3 - WMM_AC_VO
  3992. * Refer to WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_GET/SET macros.
  3993. * Bit 13 - sawf_sched
  3994. * SAWF feature flag for scheduler
  3995. * 0 -> disable SAWF based scheduling
  3996. * 1 -> enable SAWF based scheduling
  3997. * Refer to WMI_RSRC_CFG_FLAGS2_SAWF_CONFIG_ENABLE_GET/SET macros.
  3998. * Bit 14 - notify_frame_support
  3999. * Flag to enable notify_frame_support from host.
  4000. * 0 -> disable notify_frame_support feature
  4001. * 1 -> enable_notify_frame_support feature
  4002. * Refer to WMI_RSRC_CFG_FLAGS2_NOTIFY_FRAME_CONFIG_ENABLE_GET/SET
  4003. * macros.
  4004. * Bit 15 - disable_wds_mec_intrabss
  4005. * Flag to disable wds learning, MEC, intrabss offload.
  4006. * By default, it is enabled.
  4007. * 0 -> enable wds_mec_intrabss offload
  4008. * 1 -> disable wds_mec_intrabss offload
  4009. * Refer to WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_MEC_INTRABSS_OFFLOAD_GET /
  4010. * SET macros.
  4011. * Bit 16 - latency_flowq_support
  4012. * Flag to indicate whether host supports latency tolerant queue.
  4013. * By default, it is disabled.
  4014. * 0 -> disable latency_flowq_support
  4015. * 1 -> enable latency_flowq_support
  4016. * Refer to WMI_RSRC_CFG_FLAGS2_LATENCY_FLOWQ_SUPPORT_GET/SET macros.
  4017. * Bit 17 - rf_path_mode
  4018. * Flag to indicate overlapping_freq_mode
  4019. * By default, it will be primary mode (0)
  4020. * 0 - Primary
  4021. * 1 - Secondary
  4022. * Refer to WMI_RSRC_CFG_FLAGS2_RF_PATH_MODE_GET/SET macros.
  4023. * Bit 18 - disable_wds_peer_map_unmap_event
  4024. * Flag to indicate whether the WDS peer map/unmap event should be
  4025. * processed or ignored.
  4026. * 0 - leave the WDS peer map/unmap event enabled
  4027. * 1 - disable the WDS peer map/unmap event
  4028. * This flag shall only be set if the target has set the
  4029. * WMI_SERVICE_DISABLE_WDS_PEER_MAP_UNMAP_EVENT_SUPPORT flag.
  4030. * Refer to WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_PEER_MAP_UNMAP_EVENT_GET
  4031. * and _SET macros.
  4032. * Bit 19 - show whether the host supports 128 or 256 service classes
  4033. * This bit will be set when host supports for 256 service classes
  4034. * 0 -> host supports 128 service classes
  4035. * 1 -> host supports 255 [0-254] valid service classes,
  4036. * and 255 indicates an invalid service class
  4037. * Refer to WMI_RSRC_CFG_FLAGS2_SAWF_255_SVC_CLASS_SUPPORT_GET/SET
  4038. * macros.
  4039. * Bit 20 - enable feature EPM (Enhanced Power Management)
  4040. * 0 -> disable the feature
  4041. * 1 -> enable the feature
  4042. * Refer to the below WMI_RSRC_CFG_FLAGS2_EPM_GET/SET macros.
  4043. * Bit 21 - enable new MGMT SRNG for beacons and probe responses.
  4044. * 0 -> disable the feature
  4045. * 1 -> enable the feature
  4046. * Refer to the below WMI_RSRC_CFG_FLAGS2_IS_MGMT_SRNG_ENABLED_GET/SET
  4047. * macros.
  4048. * Bit 22 - enable 4address WDS support
  4049. * 0 -> disable the feature
  4050. * 1 -> enable the feature
  4051. * Refer to below WMI_RSRC_CFG_FLAGS2_ENABLE_WDS_NULL_FRAME_SUPPORT
  4052. *
  4053. * Bits 31:23 - Reserved
  4054. */
  4055. A_UINT32 flags2;
  4056. /** @brief host_service_flags - can be used by Host to indicate
  4057. * services that host can support.
  4058. *
  4059. * @details
  4060. * Bit 0
  4061. * The bit will be set when Host HDD supports separate iface creation
  4062. * for NAN. More specifically Host can support creation of NAN vdev
  4063. * in firmware.
  4064. *
  4065. * Refer to WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_IFACE_SUPPORT_GET/SET
  4066. * macros defined below.
  4067. * Bit 1
  4068. * The bit will be set when HOST is capable of processing multiple
  4069. * radio events per radio. More specifically whenever Firmware is
  4070. * sending multiple radio events (WMI_RADIO_LINK_STATS_EVENTID
  4071. * = 0x16004) for a single radio,
  4072. * Through this flag Firmware will know that HOST is able to support
  4073. * delivery of RADIO_LINK_STATS across multiple event messages,
  4074. * and Firmware can send multiple radio events.
  4075. *
  4076. * Refer to WMI_RSRC_CFG_HOST_SERVICE_FLAG_HOST_SUPPORT_MULTI_RADIO_EVTS_PER_RADIO_GET/SET
  4077. * macros defined below.
  4078. * Bit 2
  4079. * This bit will be set when host is able to handle split AST feature.
  4080. * Refer to the below definitions of the
  4081. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_SPLIT_AST_FEATURE_HOST_SUPPORT_GET
  4082. * and _SET macros.
  4083. * Bit 3
  4084. * This bit will be set when host is able to enable EAPOL offload to
  4085. * FW for SAE roaming feature.
  4086. * Refer to the below definitions of the
  4087. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_SAE_EAPOL_OFFLOAD_SUPPORT_GET
  4088. * and _SET macros.
  4089. * Bit 4
  4090. * This bit will be set when host is able to process the
  4091. * WMI_REG_CC_EXT_EVENT.
  4092. * Refer to the below definitions of the
  4093. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_CC_EXT_SUPPORT_GET
  4094. * and _SET macros.
  4095. * Bit 5
  4096. * This bit will be set when the host supports NAN channels.
  4097. * Refer to WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_CHANNEL_SUPPORT_GET/SET
  4098. * Bit 6
  4099. * This bit will be set when the host supports synchronous TWT events.
  4100. * Refer to WMI_RSRC_CFG_HOST_SERVICE_FLAG_STA_TWT_SYNC_EVT_SUPPORT_GET
  4101. * and _SET.
  4102. * Bit 7
  4103. * This bit will be set when host supports both LPI and SP mode.
  4104. * when this bit is set to 0 - Indicate LPI only mode
  4105. * when set to 1 - Indicate both SP mode and LPI mode
  4106. * both are supported
  4107. * Refer to the below definitions of the
  4108. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_LPI_SP_MODE_SUPPORT_GET
  4109. * and _SET macros.
  4110. * Bit 8
  4111. * This bit will be set when host wants to disable timer check in
  4112. * reg for AFC.
  4113. * when set to 1 - Disable timer check
  4114. * Refer to the below definitions of the
  4115. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_TIMER_CHECK_GET
  4116. * and _SET macros.
  4117. * Bit 9
  4118. * This bit will be set when host host wants to disable request id
  4119. * check in reg for AFC.
  4120. * when set to 1 - Disable Request ID check
  4121. * Refer to the below definitions of the
  4122. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_REQ_ID_CHECK_GET
  4123. * and _SET macros.
  4124. * Bit 10
  4125. * This bit will be set when host wants to enable indoor for AFC
  4126. * when this bit is set to 0 indoor mode not enabled
  4127. * when this bit is set to 1 indoor mode is enabled
  4128. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_INDOOR_SUPPORT_CHECK_GET
  4129. * and SET macros
  4130. * Bit 11
  4131. * This bit will be set when host wants to enable outdoor for AFC
  4132. * when this bit is set to 0 outdoor mode not enabled
  4133. * when this bit is set to 1 outdoor mode is enabled
  4134. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_OUTDOOR_SUPPORT_CHECK_GET
  4135. * and SET macros.
  4136. * Bit 12
  4137. * This bit will be set when host host wants to enable/disable
  4138. * REO QREF feature
  4139. * when set to 1 - Enable the REO QREF feature
  4140. * when set to 0 - Disable the REO QREF feature
  4141. * Refer to the below definitions of the
  4142. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_REO_QREF_FEATURE_SUPPORT_GET
  4143. * and _SET macros.
  4144. * Bit 13
  4145. * This bit will be set when host host wants to enable/disable
  4146. * bang radar 320M support feature
  4147. * when set to 1 - Enable the bang radar 320M support
  4148. * when set to 0 - Disable the bang radar 320M support
  4149. * Refer to the below definitions of the
  4150. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_BANG_RADAR_320M_SUPPORT_GET
  4151. * and _SET macros.
  4152. * Bit 14
  4153. * This bit will be set when host wants to enable/disable
  4154. * full BW NOL feature.
  4155. * When set to 1: Enable full BW NOL feature.
  4156. * When set to 0: Disable the full BW NOL feature.
  4157. * Refer to the below definitions of the
  4158. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_RADAR_FLAGS_FULL_BW_NOL_GET
  4159. * and _SET macros.
  4160. * Bit 15
  4161. * This bit will be set if the host has smem_mailbox support enabled.
  4162. * Refer to the below definitions of the
  4163. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_SMEM_MAILBOX_SUPPORT_GET
  4164. * and _SET macros.
  4165. * Bit 16
  4166. * ML FULL monitor mode
  4167. * This bit will be set by host to enable ML_FULL_MONITOR_MODE
  4168. * Refer to the below definitions of the
  4169. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_ML_FULL_MONITOR_MODE_SUPPORT_GET
  4170. * and _SET macros
  4171. * Bit 17
  4172. * This bit will set by host to inform FW that rx buffer refilling
  4173. * is supported by the host in Qdata feature (tx LCE consent pkt),
  4174. * So FW will start refilling the buffers.
  4175. * Refer to the below definitions of WMI_RSRC_CFG_HOST_SERVICE_FLAG
  4176. * OPT_DP_CTRL_REPLENISH_REFILL_RX_BUFFER_SUPPORT_GET and _SET macros.
  4177. * Bits 31:18 - Reserved
  4178. */
  4179. A_UINT32 host_service_flags;
  4180. /** @brief max_rnr_neighbours -
  4181. * The Maximum number of neighbour RNR's from other SoC.
  4182. * This limits the field @num_bss in @wmi_pdev_tbtt_offset_sync_cmd_fixed_param.
  4183. * Value of 0 means cross SoC TBTT offset synchronization not required and
  4184. * @PDEV_TBTT_OFFSET_SYNC_CMD wouldn't be used.
  4185. */
  4186. A_UINT32 max_rnr_neighbours;
  4187. /** @brief ema_max_vap_cnt - number of maximum EMA Tx vaps (VAPs having both
  4188. * VDEV_FLAGS_EMA_MODE and VDEV_FLAGS_TRANSMIT_AP set) at any instance
  4189. * of time across SOC. Legacy MBSS Vaps are not accounted in this field.
  4190. */
  4191. A_UINT32 ema_max_vap_cnt;
  4192. /** @brief ema_max_profile_period - maximum profile periodicity
  4193. * (maximum number of beacons after which VAP profiles repeat)
  4194. * for any EMA VAP on any pdev.
  4195. */
  4196. A_UINT32 ema_max_profile_period;
  4197. /** @brief max_ndp_sessions
  4198. * This is the max ndp sessions sent by the host which is the minimum
  4199. * of the value requested within the host's ini configurations and
  4200. * the max ndp sessions supported by the firmware (as reported in the
  4201. * SERVICE_READY_EXT2_EVENT message).
  4202. */
  4203. A_UINT32 max_ndp_sessions;
  4204. /** @brief max_ndi_supported
  4205. * This is the max ndi interfaces sent by the host based on the value
  4206. * specified by the host's ini configuration.
  4207. */
  4208. A_UINT32 max_ndi_interfaces;
  4209. /** @brief max_ap_vaps
  4210. * Maximum number of AP mode vdevs created at any time.
  4211. * This value is minimum of the number of AP vdevs supported by
  4212. * the target and host.
  4213. */
  4214. A_UINT32 max_ap_vaps;
  4215. /** @brief cbc_flow_ena
  4216. * When cbc_flow_ena is se, halphy will do Cold Boot Calibration flow.
  4217. * Otherwise, halphy will do normal flow.
  4218. */
  4219. A_UINT32 cbc_flow_ena;
  4220. /** @brief ema_init_config - can be used by Host to indicate beacon size
  4221. * @details
  4222. * Bit 0 : 15 - Size of beacon, currently it can be sent as
  4223. * 1500 or 2500 or 4000 bytes
  4224. * Bit 16 : 31 - Reserved
  4225. * In case of Backward compatibility, if this variable is 0 then
  4226. * default beacon size (1500) is used.
  4227. */
  4228. A_UINT32 ema_init_config;
  4229. /** @brief carrier_config
  4230. * Carrier profile configuration
  4231. * BIT 0 -> enable/disable charter configurations
  4232. * BIT 1 : 31 Reserved
  4233. */
  4234. A_UINT32 carrier_config;
  4235. /** @brief num_of_linkview_peers - proposed by the host value of
  4236. * the peers with the num_of_linkview_msduqs_per_tid allocation
  4237. * @details
  4238. * Host can request what the number of 'num_peers' should use
  4239. * num_of_linkview_msduqs_per_tid. All other peers will use
  4240. * default number of MSDUQs allocated.
  4241. */
  4242. A_UINT32 num_of_linkview_peers;
  4243. /** @brief num_of_linkview_msduqs_per_tid - proposed by the host value of
  4244. * MSDUQs per each LinkView peer's TID
  4245. * @details
  4246. * Host sends the number of MSDUQs per each LinkView peer's TID.
  4247. * This number will be used during resources allocation for
  4248. * LinkView peer in the target.
  4249. */
  4250. A_UINT32 num_of_linkview_msduqs_per_tid;
  4251. /**
  4252. * @brief num_max_active_vdevs -
  4253. * number of max active virtual devices (VAPs) to support
  4254. */
  4255. A_UINT32 num_max_active_vdevs;
  4256. /**
  4257. * @brief num_max_mlo_link_per_ml_bss
  4258. * number of max partner links of a ML BSS
  4259. */
  4260. A_UINT32 num_max_mlo_link_per_ml_bss;
  4261. /**
  4262. * @brief num_max_active_mlo_link_per_ml_bss
  4263. * number of max active partner links of a ML BSS
  4264. */
  4265. A_UINT32 num_max_active_mlo_link_per_ml_bss;
  4266. } wmi_resource_config;
  4267. #define WMI_MSDU_FLOW_AST_ENABLE_GET(msdu_flow_config0, ast_x) \
  4268. (((ast_x) == 0) ? 1 : ((msdu_flow_config0) & (1 << ((ast_x) - 1))))
  4269. #define WMI_MSDU_FLOW_AST_ENABLE_SET(msdu_flow_config0, ast_x, enable) \
  4270. do { \
  4271. if ((ast_x) == 0) break; \
  4272. if ((enable)) { \
  4273. (msdu_flow_config0) |= (1 << ((ast_x) - 1)); \
  4274. } else { \
  4275. (msdu_flow_config0) &= ~(1 << ((ast_x) - 1)); \
  4276. } \
  4277. } while(0)
  4278. #define WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET(msdu_flow_config1, ast_x) \
  4279. (((msdu_flow_config1) & (0x0f << ((ast_x) * 4))) >> ((ast_x) * 4))
  4280. #define WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET( \
  4281. msdu_flow_config1, ast_x, mask) \
  4282. do { \
  4283. (msdu_flow_config1) &= ~(0xF << ((ast_x) * 4)); \
  4284. (msdu_flow_config1) |= ((mask) << ((ast_x) * 4)); \
  4285. } while(0)
  4286. #define WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET(msdu_flow_config1) \
  4287. (((msdu_flow_config1) & 0xff0000) >> 16)
  4288. #define WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET(msdu_flow_config1, mask) \
  4289. do { \
  4290. (msdu_flow_config1) &= ~0xff0000; \
  4291. (msdu_flow_config1) |= ((mask) << 16); \
  4292. } while(0)
  4293. #define WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET(msdu_flow_config1) \
  4294. ((msdu_flow_config1 & 0xff000000) >> 24)
  4295. #define WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET(msdu_flow_config1, mask) \
  4296. do { \
  4297. (msdu_flow_config1) &= ~0xff000000; \
  4298. (msdu_flow_config1) |= ((mask) << 24); \
  4299. } while(0)
  4300. #define WMI_RSRC_CFG_FLAG_SET(word32, flag, value) \
  4301. do { \
  4302. (word32) &= ~WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
  4303. (word32) |= ((value) << WMI_RSRC_CFG_FLAG_ ## flag ## _S) & \
  4304. WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
  4305. } while (0)
  4306. #define WMI_RSRC_CFG_FLAG_GET(word32, flag) \
  4307. (((word32) & WMI_RSRC_CFG_FLAG_ ## flag ## _M) >> \
  4308. WMI_RSRC_CFG_FLAG_ ## flag ## _S)
  4309. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_SET(word32, value) \
  4310. WMI_RSRC_CFG_FLAG_SET((word32), WOW_IGN_PCIE_RST, (value))
  4311. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_GET(word32) \
  4312. WMI_RSRC_CFG_FLAG_GET((word32), WOW_IGN_PCIE_RST)
  4313. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_SET(word32, value) \
  4314. WMI_RSRC_CFG_FLAG_SET((word32), LTEU_SUPPORT, (value))
  4315. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_GET(word32) \
  4316. WMI_RSRC_CFG_FLAG_GET((word32), LTEU_SUPPORT)
  4317. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_SET(word32, value) \
  4318. WMI_RSRC_CFG_FLAG_SET((word32), COEX_GPIO_SUPPORT, (value))
  4319. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_GET(word32) \
  4320. WMI_RSRC_CFG_FLAG_GET((word32), COEX_GPIO_SUPPORT)
  4321. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_SET(word32, value) \
  4322. WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_SPECTRAL_INTF, (value))
  4323. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_GET(word32) \
  4324. WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_SPECTRAL_INTF)
  4325. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_SET(word32, value) \
  4326. WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_CHAN_LOAD_INTF, (value))
  4327. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_GET(word32) \
  4328. WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_CHAN_LOAD_INTF)
  4329. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_SET(word32, value) \
  4330. WMI_RSRC_CFG_FLAG_SET((word32), BSS_CHANNEL_INFO_64, (value))
  4331. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_GET(word32) \
  4332. WMI_RSRC_CFG_FLAG_GET((word32), BSS_CHANNEL_INFO_64)
  4333. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_SET(word32, value) \
  4334. WMI_RSRC_CFG_FLAG_SET((word32), ATF_CONFIG_ENABLE, (value))
  4335. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_GET(word32) \
  4336. WMI_RSRC_CFG_FLAG_GET((word32), ATF_CONFIG_ENABLE)
  4337. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_SET(word32, value) \
  4338. WMI_RSRC_CFG_FLAG_SET((word32), IPHR_PAD_CONFIG_ENABLE, (value))
  4339. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_GET(word32) \
  4340. WMI_RSRC_CFG_FLAG_GET((word32), IPHR_PAD_CONFIG_ENABLE)
  4341. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_SET(word32, value) \
  4342. WMI_RSRC_CFG_FLAG_SET((word32), QWRAP_MODE_ENABLE, (value))
  4343. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_GET(word32) \
  4344. WMI_RSRC_CFG_FLAG_GET((word32), QWRAP_MODE_ENABLE)
  4345. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_SET(word32, value) \
  4346. WMI_RSRC_CFG_FLAG_SET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT, (value))
  4347. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_GET(word32) \
  4348. WMI_RSRC_CFG_FLAG_GET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT)
  4349. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_SET(word32, value) \
  4350. WMI_RSRC_CFG_FLAG_SET((word32), TX_MSDU_ID_NEW_PARTITION_SUPPORT, (value))
  4351. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_GET(word32) \
  4352. WMI_RSRC_CFG_FLAG_GET((word32), TX_MSDU_ID_NEW_PARTITION_SUPPORT)
  4353. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_SET(word32, value) \
  4354. WMI_RSRC_CFG_FLAG_SET((word32), TCL_CCE_DISABLE, (value))
  4355. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_GET(word32) \
  4356. WMI_RSRC_CFG_FLAG_GET((word32), TCL_CCE_DISABLE)
  4357. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_SET(word32, value) \
  4358. WMI_RSRC_CFG_FLAG_SET((word32), TIM_V2_SUPPORT_ENABLE, (value))
  4359. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_GET(word32) \
  4360. WMI_RSRC_CFG_FLAG_GET((word32), TIM_V2_SUPPORT_ENABLE)
  4361. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_SET(word32, value) \
  4362. WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_REKEY_MINRATE_SUPPORT_ENABLE, (value))
  4363. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_GET(word32) \
  4364. WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_REKEY_MINRATE_SUPPORT_ENABLE)
  4365. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_SET(word32, value) \
  4366. WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_AC_OVERRIDE_VALID, (value))
  4367. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_GET(word32) \
  4368. WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_AC_OVERRIDE_VALID)
  4369. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_SET(word32, value) \
  4370. WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_AC_OVERRIDE, (value))
  4371. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_GET(word32) \
  4372. WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_AC_OVERRIDE)
  4373. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_SET(word32, value) \
  4374. WMI_RSRC_CFG_FLAG_SET((word32), TX_ACK_RSSI, (value))
  4375. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_GET(word32) \
  4376. WMI_RSRC_CFG_FLAG_GET((word32), TX_ACK_RSSI)
  4377. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_SET(word32, value) \
  4378. WMI_RSRC_CFG_FLAG_SET((word32), HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN, (value))
  4379. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_GET(word32) \
  4380. WMI_RSRC_CFG_FLAG_GET((word32), HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN)
  4381. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_SET(word32, value) \
  4382. WMI_RSRC_CFG_FLAG_SET((word32), PEER_UNMAP_RESPONSE_SUPPORT, (value))
  4383. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_GET(word32) \
  4384. WMI_RSRC_CFG_FLAG_GET((word32), PEER_UNMAP_RESPONSE_SUPPORT)
  4385. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_SET(word32, value) \
  4386. WMI_RSRC_CFG_FLAG_SET((word32), HTT_PEER_STATS, (value))
  4387. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_GET(word32) \
  4388. WMI_RSRC_CFG_FLAG_GET((word32), HTT_PEER_STATS)
  4389. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_SET(word32, value) \
  4390. WMI_RSRC_CFG_FLAG_SET((word32), PEER_TID_EXT, (value))
  4391. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_GET(word32) \
  4392. WMI_RSRC_CFG_FLAG_GET((word32), PEER_TID_EXT)
  4393. #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_SET(word32, value) \
  4394. WMI_RSRC_CFG_FLAG_SET((word32), VIDEO_OVER_WIFI_ENABLE, (value))
  4395. #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_GET(word32) \
  4396. WMI_RSRC_CFG_FLAG_GET((word32), VIDEO_OVER_WIFI_ENABLE)
  4397. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_SET(word32, value) \
  4398. WMI_RSRC_CFG_FLAG_SET((word32), THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT, (value))
  4399. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_GET(word32) \
  4400. WMI_RSRC_CFG_FLAG_GET((word32), THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT)
  4401. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_SET(word32, value) \
  4402. WMI_RSRC_CFG_FLAG_SET((word32), THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT, (value))
  4403. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_GET(word32) \
  4404. WMI_RSRC_CFG_FLAG_GET((word32), THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT)
  4405. #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_SET(word32, value) \
  4406. WMI_RSRC_CFG_FLAG_SET((word32), TX_COMPLETION_TX_TSF64_ENABLE, (value))
  4407. #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_GET(word32) \
  4408. WMI_RSRC_CFG_FLAG_GET((word32), TX_COMPLETION_TX_TSF64_ENABLE)
  4409. #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_SET(word32, value) \
  4410. WMI_RSRC_CFG_FLAG_SET((word32), PACKET_CAPTURE_SUPPORT, (value))
  4411. #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_GET(word32) \
  4412. WMI_RSRC_CFG_FLAG_GET((word32), PACKET_CAPTURE_SUPPORT)
  4413. #define WMI_RSRC_CFG_FLAG_BSS_MAX_IDLE_TIME_SUPPORT_SET(word32, value) \
  4414. WMI_RSRC_CFG_FLAG_SET((word32), BSS_MAX_IDLE_TIME_SUPPORT, (value))
  4415. #define WMI_RSRC_CFG_FLAG_BSS_MAX_IDLE_TIME_SUPPORT_GET(word32) \
  4416. WMI_RSRC_CFG_FLAG_GET((word32), BSS_MAX_IDLE_TIME_SUPPORT)
  4417. #define WMI_RSRC_CFG_FLAG_AUDIO_SYNC_SUPPORT_SET(word32, value) \
  4418. WMI_RSRC_CFG_FLAG_SET((word32), AUDIO_SYNC_SUPPORT, (value))
  4419. #define WMI_RSRC_CFG_FLAG_AUDIO_SYNC_SUPPORT_GET(word32) \
  4420. WMI_RSRC_CFG_FLAG_GET((word32), AUDIO_SYNC_SUPPORT)
  4421. #define WMI_RSRC_CFG_FLAG_IPA_DISABLE_SET(word32, value) \
  4422. WMI_RSRC_CFG_FLAG_SET((word32), IPA_DISABLE, (value))
  4423. #define WMI_RSRC_CFG_FLAG_IPA_DISABLE_GET(word32) \
  4424. WMI_RSRC_CFG_FLAG_GET((word32), IPA_DISABLE)
  4425. #define WMI_RSRC_CFG_FLAG_PCIE_GEN_SWITCH_CAPABLITY_SET(word32, value) \
  4426. WMI_RSRC_CFG_FLAG_SET((word32), PCIE_GEN_SWITCH_CAPABLITY, (value))
  4427. #define WMI_RSRC_CFG_FLAG_PCIE_GEN_SWITCH_CAPABLITY_GET(word32) \
  4428. WMI_RSRC_CFG_FLAG_GET((word32), PCIE_GEN_SWITCH_CAPABLITY)
  4429. #define WMI_RSRC_CFG_FLAGS2_RE_ULRESP_PDEV_CFG_GET(flags2, pdev_id) \
  4430. WMI_GET_BITS(flags2, pdev_id, 1)
  4431. #define WMI_RSRC_CFG_FLAGS2_RE_ULRESP_PDEV_CFG_SET(flags2, pdev_id, value) \
  4432. WMI_SET_BITS(flags2, pdev_id, 1, value)
  4433. #define WMI_RSRC_CFG_FLAGS2_RX_PEER_METADATA_VERSION_GET(flags2) \
  4434. WMI_GET_BITS(flags2, 4, 2)
  4435. #define WMI_RSRC_CFG_FLAGS2_RX_PEER_METADATA_VERSION_SET(flags2, value) \
  4436. WMI_SET_BITS(flags2, 4, 2, value)
  4437. #define WMI_RSRC_CFG_FLAGS2_IS_SAP_CONNECTED_D3WOW_ENABLED_GET(flags2) \
  4438. WMI_GET_BITS(flags2, 6, 1)
  4439. #define WMI_RSRC_CFG_FLAGS2_IS_SAP_CONNECTED_D3WOW_ENABLED_SET(flags2, value) \
  4440. WMI_SET_BITS(flags2, 6, 1, value)
  4441. #define WMI_RSRC_CFG_FLAGS2_IS_GO_CONNECTED_D3WOW_ENABLED_GET(flags2) \
  4442. WMI_GET_BITS(flags2, 7, 1)
  4443. #define WMI_RSRC_CFG_FLAGS2_IS_GO_CONNECTED_D3WOW_ENABLED_SET(flags2, value) \
  4444. WMI_SET_BITS(flags2, 7, 1, value)
  4445. #define WMI_RSRC_CFG_FLAGS2_IS_DYNAMIC_PCIE_GEN_SPEED_SWITCH_ENABLED_GET(flags2) \
  4446. WMI_GET_BITS(flags2, 8, 1)
  4447. #define WMI_RSRC_CFG_FLAGS2_IS_DYNAMIC_PCIE_GEN_SPEED_SWITCH_ENABLED_SET(flags2, value) \
  4448. WMI_SET_BITS(flags2, 8, 1, value)
  4449. #define WMI_RSRC_CFG_FLAGS2_CALC_NEXT_DTIM_COUNT_GET(flags2) \
  4450. WMI_GET_BITS(flags2, 9, 1)
  4451. #define WMI_RSRC_CFG_FLAGS2_CALC_NEXT_DTIM_COUNT_SET(flags2, value) \
  4452. WMI_SET_BITS(flags2, 9, 1, value)
  4453. #define WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_VALID_GET(flags2) \
  4454. WMI_GET_BITS(flags2, 10, 1)
  4455. #define WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_VALID_SET(flags2, value) \
  4456. WMI_SET_BITS(flags2, 10, 1, value)
  4457. #define WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_GET(flags2) \
  4458. WMI_GET_BITS(flags2, 11, 2)
  4459. #define WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_SET(flags2, value) \
  4460. WMI_SET_BITS(flags2, 11, 2, value)
  4461. #define WMI_RSRC_CFG_FLAGS2_SAWF_CONFIG_ENABLE_GET(flags2) \
  4462. WMI_GET_BITS(flags2, 13, 1)
  4463. #define WMI_RSRC_CFG_FLAGS2_SAWF_CONFIG_ENABLE_SET(flags2, value) \
  4464. WMI_SET_BITS(flags2, 13, 1, value)
  4465. #define WMI_RSRC_CFG_FLAGS2_NOTIFY_FRAME_CONFIG_ENABLE_GET(flags2) \
  4466. WMI_GET_BITS(flags2, 14, 1)
  4467. #define WMI_RSRC_CFG_FLAGS2_NOTIFY_FRAME_CONFIG_ENABLE_SET(flags2, value) \
  4468. WMI_SET_BITS(flags2, 14, 1, value)
  4469. #define WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_MEC_INTRABSS_OFFLOAD_GET(flags2) \
  4470. WMI_GET_BITS(flags2, 15, 1)
  4471. #define WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_MEC_INTRABSS_OFFLOAD_SET(flags2, value) \
  4472. WMI_SET_BITS(flags2, 15, 1, value)
  4473. #define WMI_RSRC_CFG_FLAGS2_LATENCY_FLOWQ_SUPPORT_GET(flags2) \
  4474. WMI_GET_BITS(flags2, 16, 1)
  4475. #define WMI_RSRC_CFG_FLAGS2_LATENCY_FLOWQ_SUPPORT_SET(flags2, value) \
  4476. WMI_SET_BITS(flags2, 16, 1, value)
  4477. #define WMI_RSRC_CFG_FLAGS2_RF_PATH_MODE_GET(flags2) \
  4478. WMI_GET_BITS(flags2, 17, 1)
  4479. #define WMI_RSRC_CFG_FLAGS2_RF_PATH_MODE_SET(flags2, value) \
  4480. WMI_SET_BITS(flags2, 17, 1, value)
  4481. #define WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_PEER_MAP_UNMAP_EVENT_GET(flags2) \
  4482. WMI_GET_BITS(flags2, 18, 1)
  4483. #define WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_PEER_MAP_UNMAP_EVENT_SET(flags2, value) \
  4484. WMI_SET_BITS(flags2, 18, 1, value)
  4485. #define WMI_RSRC_CFG_FLAGS2_SAWF_255_SVC_CLASS_SUPPORT_GET(flags2) \
  4486. WMI_GET_BITS(flags2, 19, 1)
  4487. #define WMI_RSRC_CFG_FLAGS2_SAWF_255_SVC_CLASS_SUPPORT_SET(flags2, value) \
  4488. WMI_SET_BITS(flags2, 19, 1, value)
  4489. #define WMI_RSRC_CFG_FLAGS2_EPM_GET(flags2) \
  4490. WMI_GET_BITS(flags2, 20, 1)
  4491. #define WMI_RSRC_CFG_FLAGS2_EPM_SET(flags2, value) \
  4492. WMI_SET_BITS(flags2, 20, 1, value)
  4493. #define WMI_RSRC_CFG_FLAGS2_IS_MGMT_SRNG_ENABLED_GET(flags2) \
  4494. WMI_GET_BITS(flags2, 21, 1)
  4495. #define WMI_RSRC_CFG_FLAGS2_IS_MGMT_SRNG_ENABLED_SET(flags2, value) \
  4496. WMI_SET_BITS(flags2, 21, 1, value)
  4497. #define WMI_RSRC_CFG_FLAGS2_ENABLE_WDS_NULL_FRAME_SUPPORT_GET(flags2) \
  4498. WMI_GET_BITS(flags2, 22, 1)
  4499. #define WMI_RSRC_CFG_FLAGS2_ENABLE_WDS_NULL_FRAME_SUPPORT_SET(flags2, value) \
  4500. WMI_SET_BITS(flags2, 22, 1, value)
  4501. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_IFACE_SUPPORT_GET(host_service_flags) \
  4502. WMI_GET_BITS(host_service_flags, 0, 1)
  4503. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_IFACE_SUPPORT_SET(host_service_flags, val) \
  4504. WMI_SET_BITS(host_service_flags, 0, 1, val)
  4505. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_HOST_SUPPORT_MULTI_RADIO_EVTS_PER_RADIO_GET(host_service_flags) \
  4506. WMI_GET_BITS(host_service_flags, 1, 1)
  4507. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_HOST_SUPPORT_MULTI_RADIO_EVTS_PER_RADIO_SET(host_service_flags, val) \
  4508. WMI_SET_BITS(host_service_flags, 1, 1, val)
  4509. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SPLIT_AST_FEATURE_HOST_SUPPORT_GET(host_service_flags) \
  4510. WMI_GET_BITS(host_service_flags, 2, 1)
  4511. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SPLIT_AST_FEATURE_HOST_SUPPORT_SET(host_service_flags, val) \
  4512. WMI_SET_BITS(host_service_flags, 2, 1, val)
  4513. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SAE_EAPOL_OFFLOAD_SUPPORT_GET(host_service_flags) \
  4514. WMI_GET_BITS(host_service_flags, 3, 1)
  4515. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SAE_EAPOL_OFFLOAD_SUPPORT_SET(host_service_flags, val) \
  4516. WMI_SET_BITS(host_service_flags, 3, 1, val)
  4517. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_CC_EXT_SUPPORT_GET(host_service_flags) \
  4518. WMI_GET_BITS(host_service_flags, 4, 1)
  4519. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_CC_EXT_SUPPORT_SET(host_service_flags, val) \
  4520. WMI_SET_BITS(host_service_flags, 4, 1, val)
  4521. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_CHANNEL_SUPPORT_GET(host_service_flags) \
  4522. WMI_GET_BITS(host_service_flags, 5, 1)
  4523. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_CHANNEL_SUPPORT_SET(host_service_flags, val) \
  4524. WMI_SET_BITS(host_service_flags, 5, 1, val)
  4525. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_STA_TWT_SYNC_EVT_SUPPORT_GET(host_service_flags) \
  4526. WMI_GET_BITS(host_service_flags, 6, 1)
  4527. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_STA_TWT_SYNC_EVT_SUPPORT_SET(host_service_flags, val) \
  4528. WMI_SET_BITS(host_service_flags, 6, 1, val)
  4529. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_LPI_SP_MODE_SUPPORT_GET(host_service_flags) \
  4530. WMI_GET_BITS(host_service_flags, 7, 1)
  4531. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_LPI_SP_MODE_SUPPORT_SET(host_service_flags, val) \
  4532. WMI_SET_BITS(host_service_flags, 7, 1, val)
  4533. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_TIMER_CHECK_GET(host_service_flags) \
  4534. WMI_GET_BITS(host_service_flags, 8, 1)
  4535. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_TIMER_CHECK_SET(host_service_flags, val) \
  4536. WMI_SET_BITS(host_service_flags, 8, 1, val)
  4537. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_REQ_ID_CHECK_GET(host_service_flags) \
  4538. WMI_GET_BITS(host_service_flags, 9, 1)
  4539. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_REQ_ID_CHECK_SET(host_service_flags, val) \
  4540. WMI_SET_BITS(host_service_flags, 9, 1, val)
  4541. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_INDOOR_SUPPORT_CHECK_GET(host_service_flags) \
  4542. WMI_GET_BITS(host_service_flags, 10, 1)
  4543. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_INDOOR_SUPPORT_CHECK_SET(host_service_flags, val) \
  4544. WMI_SET_BITS(host_service_flags, 10, 1, val)
  4545. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_OUTDOOR_SUPPORT_CHECK_GET(host_service_flags) \
  4546. WMI_GET_BITS(host_service_flags, 11, 1)
  4547. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_OUTDOOR_SUPPORT_CHECK_SET(host_service_flags, val) \
  4548. WMI_SET_BITS(host_service_flags, 11, 1, val)
  4549. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REO_QREF_FEATURE_SUPPORT_GET(host_service_flags) \
  4550. WMI_GET_BITS(host_service_flags, 12, 1)
  4551. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REO_QREF_FEATURE_SUPPORT_SET(host_service_flags, val) \
  4552. WMI_SET_BITS(host_service_flags, 12, 1, val)
  4553. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_BANG_RADAR_320M_SUPPORT_GET(host_service_flags) \
  4554. WMI_GET_BITS(host_service_flags, 13, 1)
  4555. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_BANG_RADAR_320M_SUPPORT_SET(host_service_flags, val) \
  4556. WMI_SET_BITS(host_service_flags, 13, 1, val)
  4557. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_RADAR_FLAGS_FULL_BW_NOL_GET(host_service_flags) \
  4558. WMI_GET_BITS(host_service_flags, 14, 1)
  4559. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_RADAR_FLAGS_FULL_BW_NOL_SET(host_service_flags, val) \
  4560. WMI_SET_BITS(host_service_flags, 14, 1, val)
  4561. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SMEM_MAILBOX_SUPPORT_GET(host_service_flags) \
  4562. WMI_GET_BITS(host_service_flags, 15, 1)
  4563. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SMEM_MAILBOX_SUPPORT_SET(host_service_flags, val) \
  4564. WMI_SET_BITS(host_service_flags, 15, 1, val)
  4565. /*
  4566. * Temporarily retain deprecated old "QMS_DLKM" macro names as aliases
  4567. * for the new "SMEM_MAILBOX" macro names.
  4568. */
  4569. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_QMS_DLKM_SUPPORT_GET(host_service_flags) /* DEPRECATED */ \
  4570. WMI_RSRC_CFG_HOST_SERVICE_FLAG_SMEM_MAILBOX_SUPPORT_GET(host_service_flags)
  4571. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_QMS_DLKM_SUPPORT_SET(host_service_flags, val) /* DEPRECATED */ \
  4572. WMI_RSRC_CFG_HOST_SERVICE_FLAG_SMEM_MAILBOX_SUPPORT_SET(host_service_flags, val)
  4573. /* ML FULL monitor mode */
  4574. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_ML_FULL_MONITOR_MODE_SUPPORT_GET(host_service_flags) \
  4575. WMI_GET_BITS(host_service_flags, 16, 1)
  4576. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_ML_FULL_MONITOR_MODE_SUPPORT_SET(host_service_flags, val) \
  4577. WMI_SET_BITS(host_service_flags, 16, 1, val)
  4578. /* This bit is used to inform FW to provide refill buffers in Qdata feature */
  4579. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_OPT_DP_CTRL_REPLENISH_REFILL_RX_BUFFER_SUPPORT_GET(host_service_flags) \
  4580. WMI_GET_BITS(host_service_flags, 17, 1)
  4581. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_OPT_DP_CTRL_REPLENISH_REFILL_RX_BUFFER_SUPPORT_SET(host_service_flags, val) \
  4582. WMI_SET_BITS(host_service_flags, 17, 1, val)
  4583. #define WMI_RSRC_CFG_CARRIER_CFG_CHARTER_ENABLE_GET(carrier_config) \
  4584. WMI_GET_BITS(carrier_config, 0, 1)
  4585. #define WMI_RSRC_CFG_CARRIER_CFG_CHARTER_ENABLE_SET(carrier_config, val) \
  4586. WMI_SET_BITS(carrier_config, 0, 1, val)
  4587. /** Top nibble can be used to diff between HE and EHT: 0xVXXXXXXX
  4588. * If V == 0b0000: format is HE.
  4589. * If V == 0b0001: format is EHT.
  4590. */
  4591. #define WMI_RSRC_CFG_IS_EHT_GET(param_value) \
  4592. WMI_GET_BITS(param_value, 28, 4)
  4593. #define WMI_RSRC_CFG_IS_EHT_SET(param_value, val) \
  4594. WMI_SET_BITS(param_value, 28, 4, val)
  4595. /* Used along with the above macro to set the value. */
  4596. #define WMI_RSRC_CFG_PARAM_VALUE_GET(param_value) \
  4597. WMI_GET_BITS(param_value, 0, 28)
  4598. #define WMI_RSRC_CFG_PARAM_VALUE_SET(param_value, val) \
  4599. WMI_SET_BITS(param_value, 0, 28, val)
  4600. typedef struct {
  4601. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */
  4602. /** The following indicate the WMI versions to be supported by
  4603. * the host driver. Note that the host driver decide to
  4604. * "downgrade" its WMI version support and this may not be the
  4605. * native version of the host driver. */
  4606. wmi_abi_version host_abi_vers;
  4607. A_UINT32 num_host_mem_chunks; /** size of array host_mem_chunks[] */
  4608. /* This init_cmd_fixed_param TLV is followed by the below TLVs:
  4609. * wmi_resource_config resource_config;
  4610. * wlan_host_memory_chunk host_mem_chunks[];
  4611. * wmi_pdev_set_hw_mode_cmd_fixed_param hw_mode_config;
  4612. * Note that the hw_mode_config, in spite of its "pdev" name,
  4613. * applies to the entire target rather than for a single pdev
  4614. * within the target.
  4615. * To avoid specifying a HW mode for the target, the host should
  4616. * fill hw_mode_config's fields with 0x0.
  4617. * wmi_pdev_band_to_mac band_to_mac[];
  4618. * wmi_htt_msdu_idx_to_htt_msdu_qtype htt_msdu_idx_to_qtype_map[];
  4619. */
  4620. } wmi_init_cmd_fixed_param;
  4621. typedef enum {
  4622. WMI_WIFI_STANDARD_4 = 0,
  4623. WMI_WIFI_STANDARD_5 = 1,
  4624. WMI_WIFI_STANDARD_6 = 2,
  4625. WMI_WIFI_STANDARD_6E = 3,
  4626. WMI_WIFI_STANDARD_7 = 4,
  4627. } WMI_WIFI_STANDARD;
  4628. typedef enum {
  4629. WMI_HOST_NONE = 0, /* No concurrency mode supported */
  4630. WMI_HOST_DBS = 1, /* When 2.4G + 5G & 2.4G + 6G if 6G is supported */
  4631. WMI_HOST_DBS_SBS = 2, /* When 2.4G + 5G, 2.4G + 6G, 5G + 6G & 5G + 5G is supported */
  4632. } WMI_BAND_CONCURRENCY;
  4633. typedef enum {
  4634. WMI_SISO = 1, /* When 1x1 is supported */
  4635. WMI_MIMO_2X2 = 2, /* When 2x2 MIMO is supported */
  4636. } WMI_NUM_ANTENNAS;
  4637. typedef enum {
  4638. WMI_VENDOR1_REQ1_VERSION_3_00 = 0,
  4639. WMI_VENDOR1_REQ1_VERSION_3_01 = 1,
  4640. WMI_VENDOR1_REQ1_VERSION_3_20 = 2,
  4641. WMI_VENDOR1_REQ1_VERSION_3_30 = 3,
  4642. WMI_VENDOR1_REQ1_VERSION_3_40 = 4,
  4643. WMI_VENDOR1_REQ1_VERSION_4_00 = 5,
  4644. WMI_VENDOR1_REQ1_VERSION_4_10 = 6,
  4645. } WMI_VENDOR1_REQ1_VERSION;
  4646. typedef enum {
  4647. WMI_VENDOR1_REQ2_VERSION_3_00 = 0,
  4648. WMI_VENDOR1_REQ2_VERSION_3_01 = 1,
  4649. WMI_VENDOR1_REQ2_VERSION_3_20 = 2,
  4650. WMI_VENDOR1_REQ2_VERSION_3_50 = 3,
  4651. } WMI_VENDOR1_REQ2_VERSION;
  4652. typedef enum {
  4653. WMI_HOST_BAND_CAP_2GHZ = 0x01,
  4654. WMI_HOST_BAND_CAP_5GHZ = 0x02,
  4655. WMI_HOST_BAND_CAP_6GHZ = 0x04,
  4656. } WMI_HOST_BAND_CAP;
  4657. /* HW features supported info */
  4658. /* enum WMI_WIFI_STANDARD are possible values for WiFi standard bitfield */
  4659. #define WMI_GET_WIFI_STANDARD(var, feature_bitmap) \
  4660. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 0, 4)
  4661. #define WMI_SET_WIFI_STANDARD(feature_bitmap, val) \
  4662. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 0, 4, val)
  4663. /* enum WMI_BAND_CONCURRENCY are possible values for band concurrency support bitfield */
  4664. #define WMI_GET_BAND_CONCURRENCY_SUPPORT(var, feature_bitmap) \
  4665. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 4, 3)
  4666. #define WMI_SET_BAND_CONCURRENCY_SUPPORT(feature_bitmap, val) \
  4667. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 4, 3, val)
  4668. /* PNO feature supported info */
  4669. #define WMI_GET_PNO_SCAN_IN_UNASSOC_STATE(var, feature_bitmap) \
  4670. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 7, 1)
  4671. #define WMI_SET_PNO_SCAN_IN_UNASSOC_STATE(feature_bitmap, val) \
  4672. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 7, 1, val)
  4673. #define WMI_GET_PNO_SCAN_IN_ASSOC_STATE(var, feature_bitmap) \
  4674. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 8, 1)
  4675. #define WMI_SET_PNO_SCAN_IN_ASSOC_STATE(feature_bitmap, val) \
  4676. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 8, 1, val)
  4677. /* TWT feature supported info */
  4678. #define WMI_GET_TWT_FEATURE_SUPPORT(var, feature_bitmap) \
  4679. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 9, 1)
  4680. #define WMI_SET_TWT_FEATURE_SUPPORT(feature_bitmap, val) \
  4681. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 9, 1, val)
  4682. #define WMI_GET_TWT_REQUESTOR(var, feature_bitmap) \
  4683. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 10, 1)
  4684. #define WMI_SET_TWT_REQUESTER(feature_bitmap, val) \
  4685. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 10, 1, val)
  4686. #define WMI_GET_TWT_BROADCAST(var, feature_bitmap) \
  4687. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 11, 1)
  4688. #define WMI_SET_TWT_BROADCAST(feature_bitmap, val) \
  4689. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 11, 1, val)
  4690. #define WMI_GET_TWT_FLEXIBLE(var, feature_bitmap) \
  4691. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 12, 1)
  4692. #define WMI_SET_TWT_FLEXIBLE(feature_bitmap, val) \
  4693. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 12, 1, val)
  4694. /* WIFI optimizer feature supported info */
  4695. #define WMI_GET_WIFI_OPT_FEATURE_SUPPORT(var, feature_bitmap) \
  4696. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 13, 1)
  4697. #define WMI_SET_WIFI_OPT_FEATURE_SUPPORT(feature_bitmap, val) \
  4698. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 13, 1, val)
  4699. /* RFC8325 feature supported info */
  4700. #define WMI_GET_RFC8325_FEATURE_SUPPORT(var, feature_bitmap) \
  4701. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 14, 1)
  4702. #define WMI_SET_RFC8325_FEATURE_SUPPORT(feature_bitmap, val) \
  4703. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 14, 1, val)
  4704. /* MHS feature supported info */
  4705. #define WMI_GET_MHS_5G_SUPPORT(var, feature_bitmap) \
  4706. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 15, 1)
  4707. #define WMI_SET_MHS_5G_SUPPORT(feature_bitmap, val) \
  4708. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 15, 1, val)
  4709. #define WMI_GET_MHS_6G_SUPPORT(var, feature_bitmap) \
  4710. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 16, 1)
  4711. #define WMI_SET_MHS_6G_SUPPORT(feature_bitmap, val) \
  4712. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 16, 1, val)
  4713. #define WMI_GET_MHS_MAX_CLIENTS_SUPPORT(var, feature_bitmap) \
  4714. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 17, 8)
  4715. #define WMI_SET_MHS_MAX_CLIENTS_SUPPORT(feature_bitmap, val) \
  4716. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 17, 8, val)
  4717. #define WMI_GET_MHS_SET_COUNTRY_CODE_HAL_SUPPORT(var, feature_bitmap) \
  4718. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 25, 1)
  4719. #define WMI_SET_MHS_SET_COUNTRY_CODE_HAL_SUPPORT(feature_bitmap, val) \
  4720. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 25, 1, val)
  4721. #define WMI_GET_MHS_GETVALID_CHANNELS_SUPPORT(var, feature_bitmap) \
  4722. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 26, 1)
  4723. #define WMI_SET_MHS_GETVALID_CHANNELS_SUPPORT(feature_bitmap, val) \
  4724. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 26, 1, val)
  4725. /* enum WMI_WIFI_STANDARD are possible values for MHS DOT11 mode support bitfield */
  4726. #define WMI_GET_MHS_DOT11_MODE_SUPPORT(var, feature_bitmap) \
  4727. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 27, 4)
  4728. #define WMI_SET_MHS_DOT11_MODE_SUPPORT(feature_bitmap, val) \
  4729. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 27, 4, val)
  4730. #define WMI_GET_MHS_WPA3_SUPPORT(var, feature_bitmap) \
  4731. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 31, 1)
  4732. #define WMI_SET_MHS_WPA3_SUPPORT(feature_bitmap, val) \
  4733. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 31, 1, val)
  4734. /* Vendor requirement1 supported version info */
  4735. /* enum's WMI_VENDORxx_REQxx_VERSION are the possible vaues for below bitfield*/
  4736. #define WMI_GET_VENDOR_REQ_1_VERSION(var, feature_bitmap) \
  4737. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 32, 8)
  4738. #define WMI_SET_VENDOR_REQ_1_VERSION(feature_bitmap, val) \
  4739. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 32, 8, val)
  4740. /* Roaming feature supported info */
  4741. #define WMI_GET_ROAMING_HIGH_CU_ROAM_TRIGGER(var, feature_bitmap) \
  4742. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 40, 1)
  4743. #define WMI_SET_ROAMING_HIGH_CU_ROAM_TRIGGER(feature_bitmap, val) \
  4744. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 40, 1, val)
  4745. #define WMI_GET_ROAMING_EMERGENCY_TRIGGER(var, feature_bitmap) \
  4746. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 41, 1)
  4747. #define WMI_SET_ROAMING_EMERGENCY_TRIGGER(feature_bitmap, val) \
  4748. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 41, 1, val)
  4749. #define WMI_GET_ROAMING_BTM_TRIGGER(var, feature_bitmap) \
  4750. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 42, 1)
  4751. #define WMI_SET_ROAMING_BTM_TRIGGER(feature_bitmap, val) \
  4752. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 42, 1, val)
  4753. #define WMI_GET_ROAMING_IDLE_TRIGGER(var, feature_bitmap) \
  4754. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 43, 1)
  4755. #define WMI_SET_ROAMING_IDLE_TRIGGER(feature_bitmap, val) \
  4756. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 43, 1, val)
  4757. #define WMI_GET_ROAMING_WTC_TRIGGER(var, feature_bitmap) \
  4758. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 44, 1)
  4759. #define WMI_SET_ROAMING_WTC_TRIGGER(feature_bitmap, val) \
  4760. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 44, 1, val)
  4761. #define WMI_GET_ROAMING_BTCOEX_TRIGGER(var, feature_bitmap) \
  4762. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 45, 1)
  4763. #define WMI_SET_ROAMING_BTCOEX_TRIGGER(feature_bitmap, val) \
  4764. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 45, 1, val)
  4765. #define WMI_GET_ROAMING_BTW_WPA_WPA2(var, feature_bitmap) \
  4766. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 46, 1)
  4767. #define WMI_SET_ROAMING_BTW_WPA_WPA2(feature_bitmap, val) \
  4768. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 46, 1, val)
  4769. #define WMI_GET_ROAMING_MANAGE_CHAN_LIST_API(var, feature_bitmap) \
  4770. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 47, 1)
  4771. #define WMI_SET_ROAMING_MANAGE_CHAN_LIST_API(feature_bitmap, val) \
  4772. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 47, 1, val)
  4773. #define WMI_GET_ROAMING_ADAPTIVE_11R(var, feature_bitmap) \
  4774. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 48, 1)
  4775. #define WMI_SET_ROAMING_ADAPTIVE_11R(feature_bitmap, val) \
  4776. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 48, 1, val)
  4777. #define WMI_GET_ROAMING_CTRL_API_GET_SET(var, feature_bitmap) \
  4778. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 49, 1)
  4779. #define WMI_SET_ROAMING_CTRL_API_GET_SET(feature_bitmap, val) \
  4780. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 49, 1, val)
  4781. #define WMI_GET_ROAMING_CTRL_API_REASSOC(var, feature_bitmap) \
  4782. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 50, 1)
  4783. #define WMI_SET_ROAMING_CTRL_API_REASSOC(feature_bitmap, val) \
  4784. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 50, 1, val)
  4785. #define WMI_GET_ROAMING_CTRL_GET_CU(var, feature_bitmap) \
  4786. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 51, 1)
  4787. #define WMI_SET_ROAMING_CTRL_GET_CU(feature_bitmap, val) \
  4788. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 51, 1, val)
  4789. /* Vendor requirement2 supported version info */
  4790. /* enum's WMI_VENDORxx_REQxx_VERSION are the possible vaues for below bitfield*/
  4791. #define WMI_GET_VENDOR_REQ_2_VERSION(var, feature_bitmap) \
  4792. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 52, 8)
  4793. #define WMI_SET_VENDOR_REQ_2_VERSION(feature_bitmap, val) \
  4794. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 52, 8, val)
  4795. #define WMI_GET_ASSURANCE_DISCONNECT_REASON_API(var, feature_bitmap) \
  4796. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 60, 1)
  4797. #define WMI_SET_ASSURANCE_DISCONNECT_REASON_API(feature_bitmap, val) \
  4798. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 60, 1, val)
  4799. /* Frame pcap logging */
  4800. #define WMI_GET_FRAME_PCAP_LOG_MGMT(var, feature_bitmap) \
  4801. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 61, 1)
  4802. #define WMI_SET_FRAME_PCAP_LOG_MGMT(feature_bitmap, val) \
  4803. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 61, 1, val)
  4804. #define WMI_GET_FRAME_PCAP_LOG_CTRL(var, feature_bitmap) \
  4805. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 62, 1)
  4806. #define WMI_SET_FRAME_PCAP_LOG_CTRL(feature_bitmap, val) \
  4807. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 62, 1, val)
  4808. #define WMI_GET_FRAME_PCAP_LOG_DATA(var, feature_bitmap) \
  4809. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 63, 1)
  4810. #define WMI_SET_FRAME_PCAP_LOG_DATA(feature_bitmap, val) \
  4811. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 63, 1, val)
  4812. /* Security features supported info */
  4813. #define WMI_GET_SECURITY_WPA3_SAE_H2E(var, feature_bitmap) \
  4814. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 64, 1)
  4815. #define WMI_SET_SECURITY_WPA3_SAE_H2E(feature_bitmap, val) \
  4816. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 64, 1, val)
  4817. #define WMI_GET_SECURITY_WPA3_SAE_FT(var, feature_bitmap) \
  4818. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 65, 1)
  4819. #define WMI_SET_SECURITY_WPA3_SAE_FT(feature_bitmap, val) \
  4820. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 65, 1, val)
  4821. #define WMI_GET_SECURITY_WPA3_ENTERP_SUITEB(var, feature_bitmap) \
  4822. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 66, 1)
  4823. #define WMI_SET_SECURITY_WPA3_ENTERP_SUITEB(feature_bitmap, val) \
  4824. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 66, 1, val)
  4825. #define WMI_GET_SECURITY_WPA3_ENTERP_SUITEB_192bit(var, feature_bitmap) \
  4826. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 67, 1)
  4827. #define WMI_SET_SECURITY_WPA3_ENTERP_SUITEB_192bit(feature_bitmap, val) \
  4828. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 67, 1, val)
  4829. #define WMI_GET_SECURITY_FILS_SHA256(var, feature_bitmap) \
  4830. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 68, 1)
  4831. #define WMI_SET_SECURITY_FILS_SHA256(feature_bitmap, val) \
  4832. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 68, 1, val)
  4833. #define WMI_GET_SECURITY_FILS_SHA384(var, feature_bitmap) \
  4834. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 69, 1)
  4835. #define WMI_SET_SECURITY_FILS_SHA384(feature_bitmap, val) \
  4836. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 69, 1, val)
  4837. #define WMI_GET_SECURITY_FILS_SHA256_FT(var, feature_bitmap) \
  4838. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 70, 1)
  4839. #define WMI_SET_SECURITY_FILS_SHA256_FT(feature_bitmap, val) \
  4840. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 70, 1, val)
  4841. #define WMI_GET_SECURITY_FILS_SHA384_FT(var, feature_bitmap) \
  4842. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 71, 1)
  4843. #define WMI_SET_SECURITY_FILS_SHA384_FT(feature_bitmap, val) \
  4844. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 71, 1, val)
  4845. #define WMI_GET_SECURITY_ENCHANCED_OPEN(var, feature_bitmap) \
  4846. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 72, 1)
  4847. #define WMI_SET_SECURITY_ENCHANCED_OPEN(feature_bitmap, val) \
  4848. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 72, 1, val)
  4849. /* Peer protocol features supported info */
  4850. #define WMI_GET_NAN_SUPPORT(var, feature_bitmap) \
  4851. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 73, 1)
  4852. #define WMI_SET_NAN_SUPPORT(feature_bitmap, val) \
  4853. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 73, 1, val)
  4854. #define WMI_GET_TDLS_SUPPORT(var, feature_bitmap) \
  4855. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 74, 1)
  4856. #define WMI_SET_TDLS_SUPPORT(feature_bitmap, val) \
  4857. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 74, 1, val)
  4858. #define WMI_GET_P2P6E_SUPPORT(var, feature_bitmap) \
  4859. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 75, 1)
  4860. #define WMI_SET_P2P6E_SUPPORT(feature_bitmap, val) \
  4861. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 75, 1, val)
  4862. #define WMI_GET_TDLS_OFFCHAN_SUPPORT(var, feature_bitmap) \
  4863. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 76, 1)
  4864. #define WMI_SET_TDLS_OFFCHAN_SUPPORT(feature_bitmap, val) \
  4865. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 76, 1, val)
  4866. #define WMI_GET_TDLS_CAP_ENHANCE(var, feature_bitmap) \
  4867. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 77, 1)
  4868. #define WMI_SET_TDLS_CAP_ENHANCE(feature_bitmap, val) \
  4869. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 77, 1, val)
  4870. #define WMI_GET_MAX_TDLS_PEERS_SUPPORT(var, feature_bitmap) \
  4871. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 78, 4)
  4872. #define WMI_SET_MAX_TDLS_PEERS_SUPPORT(feature_bitmap, val) \
  4873. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 78, 4, val)
  4874. #define WMI_GET_STA_DUAL_P2P_SUPPORT(var, feature_bitmap) \
  4875. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 82, 1)
  4876. #define WMI_SET_STA_DUAL_P2P_SUPPORT(feature_bitmap, val) \
  4877. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 82, 1, val)
  4878. /* Big data feature supported info */
  4879. #define WMI_GET_PEER_BIGDATA_GETBSSINFO_API_SUPPORT(var, feature_bitmap) \
  4880. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 83, 1)
  4881. #define WMI_SET_PEER_BIGDATA_GETBSSINFO_API_SUPPORT(feature_bitmap, val) \
  4882. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 83, 1, val)
  4883. #define WMI_GET_PEER_BIGDATA_GETASSOCREJECTINFO_API_SUPPORT(var, feature_bitmap) \
  4884. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 84, 1)
  4885. #define WMI_SET_PEER_BIGDATA_GETASSOCREJECTINFO_API_SUPPORT(feature_bitmap, val) \
  4886. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 84, 1, val)
  4887. #define WMI_GET_PEER_BIGDATA_GETSTAINFO_API_SUPPORT(var, feature_bitmap) \
  4888. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 85, 1)
  4889. #define WMI_SET_PEER_BIGDATA_GETSTAINFO_API_SUPPORT(feature_bitmap, val) \
  4890. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 85, 1, val)
  4891. /* Feature set requirement supported version info */
  4892. #define WMI_GET_FEATURE_SET_VERSION(var, feature_bitmap) \
  4893. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 86, 16)
  4894. #define WMI_SET_FEATURE_SET_VERSION(feature_bitmap, val) \
  4895. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 86, 16, val)
  4896. /*
  4897. * enum WMI_NUM_ANTENNAS are possible values for number of antennas supported bitfield.
  4898. * Bitfield value 0 means invalid, 1 means SISO, 2 means MIMO, and values 3+ are reserved.
  4899. */
  4900. #define WMI_GET_NUM_ANTENNAS(var, feature_bitmap) \
  4901. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 102, 4)
  4902. #define WMI_SET_NUM_ANTENNAS(feature_bitmap, val) \
  4903. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 102, 4, val)
  4904. /* enum WMI_HOST_BAND_CAP are possible values for below bitfield */
  4905. #define WMI_GET_HOST_BAND_CAP(var, feature_bitmap) \
  4906. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 106, 6)
  4907. #define WMI_SET_HOST_BAND_CAP(feature_bitmap, val) \
  4908. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 106, 6, val)
  4909. #define WMI_GET_STA_DUMP_SUPPORT(var, feature_bitmap) \
  4910. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 112, 1)
  4911. #define WMI_SET_STA_DUMP_SUPPORT(feature_bitmap, val) \
  4912. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 112, 1, val)
  4913. /* Peer protocol features supported info (contd) */
  4914. #define WMI_GET_STA_P2P_SUPPORT(var, feature_bitmap) \
  4915. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 113, 1)
  4916. #define WMI_SET_STA_P2P_SUPPORT(feature_bitmap, val) \
  4917. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 113, 1, val)
  4918. #define WMI_GET_STA_SAP_SUPPORT(var, feature_bitmap) \
  4919. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 114, 1)
  4920. #define WMI_SET_STA_SAP_SUPPORT(feature_bitmap, val) \
  4921. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 114, 1, val)
  4922. #define WMI_GET_STA_NAN_SUPPORT(var, feature_bitmap) \
  4923. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 115, 1)
  4924. #define WMI_SET_STA_NAN_SUPPORT(feature_bitmap, val) \
  4925. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 115, 1, val)
  4926. #define WMI_GET_STA_TDLS_SUPPORT(var, feature_bitmap) \
  4927. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 116, 1)
  4928. #define WMI_SET_STA_TDLS_SUPPORT(feature_bitmap, val) \
  4929. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 116, 1, val)
  4930. /* Reserving 16 bits for accomodating other 2 port concurrencies later */
  4931. #define WMI_GET_STA_SAP_P2P_SUPPORT(var, feature_bitmap) \
  4932. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 133, 1)
  4933. #define WMI_SET_STA_SAP_P2P_SUPPORT(feature_bitmap, val) \
  4934. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 133, 1, val)
  4935. #define WMI_GET_STA_SAP_NAN_SUPPORT(var, feature_bitmap) \
  4936. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 134, 1)
  4937. #define WMI_SET_STA_SAP_NAN_SUPPORT(feature_bitmap, val) \
  4938. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 134, 1, val)
  4939. #define WMI_GET_STA_P2P_NAN_SUPPORT(var, feature_bitmap) \
  4940. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 135, 1)
  4941. #define WMI_SET_STA_P2P_NAN_SUPPORT(feature_bitmap, val) \
  4942. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 135, 1, val)
  4943. #define WMI_GET_STA_P2P_TDLS_SUPPORT(var, feature_bitmap) \
  4944. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 136, 1)
  4945. #define WMI_SET_STA_P2P_TDLS_SUPPORT(feature_bitmap, val) \
  4946. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 136, 1, val)
  4947. #define WMI_GET_STA_SAP_TDLS_SUPPORT(var, feature_bitmap) \
  4948. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 137, 1)
  4949. #define WMI_SET_STA_SAP_TDLS_SUPPORT(feature_bitmap, val) \
  4950. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 137, 1, val)
  4951. #define WMI_GET_STA_NAN_TDLS_SUPPORT(var, feature_bitmap) \
  4952. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 138, 1)
  4953. #define WMI_SET_STA_NAN_TDLS_SUPPORT(feature_bitmap, val) \
  4954. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 138, 1, val)
  4955. /* Reserving 16 bits for accomodating other 3 port concurrencies later */
  4956. #define WMI_GET_STA_SAP_P2P_TDLS_SUPPORT(var, feature_bitmap) \
  4957. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 155, 1)
  4958. #define WMI_SET_STA_SAP_P2P_TDLS_SUPPORT(feature_bitmap, val) \
  4959. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 155, 1, val)
  4960. #define WMI_GET_STA_SAP_NAN_TDLS_SUPPORT(var, feature_bitmap) \
  4961. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 156, 1)
  4962. #define WMI_SET_STA_SAP_NAN_TDLS_SUPPORT(feature_bitmap, val) \
  4963. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 156, 1, val)
  4964. #define WMI_GET_STA_P2P_P2P_TDLS_SUPPORT(var, feature_bitmap) \
  4965. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 157, 1)
  4966. #define WMI_SET_STA_P2P_P2P_TDLS_SUPPORT(feature_bitmap, val) \
  4967. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 157, 1, val)
  4968. #define WMI_GET_STA_P2P_NAN_TDLS_SUPPORT(var, feature_bitmap) \
  4969. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 158, 1)
  4970. #define WMI_SET_STA_P2P_NAN_TDLS_SUPPORT(feature_bitmap, val) \
  4971. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 158, 1, val)
  4972. /* NAN EHT supported info */
  4973. #define WMI_GET_NAN_EHT_SUPPORT(var, feature_bitmap) \
  4974. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 159, 1)
  4975. #define WMI_SET_NAN_EHT_SUPPORT(feature_bitmap, val) \
  4976. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 159, 1, val)
  4977. /*
  4978. * Specify how many A_UINT32 words are needed to hold the feature bitmap flags.
  4979. * This value may change over time.
  4980. * It is not directly used in any WMI message definition.
  4981. * It is provided simply as a convenience for the feature_set_bitmap sender to
  4982. * know how many 32-bit words to allocate for the bitmap.
  4983. */
  4984. #define WMI_FEATURE_SET_BITMAP_ARRAY_LEN32 6
  4985. /**
  4986. * TLV for channel list
  4987. */
  4988. typedef struct {
  4989. /** WMI_CHAN_LIST_TAG */
  4990. A_UINT32 tag;
  4991. /** # of channels to scan */
  4992. A_UINT32 num_chan;
  4993. /** channels in Mhz */
  4994. WMI_VAR_LEN_ARRAY1(A_UINT32, channel_list);
  4995. } wmi_chan_list;
  4996. /**
  4997. * TLV for bssid list
  4998. */
  4999. typedef struct {
  5000. /** WMI_BSSID_LIST_TAG */
  5001. A_UINT32 tag;
  5002. /** number of bssids */
  5003. A_UINT32 num_bssid;
  5004. /** bssid list */
  5005. WMI_VAR_LEN_ARRAY1(wmi_mac_addr, bssid_list);
  5006. } wmi_bssid_list;
  5007. /**
  5008. * TLV for ie data.
  5009. */
  5010. typedef struct {
  5011. /** WMI_IE_TAG */
  5012. A_UINT32 tag;
  5013. /** number of bytes in ie data */
  5014. A_UINT32 ie_len;
  5015. /** ie data array (ie_len adjusted to number of words (ie_len + 4)/4) */
  5016. WMI_VAR_LEN_ARRAY1(A_UINT32, ie_data);
  5017. } wmi_ie_data;
  5018. /**
  5019. * TLV used for length/buffer
  5020. */
  5021. typedef struct {
  5022. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tlv_buf_len_param */
  5023. A_UINT32 buf_len; /** Length of buf */
  5024. /**
  5025. * Following this structure is the TLV byte stream of buf of length buf_len:
  5026. * A_UINT8 buf[];
  5027. *
  5028. */
  5029. } wmi_tlv_buf_len_param;
  5030. /**
  5031. * TLV used for specifying the dimensions of a multi-dimensional array
  5032. * that has been stored in a flat buffer
  5033. */
  5034. typedef struct {
  5035. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tlv_arrays_len_param */
  5036. /**
  5037. * d1_len, d2_len, d3_len, and d4_len are the lengths of each dimension
  5038. * for a multi-dimensional array.
  5039. * If the length of outer dimension is not 1, the inner dimension
  5040. * shouldn't be 1.
  5041. * If the multi-dimensional array has less than 4 dimensions, the outer
  5042. * dimensions' lengths should be 1. For example, a buf[3][4] array
  5043. * would have d1_len = 4, d2_len = 3, d3_len = 1, d4_len = 1.
  5044. * The outermost dimension of the array can be inferred from the array
  5045. * length; thus, this struct supports up to 5-D arrays. For a 5-D array,
  5046. * the outermost (5th) dimension would be
  5047. * array length / (d1_len * d2_len * d3_len * d4_len)
  5048. *
  5049. * For security (to ensure no out-of-bounds memory access),
  5050. * the receiver shall validate that the product of all dimensions
  5051. * is equal to (or less than) the array length.
  5052. */
  5053. A_UINT32 d1_len; /* the length of 1st (innermost) dimension array */
  5054. A_UINT32 d2_len; /* the length of 2nd dimension array */
  5055. A_UINT32 d3_len; /* the length of 3rd dimension array */
  5056. A_UINT32 d4_len; /* the length of 4th dimension array */
  5057. /**
  5058. * Following this structure is the TLV multi-dimension array buffer:
  5059. * <type> buf[L1*L2*L3*L4];
  5060. * where, L1, L2, L3, and L4 are the values of
  5061. * d1_len, d2_len, d3_len and d4_len.
  5062. * To access the 4-D element a[i][j][k][l], the buf[] array would be
  5063. * indexed as buf[i*L3*L2*L1 + j*L2*L1 + k*L1 + l].
  5064. */
  5065. } wmi_tlv_arrays_len_param;
  5066. typedef struct {
  5067. /** Len of the SSID */
  5068. A_UINT32 ssid_len;
  5069. /** SSID */
  5070. A_UINT32 ssid[8];
  5071. } wmi_ssid;
  5072. typedef struct {
  5073. /** WMI_SSID_LIST_TAG */
  5074. A_UINT32 tag;
  5075. A_UINT32 num_ssids;
  5076. WMI_VAR_LEN_ARRAY1(wmi_ssid, ssids);
  5077. } wmi_ssid_list;
  5078. typedef struct {
  5079. /** WMI_SCAN_START_OFFSET_TAG */
  5080. A_UINT32 tag;
  5081. /** Number of start TSF offsets */
  5082. A_UINT32 num_offset;
  5083. /** Array of start TSF offsets provided in milliseconds */
  5084. WMI_VAR_LEN_ARRAY1(A_UINT32, start_tsf_offset);
  5085. } wmi_scan_start_offset;
  5086. /**
  5087. * WLAN_SCAN_CHAN_MODE Macros defined for A_UINT8 phymode_list[]
  5088. */
  5089. /** enum WLAN_PHY_MODE _mode starts from 0, but the WMI message requires
  5090. * 0 to be used to represent unspecified / don't care / default values.
  5091. * Therefore, WMI phy mode = WLAN phy mode + 1.
  5092. */
  5093. /** If the received WMI phy mode is 0 then it is ignored by the FW,
  5094. * and the FW will use any mode as long as the frequency matches.
  5095. */
  5096. /** The number of phy_mode's (BW+mode) passed in the TLV phymode_list[] must
  5097. * be equal to num_chan. (Unless the host does not specify phymode_list values
  5098. * at all, in which case the number of phymode_list elements will be zero.)
  5099. * The indexing of the phymode_list[] array corresponds to same index of
  5100. * the chan_list[] array.
  5101. */
  5102. #define WMI_SCAN_CHAN_SET_MODE(_c) ((_c) + 1)
  5103. #define WMI_SCAN_CHAN_GET_MODE(_c) ((_c) - 1)
  5104. #define WMI_SCAN_CHAN_MODE_IS_SET(_c) (_c)
  5105. typedef struct {
  5106. /*
  5107. * freq unit: MHz (upper 16bits -- value)
  5108. * flags (lower 16bits -- bitfield): valid for the freq short ssid
  5109. * The flags bitfield contains a bitmask of WMI_SCAN_HINT_FLAG_ values.
  5110. */
  5111. A_UINT32 freq_flags;
  5112. /* per spec, only 4 bytes*/
  5113. A_UINT32 short_ssid;
  5114. } wmi_hint_freq_short_ssid;
  5115. /** following bssid mac address same as wmi_mac_addr
  5116. * one example: freq -- 5980(0x175c), flags -- 0x1, mac -- 00:03:7f:12:34:56
  5117. * freq_flags will be: 0x175c0001
  5118. * macaddr31to00 will be: 0x127f0300
  5119. * macaddr47to32 will be: 0x00005634
  5120. */
  5121. typedef struct {
  5122. /*
  5123. * freq unit: MHz (upper 16bits -- value)
  5124. * flags (lower 16bits -- bitfield): valid for the freq bssid
  5125. * The flags bitfield contains a bitmask of WMI_SCAN_HINT_FLAG_ values.
  5126. */
  5127. A_UINT32 freq_flags;
  5128. /* legacy bssid addr, use same macro to convert: WMI_MAC_ADDR_TO_CHAR_ARRAY, WMI_CHAR_ARRAY_TO_MAC_ADDR */
  5129. wmi_mac_addr bssid;
  5130. } wmi_hint_freq_bssid;
  5131. /** macro to get freq and corresponding flags from wmi_hint_freq_short_ssid */
  5132. #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)
  5133. #define WMI_GET_FLAGS_FROM_HINT_FREQ_SHORT_SSID(pwmi_hint_freq_short_ssid_addr) (((pwmi_hint_freq_short_ssid_addr)->freq_flags) & 0xffff)
  5134. /** macro to set freq and corresponding flags in wmi_hint_freq_short_ssid */
  5135. #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))
  5136. #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))
  5137. /** macro to get freq and corresponding flags from wmi_hint_freq_bssid */
  5138. #define WMI_GET_FREQ_FROM_HINT_FREQ_BSSID(pwmi_hint_freq_bssid_addr) ((((pwmi_hint_freq_bssid_addr)->freq_flags) >> 16) & 0xffff)
  5139. #define WMI_GET_FLAGS_FROM_HINT_FREQ_BSSID(pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) & 0xffff)
  5140. /** macro to set freq and corresponding flags in wmi_hint_freq_bssid */
  5141. #define WMI_SET_FREQ_IN_HINT_FREQ_BSSID(freq, pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) |= ((freq) << 16))
  5142. #define WMI_SET_FLAGS_IN_HINT_FREQ_BSSID(flags, pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) |= (flags))
  5143. /** other macro for 6 GHZ, TU (time unit), 20TU normally it is 20ms */
  5144. #define MAX_NUM_20TU_EACH_CH 6
  5145. #define MAX_NUM_S_SSID_EACH_20TU 1
  5146. #define MAX_NUM_BSSID_EACH_20TU 3
  5147. /* prefix used by scan requestor ids on the host */
  5148. #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
  5149. /* prefix used by scan request ids generated on the host */
  5150. /* host cycles through the lower 12 bits to generate ids */
  5151. #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
  5152. #define WLAN_SCAN_PARAMS_MAX_SSID 16
  5153. #define WLAN_SCAN_PARAMS_MAX_BSSID 4
  5154. #define WLAN_SCAN_PARAMS_MAX_IE_LEN 512
  5155. /* NOTE: This constant cannot be changed without breaking WMI compatibility */
  5156. #define WMI_IE_BITMAP_SIZE 8
  5157. #define WMI_SCAN_MLD_PARAM_MLD_ID_GET(mld_param) WMI_GET_BITS(mld_param, 0, 8)
  5158. #define WMI_SCAN_MLD_PARAM_MLD_ID_SET(mld_param, val) WMI_SET_BITS(mld_param, 0, 8, val)
  5159. typedef struct {
  5160. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
  5161. /** Scan ID (lower 16 bits) MSB 4 bits is used to identify scan client based on enum WMI_SCAN_CLIENT_ID */
  5162. A_UINT32 scan_id;
  5163. /** Scan requestor ID (lower 16 bits) is used by scan client to classify the scan source, reason, ...etc */
  5164. A_UINT32 scan_req_id;
  5165. /** VDEV id(interface) that is requesting scan */
  5166. A_UINT32 vdev_id;
  5167. /** Scan Priority, input to scan scheduler */
  5168. A_UINT32 scan_priority;
  5169. /** Scan events subscription */
  5170. A_UINT32 notify_scan_events;
  5171. /** dwell time in msec on active channels */
  5172. A_UINT32 dwell_time_active;
  5173. /** dwell time in msec on passive channels */
  5174. A_UINT32 dwell_time_passive;
  5175. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  5176. A_UINT32 min_rest_time;
  5177. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  5178. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  5179. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  5180. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  5181. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  5182. * irrespective of activity. activity is determined by the idle_time parameter.
  5183. */
  5184. A_UINT32 max_rest_time;
  5185. /** time before sending next set of probe requests.
  5186. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  5187. * The number of probe requests specified depends on the ssid_list and bssid_list
  5188. */
  5189. A_UINT32 repeat_probe_time;
  5190. /** time in msec between 2 consecutive probe requests with in a set. */
  5191. A_UINT32 probe_spacing_time;
  5192. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  5193. A_UINT32 idle_time;
  5194. /** maximum time in msec allowed for scan */
  5195. A_UINT32 max_scan_time;
  5196. /** delay in msec before sending first probe request after switching to a channel */
  5197. A_UINT32 probe_delay;
  5198. /** Scan control flags */
  5199. A_UINT32 scan_ctrl_flags;
  5200. /** Burst duration time in msec*/
  5201. A_UINT32 burst_duration;
  5202. /** # if channels to scan. In the TLV channel_list[] */
  5203. A_UINT32 num_chan;
  5204. /** number of bssids. In the TLV bssid_list[] */
  5205. A_UINT32 num_bssid;
  5206. /** number of ssid. In the TLV ssid_list[] */
  5207. A_UINT32 num_ssids;
  5208. /** number of bytes in ie data. In the TLV ie_data[]. Max len is defined by WLAN_SCAN_PARAMS_MAX_IE_LEN */
  5209. A_UINT32 ie_len;
  5210. /** Max number of probes to be sent */
  5211. A_UINT32 n_probes;
  5212. /** MAC Address to use in Probe Req as SA **/
  5213. wmi_mac_addr mac_addr;
  5214. /** Mask on which MAC has to be randomized **/
  5215. wmi_mac_addr mac_mask;
  5216. /** ie bitmap to use in probe req **/
  5217. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  5218. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  5219. A_UINT32 num_vendor_oui;
  5220. /** Scan control flags extended **/
  5221. A_UINT32 scan_ctrl_flags_ext;
  5222. /** dwell time in msec on active 2G channels, if it's not zero */
  5223. A_UINT32 dwell_time_active_2g;
  5224. /**
  5225. * dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked
  5226. * as an active channel
  5227. */
  5228. A_UINT32 dwell_time_active_6ghz;
  5229. /**
  5230. * dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked
  5231. * as a passive channel
  5232. */
  5233. A_UINT32 dwell_time_passive_6ghz;
  5234. /**
  5235. * Offset time is in milliseconds per channel.
  5236. */
  5237. A_UINT32 scan_start_offset;
  5238. /**
  5239. * minimum dwell time in msec for 6 GHz channel
  5240. * We'll listen for this time on the channel; if no beacon /
  5241. * probe response / FILS frame are received during this time
  5242. * we'll move to next channel.
  5243. */
  5244. A_UINT32 min_dwell_time_6ghz;
  5245. /**
  5246. * dwell time in msec for 6 GHz channel of spectral scan channel list
  5247. */
  5248. A_UINT32 dwell_time_spectral_ch;
  5249. /**
  5250. * B0-B7: mld id to be inserted in ML probe request
  5251. * B8-B31: reserved
  5252. */
  5253. A_UINT32 mld_parameter;
  5254. /**
  5255. * TLV (tag length value) parameters follow the scan_cmd
  5256. * structure. The TLV's are:
  5257. * channel_list:
  5258. * If FW supports WMI_SERVICE_SCAN_CONFIG_PER_CHANNEL,
  5259. * then channel_list may fill the upper 12 bits with channel flags,
  5260. * while using only the lower 20 bits for channel frequency.
  5261. * Check WMI_SCAN_CHANNEL_FLAG macros for the channel flags
  5262. * If FW doesn't support WMI_SERVICE_SCAN_CONFIG_PER_CHANNEL,
  5263. * then channel_list only holds the frequency value
  5264. * Use WMI_SCAN_CHANNEL_FREQ_MASK & WMI_SCAN_CHANNEL_FLAGS_MASK
  5265. * A_UINT32 channel_list[num_chan]; // in MHz
  5266. * wmi_ssid ssid_list[num_ssids];
  5267. * wmi_mac_addr bssid_list[num_bssid];
  5268. * A_UINT8 ie_data[ie_len];
  5269. * wmi_vendor_oui vendor_oui[num_vendor_oui];
  5270. * A_UINT8 phymode_list[0 or num_chan]; // see WMI_SCAN_CHAN_MODE macros
  5271. * wmi_hint_freq_short_ssid hint_freq_short_ssid[num]; // the num can be calculated by TLV len
  5272. * wmi_hint_freq_bssid hint_freq_bssid[num]; // the num can be calculated by TLV len
  5273. * A_UINT32 spectral_chan_list[num]; // in MHz, the num can be calculated by TLV len
  5274. * *** NOTE:
  5275. * *** Use caution when using further TLVs, in case the additional
  5276. * *** TLVs cause the message size to exceed the of the buffer to
  5277. * *** hold the message.
  5278. */
  5279. } wmi_start_scan_cmd_fixed_param;
  5280. /**
  5281. * scan control flags.
  5282. */
  5283. /** passively scan all channels including active channels */
  5284. #define WMI_SCAN_FLAG_PASSIVE 0x1
  5285. /** add wild card ssid probe request even though ssid_list is specified. */
  5286. #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
  5287. /** add cck rates to rates/xrate ie for the generated probe request */
  5288. #define WMI_SCAN_ADD_CCK_RATES 0x4
  5289. /** add ofdm rates to rates/xrate ie for the generated probe request */
  5290. #define WMI_SCAN_ADD_OFDM_RATES 0x8
  5291. /** To enable indication of Chan load and Noise floor to host */
  5292. #define WMI_SCAN_CHAN_STAT_EVENT 0x10
  5293. /** Filter Probe request frames */
  5294. #define WMI_SCAN_FILTER_PROBE_REQ 0x20
  5295. /**When set, not to scan DFS channels*/
  5296. #define WMI_SCAN_BYPASS_DFS_CHN 0x40
  5297. /**When set, certain errors are ignored and scan continues.
  5298. * Different FW scan engine may use its own logic to decide what errors to ignore*/
  5299. #define WMI_SCAN_CONTINUE_ON_ERROR 0x80
  5300. /** Enable promiscuous mode for CCXv4 */
  5301. #define WMI_SCAN_FILTER_PROMISCOUS 0x100
  5302. /** allow to send probe req on DFS channel */
  5303. #define WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS 0x200
  5304. /** add TPC content in probe req frame */
  5305. #define WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ 0x400
  5306. /** add DS content in probe req frame */
  5307. #define WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ 0x800
  5308. /** use random mac address for TA for probe request frame and add
  5309. * oui specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the probe req frame.
  5310. * if oui is not set by WMI_SCAN_PROB_REQ_OUI_CMDID then the flag is ignored*/
  5311. #define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ 0x1000
  5312. /** allow mgmt transmission during off channel scan */
  5313. #define WMI_SCAN_OFFCHAN_MGMT_TX 0x2000
  5314. /** allow data transmission during off channel scan */
  5315. #define WMI_SCAN_OFFCHAN_DATA_TX 0x4000
  5316. /** allow capture ppdu with phy errors */
  5317. #define WMI_SCAN_CAPTURE_PHY_ERROR 0x8000
  5318. /** always do passive scan on passive channels */
  5319. #define WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN 0x10000
  5320. /** set HALF (10MHz) rate support */
  5321. #define WMI_SCAN_FLAG_HALF_RATE_SUPPORT 0x20000
  5322. /** set Quarter (5MHz) rate support */
  5323. #define WMI_SCAN_FLAG_QUARTER_RATE_SUPPORT 0x40000
  5324. #define WMI_SCAN_RANDOM_SEQ_NO_IN_PROBE_REQ 0x80000
  5325. #define WMI_SCAN_ENABLE_IE_WHTELIST_IN_PROBE_REQ 0x100000
  5326. /** pause home channel when scan channel is same as home channel */
  5327. #define WMI_SCAN_FLAG_PAUSE_HOME_CHANNEL 0x200000
  5328. /**
  5329. * report CCA busy for each possible 20Mhz subbands of the wideband scan channel
  5330. */
  5331. #define WMI_SCAN_FLAG_REPORT_CCA_BUSY_FOREACH_20MHZ 0x400000
  5332. /** for adaptive scan mode using 3 bits (21 - 23 bits) */
  5333. #define WMI_SCAN_DWELL_MODE_MASK 0x00E00000
  5334. #define WMI_SCAN_DWELL_MODE_SHIFT 21
  5335. typedef enum {
  5336. WMI_SCAN_DWELL_MODE_DEFAULT = 0,
  5337. WMI_SCAN_DWELL_MODE_CONSERVATIVE = 1,
  5338. WMI_SCAN_DWELL_MODE_MODERATE = 2,
  5339. WMI_SCAN_DWELL_MODE_AGGRESSIVE = 3,
  5340. WMI_SCAN_DWELL_MODE_STATIC = 4,
  5341. } WMI_SCAN_DWELL_MODE;
  5342. #define WMI_SCAN_SET_DWELL_MODE(flag, mode) \
  5343. do { \
  5344. (flag) |= (((mode) << WMI_SCAN_DWELL_MODE_SHIFT) & \
  5345. WMI_SCAN_DWELL_MODE_MASK); \
  5346. } while (0)
  5347. #define WMI_SCAN_GET_DWELL_MODE(flag) \
  5348. (((flag) & WMI_SCAN_DWELL_MODE_MASK) >> WMI_SCAN_DWELL_MODE_SHIFT)
  5349. /** WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
  5350. #define WMI_SCAN_CLASS_MASK 0xFF000000
  5351. /*
  5352. * Masks identifying types/ID of scans
  5353. * Scan_Stop macros should be the same value as below defined in UMAC
  5354. * #define IEEE80211_SPECIFIC_SCAN 0x00000000
  5355. * #define IEEE80211_VAP_SCAN 0x01000000
  5356. * #define IEEE80211_ALL_SCANS 0x04000000
  5357. */
  5358. /* WMI_SCAN_STOP_ONE:
  5359. * Stop one scan which matches with scan_id provided in scan stop command.
  5360. */
  5361. #define WMI_SCAN_STOP_ONE 0x00000000
  5362. /* WMI_SCN_STOP_VAP_ALL:
  5363. * Stop all scans (host scans and FW internal scans) on provided vdev.
  5364. */
  5365. #define WMI_SCN_STOP_VAP_ALL 0x01000000
  5366. /* WMI_SCN_STOP_HOST_VAP_ALL:
  5367. * Stop all host scans on provided vdev.
  5368. */
  5369. #define WMI_SCN_STOP_HOST_VAP_ALL 0x02000000
  5370. /* WMI_SCAN_STOP_ALL:
  5371. * Stop all scans (host scans and FW internal scans) on all vdevs.
  5372. */
  5373. #define WMI_SCAN_STOP_ALL 0x04000000
  5374. /** extended Scan ctrl flags **/
  5375. #define WMI_SCAN_FLAG_EXT_DBS_SCAN_POLICY_MASK 0x00000003 /* Bit 0-1 reserved for DBS scan selection policy.*/
  5376. #define WMI_SCAN_DBS_POLICY_DEFAULT 0x0 /** Select duty cycle if configured, else fall back to whatever
  5377. policy scan manager computes */
  5378. #define WMI_SCAN_DBS_POLICY_FORCE_NONDBS 0x1 /** Force to select Non-DBS scan */
  5379. #define WMI_SCAN_DBS_POLICY_IGNORE_DUTY 0x2 /** Ignore duty cycle even if configured and fall back to whatever
  5380. policy scan manager computes*/
  5381. #define WMI_SCAN_DBS_POLICY_RESERVED 0x3
  5382. #define WMI_SCAN_DBS_POLICY_MAX 0x3
  5383. /* Enable Reception of Public Action frame with this flag */
  5384. #define WMI_SCAN_FLAG_EXT_FILTER_PUBLIC_ACTION_FRAME 0x00000004
  5385. /* Indicate to scan all PSC channel */
  5386. #define WMI_SCAN_FLAG_EXT_6GHZ_SCAN_ALL_PSC_CH 0x00000008
  5387. /* Indicate to scan all NON-PSC channel */
  5388. #define WMI_SCAN_FLAG_EXT_6GHZ_SCAN_ALL_NON_PSC_CH 0x00000010
  5389. /* Indicate to save scan result matching hint from scan client */
  5390. #define WMI_SCAN_FLAG_EXT_6GHZ_MATCH_HINT 0x00000020
  5391. /* Skip any ch on which no any RNR had been received */
  5392. #define WMI_SCAN_FLAG_EXT_6GHZ_SKIP_NON_RNR_CH 0x00000040
  5393. /* Indicate client hint req is high priority than fw rnr or FILS disc */
  5394. #define WMI_SCAN_FLAG_EXT_6GHZ_CLIENT_HIGH_PRIORITY 0x00000080
  5395. /* Force all 6 GHz scan channels to active channel */
  5396. #define WMI_SCAN_FLAG_EXT_6GHZ_FORCE_CHAN_ACTIVE 0x00000100
  5397. /* Force broadcast address in RA even though specified bssid */
  5398. #define WMI_SCAN_FLAG_EXT_FORCE_BRCAST_RA 0x00000200
  5399. /* Extend 6 GHz channel measure time */
  5400. #define WMI_SCAN_FLAG_EXT_6GHZ_EXTEND_MEASURE_TIME 0x00000400
  5401. /**
  5402. * Currently passive scan has higher priority than beacon and
  5403. * beacon miss would happen irrespective of dwell time.
  5404. * Below flag ensures there would not be beacon miss if the dwell
  5405. * time is lesser than beacon interval - channel switch time combined.
  5406. * For dwell time greater than beacon interval, bmiss is expected.
  5407. */
  5408. #define WMI_SCAN_FLAG_EXT_PASSIVE_SCAN_START_TIME_ENHANCE 0x00000800
  5409. /* Force unicast address in RA */
  5410. #define WMI_SCAN_FLAG_EXT_FORCE_UNICAST_RA 0x00001000
  5411. /**
  5412. * Indicate to add 10 Mhz offset to spectral scan center frequencies
  5413. * sent by Host when checking against support channel list in FW
  5414. */
  5415. #define WMI_SCAN_FLAG_EXT_SPECTRAL_CFREQ_PLUS_10MHZ_IN_SUPP_CH_LIST 0x00002000
  5416. /* Include MLO IE in Probe req */
  5417. #define WMI_SCAN_FLAG_EXT_INCL_MLIE_PRB_REQ 0x00004000
  5418. #define WMI_SCAN_FLAG_EXT_LOW_LATENCY_SCAN 0x00008000
  5419. #define WMI_SCAN_FLAG_EXT_RELIABLE_SCAN 0x00010000
  5420. #define WMI_SCAN_FLAG_EXT_FAST_SCAN 0x00020000
  5421. #define WMI_SCAN_FLAG_EXT_LOW_POWER_SCAN 0x00040000
  5422. #define WMI_SCAN_FLAG_EXT_STOP_IF_BSSID_FOUND 0x00080000
  5423. #define WMI_SCAN_FLAG_EXT_P2P_SCAN 0x00100000
  5424. /**
  5425. * new 6 GHz flags per chan (short ssid or bssid) in struct
  5426. * wmi_hint_freq_short_ssid or wmi_hint_freq_bssid
  5427. */
  5428. /* Indicate not to send probe req for short_ssid or bssid on that channel */
  5429. #define WMI_SCAN_HINT_FLAG_SKIP_TX_PROBE_REQ 0x00000001
  5430. /* Force channel in WMI hint to active channel */
  5431. #define WMI_SCAN_HINT_FLAG_FORCE_CHAN_ACTIVE 0x00000002
  5432. /* Combine short SSID with legacy bssid list */
  5433. #define WMI_SCAN_HINT_FLAG_COMBINE_BSSID_LIST 0x00000004
  5434. #define WMI_SCAN_CHANNEL_FREQ_MASK 0x000FFFFF
  5435. #define WMI_SCAN_CHANNEL_FLAGS_MASK 0xFFF00000
  5436. /**
  5437. * Per channel configuration flags
  5438. */
  5439. /**
  5440. * WMI_SCAN_CHANNEL_FLAG_SCAN_ONLY_IF_RNR_FOUND:
  5441. * If this flag is set, then scan only if the corresponding channel
  5442. * is found via RNR IE during 2g/5g scan.
  5443. * If this flag is not set, then FW always scans the channel
  5444. * irrespective of RNR and also FW ignores
  5445. * WMI_SCAN_FLAG_EXT_6GHZ_SKIP_NON_RNR_CH flag
  5446. */
  5447. #define WMI_SCAN_CHANNEL_FLAG_SCAN_ONLY_IF_RNR_FOUND 0x001
  5448. typedef struct {
  5449. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
  5450. /** requestor requesting cancel */
  5451. A_UINT32 requestor;
  5452. /** Scan ID */
  5453. A_UINT32 scan_id;
  5454. /**
  5455. * Req Type
  5456. * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
  5457. * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id (on a specific pdev in DBDC)
  5458. * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
  5459. * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine (on a specific pdev in DBDC)
  5460. */
  5461. A_UINT32 req_type;
  5462. /**
  5463. * vDev ID
  5464. * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
  5465. */
  5466. A_UINT32 vdev_id;
  5467. /** pdev_id for identifying the MAC
  5468. * See macros starting with WMI_PDEV_ID_ for values.
  5469. * In non-DBDC case host should set it to 0
  5470. */
  5471. A_UINT32 pdev_id;
  5472. } wmi_stop_scan_cmd_fixed_param;
  5473. #define MAX_NUM_CHAN_PER_WMI_CMD 58 /* each WMI cmd can hold 58 channel entries at most */
  5474. #define WMI_APPEND_TO_EXISTING_CHAN_LIST 0x1
  5475. #define WMI_CHANNEL_MAX_BANDWIDTH_VALID 0x2
  5476. #define WMI_HONOR_HOST_6GHZ_CHANNEL_PASSIVE 0x4
  5477. /*
  5478. * To preserve backwards compatibility, retain old names (without WMI_ prefix)
  5479. * as aliases for the corrected names (with WMI_ prefix).
  5480. */
  5481. #define APPEND_TO_EXISTING_CHAN_LIST WMI_APPEND_TO_EXISTING_CHAN_LIST
  5482. #define CHANNEL_MAX_BANDWIDTH_VALID WMI_CHANNEL_MAX_BANDWIDTH_VALID
  5483. typedef struct {
  5484. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */
  5485. A_UINT32 num_scan_chans; /** no of elements in chan_info[] */
  5486. A_UINT32 flags; /* Flags used to control the behavior of channel list update on target side */
  5487. 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. */
  5488. /** Followed by the variable length TLV chan_info:
  5489. * wmi_channel chan_info[] */
  5490. } wmi_scan_chan_list_cmd_fixed_param;
  5491. /*
  5492. * Priority numbers must be sequential, starting with 0.
  5493. */
  5494. /* NOTE: WLAN SCAN_PRIORITY_COUNT can't be changed without breaking the compatibility */
  5495. typedef enum {
  5496. WMI_SCAN_PRIORITY_VERY_LOW = 0,
  5497. WMI_SCAN_PRIORITY_LOW,
  5498. WMI_SCAN_PRIORITY_MEDIUM,
  5499. WMI_SCAN_PRIORITY_HIGH,
  5500. WMI_SCAN_PRIORITY_VERY_HIGH,
  5501. WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
  5502. } wmi_scan_priority;
  5503. /* Five Levels for Requested Priority */
  5504. /* VERY_LOW LOW MEDIUM HIGH VERY_HIGH */
  5505. typedef A_UINT32 WLAN_PRIORITY_MAPPING[WMI_SCAN_PRIORITY_COUNT];
  5506. /**
  5507. * 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
  5508. * ex. if we need overwrite P2P Client prority entry, we will overwrite the whole table for WLAN_M_STA
  5509. * we will generate the new WLAN_M_STA table with modified P2P Client Entry but keep STA entry intact
  5510. */
  5511. typedef struct {
  5512. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param */
  5513. /**
  5514. * used as an index to find the proper table for a specific vdev type in default_scan_priority_mapping_table
  5515. * 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
  5516. */
  5517. A_UINT32 vdev_type;
  5518. /**
  5519. * number of rows in mapping_table for a specific vdev
  5520. * for WLAN_M_STA type, there are 3 entries in the table (refer to default_scan_priority_mapping_table definition)
  5521. */
  5522. A_UINT32 number_rows;
  5523. /**
  5524. * pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values.
  5525. * In non-DBDC case host should set it to 0
  5526. */
  5527. A_UINT32 pdev_id;
  5528. /** mapping_table for a specific vdev follows this TLV
  5529. * WLAN_PRIORITY_MAPPING mapping_table[]; */
  5530. } wmi_scan_sch_priority_table_cmd_fixed_param;
  5531. /** update flags */
  5532. #define WMI_SCAN_UPDATE_SCAN_PRIORITY 0x1
  5533. #define WMI_SCAN_UPDATE_SCAN_MIN_REST_TIME 0x2
  5534. #define WMI_SCAN_UPDATE_SCAN_MAX_REST_TIME 0x4
  5535. typedef struct {
  5536. A_UINT32 tlv_header;
  5537. /** requestor requesting update scan request */
  5538. A_UINT32 requestor;
  5539. /** Scan ID of the scan request that need to be update */
  5540. A_UINT32 scan_id;
  5541. /** update flags, indicating which of the following fields are valid and need to be updated*/
  5542. A_UINT32 scan_update_flags;
  5543. /** scan priority. Only valid if WMI_SCAN_UPDATE_SCAN_PRIORITY flag is set in scan_update_flag */
  5544. A_UINT32 scan_priority;
  5545. /** min rest time. Only valid if WMI_SCAN_UPDATE_MIN_REST_TIME flag is set in scan_update_flag */
  5546. A_UINT32 min_rest_time;
  5547. /** min rest time. Only valid if WMI_SCAN_UPDATE_MAX_REST_TIME flag is set in scan_update_flag */
  5548. A_UINT32 max_rest_time;
  5549. /** 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 */
  5550. A_UINT32 pdev_id;
  5551. } wmi_scan_update_request_cmd_fixed_param;
  5552. #define WMI_SCAN_PROBE_OUI_SPOOFED_MAC_IN_PROBE_REQ 0x1
  5553. #define WMI_SCAN_PROBE_OUI_RANDOM_SEQ_NO_IN_PROBE_REQ 0x2
  5554. #define WMI_SCAN_PROBE_OUI_ENABLE_IE_WHITELIST_IN_PROBE_REQ 0x4
  5555. typedef struct _wmi_vendor_oui {
  5556. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vendor_oui */
  5557. A_UINT32 oui_type_subtype; /** Vendor OUI type and subtype, lower 3 bytes is type and highest byte is subtype**/
  5558. }wmi_vendor_oui;
  5559. typedef struct {
  5560. A_UINT32 tlv_header;
  5561. /** oui to be used in probe request frame when random mac addresss is
  5562. * requested part of scan parameters. this is applied to both FW internal scans and
  5563. * host initated scans. host can request for random mac address with
  5564. * WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ flag. */
  5565. A_UINT32 prob_req_oui;
  5566. A_UINT32 vdev_id;
  5567. /** Control Flags **/
  5568. A_UINT32 flags;
  5569. /** ie bitmap to use in probe req **/
  5570. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  5571. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  5572. A_UINT32 num_vendor_oui;
  5573. /** 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 */
  5574. A_UINT32 pdev_id;
  5575. /* Following this tlv, there comes an array of structure of type wmi_vendor_oui
  5576. wmi_vendor_oui vendor_oui[];*/
  5577. } wmi_scan_prob_req_oui_cmd_fixed_param;
  5578. enum wmi_scan_event_type {
  5579. WMI_SCAN_EVENT_STARTED = 0x1,
  5580. WMI_SCAN_EVENT_COMPLETED = 0x2,
  5581. WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
  5582. WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
  5583. WMI_SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */
  5584. WMI_SCAN_EVENT_PREEMPTED = 0x20, /* preempted by other high priority scan */
  5585. WMI_SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */
  5586. WMI_SCAN_EVENT_RESTARTED = 0x80, /* scan restarted */
  5587. WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
  5588. WMI_SCAN_EVENT_SUSPENDED = 0x200, /* scan request is suspended */
  5589. WMI_SCAN_EVENT_RESUMED = 0x400, /* scan request is resumed */
  5590. WMI_SCAN_EVENT_MAX = 0x8000
  5591. };
  5592. enum wmi_scan_completion_reason {
  5593. /** scan related events */
  5594. WMI_SCAN_REASON_NONE = 0xFF,
  5595. WMI_SCAN_REASON_COMPLETED = 0,
  5596. WMI_SCAN_REASON_CANCELLED = 1,
  5597. WMI_SCAN_REASON_PREEMPTED = 2,
  5598. WMI_SCAN_REASON_TIMEDOUT = 3,
  5599. WMI_SCAN_REASON_INTERNAL_FAILURE = 4, /* This reason indication failures when performaing scan */
  5600. WMI_SCAN_REASON_SUSPENDED = 5,
  5601. WMI_SCAN_REASON_DFS_VIOLATION = 6, /* Failure when tried to SCAN channel in NOL list */
  5602. WMI_SCAN_REASON_MAX,
  5603. };
  5604. #define WMI_SCAN_EVT_IS_SCAN_TYPE_P2P_FLAG_SET(flag, value) \
  5605. WMI_SET_BITS(flag, 0, 1, value)
  5606. #define WMI_SCAN_EVT_IS_SCAN_TYPE_P2P_FLAG_GET(flag) \
  5607. WMI_GET_BITS(flag, 0, 1)
  5608. typedef struct {
  5609. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_event_fixed_param */
  5610. /** scan event (wmi_scan_event_type) */
  5611. A_UINT32 event;
  5612. /** status of the scan completion event */
  5613. A_UINT32 reason;
  5614. /** channel freq , only valid for FOREIGN channel event*/
  5615. A_UINT32 channel_freq;
  5616. /**id of the requestor whose scan is in progress */
  5617. A_UINT32 requestor;
  5618. /**id of the scan that is in progress */
  5619. A_UINT32 scan_id;
  5620. /**id of VDEV that requested the scan */
  5621. A_UINT32 vdev_id;
  5622. /** TSF Timestamp when the scan event (wmi_scan_event_type) is completed
  5623. * In case of AP it is TSF of the AP vdev
  5624. * In case of STA connected state this is the TSF of the AP
  5625. * In case of STA not connected it will be the free running HW timer
  5626. */
  5627. A_UINT32 tsf_timestamp;
  5628. /** flags:
  5629. * Bit[0] - indicate if scan type is for p2p
  5630. * Bit[1:31] - reserved
  5631. */
  5632. A_UINT32 flags;
  5633. } wmi_scan_event_fixed_param;
  5634. /* WMI Diag event */
  5635. typedef struct {
  5636. A_UINT32 tlv_header; /* TLV tag and len; tag is WMITLV_TAG_STRUC_wmi_diag_event_fixed_param */
  5637. A_UINT32 time_stamp; /* Reference timestamp. diag frame contains diff value */
  5638. A_UINT32 count; /* Number of diag frames added to current event */
  5639. A_UINT32 dropped;
  5640. /* followed by WMITLV_TAG_ARRAY_BYTE */
  5641. } wmi_diag_event_fixed_param;
  5642. #define WMI_11K_OFFLOAD_BITMAP_NEIGHBOR_REPORT_REQ 0x1
  5643. typedef struct {
  5644. A_UINT32 time_offset; /* positive offset in secs from the time 11k offload command has been received, 0xFFFFFFFF if offset is not valid */
  5645. 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 */
  5646. A_UINT32 bmiss_count_trigger; /* value 1 is to send neighbor report at 1st BMISS, 0xFFFFFFFF if input is not valid */
  5647. A_UINT32 per_threshold_offset; /* percentage offset from the current per_threshold, 0xFFFFFFFF if input is not valid */
  5648. 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 */
  5649. 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
  5650. * neighbor report requests that will be sent by FW after every roam */
  5651. wmi_ssid ssid; /* ssid of current connected AP FW might choose to use this SSID in the neighbor report req frame if it is
  5652. * interested in candidate of the same SSID */
  5653. } wmi_neighbor_report_offload;
  5654. typedef struct {
  5655. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_11k_report_fixed_param */
  5656. A_UINT32 vdev_id;
  5657. A_UINT32 offload_11k; /* bitmask to indicate to FW what all 11k features are offloaded */
  5658. } wmi_11k_offload_report_fixed_param;
  5659. typedef struct {
  5660. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_neighbor_report_offload_tlv_param */
  5661. wmi_neighbor_report_offload neighbor_rep_ofld_params;
  5662. } wmi_neighbor_report_11k_offload_tlv_param;
  5663. #define WMI_INVOKE_NEIGHBOR_REPORT_FLAGS_SEND_RESP_TO_HOST 0x1
  5664. typedef struct {
  5665. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_invoke_neighbor_report_fixed_param */
  5666. A_UINT32 vdev_id;
  5667. A_UINT32 flags;
  5668. wmi_ssid ssid; /* if ssid.len == 0, firmware doesn't include ssid sub-element.
  5669. * In that case AP gives all the candidates in ESS without SSID filter
  5670. * If host wants to insert ssid subelement in the neighbor report request frame, then it can specify the ssid here */
  5671. } wmi_11k_offload_invoke_neighbor_report_fixed_param;
  5672. #define WMI_MAX_PMKID_LEN 16
  5673. #define WMI_MAX_PMK_LEN 64
  5674. #define WMI_PMK_CACHE_CAT_FLAG_BSSID 0x1
  5675. #define WMI_PMK_CACHE_CAT_FLAG_SSID_CACHE_ID 0x2
  5676. #define WMI_PMK_CACHE_ACTION_FLAG_ADD_ENTRY 0x1
  5677. #define WMI_PMK_CACHE_ACTION_FLAG_DEL_ENTRY 0x2
  5678. typedef struct {
  5679. A_UINT32 tlv_header;
  5680. A_UINT32 pmk_len;
  5681. 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,
  5682. in spite of the automatic byte-swap applied to WMI messages during download*/
  5683. A_UINT32 pmkid_len;
  5684. A_UINT8 pmkid[WMI_MAX_PMKID_LEN];
  5685. wmi_mac_addr bssid;
  5686. wmi_ssid ssid;
  5687. A_UINT32 cache_id;
  5688. A_UINT32 cat_flag; // whether (bssid) or (ssid,cache_id) is valid
  5689. A_UINT32 action_flag; // add/delete the entry
  5690. } wmi_pmk_cache;
  5691. #define WMI_PMK_CACHE_OP_FLAG_FLUSH_ALL 0x1
  5692. typedef struct {
  5693. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_update_pmk_cache_cmd_fixed_param */
  5694. A_UINT32 op_flag; //option to flush all the cache at once
  5695. A_UINT32 vdev_id;
  5696. A_UINT32 num_cache;
  5697. /**
  5698. * TLV (tag length value) parameters follow the update_pmk_cache cmd
  5699. * structure. The TLV's are:
  5700. * wmi_pmk_cache cache_list[];
  5701. */
  5702. } wmi_pdev_update_pmk_cache_cmd_fixed_param;
  5703. #define WMI_FILS_MAX_USERNAME_LEN 16
  5704. #define WMI_FILS_MAX_REALM_LEN 256
  5705. #define WMI_FILS_MAX_RRK_LEN 64
  5706. #define WMI_FILS_MAX_RIK_LEN 64
  5707. /* for big-endian hosts, manual endian conversion will be needed to keep the array values in their original order,
  5708. in spite of the automatic byte-swap applied to WMI messages during download*/
  5709. typedef struct {
  5710. A_UINT8 username[WMI_FILS_MAX_USERNAME_LEN];
  5711. A_UINT32 username_length;
  5712. A_UINT32 next_erp_seq_num;
  5713. A_UINT8 rRk[WMI_FILS_MAX_RRK_LEN];
  5714. A_UINT32 rRk_length;
  5715. A_UINT8 rIk[WMI_FILS_MAX_RIK_LEN];
  5716. A_UINT32 rIk_length;
  5717. A_UINT8 realm[WMI_FILS_MAX_REALM_LEN];
  5718. A_UINT32 realm_len;
  5719. } wmi_erp_info;
  5720. enum wmi_fils_hlp_pkt_type {
  5721. WMI_FILS_HLP_PKT_TYPE_DHCP_DISCOVER = 1,
  5722. };
  5723. typedef struct {
  5724. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_fils_offload_tlv_param */
  5725. A_UINT32 flags;
  5726. wmi_erp_info vdev_erp_info;
  5727. } wmi_roam_fils_offload_tlv_param;
  5728. typedef struct {
  5729. A_UINT32 tlv_header; /** tag WMITLV_TAG_STRUC_wmi_pdev_update_fils_hlp_pkt_cmd_fixed_param**/
  5730. A_UINT32 flags;
  5731. A_UINT32 vdev_id;
  5732. A_UINT32 size;
  5733. A_UINT32 pkt_type; // filled using enum wmi_fils_hlp_pkt_type
  5734. // A_UINT8 fils_hlp_pkt[];
  5735. } wmi_pdev_update_fils_hlp_pkt_cmd_fixed_param;
  5736. #define WMI_MAX_KEK_LEN 64
  5737. #define GTK_OFFLOAD_KEK_EXTENDED_BYTES WMI_MAX_KEK_LEN /*KEK len has been increased to 64 to support FILS security.
  5738. To not break backward compatibility, new GTK_OFFLOAD_KEK_EXTENDED_BYTES has been defined without modifying old GTK_OFFLOAD_KEK_BYTES */
  5739. typedef struct {
  5740. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_fils_synch_tlv_param */
  5741. A_UINT32 update_erp_next_seq_num;// Boolean denoting whether next erp_seq_num changed or not.
  5742. A_UINT32 next_erp_seq_num;
  5743. A_UINT32 kek_len;
  5744. A_UINT8 kek[WMI_MAX_KEK_LEN];
  5745. A_UINT32 pmk_len;
  5746. A_UINT8 pmk[WMI_MAX_PMK_LEN];
  5747. A_UINT8 pmkid[WMI_MAX_PMKID_LEN];
  5748. A_UINT8 realm[WMI_FILS_MAX_REALM_LEN];
  5749. A_UINT32 realm_len;
  5750. } wmi_roam_fils_synch_tlv_param;
  5751. /*
  5752. * FW sends PMK cache of roamed candidate to host to sync pmk cache with host
  5753. */
  5754. typedef struct {
  5755. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_pmk_cache_synch_tlv_param */
  5756. A_UINT32 pmk_len;
  5757. A_UINT8 pmk[WMI_MAX_PMK_LEN];
  5758. A_UINT8 pmkid[WMI_MAX_PMKID_LEN];
  5759. } wmi_roam_pmk_cache_synch_tlv_param;
  5760. /**
  5761. * WMI_ROAM_LINK_FLAG_XXX definition:
  5762. */
  5763. #define WMI_ROAM_LINK_FLAG_DISABLE 0x1 /* link is disabled, host can overwrite it later. */
  5764. typedef struct {
  5765. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ml_setup_links_param */
  5766. A_UINT32 vdev_id; /* when vdev_id is 0xffffffff, means the link_id hasn't attached to vdev */
  5767. A_UINT32 link_id; /* link id defined as in 802.11 BE spec. */
  5768. wmi_channel channel; /* link primary channel */
  5769. /**
  5770. * link flags: refer WMI_ROAM_LINK_FLAG_XXX.
  5771. */
  5772. A_UINT32 flags;
  5773. wmi_mac_addr link_addr; /* link address */
  5774. wmi_mac_addr self_link_addr; /* self-link address */
  5775. } wmi_roam_ml_setup_links_param;
  5776. /*
  5777. * If FW has multiple active channels due to MCC(multi channel concurrency),
  5778. * then these stats are combined stats for all the active channels.
  5779. */
  5780. typedef struct {
  5781. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param */
  5782. /** ack count, it is an incremental number, not accumulated number */
  5783. A_UINT32 ackRcvBad;
  5784. /** bad rts count, it is an incremental number, not accumulated number */
  5785. A_UINT32 rtsBad;
  5786. /** good rts, it is an incremental number, not accumulated number */
  5787. A_UINT32 rtsGood;
  5788. /** fcs count, it is an incremental number, not accumulated number */
  5789. A_UINT32 fcsBad;
  5790. /** beacon count, it is an incremental number, not accumulated number */
  5791. A_UINT32 noBeacons;
  5792. } wmi_update_whal_mib_stats_event_fixed_param;
  5793. /*
  5794. * This defines how much headroom is kept in the
  5795. * receive frame between the descriptor and the
  5796. * payload, in order for the WMI PHY error and
  5797. * management handler to insert header contents.
  5798. *
  5799. * This is in bytes.
  5800. */
  5801. #define WMI_MGMT_RX_HDR_HEADROOM (sizeof(wmi_comb_phyerr_rx_hdr) + WMI_TLV_HDR_SIZE + sizeof(wmi_single_phyerr_rx_hdr))
  5802. /** This event will be used for sending scan results
  5803. * as well as rx mgmt frames to the host. The rx buffer
  5804. * will be sent as part of this WMI event. It would be a
  5805. * good idea to pass all the fields in the RX status
  5806. * descriptor up to the host.
  5807. */
  5808. /* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */
  5809. #define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */
  5810. /** flag indicating that the mgmt frame (probe req/beacon) is received in the context of extscan performed by FW */
  5811. #define WMI_MGMT_RX_HDR_EXTSCAN 0x01
  5812. /** flag indicating that the mgmt frame (probe req/beacon) is received in the context of matched network by FW ENLO */
  5813. #define WMI_MGMT_RX_HDR_ENLO 0x02
  5814. #define MAX_ANTENNA_EIGHT 8
  5815. /** Helper macro for params GET/SET of MGMT_RX_FW_CONSUMED_EVENTID */
  5816. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_PEER_ID_GET(peer_info_subtype) WMI_GET_BITS(peer_info_subtype, 0, 16)
  5817. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_PEER_ID_SET(peer_info_subtype, value) WMI_SET_BITS(peer_info_subtype, 0, 16, value)
  5818. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_IEEE_LINK_ID_GET(peer_info_subtype) WMI_GET_BITS(peer_info_subtype, 16, 3)
  5819. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_IEEE_LINK_ID_SET(peer_info_subtype, value) WMI_SET_BITS(peer_info_subtype, 16, 3, value)
  5820. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_SUBTYPE_GET(peer_info_subtype) WMI_GET_BITS(peer_info_subtype, 28, 4)
  5821. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_SUBTYPE_SET(peer_info_subtype, value) WMI_SET_BITS(peer_info_subtype, 28, 4, value)
  5822. #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)
  5823. #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)
  5824. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_MGMT_PKT_CTR_GET(mgmt_pkt_ctr_info) WMI_GET_BITS(mgmt_pkt_ctr_info, 16, 16)
  5825. #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)
  5826. typedef struct {
  5827. A_UINT32 tlv_header; /* WMITLV_TAG_STRUCT_wmi_mgmt_rx_fw_consumed_hdr */
  5828. A_UINT32 rx_tsf_l32; /* h/w assigned timestamp of the rx frame in micro sec */
  5829. A_UINT32 rx_tsf_u32 ;/* h/w assigned timestamp of the rx frame in micro sec */
  5830. A_UINT32 pdev_id; /* pdev_id for identifying the MAC the rx mgmt frame was received by */
  5831. /**
  5832. * peer_info_subtype
  5833. *
  5834. * [15:0]: ml_peer_id, ML peer_id unique across chips
  5835. * [18:16]: ieee_link_id, protocol link id on which the rx frame is received
  5836. * [27:19]: reserved
  5837. * [31:28]: subtype, subtype of the received MGMT frame
  5838. */
  5839. A_UINT32 peer_info_subtype;
  5840. A_UINT32 chan_freq; /* frequency in MHz of the channel on which this frame was received */
  5841. /* Timestamp (in micro sec) of the last fw consumed/dropped mgmt. frame, same across chips */
  5842. A_UINT32 global_timestamp;
  5843. /**
  5844. * mgmt_pkt_ctr_info
  5845. *
  5846. * [14:0]: reserved
  5847. * [15]: mgmt_pkt_ctr_valid
  5848. * [31:16]: mgmt_pkt_ctr, Sequence number of the last fw consumed mgmt frame
  5849. */
  5850. A_UINT32 mgmt_pkt_ctr_info;
  5851. A_UINT32 rx_ppdu_duration_us; /* receive duration in us */
  5852. A_UINT32 mpdu_end_timestamp; /* mpdu end timestamp in us (based on HWMLO timer) */
  5853. } wmi_mgmt_rx_fw_consumed_hdr;
  5854. /** Helper macro for param GET/SET of mgmt_rx_reo_params */
  5855. #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)
  5856. #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)
  5857. #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)
  5858. #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)
  5859. #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)
  5860. #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)
  5861. /** Data structure of the TLV to add in RX EVENTID for providing REO params
  5862. * like global_timestamp and mgmt_pkt_ctr
  5863. */
  5864. typedef struct {
  5865. A_UINT32 tlv_header; /*TLV WMITLV_TAG_STRUC_wmi_mgmt_rx_reo_params*/
  5866. /* Timestamp (in micro sec) of the last fw forwarded mgmt. frame, same across chips */
  5867. A_UINT32 global_timestamp;
  5868. /**
  5869. * mgmt_pkt_ctr_link_info
  5870. *
  5871. * [11:0]: reserved
  5872. * [14:12]: ieee_link_id, protocol link id on which the rx frame is received
  5873. * [15]: mgmt_pkt_ctr_valid
  5874. * [31:16]: mgmt_pkt_ctr, Sequence number of the last fw forwarded mgmt frame
  5875. */
  5876. A_UINT32 mgmt_pkt_ctr_link_info;
  5877. A_UINT32 rx_ppdu_duration_us; /* receive duration in us */
  5878. A_UINT32 mpdu_end_timestamp; /* mpdu end timestamp in us (based on HWMLO timer) */
  5879. } wmi_mgmt_rx_reo_params;
  5880. /** Helper macro for param GET/SET */
  5881. #define WMI_RX_PARAM_EXT_META_ID_GET(mgmt_rx_params_ext_dword0) WMI_GET_BITS(mgmt_rx_params_ext_dword0, 0, 3)
  5882. #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)
  5883. #define WMI_RX_PARAM_EXT_BA_WIN_SIZE_GET(mgmt_rx_params_ext_dword1) WMI_GET_BITS(mgmt_rx_params_ext_dword1, 0, 16)
  5884. #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)
  5885. #define WMI_RX_PARAM_EXT_REO_WIN_SIZE_GET(mgmt_rx_params_ext_dword1) WMI_GET_BITS(mgmt_rx_params_ext_dword1, 16, 16)
  5886. #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)
  5887. typedef enum {
  5888. WMI_RX_PARAMS_EXT_META_ADDBA = 0x0,
  5889. WMI_RX_PARAMS_EXT_META_TWT = 0x1,
  5890. } wmi_mgmt_rx_params_ext_meta_t;
  5891. typedef struct {
  5892. A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_mgmt_rx_params_ext) and len */
  5893. union {
  5894. struct {
  5895. A_UINT32
  5896. /* Describes the representation of the data in rx_param_ext_dword1
  5897. * Full set shown in wmi_mgmt_rx_params_ext_meta_t */
  5898. meta_id : 3,
  5899. /* Dedicated for commonly used parameters only */
  5900. reserved_0 : 29;
  5901. };
  5902. A_UINT32 mgmt_rx_params_ext_dword0;
  5903. };
  5904. union {
  5905. struct {
  5906. /* WMI_RX_PARAMS_EXT_META_ADDBA */
  5907. A_UINT32
  5908. ba_win_size :16, /* negotiated BA window size */
  5909. reo_win_size :16; /* 2x the negotiated BA window size to handle any latency across MLO */
  5910. };
  5911. A_UINT32 mgmt_rx_params_ext_dword1;
  5912. };
  5913. union {
  5914. struct {
  5915. /* WMI_RX_PARAMS_EXT_META_TWT */
  5916. A_UINT32 twt_ie_buf_len; /* IE length */
  5917. /* Following this structure is the TLV byte stream of IE data
  5918. * of length twt_ie_buf_len:
  5919. * A_UINT8 ie_data[]; <-- length in bytes given by field
  5920. * twt_ie_buf_len.
  5921. * This ie_data[] would contain only the TWT IE information
  5922. * when twt_ie_buf_len is non zero.
  5923. */
  5924. };
  5925. A_UINT32 mgmt_rx_params_ext_dword2;
  5926. };
  5927. } wmi_mgmt_rx_params_ext;
  5928. typedef struct {
  5929. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */
  5930. /** channel on which this frame is received (channel number) */
  5931. A_UINT32 channel;
  5932. /** snr information used to cal RSSI */
  5933. A_UINT32 snr;
  5934. /** Rate kbps */
  5935. A_UINT32 rate;
  5936. /** rx phy mode WLAN_PHY_MODE */
  5937. A_UINT32 phy_mode;
  5938. /** length of the frame */
  5939. A_UINT32 buf_len;
  5940. /** rx status */
  5941. A_UINT32 status; /* capture mode indication */
  5942. /** RSSI of PRI 20MHz for each chain. */
  5943. A_UINT32 rssi_ctl[ATH_MAX_ANTENNA];
  5944. /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */
  5945. A_UINT32 flags;
  5946. /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
  5947. A_INT32 rssi;
  5948. /** delta between local TSF(TSF timestamp when frame was RXd)
  5949. * and remote TSF(TSF timestamp in the IE for mgmt frame -
  5950. * beacon,proberesp for e.g). If remote TSF is not available,
  5951. * delta set to 0.
  5952. * Although tsf_delta is stored as A_UINT32, it can be negative,
  5953. * and thus would need to be sign-extended if added to a value
  5954. * larger than 32 bits.
  5955. */
  5956. A_UINT32 tsf_delta;
  5957. /* The lower 32 bits of the TSF (rx_tsf_l32) is copied by FW from
  5958. * TSF timestamp in the RX MAC descriptor provided by HW.
  5959. */
  5960. A_UINT32 rx_tsf_l32;
  5961. /* The Upper 32 bits (rx_tsf_u32) is filled by reading the TSF register
  5962. * after the packet is received.
  5963. */
  5964. A_UINT32 rx_tsf_u32;
  5965. /** pdev_id for identifying the MAC the rx mgmt frame was received by
  5966. * See macros starting with WMI_PDEV_ID_ for values.
  5967. */
  5968. A_UINT32 pdev_id;
  5969. /** freq in MHz of the channel on which this frame was received */
  5970. A_UINT32 chan_freq;
  5971. /* This TLV is followed by array of bytes:
  5972. * A_UINT8 bufp[]; <-- management frame buffer
  5973. */
  5974. /* This TLV is optionally followed by array of struct:
  5975. * wmi_rssi_ctl_ext rssi_ctl_ext;
  5976. */
  5977. /*
  5978. * This TLV is followed by struct:
  5979. * wmi_mgmt_rx_reo_params reo_params;// MGMT rx REO params
  5980. */
  5981. /*
  5982. * This TLV is optionally followed by struct:
  5983. * wmi_mgmt_rx_params_ext mgmt_rx_params_ext[0 or 1];
  5984. */
  5985. } wmi_mgmt_rx_hdr;
  5986. /* WMI CMD to receive the management filter criteria from the host */
  5987. typedef struct {
  5988. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_mgmt_reo_filter_cmd_fixed_param */
  5989. A_UINT32 pdev_id; /* pdev_id for identifying the MAC */
  5990. /* filter:
  5991. * Each bit represents the possible combination of frame type (2 bits)
  5992. * and subtype (4 bits)
  5993. * There would be 64 such combinations as per the 802.11 standard
  5994. * For Exp : We have beacon frame, we will take the type and subtype
  5995. * of this frame and concatenate the bits, it will give 6 bits
  5996. * number. We need to go to that bit position in the below
  5997. * 2 filter_low and filter_high bitmap and set the bit.
  5998. */
  5999. A_UINT32 filter_low;
  6000. A_UINT32 filter_high;
  6001. } wmi_mgmt_rx_reo_filter_configuration_cmd_fixed_param;
  6002. typedef struct {
  6003. A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_frame_pn_params) and len */
  6004. A_UINT8 cur_pn[WMI_MAX_PN_LEN];
  6005. A_UINT8 prev_pn[WMI_MAX_PN_LEN];
  6006. } wmi_frame_pn_params;
  6007. typedef struct {
  6008. A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_is_my_frame) */
  6009. A_UINT32 mgmt_frm_sub_type; /* to indicate which sub-type of MGMT frame */
  6010. A_UINT32 is_my_frame; /* to indicate frame is sent to this BSSID */
  6011. } wmi_is_my_mgmt_frame;
  6012. typedef struct {
  6013. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_ml_info */
  6014. /**
  6015. * CU vdev map to initmate about the on-going Critical update
  6016. * per-link contains 16 VAPs at max.
  6017. */
  6018. /*
  6019. * bits : 0-15 | 16-31
  6020. * link-id : 0 | 1
  6021. */
  6022. A_UINT32 cu_vdev_map_1;
  6023. /*
  6024. * bits : 0-15 | 16-31
  6025. * link-id : 2 | 3
  6026. */
  6027. A_UINT32 cu_vdev_map_2;
  6028. /*
  6029. * bits : 0-15 | 16-31
  6030. * link-id : 4 | 5
  6031. */
  6032. A_UINT32 cu_vdev_map_3;
  6033. /*
  6034. * bits : 0-15 | 16-31
  6035. * link-id : 6 | 7
  6036. */
  6037. A_UINT32 cu_vdev_map_4; /* bits 63:32 */
  6038. /**
  6039. * This is followed by byte array that contains BPCC value per MLO VAP.
  6040. * There will be 16 byte entries for each link corresponding to VAP-ID.
  6041. * So number of byte entries will be (num of max links supported by AP * 16)
  6042. * Note: num of max links supported = 8
  6043. */
  6044. } wmi_mgmt_ml_info;
  6045. #define WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_GET(_var) WMI_GET_BITS(_var, 0, 8)
  6046. #define WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_SET(_var, _val) WMI_SET_BITS(_var, 0, 8, _val)
  6047. #define WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_EXP_DUR_GET(_var) WMI_GET_BITS(_var, 8, 24)
  6048. #define WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_EXP_DUR_SET(_var, _val) WMI_SET_BITS(_var, 8, 24, _val)
  6049. typedef struct {
  6050. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_bcast_t2lm_info */
  6051. /*
  6052. * Vdev_id for MLO vap
  6053. * WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_GET /
  6054. * WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_SET
  6055. * vdev_id :8
  6056. *
  6057. * Duration time for MLO Vap
  6058. * WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_GET /
  6059. * WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_SET
  6060. * expected_duration :24
  6061. */
  6062. A_UINT32 vdev_id_expec_dur;
  6063. } wmi_mlo_bcast_t2lm_info;
  6064. typedef enum {
  6065. PKT_CAPTURE_MODE_DISABLE = 0,
  6066. PKT_CAPTURE_MODE_MGMT_ONLY,
  6067. PKT_CAPTURE_MODE_DATA_ONLY,
  6068. PKT_CAPTURE_MODE_DATA_MGMT,
  6069. } WMI_PKT_CAPTURE_MODE_CONFIG;
  6070. /* This information sending to host during offloaded MGMT local TX and host TX */
  6071. typedef struct {
  6072. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_hdr */
  6073. /* channel frequency in MHz */
  6074. A_UINT32 chan_freq;
  6075. /** snr information used to cal RSSI in dB */
  6076. A_UINT32 snr;
  6077. /** Rate kbps */
  6078. A_UINT32 rate_kbps;
  6079. /** phy mode WLAN_PHY_MODE */
  6080. A_UINT32 phy_mode;
  6081. /** length of the frame in bytes */
  6082. A_UINT32 buf_len;
  6083. /** status:
  6084. * 0x00: CRC ERR
  6085. * 0x08: DECRYPT ERR
  6086. * 0x10: MIC ERR
  6087. * 0x20: KEY CACHE MISS
  6088. */
  6089. A_UINT32 status;
  6090. /** flags:
  6091. * Information about the management frame e.g. can give a scan source
  6092. * for a scan result mgmt frame
  6093. * Refer to WMI_MGMT_RX_HDR_ definitions.
  6094. * ex: WMI_MGMT_RX_HDR_EXTSCAN,WMI_MGMT_RX_HDR_ENLO
  6095. */
  6096. A_UINT32 flags;
  6097. /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
  6098. A_INT32 rssi;
  6099. /** delta between local TSF (TSF timestamp when frame was RXd)
  6100. * and remote TSF (TSF timestamp in the IE for mgmt frame -
  6101. * beacon, proberesp for example). If remote TSF is not available,
  6102. * delta is set to 0.
  6103. * Although tsf_delta is stored as A_UINT32, it can be negative,
  6104. * and thus would need to be sign-extended if added to a value
  6105. * larger than 32 bits.
  6106. */
  6107. A_UINT32 tsf_delta;
  6108. /* The lower 32 bits of the TSF (tsf_l32) is copied by FW from
  6109. * TSF timestamp in the TX MAC descriptor provided by HW.
  6110. */
  6111. A_UINT32 tsf_l32;
  6112. /* The upper 32 bits of the TSF (tsf_u32) is copied by FW from
  6113. * TSF timestamp in the TX MAC descriptor provided by HW.
  6114. */
  6115. A_UINT32 tsf_u32;
  6116. /** pdev_id for identifying the MAC the tx mgmt frame transmitted.
  6117. * See macros starting with WMI_PDEV_ID_ for values.
  6118. */
  6119. A_UINT32 pdev_id;
  6120. A_UINT32 direction; /* tx:0,rx:1*/
  6121. /** tx_status:
  6122. * 0: xmit ok
  6123. * 1: excessive retries
  6124. * 2: blocked by tx filtering
  6125. * 4: fifo underrun
  6126. * 8: swabort
  6127. */
  6128. A_UINT32 tx_status;
  6129. A_UINT32
  6130. /* tx_retry_cnt:
  6131. * Indicates retry count of offloaded/local & host mgmt tx frames.
  6132. * The WMI_MGMT_HDR_TX_RETRY_[SET,GET] macros can be used to access
  6133. * this bitfield in a portable manner.
  6134. */
  6135. tx_retry_cnt:6, /* [5:0] */
  6136. reserved_1:26; /* [31:6] */
  6137. /* This TLV may be followed by array of bytes:
  6138. * A_UINT8 bufp[]; <-- management frame buffer
  6139. */
  6140. } wmi_mgmt_hdr;
  6141. /* Tx retry cnt set & get bits*/
  6142. #define WMI_MGMT_HDR_TX_RETRY_CNT_SET(tx_retry_cnt, value) \
  6143. WMI_SET_BITS(tx_retry_cnt, 0, 6, value)
  6144. #define WMI_MGMT_HDR_TX_RETRY_CNT_GET(tx_retry_cnt) \
  6145. WMI_GET_BITS(tx_retry_cnt, 0, 6)
  6146. /*
  6147. * Instead of universally increasing the RX_HDR_HEADROOM size which may cause problems for older targets,
  6148. * this new ext_hdr can be used for extending the header and will be only applicable for new targets.
  6149. */
  6150. typedef struct
  6151. {
  6152. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_rssi_ctl_ext */
  6153. /** RSSI of PRI 20MHz for each chain, in dB w.r.t. noise floor */
  6154. A_UINT32 rssi_ctl_ext[MAX_ANTENNA_EIGHT - ATH_MAX_ANTENNA];
  6155. } wmi_rssi_ctl_ext;
  6156. typedef struct {
  6157. /** TSF timestamp */
  6158. A_UINT32 tsf_timestamp;
  6159. /**
  6160. * Current freq1, freq2
  6161. *
  6162. * [7:0]: freq1[lo]
  6163. * [15:8] : freq1[hi]
  6164. * [23:16]: freq2[lo]
  6165. * [31:24]: freq2[hi]
  6166. */
  6167. A_UINT32 freq_info_1;
  6168. /**
  6169. * Combined RSSI over all chains and channel width for this PHY error
  6170. *
  6171. * [7:0]: RSSI combined
  6172. * [15:8]: Channel width (MHz)
  6173. * [23:16]: PHY error code
  6174. * [24:16]: reserved (future use)
  6175. */
  6176. A_UINT32 freq_info_2;
  6177. /**
  6178. * RSSI on chain 0 through 3
  6179. *
  6180. * This is formatted the same as the PPDU_START RX descriptor
  6181. * field:
  6182. *
  6183. * [7:0]: pri20
  6184. * [15:8]: sec20
  6185. * [23:16]: sec40
  6186. * [31:24]: sec80
  6187. */
  6188. A_UINT32 rssi_chain0;
  6189. A_UINT32 rssi_chain1;
  6190. A_UINT32 rssi_chain2;
  6191. A_UINT32 rssi_chain3;
  6192. /**
  6193. * Last calibrated NF value for chain 0 through 3
  6194. *
  6195. * nf_list_1:
  6196. *
  6197. * + [15:0] - chain 0
  6198. * + [31:16] - chain 1
  6199. *
  6200. * nf_list_2:
  6201. *
  6202. * + [15:0] - chain 2
  6203. * + [31:16] - chain 3
  6204. */
  6205. A_UINT32 nf_list_1;
  6206. A_UINT32 nf_list_2;
  6207. /** Length of the frame */
  6208. A_UINT32 buf_len;
  6209. } wmi_single_phyerr_rx_hdr;
  6210. typedef struct {
  6211. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_single_phyerr_ext_rx_hdr */
  6212. /**
  6213. * RSSI on chain 4 through 7 in dB w.r.t noise floor.
  6214. *
  6215. * This is formatted the same as the PPDU_START RX descriptor
  6216. * field:
  6217. *
  6218. * [7:0]: pri20
  6219. * [15:8]: sec20
  6220. * [23:16]: sec40
  6221. * [31:24]: sec80
  6222. */
  6223. A_UINT32 rssi_chain4;
  6224. A_UINT32 rssi_chain5;
  6225. A_UINT32 rssi_chain6;
  6226. A_UINT32 rssi_chain7;
  6227. /**
  6228. * Last calibrated NF value for chain 4 through 7 in dBm
  6229. *
  6230. * nf_list_3:
  6231. * + [15:0] - chain 4
  6232. * + [31:16] - chain 5
  6233. *
  6234. * nf_list_4:
  6235. * + [15:0] - chain 6
  6236. * + [31:16] - chain 7
  6237. *
  6238. * Each chain's noise floor is stored as a sign-extended (negative)
  6239. * value in dBm units.
  6240. */
  6241. A_UINT32 nf_list_3;
  6242. A_UINT32 nf_list_4;
  6243. } wmi_single_phyerr_ext_rx_hdr;
  6244. #define WMI_UNIFIED_FREQINFO_1_LO 0x000000ff
  6245. #define WMI_UNIFIED_FREQINFO_1_LO_S 0
  6246. #define WMI_UNIFIED_FREQINFO_1_HI 0x0000ff00
  6247. #define WMI_UNIFIED_FREQINFO_1_HI_S 8
  6248. #define WMI_UNIFIED_FREQINFO_2_LO 0x00ff0000
  6249. #define WMI_UNIFIED_FREQINFO_2_LO_S 16
  6250. #define WMI_UNIFIED_FREQINFO_2_HI 0xff000000
  6251. #define WMI_UNIFIED_FREQINFO_2_HI_S 24
  6252. /*
  6253. * Please keep in mind that these _SET macros break macro side effect
  6254. * assumptions; don't be clever with them.
  6255. */
  6256. #define WMI_UNIFIED_FREQ_INFO_GET(hdr, f) \
  6257. (WMI_F_MS((hdr)->freq_info_1, \
  6258. WMI_UNIFIED_FREQINFO_##f##_LO) \
  6259. | (WMI_F_MS((hdr)->freq_info_1, \
  6260. WMI_UNIFIED_FREQINFO_##f##_HI) << 8))
  6261. #define WMI_UNIFIED_FREQ_INFO_SET(hdr, f, v) \
  6262. do { \
  6263. WMI_F_RMW((hdr)->freq_info_1, (v) & 0xff, \
  6264. WMI_UNIFIED_FREQINFO_##f##_LO); \
  6265. WMI_F_RMW((hdr)->freq_info_1, ((v) >> 8) & 0xff, \
  6266. WMI_UNIFIED_FREQINFO_##f##_HI); \
  6267. } while (0)
  6268. #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB 0x000000ff
  6269. #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB_S 0
  6270. #define WMI_UNIFIED_FREQINFO_2_CHWIDTH 0x0000ff00
  6271. #define WMI_UNIFIED_FREQINFO_2_CHWIDTH_S 8
  6272. #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE 0x00ff0000
  6273. #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE_S 16
  6274. #define WMI_UNIFIED_RSSI_COMB_GET(hdr) \
  6275. ((int8_t) (WMI_F_MS((hdr)->freq_info_2, \
  6276. WMI_UNIFIED_FREQINFO_2_RSSI_COMB)))
  6277. #define WMI_UNIFIED_RSSI_COMB_SET(hdr, v) \
  6278. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  6279. WMI_UNIFIED_FREQINFO_2_RSSI_COMB);
  6280. #define WMI_UNIFIED_CHWIDTH_GET(hdr) \
  6281. WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_CHWIDTH)
  6282. #define WMI_UNIFIED_CHWIDTH_SET(hdr, v) \
  6283. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  6284. WMI_UNIFIED_FREQINFO_2_CHWIDTH);
  6285. #define WMI_UNIFIED_PHYERRCODE_GET(hdr) \
  6286. WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_PHYERRCODE)
  6287. #define WMI_UNIFIED_PHYERRCODE_SET(hdr, v) \
  6288. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  6289. WMI_UNIFIED_FREQINFO_2_PHYERRCODE);
  6290. #define WMI_UNIFIED_CHAIN_0 0x0000ffff
  6291. #define WMI_UNIFIED_CHAIN_0_S 0
  6292. #define WMI_UNIFIED_CHAIN_1 0xffff0000
  6293. #define WMI_UNIFIED_CHAIN_1_S 16
  6294. #define WMI_UNIFIED_CHAIN_2 0x0000ffff
  6295. #define WMI_UNIFIED_CHAIN_2_S 0
  6296. #define WMI_UNIFIED_CHAIN_3 0xffff0000
  6297. #define WMI_UNIFIED_CHAIN_3_S 16
  6298. #define WMI_UNIFIED_CHAIN_4 0x0000ffff
  6299. #define WMI_UNIFIED_CHAIN_4_S 0
  6300. #define WMI_UNIFIED_CHAIN_5 0xffff0000
  6301. #define WMI_UNIFIED_CHAIN_5_S 16
  6302. #define WMI_UNIFIED_CHAIN_6 0x0000ffff
  6303. #define WMI_UNIFIED_CHAIN_6_S 0
  6304. #define WMI_UNIFIED_CHAIN_7 0xffff0000
  6305. #define WMI_UNIFIED_CHAIN_7_S 16
  6306. #define WMI_UNIFIED_CHAIN_0_FIELD nf_list_1
  6307. #define WMI_UNIFIED_CHAIN_1_FIELD nf_list_1
  6308. #define WMI_UNIFIED_CHAIN_2_FIELD nf_list_2
  6309. #define WMI_UNIFIED_CHAIN_3_FIELD nf_list_2
  6310. #define WMI_UNIFIED_CHAIN_4_FIELD nf_list_3
  6311. #define WMI_UNIFIED_CHAIN_5_FIELD nf_list_3
  6312. #define WMI_UNIFIED_CHAIN_6_FIELD nf_list_4
  6313. #define WMI_UNIFIED_CHAIN_7_FIELD nf_list_4
  6314. #define WMI_UNIFIED_NF_CHAIN_GET(hdr, c) \
  6315. ((int16_t) (WMI_F_MS((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD, \
  6316. WMI_UNIFIED_CHAIN_##c)))
  6317. #define WMI_UNIFIED_NF_CHAIN_SET(hdr, c, nf) \
  6318. WMI_F_RMW((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD, (nf) & 0xffff, \
  6319. WMI_UNIFIED_CHAIN_##c);
  6320. /*
  6321. * For now, this matches what the underlying hardware is doing.
  6322. * Update ar6000ProcRxDesc() to use these macros when populating
  6323. * the rx descriptor and then we can just copy the field over
  6324. * to the WMI PHY notification without worrying about breaking
  6325. * things.
  6326. */
  6327. #define WMI_UNIFIED_RSSI_CHAN_PRI20 0x000000ff
  6328. #define WMI_UNIFIED_RSSI_CHAN_PRI20_S 0
  6329. #define WMI_UNIFIED_RSSI_CHAN_SEC20 0x0000ff00
  6330. #define WMI_UNIFIED_RSSI_CHAN_SEC20_S 8
  6331. #define WMI_UNIFIED_RSSI_CHAN_SEC40 0x00ff0000
  6332. #define WMI_UNIFIED_RSSI_CHAN_SEC40_S 16
  6333. #define WMI_UNIFIED_RSSI_CHAN_SEC80 0xff000000
  6334. #define WMI_UNIFIED_RSSI_CHAN_SEC80_S 24
  6335. #define WMI_UNIFIED_RSSI_CHAN_SET(hdr, c, ch, rssi) \
  6336. WMI_F_RMW((hdr)->rssi_chain##c, (rssi) & 0xff, \
  6337. WMI_UNIFIED_RSSI_CHAN_##ch);
  6338. #define WMI_UNIFIED_RSSI_CHAN_GET(hdr, c, ch) \
  6339. ((int8_t) (WMI_F_MS((hdr)->rssi_chain##c, \
  6340. WMI_UNIFIED_RSSI_CHAN_##ch)))
  6341. #define WMI_UNIFIED_CHAIN_RSSI_GET(tlv, chain_idx, band) \
  6342. ((A_INT8) WMI_F_MS((tlv)->chain_rssi[chain_idx], WMI_UNIFIED_RSSI_CHAN_ ## band))
  6343. typedef struct {
  6344. /** Phy error event header */
  6345. wmi_single_phyerr_rx_hdr hdr;
  6346. /** frame buffer */
  6347. WMI_VAR_LEN_ARRAY1(A_UINT8, bufp);
  6348. } wmi_single_phyerr_rx_event;
  6349. /* PHY ERROR MASK 0 */
  6350. /* bits 1:0 defined but not published */
  6351. #define WMI_PHY_ERROR_MASK0_RADAR (1 << 2)
  6352. /* bits 23:3 defined but not published */
  6353. #define WMI_PHY_ERROR_MASK0_FALSE_RADAR_EXT (1 << 24)
  6354. /* bits 25:24 defined but not published */
  6355. #define WMI_PHY_ERROR_MASK0_SPECTRAL_SCAN (1 << 26)
  6356. /* bits 31:27 defined but not published */
  6357. /* PHY ERROR MASK 1 */
  6358. /* bits 13:0 defined but not published */
  6359. /* bits 31:14 reserved */
  6360. /* PHY ERROR MASK 2 */
  6361. /* bits 31:0 reserved */
  6362. typedef struct {
  6363. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_comb_phyerr_rx_hdr */
  6364. /** Phy error phy error count */
  6365. A_UINT32 num_phyerr_events;
  6366. A_UINT32 tsf_l32;
  6367. A_UINT32 tsf_u32;
  6368. A_UINT32 buf_len;
  6369. union {
  6370. A_UINT32 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
  6371. /** pdev_id for identifying the MAC
  6372. * See macros starting with WMI_PDEV_ID_ for values.
  6373. */
  6374. A_UINT32 pdev_id;
  6375. };
  6376. A_UINT32 rsPhyErrMask0; /* see WMI_PHY_ERROR_MASK0 */
  6377. A_UINT32 rsPhyErrMask1; /* see WMI_PHY_ERROR_MASK1 */
  6378. A_UINT32 rsPhyErrMask2; /* see WMI_PHY_ERROR_MASK2 */
  6379. /* This TLV is followed by array of bytes:
  6380. * frame buffer - contains multiple payloads in the order:
  6381. * header - payload, header - payload...
  6382. * (The header is of type: wmi_single_phyerr_rx_hdr)
  6383. * A_UINT8 bufp[];
  6384. * The extension hdr will repeat num_phyerr_events of times
  6385. * and will have 1:1 mapping with above header. i.e the 1st
  6386. * ext_rx_hdr will belong to 1st phyerr_rx_hdr and so on.
  6387. * wmi_single_phyerr_ext_rx_hdr single_phyerr_ext;
  6388. */
  6389. } wmi_comb_phyerr_rx_hdr;
  6390. /* WMI MGMT TX */
  6391. typedef struct {
  6392. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_hdr */
  6393. /** unique id identifying the VDEV, generated by the caller */
  6394. A_UINT32 vdev_id;
  6395. /** peer MAC address */
  6396. wmi_mac_addr peer_macaddr;
  6397. /** xmit rate */
  6398. A_UINT32 tx_rate;
  6399. /** xmit power */
  6400. A_UINT32 tx_power;
  6401. /** Buffer length in bytes */
  6402. A_UINT32 buf_len;
  6403. /* This TLV is followed by array of bytes:
  6404. * A_UINT8 bufp[]; <-- management frame buffer
  6405. */
  6406. } wmi_mgmt_tx_hdr;
  6407. #define WMI_TX_SEND_PARAM_EXT_META_ID_GET(tx_param_ext_dword0) WMI_GET_BITS(tx_param_dword0, 0, 3)
  6408. #define WMI_TX_SEND_PARAM_EXT_META_ID_SET(tx_param_ext_dword0, value) WMI_SET_BITS(tx_param_dword0, 0, 3, value)
  6409. #define WMI_TX_SEND_PARAM_EXT_WIN_SIZE_GET(tx_param_ext_dword1) WMI_GET_BITS(tx_param_dword1, 0, 16)
  6410. #define WMI_TX_SEND_PARAM_EXT_WIN_SIZE_SET(tx_param_ext_dword1, value) WMI_SET_BITS(tx_param_dword1, 0, 16, value)
  6411. typedef enum {
  6412. WMI_TX_SEND_PARAMS_EXT_META_ADDBA = 0x0,
  6413. WMI_TX_SEND_PARAMS_EXT_META_DELBA = 0x1,
  6414. } wmi_tx_send_params_ext_meta_t;
  6415. typedef struct {
  6416. A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_tx_send_params_ext) and len */
  6417. union {
  6418. struct {
  6419. 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 */
  6420. reserved_0 : 29; /* Dedicated for commonly used parameters only */
  6421. };
  6422. A_UINT32 tx_param_ext_dword0;
  6423. };
  6424. union {
  6425. struct {
  6426. /* WMI_TX_SEND_PARAMS_EXT_META_ADDBA */
  6427. A_UINT32 win_size : 16,
  6428. reserved_1 : 16;
  6429. };
  6430. A_UINT32 tx_param_ext_dword1;
  6431. };
  6432. } wmi_tx_send_params_ext;
  6433. #define WMI_TX_SEND_PARAM_PWR_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 0, 8)
  6434. #define WMI_TX_SEND_PARAM_PWR_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 0, 8, value)
  6435. #define WMI_TX_SEND_PARAM_MCS_MASK_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 8, 12)
  6436. #define WMI_TX_SEND_PARAM_MCS_MASK_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 8, 12, value)
  6437. #define WMI_TX_SEND_PARAM_NSS_MASK_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 20, 8)
  6438. #define WMI_TX_SEND_PARAM_NSS_MASK_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 20, 8, value)
  6439. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 28, 4)
  6440. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 28, 4, value)
  6441. #define WMI_TX_SEND_PARAM_CHAIN_MASK_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 0, 8)
  6442. #define WMI_TX_SEND_PARAM_CHAIN_MASK_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 0, 8, value)
  6443. #define WMI_TX_SEND_PARAM_BW_MASK_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 8, 7)
  6444. #define WMI_TX_SEND_PARAM_BW_MASK_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 8, 7, value)
  6445. #define WMI_TX_SEND_PARAM_PREAMBLE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 15, 5)
  6446. #define WMI_TX_SEND_PARAM_PREAMBLE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 15, 5, value)
  6447. #define WMI_TX_SEND_PARAM_FRAME_TYPE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 20, 1)
  6448. #define WMI_TX_SEND_PARAM_FRAME_TYPE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 20, 1, value)
  6449. #define WMI_TX_SEND_PARAM_CFR_CAPTURE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 21, 1)
  6450. #define WMI_TX_SEND_PARAM_CFR_CAPTURE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 21, 1, value)
  6451. #define WMI_TX_SEND_PARAM_BEAMFORM_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 22, 1)
  6452. #define WMI_TX_SEND_PARAM_BEAMFORM_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 22, 1, value)
  6453. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_EXT_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 23, 3)
  6454. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_EXT_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 23, 3, value)
  6455. /* TX_SEND flags:
  6456. * Bit 0: set wrong txkey
  6457. * There is one special WFA test case in STA or AP, setting wrong txkey
  6458. * in disassoc or deauth with PMF enabled to verify if peer disconnected
  6459. * Bit 1: set ps buffering for SA query frame
  6460. */
  6461. #define WMI_TX_SEND_FLAG_SET_WRONG_KEY 0x00000001
  6462. #define WMI_TX_SEND_FLAG_SET_WRONG_KEY_GET(tx_flags) WMI_GET_BITS(tx_flags, 0, 1)
  6463. #define WMI_TX_SEND_FLAG_SET_WRONG_KEY_SET(tx_flags, value) WMI_SET_BITS(tx_flags, 0, 1, value)
  6464. #define WMI_TX_SEND_FLAG_SET_PS_BUFFERING_FOR_SA_QUERY 0x00000002
  6465. #define WMI_TX_SEND_FLAG_SET_PS_BUFFERING_FOR_SA_QUERY_GET(tx_flags) WMI_GET_BITS(tx_flags, 1, 1)
  6466. #define WMI_TX_SEND_FLAG_SET_PS_BUFFERING_FOR_SA_QUERY_SET(tx_flags, value) WMI_SET_BITS(tx_flags, 1, 1, value)
  6467. #define WMI_TX_SEND_FLAG_SET_IS_SA_QUERY 0x00000004
  6468. #define WMI_TX_SEND_FLAG_SET_IS_SA_QUERY_GET(tx_flags) WMI_GET_BITS(tx_flags, 2, 1)
  6469. #define WMI_TX_SEND_FLAG_SET_IS_SA_QUERY_SET(tx_flags, value) WMI_SET_BITS(tx_flags, 2, 1, value)
  6470. #define WMI_TX_SEND_FLAG_SET_P2P_FRAME_ON_STA_VDEV 0x00000008
  6471. #define WMI_TX_SEND_FLAG_SET_P2P_FRAME_ON_STA_VDEV_GET(tx_flags) WMI_GET_BITS(tx_flags, 3, 1)
  6472. #define WMI_TX_SEND_FLAG_SET_P2P_FRAME_ON_STA_VDEV_SET(tx_flags, value) WMI_SET_BITS(tx_flags, 3, 1, value)
  6473. typedef struct {
  6474. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_send_params */
  6475. union {
  6476. struct {
  6477. /* DWORD 0: tx power, tx rate, retry_limit */
  6478. A_UINT32
  6479. /* pwr -
  6480. * Specify what power the tx frame needs to be transmitted at.
  6481. * The power a signed (two's complement) value is in units of 0.5 dBm.
  6482. * The value needs to be appropriately sign-extended when extracting
  6483. * the value from the message and storing it in a variable that is
  6484. * larger than A_INT8. (fw automatically handles this sign-extension.)
  6485. * If the transmission uses multiple tx chains, this power spec is
  6486. * the total transmit power, assuming incoherent combination of
  6487. * per-chain power to produce the total power.
  6488. */
  6489. pwr: 8,
  6490. /* mcs_mask -
  6491. * Specify the allowable values for MCS index (modulation and coding)
  6492. * to use for transmitting the frame.
  6493. *
  6494. * For HT / VHT preamble types, this mask directly corresponds to
  6495. * the HT or VHT MCS indices that are allowed. For each bit N set
  6496. * within the mask, MCS index N is allowed for transmitting the frame.
  6497. * For legacy CCK and OFDM rates, separate bits are provided for CCK
  6498. * rates versus OFDM rates, so the host has the option of specifying
  6499. * that the target must transmit the frame with CCK or OFDM rates
  6500. * (not HT or VHT), but leaving the decision to the target whether
  6501. * to use CCK or OFDM.
  6502. *
  6503. * For CCK and OFDM, the bits within this mask are interpreted as
  6504. * follows:
  6505. * bit 0 -> CCK 1 Mbps rate is allowed
  6506. * bit 1 -> CCK 2 Mbps rate is allowed
  6507. * bit 2 -> CCK 5.5 Mbps rate is allowed
  6508. * bit 3 -> CCK 11 Mbps rate is allowed
  6509. * bit 4 -> OFDM BPSK modulation, 1/2 coding rate is allowed
  6510. * bit 5 -> OFDM BPSK modulation, 3/4 coding rate is allowed
  6511. * bit 6 -> OFDM QPSK modulation, 1/2 coding rate is allowed
  6512. * bit 7 -> OFDM QPSK modulation, 3/4 coding rate is allowed
  6513. * bit 8 -> OFDM 16-QAM modulation, 1/2 coding rate is allowed
  6514. * bit 9 -> OFDM 16-QAM modulation, 3/4 coding rate is allowed
  6515. * bit 10 -> OFDM 64-QAM modulation, 2/3 coding rate is allowed
  6516. * bit 11 -> OFDM 64-QAM modulation, 3/4 coding rate is allowed
  6517. *
  6518. * The MCS index specification needs to be compatible with the
  6519. * bandwidth mask specification. For example, a MCS index == 9
  6520. * specification is inconsistent with a preamble type == VHT,
  6521. * Nss == 1, and channel bandwidth == 20 MHz.
  6522. *
  6523. * Furthermore, the host has only a limited ability to specify to
  6524. * the target to select from HT + legacy rates, or VHT + legacy rates,
  6525. * since this mcs_mask can specify either HT/VHT rates or legacy rates.
  6526. * If no bits are set, target can choose what MCS type to use.
  6527. */
  6528. mcs_mask: 12,
  6529. /* nss_mask -
  6530. * Specify which numbers of spatial streams (MIMO factor) are permitted.
  6531. * Each bit in this mask corresponds to a Nss value:
  6532. * bit 0: if set, Nss = 1 (non-MIMO) is permitted
  6533. * bit 1: if set, Nss = 2 (2x2 MIMO) is permitted
  6534. * bit 2: if set, Nss = 3 (3x3 MIMO) is permitted
  6535. * bit 3: if set, Nss = 4 (4x4 MIMO) is permitted
  6536. * bit 4: if set, Nss = 5 (5x5 MIMO) is permitted
  6537. * bit 5: if set, Nss = 6 (6x6 MIMO) is permitted
  6538. * bit 6: if set, Nss = 7 (7x7 MIMO) is permitted
  6539. * bit 7: if set, Nss = 8 (8x8 MIMO) is permitted
  6540. * The values in the Nss mask must be suitable for the recipient, e.g.
  6541. * a value of 0x4 (Nss = 3) cannot be specified for a tx frame to a
  6542. * recipient which only supports 2x2 MIMO.
  6543. * If no bits are set, target can choose what NSS type to use.
  6544. */
  6545. nss_mask: 8,
  6546. /* retry_limit -
  6547. * Specify the maximum number of transmissions, including the
  6548. * initial transmission, to attempt before giving up if no ack
  6549. * is received.
  6550. * If the tx rate is specified, then all retries shall use the
  6551. * same rate as the initial transmission.
  6552. * If no tx rate is specified, the target can choose whether to
  6553. * retain the original rate during the retransmissions, or to
  6554. * fall back to a more robust rate.
  6555. */
  6556. retry_limit: 4;
  6557. };
  6558. A_UINT32 tx_param_dword0;
  6559. };
  6560. union {
  6561. struct {
  6562. /* DWORD 1: tx chain mask, preamble_type, tx BW */
  6563. A_UINT32
  6564. /* chain_mask - specify which chains to transmit from
  6565. * If not set, target will choose what chain_mask to use.
  6566. */
  6567. chain_mask: 8,
  6568. /* The bits in this mask correspond to the values as below
  6569. * bit 0 -> 5MHz
  6570. * bit 1 -> 10MHz
  6571. * bit 2 -> 20MHz
  6572. * bit 3 -> 40MHz
  6573. * bit 4 -> 80MHz
  6574. * bit 5 -> 160MHz
  6575. * bit 6 -> 80_80MHz
  6576. * If no bits are set, target can choose what BW to use.
  6577. */
  6578. bw_mask: 7,
  6579. /* preamble_type_mask -
  6580. * Specify which preamble types (CCK, OFDM, HT, VHT) the target
  6581. * may choose from for transmitting this frame.
  6582. * Each bit in this mask corresponds to a preamble_type value:
  6583. * bit 0: if set, OFDM
  6584. * bit 1: if set, CCK
  6585. * bit 2: if set, HT
  6586. * bit 3: if set, VHT
  6587. * bit 4: if set, HE
  6588. * If no bits are set, target can choose what preamble type to use.
  6589. */
  6590. preamble_type: 5,
  6591. /* Data:1 Mgmt:0 */
  6592. frame_type: 1,
  6593. /* Capture CFR when bit is set */
  6594. cfr_capture: 1,
  6595. /* Enables Beamforming when bit is set */
  6596. en_beamforming: 1,
  6597. /*
  6598. * Extra 3 bits of retry limit defined in tx_param_dword0,
  6599. * to allow maximum 127 retries for specific frames.
  6600. */
  6601. retry_limit_ext: 3,
  6602. reserved1_31_26: 6;
  6603. };
  6604. A_UINT32 tx_param_dword1;
  6605. };
  6606. } wmi_tx_send_params;
  6607. #define WMI_MLO_MGMT_TID 0xFFFFFFFF
  6608. typedef struct {
  6609. A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_mlo_tx_send_params) and len */
  6610. A_UINT32 hw_link_id; /** Unique link id across SOCs, provided by QMI handshake.
  6611. * If WMI_MLO_MGMT_TID then the frame will be queued in the MLO queue
  6612. * If valid hw_link_id
  6613. */
  6614. } wmi_mlo_tx_send_params;
  6615. typedef struct {
  6616. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_send_cmd_fixed_param */
  6617. A_UINT32 vdev_id;
  6618. A_UINT32 desc_id; /* echoed in tx_compl_event */
  6619. A_UINT32 chanfreq; /* MHz units */
  6620. /* WMI_MGMT_TX_SEND_CMDID is used for both pass by value and
  6621. * pass by reference WMI management frames.
  6622. *
  6623. * a) If the command is for pass by reference,
  6624. * paddr_lo and padd_hi will hold the address of remote/host buffer
  6625. * b) If the command is for pass by value,
  6626. * paddr_lo and paddr_hi will be NULL.
  6627. */
  6628. A_UINT32 paddr_lo;
  6629. A_UINT32 paddr_hi;
  6630. A_UINT32 frame_len;
  6631. A_UINT32 buf_len; /** Buffer length in bytes */
  6632. /*
  6633. * The frame which will have tx_params_valid set will be always be RAW
  6634. * frame, as it will be tx'ed on non-pause tid
  6635. */
  6636. A_UINT32 tx_params_valid;
  6637. /* tx_flags:
  6638. * Extra flags when tx_params_valid is 0.
  6639. * Refer to WMI_TX_SEND_FLAG_xxx defs regarding the meaning of the
  6640. * bits within this field.
  6641. */
  6642. A_UINT32 tx_flags;
  6643. /* peer_rssi:
  6644. * If non-zero, indicates saved peer beacon/probe resp RSSI (dBm units)
  6645. * ONLY for init connection auth/assoc pkt.
  6646. */
  6647. A_INT32 peer_rssi;
  6648. /* This TLV is followed by array of bytes: First 64 bytes of management frame
  6649. * A_UINT8 bufp[];
  6650. */
  6651. /* This TLV is followed by wmi_tx_send_params
  6652. * wmi_tx_send_params tx_send_params;
  6653. * wmi_mlo_tx_send_params mlo_tx_send_params[];
  6654. * Note: WMI_MLO_MGMT_TID path validated for specific scenario
  6655. * (BTM Usecase). Full support is not available.
  6656. * wmi_tx_send_params_ext tx_send_params_ext[0 or 1];
  6657. */
  6658. } wmi_mgmt_tx_send_cmd_fixed_param;
  6659. typedef struct {
  6660. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offchan_data_tx_send_cmd_fixed_param */
  6661. A_UINT32 vdev_id;
  6662. A_UINT32 desc_id; /* echoed in tx_compl_event */
  6663. A_UINT32 chanfreq; /* MHz units */
  6664. A_UINT32 paddr_lo;
  6665. A_UINT32 paddr_hi;
  6666. A_UINT32 frame_len;
  6667. A_UINT32 buf_len; /** Buffer length in bytes */
  6668. /* The frame which will have tx_params_valid set will be always be RAW
  6669. * frame, as it will be tx'ed on non-pause tid
  6670. */
  6671. A_UINT32 tx_params_valid;
  6672. /* This TLV is followed by array of bytes: First 64 bytes of frame
  6673. * A_UINT8 bufp[];
  6674. */
  6675. /* This TLV is followed by wmi_tx_send_params
  6676. * wmi_tx_send_params tx_send_params;
  6677. */
  6678. } wmi_offchan_data_tx_send_cmd_fixed_param;
  6679. typedef struct {
  6680. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_qos_null_frame_tx_send_cmd_fixed_param */
  6681. A_UINT32 vdev_id;
  6682. A_UINT32 desc_id; /* echoed in tx_compl_event */
  6683. A_UINT32 paddr_lo; /* paddr_lo and padd_hi will hold the address of remote/host buffer, which is physical address of frame */
  6684. A_UINT32 paddr_hi;
  6685. A_UINT32 frame_len; /* Actual length of frame in bytes*/
  6686. A_UINT32 buf_len; /** Buffer length in bytes, length of data DMA'ed to FW from host */
  6687. /* This fixed_param TLV is followed by the TLVs listed below:
  6688. * 1. ARRAY_BYTE TLV: First buf_len (expected to be 64) bytes of frame
  6689. * A_UINT8 bufp[];
  6690. * 2. wmi_tx_send_params tx_send_params;
  6691. */
  6692. } wmi_qos_null_frame_tx_send_cmd_fixed_param;
  6693. typedef struct {
  6694. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_event_fixed_param */
  6695. A_UINT32 value;
  6696. } wmi_echo_event_fixed_param;
  6697. typedef struct {
  6698. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_cmd_fixed_param */
  6699. A_UINT32 value;
  6700. } wmi_echo_cmd_fixed_param;
  6701. typedef struct {
  6702. A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to WMITLV_TAG_STRUC_wmi_mlo_link_disable_request_event_fixed_param */
  6703. /** AP MLD address request to be disabled some set of link */
  6704. wmi_mac_addr mld_addr;
  6705. /** Request link id set to disable */
  6706. A_UINT32 linkid_bitmap;
  6707. } wmi_mlo_link_disable_request_event_fixed_param;
  6708. typedef enum {
  6709. /**
  6710. * Projects support to offload regulatory database by default.
  6711. * If don`t offload regulatory database, host can set this bit.
  6712. */
  6713. WMI_REGDOMAIN_DATABASE_NO_OFFLOAD_BITMASK = 0x00000001,
  6714. } WMI_REGDOMAIN_BITMASK;
  6715. typedef struct {
  6716. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param */
  6717. /** pdev_id for identifying the MAC
  6718. * See macros starting with WMI_PDEV_ID_ for values.
  6719. */
  6720. A_UINT32 pdev_id;
  6721. /** reg domain code */
  6722. A_UINT32 reg_domain;
  6723. A_UINT32 reg_domain_2G; /* fulfil 2G domain ID */
  6724. A_UINT32 reg_domain_5G; /* fulfil 5G domain ID */
  6725. A_UINT32 conformance_test_limit_2G; /* 2G whole band CTL index */
  6726. A_UINT32 conformance_test_limit_5G; /* 5G whole band CTL index */
  6727. A_UINT32 dfs_domain;
  6728. /**
  6729. * The below conformance_test_limit index fields are for supporting the
  6730. * 5G sub-band CTL feature.
  6731. * Conformance test limits (CTLs) are the product-specific
  6732. * regulatory-compliant powers stored in the board data file (BDF).
  6733. * These CTLs within the BDF are identified by CTL index values.
  6734. * For example, the BDF file is expected to contain CTL data for
  6735. * FCC (CTL index = 0x10), ETSI (CTL index = 0x30),
  6736. * Japan/MKK (CTL index = 0x40), Korea (CTL index = 0x50),
  6737. * and China (CTL index = 0x60) CTL regions.
  6738. * The target FW will use the CTL indices specified in this message to
  6739. * find a BDF CTL entry with a matching CTL index value, and then use
  6740. * that CTL as one of the inputs into the tx power limit computation.
  6741. * A CTL index value of 0x0 is invalid, and will be ignored by the FW.
  6742. */
  6743. A_UINT32 conformance_test_limit_5G_subband_UNII1;
  6744. A_UINT32 conformance_test_limit_5G_subband_UNII2a;
  6745. A_UINT32 conformance_test_limit_5G_subband_UNII2c;
  6746. A_UINT32 conformance_test_limit_5G_subband_UNII3;
  6747. A_UINT32 conformance_test_limit_5G_subband_UNII4;
  6748. /**
  6749. * The below conformance_test_limit index fields are like the above,
  6750. * but are for supporting the 6G sub-band CTL feature.
  6751. */
  6752. A_UINT32 conformance_test_limit_6G_subband_UNII5;
  6753. A_UINT32 conformance_test_limit_6G_subband_UNII6;
  6754. A_UINT32 conformance_test_limit_6G_subband_UNII7;
  6755. A_UINT32 conformance_test_limit_6G_subband_UNII8;
  6756. /**
  6757. * In 6G sub-band CTL, fulfil 6G domain id and whole band CTL index firstly.
  6758. * Unlike 5G sub-band CTL index fields, role ap and role client have
  6759. * different indices.
  6760. * Each role has 3 sub-band indices due to different power_mode type.
  6761. * Below 3 represent for power_mode types: 0-LPI, 1-SP, 2-VLP
  6762. * Below 2 represent for client_max: 0-default, 1-subordinate
  6763. */
  6764. A_UINT32 reg_domain_6G; /* fulfil 6G domain id */
  6765. A_UINT32 conformance_test_limit_6G; /* 6G whole band CTL index */
  6766. A_UINT32 conformance_test_limit_6G_subband_UNII5_ap[3];
  6767. A_UINT32 conformance_test_limit_6G_subband_UNII6_ap[3];
  6768. A_UINT32 conformance_test_limit_6G_subband_UNII7_ap[3];
  6769. A_UINT32 conformance_test_limit_6G_subband_UNII8_ap[3];
  6770. A_UINT32 conformance_test_limit_6G_subband_UNII5_client[3][2];
  6771. A_UINT32 conformance_test_limit_6G_subband_UNII6_client[3][2];
  6772. A_UINT32 conformance_test_limit_6G_subband_UNII7_client[3][2];
  6773. A_UINT32 conformance_test_limit_6G_subband_UNII8_client[3][2];
  6774. /** reg domain bitmap */
  6775. A_UINT32 regdomain_bitmap;
  6776. } wmi_pdev_set_regdomain_cmd_fixed_param;
  6777. typedef struct {
  6778. /** TRUE for scan start and flase for scan end */
  6779. A_UINT32 scan_start;
  6780. } wmi_pdev_scan_cmd;
  6781. /* WMI support for setting ratemask in target */
  6782. typedef struct {
  6783. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_config_ratemask_fixed_param */
  6784. A_UINT32 vdev_id;
  6785. /*
  6786. * 0 - cck/ofdm
  6787. * 1 - HT
  6788. * 2 - VHT
  6789. * 3 - HE
  6790. * 4 - EHT
  6791. *
  6792. * Rate Bit mask format:
  6793. * <MCS in NSS MAX> ...
  6794. * <MCS MAX, ..., 2, 1, 0 : NSS2>
  6795. * <MCS MAX, ..., 2, 1, 0 : NSS1>
  6796. * EHT Rate Bit Mask format:
  6797. * <MCS in NSS MAX> ...
  6798. * <MCS MAX, ... 2, 1, 0, -1, -2 : NSS2>
  6799. * <MCS MAX, ..., 2, 1, 0, -1(DCM), -2(EHT Dup) : NSS1>
  6800. */
  6801. A_UINT32 type;
  6802. A_UINT32 mask_lower32;
  6803. A_UINT32 mask_higher32;
  6804. A_UINT32 mask_lower32_2;
  6805. A_UINT32 mask_higher32_2;
  6806. } wmi_vdev_config_ratemask_cmd_fixed_param;
  6807. /* nrp action - Filter Neighbor Rx Packets - add/remove filter */
  6808. enum {
  6809. WMI_FILTER_NRP_ACTION_ADD = 0x1,
  6810. WMI_FILTER_NRP_ACTION_REMOVE = 0x2,
  6811. WMI_FILTER_NRP_ACTION_GET_LIST = 0x3,
  6812. }; /* nrp - Neighbor Rx Packets */
  6813. /* nrp type - Filter Neighbor Rx Packets - ap/client addr */
  6814. enum {
  6815. WMI_FILTER_NRP_TYPE_AP_BSSID = 0x1,
  6816. WMI_FILTER_NRP_TYPE_STA_MACADDR = 0x2,
  6817. };
  6818. /* nrp flag - Filter Neighbor Rx Packets
  6819. * (capture flag, 2 & 3 not initially supported)
  6820. */
  6821. enum {
  6822. WMI_FILTER_NRP_CAPTURE_ONLY_RX_PACKETS = 0x1,
  6823. WMI_FILTER_NRP_CAPTURE_ONLY_TX_PACKETS = 0x2,
  6824. WMI_FILTER_NRP_CAPTURE_BOTH_TXRX_PACKETS = 0x3,
  6825. };
  6826. typedef struct {
  6827. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_filter_nrp_config_cmd_fixed_param */
  6828. A_UINT32 vdev_id;
  6829. /* AP Bssid or Client Mac-addr */
  6830. wmi_mac_addr addr;
  6831. /* Add/Remove NRF Filter */
  6832. A_UINT32 action; /* WMI_FILTER_NRP_ACTION enum */
  6833. /* client/ap filter */
  6834. A_UINT32 type; /* WMI_FILTER_NRP_TYPE enum */
  6835. /* optional - tx/rx capture */
  6836. A_UINT32 flag; /* WMI_FILTER_NRP_CAPTURE enum */
  6837. /* BSSID index - index of the BSSID register */
  6838. A_UINT32 bssid_idx;
  6839. } wmi_vdev_filter_nrp_config_cmd_fixed_param; /* Filter for Neighbor Rx Packets */
  6840. /* tx peer filter action - Filter Tx Packets - add/remove filter */
  6841. enum {
  6842. WMI_PEER_TX_FILTER_ACTION_ADD = 1,
  6843. WMI_PEER_TX_FILTER_ACTION_REMOVE = 2,
  6844. WMI_PEER_TX_FILTER_ACTION_ADD_AND_ENABLE_FILTERING = 3,
  6845. WMI_PEER_TX_FILTER_ACTION_REMOVE_AND_CLEAR_FILTERING = 4,
  6846. };
  6847. typedef struct {
  6848. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tx_filter_cmd_fixed_param */
  6849. A_UINT32 vdev_id;
  6850. /* Client MAC addr */
  6851. wmi_mac_addr addr;
  6852. /* Add/Remove monitor_sta Filter */
  6853. A_UINT32 action; /* WMI_PEER_TX_FILTER_ACTION enum */
  6854. } wmi_peer_tx_filter_cmd_fixed_param; /* Filter for TX Packets */
  6855. /* Command to set/unset chip in quiet mode */
  6856. typedef struct {
  6857. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_quiet_cmd_fixed_param */
  6858. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  6859. A_UINT32 period; /*period in TUs*/
  6860. A_UINT32 duration; /*duration in TUs*/
  6861. A_UINT32 next_start; /*offset in TUs*/
  6862. A_UINT32 enabled; /*enable/disable*/
  6863. } wmi_pdev_set_quiet_cmd_fixed_param;
  6864. typedef struct {
  6865. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_quiet_cmd_fixed_param */
  6866. A_UINT32 vdev_id; /* Virtual interface ID */
  6867. A_UINT32 period; /* period in TUs */
  6868. A_UINT32 duration; /* duration in TUs */
  6869. A_UINT32 next_start; /* offset in TUs */
  6870. A_UINT32 enabled; /* enable/disable */
  6871. } wmi_vdev_set_quiet_cmd_fixed_param;
  6872. /*
  6873. * START_STOP flag value: 1 - Start, 0 - Stop
  6874. */
  6875. #define WMI_OFFLOAD_QUIET_FLAG_START_STOP 0x00000001
  6876. /*
  6877. * ONE_SHOT flag value: 1 - One shot, 0 - Repeat
  6878. * This flag is only relevant if the START_STOP flag == 1 (start).
  6879. */
  6880. #define WMI_OFFLOAD_QUIET_FLAG_ONE_SHOT 0x00000002
  6881. /*
  6882. * Enable/Disable sending Quiet IE info in SWBA event from the target
  6883. * 0 - Don't include Quiet IE in WMI SWBA Event
  6884. * 1 - Include Quiet IE in WMI SWBA Event
  6885. */
  6886. #define WMI_OFFLOAD_QUIET_FLAG_INFO_IN_SWBA_START_STOP 0x00000004
  6887. typedef struct {
  6888. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_bcn_offload_ml_quiet_config_params */
  6889. A_UINT32 vdev_id; /* partner vdev_id */
  6890. A_UINT32 hw_link_id; /* hw_link_id: Unique link id across SOCs, got as part of QMI handshake */
  6891. A_UINT32 beacon_interval; /* beacon interval in TU from received beacon of the partner link */
  6892. A_UINT32 period; /* period in TUs */
  6893. A_UINT32 duration; /* duration in TUs */
  6894. A_UINT32 next_start; /* offset in TUs from beacon */
  6895. A_UINT32 flags; /* STOP or START (and single vs. repeated) Quiet IE
  6896. * See WMI_OFFLOAD_QUIET_FLAG_xxx defs.
  6897. */
  6898. } wmi_vdev_bcn_offload_ml_quiet_config_params;
  6899. typedef struct {
  6900. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_bcn_offload_quiet_config_cmd_fixed_param */
  6901. A_UINT32 vdev_id; /* Virtual interface ID */
  6902. A_UINT32 period; /* period in TUs */
  6903. A_UINT32 duration; /* duration in TUs */
  6904. A_UINT32 next_start; /* offset in TUs from beacon */
  6905. A_UINT32 flags; /* STOP or START (and single vs. repeated) Quiet IE
  6906. * See WMI_OFFLOAD_QUIET_FLAG_xxx defs.
  6907. */
  6908. /*
  6909. * This TLV is optionally followed by array of wmi_vdev_bcn_offload_ml_quiet_config_params struct
  6910. * wmi_vdev_bcn_offload_ml_quiet_config_params will have multiple instances equal to num of links in an AP MLD
  6911. * wmi_vdev_bcn_offload_ml_quiet_config_params ml_quiet_param[];
  6912. */
  6913. } wmi_vdev_bcn_offload_quiet_config_cmd_fixed_param;
  6914. typedef struct {
  6915. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_custom_aggr_size_cmd_fixed_param */
  6916. A_UINT32 vdev_id; /* vdev id indicating to which the vdev custom aggregation size will be applied. */
  6917. /* Size for tx aggregation for the vdev mentioned in vdev id
  6918. * (max MPDUs per A-MPDU or max MSDUs per A-MSDU based on aggr_type field)
  6919. */
  6920. A_UINT32 tx_aggr_size;
  6921. A_UINT32 rx_aggr_size; /* Size for rx aggregation (block ack window size limit) for the vdev mentioned in vdev id */
  6922. /*
  6923. * To set TX aggregation size limits per VDEV per AC
  6924. * bits 1:0 (ac):
  6925. * Access Category (0x0=BE, 0x1=BK, 0x2=VI, 0x3=VO)
  6926. * If tx_ac_enable bit is not set, tx_aggr_size is applied
  6927. * for all Access Categories
  6928. * bit 2 (aggr_type): TX Aggregation Type (0=A-MPDU, 1=A-MSDU)
  6929. * bit 3 (tx_aggr_size_disable): If set tx_aggr_size is invalid
  6930. * bit 4 (rx_aggr_size_disable): If set rx_aggr_size is invalid
  6931. * bit 5 (tx_ac_enable): If set, above ac bitmap is valid.
  6932. * bit 6 (256 BA support enable) If set, Default 256 BA size is expected
  6933. * from host
  6934. * bit 7 (1024 BA support enable) If set, Default 1024 BA size is expected
  6935. * from host
  6936. * bits 31:8: Reserved bits. should be set to zero.
  6937. */
  6938. A_UINT32 enable_bitmap;
  6939. } wmi_vdev_set_custom_aggr_size_cmd_fixed_param;
  6940. typedef enum {
  6941. WMI_VDEV_CUSTOM_AGGR_TYPE_AMPDU = 0,
  6942. WMI_VDEV_CUSTOM_AGGR_TYPE_AMSDU = 1,
  6943. WMI_VDEV_CUSTOM_AGGR_TYPE_MAX,
  6944. } wmi_vdev_custom_aggr_type_t;
  6945. #define WMI_VDEV_CUSTOM_AGGR_AC_BITPOS 0
  6946. #define WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS 2
  6947. #define WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS 2
  6948. #define WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS 1
  6949. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS 3
  6950. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS 1
  6951. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS 4
  6952. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS 1
  6953. #define WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS 5
  6954. #define WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS 1
  6955. #define WMI_VDEV_CUSTOM_AGGR_256_BA_EN_BITPOS 6
  6956. #define WMI_VDEV_CUSTOM_AGGR_256_BA_EN_NUM_BITS 1
  6957. #define WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_BITPOS 7
  6958. #define WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_NUM_BITS 1
  6959. #define WMI_VDEV_CUSTOM_AGGR_AC_SET(param, value) \
  6960. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_AC_BITPOS, \
  6961. WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS, value)
  6962. #define WMI_VDEV_CUSTOM_AGGR_AC_GET(param) \
  6963. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_AC_BITPOS, \
  6964. WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS)
  6965. #define WMI_VDEV_CUSTOM_AGGR_TYPE_SET(param, value) \
  6966. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS, \
  6967. WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS, value)
  6968. #define WMI_VDEV_CUSTOM_AGGR_TYPE_GET(param) \
  6969. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS, \
  6970. WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS)
  6971. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_SET(param, value) \
  6972. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS, \
  6973. WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS, value)
  6974. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_GET(param) \
  6975. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS, \
  6976. WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS)
  6977. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_SET(param, value) \
  6978. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS, \
  6979. WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS, value)
  6980. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_GET(param) \
  6981. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS, \
  6982. WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS)
  6983. #define WMI_VDEV_CUSTOM_TX_AC_EN_SET(param, value) \
  6984. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS, \
  6985. WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS, value)
  6986. #define WMI_VDEV_CUSTOM_TX_AC_EN_GET(param) \
  6987. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS, \
  6988. WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS)
  6989. #define WMI_VDEV_CUSTOM_AGGR_256_BA_EN_SET(param, value) \
  6990. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_256_BA_EN_BITPOS, \
  6991. WMI_VDEV_CUSTOM_AGGR_256_BA_EN_NUM_BITS, value)
  6992. #define WMI_VDEV_CUSTOM_AGGR_256_BA_EN_GET(param) \
  6993. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_256_BA_EN_BITPOS, \
  6994. WMI_VDEV_CUSTOM_AGGR_256_BA_EN_NUM_BITS)
  6995. #define WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_SET(param, value) \
  6996. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_BITPOS, \
  6997. WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_NUM_BITS, value)
  6998. #define WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_GET(param) \
  6999. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_BITPOS, \
  7000. WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_NUM_BITS)
  7001. typedef enum {
  7002. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_NONAGGR = 0,
  7003. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_AGGR = 1,
  7004. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_MAX,
  7005. } wmi_vdev_custom_sw_retry_type_t;
  7006. typedef struct {
  7007. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param */
  7008. A_UINT32 vdev_id; /* vdev id indicating to which the vdev custom software retries will be applied. */
  7009. A_UINT32 ac_type; /* access category (VI, VO, BE, BK) enum wmi_traffic_ac */
  7010. A_UINT32 sw_retry_type; /* 0 = non-aggr retry, 1 = aggr retry (wmi_vdev_custom_sw_retry_type_t enum) */
  7011. A_UINT32 sw_retry_th; /* max retry count per AC base on ac_type for the vdev mentioned in vdev id*/
  7012. } wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param;
  7013. typedef struct {
  7014. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_chainmask_config_cmd_fixed_param */
  7015. A_UINT32 tlv_header;
  7016. /* vdev id indicating to which the vdev, this chainmask configuration will be applied. */
  7017. A_UINT32 vdev_id;
  7018. /* number of chains to use for transmissions in 2.4 GHz band
  7019. * If vdev is MLO vdev, below 2g params apply to all 2.4 GHz band links
  7020. * If vdev is MLO vdev, below 5g params apply to all 5/6 GHz band links
  7021. */
  7022. A_UINT32 num_tx_chains_2g;
  7023. /* number of chains to use for reception in 2.4 GHz band */
  7024. A_UINT32 num_rx_chains_2g;
  7025. /* nss to use for transmissions in 2.4 GHz band */
  7026. A_UINT32 tx_nss_2g;
  7027. /* nss to use for reception in 2.4 GHz band */
  7028. A_UINT32 rx_nss_2g;
  7029. /* number of chains to use for 11b transmissions. Valid only in 2.4 GHz */
  7030. A_UINT32 num_tx_chains_b;
  7031. /* number of chains to use for 11g transmissions. Valid only in 2.4 GHz */
  7032. A_UINT32 num_tx_chains_g;
  7033. /* number of chains to use for transmissions in 5 GHz band */
  7034. A_UINT32 num_tx_chains_5g;
  7035. /* number of chains to use for reception in 5 GHz band */
  7036. A_UINT32 num_rx_chains_5g;
  7037. /* nss to use for transmissions in 5 GHz band */
  7038. A_UINT32 tx_nss_5g;
  7039. /* nss to use for reception in 5 GHz band */
  7040. A_UINT32 rx_nss_5g;
  7041. /* number of chains to use for 11a transmissions. Valid only in 5 GHz */
  7042. A_UINT32 num_tx_chains_a;
  7043. /* If non-zero then use only one chain for TX when connection tx_nss is 1 in 2.4 GHz */
  7044. A_UINT32 disable_tx_mrc_2g;
  7045. /* If non-zero then use only one chain for RX when connection rx_nss is 1 in 2.4 GHz */
  7046. A_UINT32 disable_rx_mrc_2g;
  7047. /* If non-zero then use only one chain for TX when connection tx_nss is 1 in 5 GHz */
  7048. A_UINT32 disable_tx_mrc_5g;
  7049. /* If non-zero then use only one chain for RX when connection rx_nss is 1 in 5 GHz */
  7050. A_UINT32 disable_rx_mrc_5g;
  7051. /* Whether fast chain selection is needed when TX chain num is 1 */
  7052. A_UINT32 fast_chain_selection;
  7053. /* RSSI delta threshold to determine better chain, units: dB */
  7054. A_UINT32 better_chain_rssi_threshold;
  7055. } wmi_vdev_chainmask_config_cmd_fixed_param;
  7056. /*
  7057. * Command to enable/disable Green AP Power Save.
  7058. * This helps conserve power during AP operation. When the AP has no
  7059. * stations associated with it, the host can enable Green AP Power Save
  7060. * to request the firmware to shut down all but one transmit and receive
  7061. * chains.
  7062. */
  7063. typedef struct {
  7064. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_green_ap_ps_enable_cmd_fixed_param */
  7065. /** pdev_id for identifying the MAC
  7066. * See macros starting with WMI_PDEV_ID_ for values.
  7067. */
  7068. A_UINT32 pdev_id;
  7069. A_UINT32 enable; /*1:enable, 0:disable*/
  7070. } wmi_pdev_green_ap_ps_enable_cmd_fixed_param;
  7071. #define MAX_HT_IE_LEN 32
  7072. /* DEPRECATED */
  7073. typedef struct {
  7074. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ht_ie_cmd_fixed_param */
  7075. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  7076. A_UINT32 ie_len; /*length of the ht ie in the TLV ie_data[] */
  7077. A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
  7078. A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
  7079. /** The TLV for the HT IE follows:
  7080. * A_UINT32 ie_data[];
  7081. */
  7082. } wmi_pdev_set_ht_ie_cmd_fixed_param;
  7083. #define MAX_VHT_IE_LEN 32
  7084. /* DEPRECATED */
  7085. typedef struct {
  7086. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_vht_ie_cmd_fixed_param */
  7087. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  7088. A_UINT32 ie_len; /*length of the vht ie in the TLV ie_data[] */
  7089. A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
  7090. A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
  7091. /** The TLV for the VHT IE follows:
  7092. * A_UINT32 ie_data[];
  7093. */
  7094. } wmi_pdev_set_vht_ie_cmd_fixed_param;
  7095. typedef struct {
  7096. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param */
  7097. /** pdev_id for identifying the MAC
  7098. * See macros starting with WMI_PDEV_ID_ for values.
  7099. */
  7100. A_UINT32 pdev_id;
  7101. wmi_mac_addr base_macaddr;
  7102. } wmi_pdev_set_base_macaddr_cmd_fixed_param;
  7103. enum wmi_spectral_scan_mode {
  7104. WMI_SPECTRAL_SCAN_NORMAL_MODE,
  7105. WMI_SPECTRAL_SCAN_AGILE_MODE,
  7106. WMI_SPECTRAL_SCAN_MAX_MODE /* keep this last */
  7107. };
  7108. /*
  7109. * For now, the spectral configuration is global rather than
  7110. * per-vdev. The vdev is a placeholder and will be ignored
  7111. * by the firmware.
  7112. */
  7113. typedef struct {
  7114. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_configure_cmd_fixed_param */
  7115. A_UINT32 vdev_id;
  7116. A_UINT32 spectral_scan_count;
  7117. A_UINT32 spectral_scan_period;
  7118. A_UINT32 spectral_scan_priority;
  7119. A_UINT32 spectral_scan_fft_size;
  7120. A_UINT32 spectral_scan_gc_ena;
  7121. A_UINT32 spectral_scan_restart_ena;
  7122. A_UINT32 spectral_scan_noise_floor_ref;
  7123. A_UINT32 spectral_scan_init_delay;
  7124. A_UINT32 spectral_scan_nb_tone_thr;
  7125. A_UINT32 spectral_scan_str_bin_thr;
  7126. A_UINT32 spectral_scan_wb_rpt_mode;
  7127. A_UINT32 spectral_scan_rssi_rpt_mode;
  7128. A_UINT32 spectral_scan_rssi_thr;
  7129. A_UINT32 spectral_scan_pwr_format;
  7130. A_UINT32 spectral_scan_rpt_mode;
  7131. A_UINT32 spectral_scan_bin_scale;
  7132. A_UINT32 spectral_scan_dBm_adj;
  7133. A_UINT32 spectral_scan_chn_mask;
  7134. /* See enum wmi_spectral_scan_mode */
  7135. A_UINT32 spectral_scan_mode;
  7136. union {
  7137. /**
  7138. * Two center frequencies are required for agile channel switch
  7139. * supporting True 160 and Restricted 160 ((80+80) or 165) MHz.
  7140. * This parameter specifies the center frequency for cases with a
  7141. * contiguous channel, and the center frequency of the primary
  7142. * portion of a non-contiguous (80+80 or 165 MHz) channel.
  7143. */
  7144. A_UINT32 spectral_scan_center_freq;
  7145. A_UINT32 spectral_scan_center_freq1;
  7146. };
  7147. /* agile span primary channel frequency (MHz), 0 for normal scan*/
  7148. A_UINT32 spectral_scan_chan_freq;
  7149. /* agile scan bandwidth (20, 40, 80, 80+80, 160), enum wmi_channel_width */
  7150. A_UINT32 spectral_scan_chan_width;
  7151. /**
  7152. * Adding freq2 to support True 160 and restricted 160 ((80+80) or 165) MHz.
  7153. * agile span center frequency2 (MHz), 0 for normal scan.
  7154. */
  7155. A_UINT32 spectral_scan_center_freq2;
  7156. /**
  7157. * Flag to enable re-capture of FFT sample if the previous sample has
  7158. * AGC gain change bit set.
  7159. * Re-capture will be enabled only if scan period is greater than 50us.
  7160. */
  7161. A_UINT32 recapture_sample_on_gain_change;
  7162. } wmi_vdev_spectral_configure_cmd_fixed_param;
  7163. /*
  7164. * Enabling, disabling and triggering the spectral scan
  7165. * is a per-vdev operation. That is, it will set channel
  7166. * flags per vdev rather than globally; so concurrent scan/run
  7167. * and multiple STA (eg p2p, tdls, multi-band STA) is possible.
  7168. */
  7169. typedef struct {
  7170. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_enable_cmd_fixed_param */
  7171. A_UINT32 vdev_id;
  7172. /* 0 - ignore; 1 - trigger, 2 - clear trigger */
  7173. A_UINT32 trigger_cmd;
  7174. /* 0 - ignore; 1 - enable, 2 - disable */
  7175. A_UINT32 enable_cmd;
  7176. /* See enum wmi_spectral_scan_mode */
  7177. A_UINT32 spectral_scan_mode;
  7178. } wmi_vdev_spectral_enable_cmd_fixed_param;
  7179. typedef struct {
  7180. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_tx_power_cmd_fixed_param */
  7181. A_UINT32 vdev_id;
  7182. } wmi_vdev_get_tx_power_cmd_fixed_param;
  7183. /* Primary 80 bin values */
  7184. #define WMI_SSCAN_PRI80_START_BIN_GET(pri80_bins) WMI_GET_BITS(pri80_bins, 0, 16)
  7185. #define WMI_SSCAN_PRI80_START_BIN_SET(pri80_bins, value) WMI_SET_BITS(pri80_bins, 0, 16, value)
  7186. #define WMI_SSCAN_PRI80_END_BIN_GET(pri80_bins) WMI_GET_BITS(pri80_bins, 16, 16)
  7187. #define WMI_SSCAN_PRI80_END_BIN_SET(pri80_bins, value) WMI_SET_BITS(pri80_bins, 16, 16, value)
  7188. /* Secondary 80 bin values */
  7189. #define WMI_SSCAN_SEC80_START_BIN_GET(sec80_bins) WMI_GET_BITS(sec80_bins, 0, 16)
  7190. #define WMI_SSCAN_SEC80_START_BIN_SET(sec80_bins, value) WMI_SET_BITS(sec80_bins, 0, 16, value)
  7191. #define WMI_SSCAN_SEC80_END_BIN_GET(sec80_bins) WMI_GET_BITS(sec80_bins, 16, 16)
  7192. #define WMI_SSCAN_SEC80_END_BIN_SET(sec80_bins, value) WMI_SET_BITS(sec80_bins, 16, 16, value)
  7193. /* 5MHz bin values */
  7194. #define WMI_SSCAN_MID_5MHZ_START_BIN_GET(mid_5mhz_bins) WMI_GET_BITS(mid_5mhz_bins, 0, 16)
  7195. #define WMI_SSCAN_MID_5MHZ_START_BIN_SET(mid_5mhz_bins, value) WMI_SET_BITS(mid_5mhz_bins, 0, 16, value)
  7196. #define WMI_SSCAN_MID_5MHZ_END_BIN_GET(mid_5mhz_bins) WMI_GET_BITS(mid_5mhz_bins, 16, 16)
  7197. #define WMI_SSCAN_MID_5MHZ_END_BIN_SET(mid_5mhz_bins, value) WMI_SET_BITS(mid_5mhz_bins, 16, 16, value)
  7198. typedef struct {
  7199. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sscan_fw_cmd_fixed_param */
  7200. A_UINT32 pdev_id;
  7201. /* See enum wmi_spectral_scan_mode */
  7202. A_UINT32 spectral_scan_mode;
  7203. /**
  7204. * This fixed_param TLV is followed by the below TLVs:
  7205. *
  7206. * wmi_pdev_sscan_fft_bin_index fft_bin_index[]; // array len = 0 or 1
  7207. * If present (array length is 1) this TLV specifies the primary
  7208. * and secondary channels FFT bin indices for True 160 and
  7209. * Restricted 160 (80+80 or 165) MHz BW cases.
  7210. */
  7211. } wmi_pdev_sscan_fw_cmd_fixed_param;
  7212. /**
  7213. * The below structure is used only to send the FFT bin numbers for
  7214. * True 160 and Restricted 160(80+80 or 165) MHz from FW to HOST
  7215. */
  7216. typedef struct {
  7217. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sscan_fft_bin_index */
  7218. /**
  7219. * Bit 15 - 0 : primary 80 start bin number
  7220. * Bit 31 - 16 : primary 80 end bin number
  7221. * Refer to WMI_SSCAN_PRI80_[START,END]_BIN_[GET,SET] macros.
  7222. * Only for True 160 and Restricted 160(80+80 or 165) MHz this
  7223. * will be filled.
  7224. */
  7225. A_UINT32 pri80_bins;
  7226. /**
  7227. * Bit 15 - 0 : secondary 80 start bin number
  7228. * Bit 31 - 16 : secondary 80 end bin number
  7229. * Refer to WMI_SSCAN_SEC80_[START,END]_BIN_[GET,SET] macros.
  7230. * Only for True 160 and Restricted 160(80+80 or 165) MHz this
  7231. * will be filled.
  7232. */
  7233. A_UINT32 sec80_bins;
  7234. /**
  7235. * Bit 15 - 0 : 5Mhz start bin number
  7236. * Bit 31 - 16 : 5Mhz end bin number
  7237. * Refer to WMI_SSCAN_MID_5MHZ_[START,END]_BIN_[GET,SET] macros.
  7238. * Only for Restricted 160(80+80 or 165), otherwise 0.
  7239. */
  7240. A_UINT32 mid_5mhz_bins;
  7241. } wmi_pdev_sscan_fft_bin_index;
  7242. #define WMI_SPECTRAL_CHAN_PUNCTURE_BMAP_GET(puncture_bmap) WMI_GET_BITS(puncture_bmap, 0, 16)
  7243. #define WMI_SPECTRAL_CHAN_PUNCTURE_BMAP_SET(puncture_bmap, value) WMI_SET_BITS(puncture_bmap, 0 , 16, value)
  7244. typedef struct {
  7245. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sscan_chan_info */
  7246. /*
  7247. * For contiguous channels, cfreq1 should be represent the center of the entire span and
  7248. * cfreq2 should be 0 whereas for non-contiguous channels, cfreq1 should represent the
  7249. * center of primary segment whereas cfreq2 should represent the center of secondary segment
  7250. */
  7251. /* Information corresponding to operating channel */
  7252. A_UINT32 operating_pri20_freq; /* In MHz */
  7253. A_UINT32 operating_cfreq1; /* In MHz */
  7254. A_UINT32 operating_cfreq2; /* In MHz */
  7255. A_UINT32 operating_bw; /* as per enum wmi_channel_width */
  7256. /*
  7257. * bits [15:0] are used to represent puncture modes where each bit indicates
  7258. * whether that 20MHz channel is punctured.
  7259. * bits [31:16] are reserved.
  7260. */
  7261. A_UINT32 operating_puncture_20mhz_bitmap;
  7262. /* Information corresponding to channel in which spectral scan is done */
  7263. A_UINT32 sscan_cfreq1; /* In MHz */
  7264. A_UINT32 sscan_cfreq2; /* In MHz */
  7265. A_UINT32 sscan_bw; /* as per enum wmi_channel_width */
  7266. /*
  7267. * bits [15:0] are used to represent puncture modes where each bit indicates
  7268. * whether that 20MHz channel is punctured.
  7269. * bits [31:16] are reserved.
  7270. */
  7271. A_UINT32 sscan_puncture_20mhz_bitmap;
  7272. } wmi_pdev_sscan_chan_info;
  7273. typedef struct
  7274. {
  7275. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sscan_per_detector_info */
  7276. A_UINT32 detector_id; /** ID of the detector involved in the spectral scan */
  7277. /*
  7278. * Start/End frequency (in MHz) to indicate the frequency range to which the detector is listening
  7279. */
  7280. A_UINT32 start_freq; /* in MHz */
  7281. A_UINT32 end_freq; /* in MHz */
  7282. } wmi_pdev_sscan_per_detector_info;
  7283. typedef enum {
  7284. /** Enum to indicate bmsk of spectral scan stop evt on scan count max out */
  7285. WMI_SSCAN_EVT_BMSK_SCAN_STOP_SCOUNT = 0X00000001,
  7286. /** Add more event code bmsks above this */
  7287. WMI_SSCAN_EVT_BMSK_MAX = 0Xffffffff,
  7288. } wmi_sscan_evt_message_code;
  7289. /**
  7290. * The below structure is used to send the start/stop triggers
  7291. * for events related to spectral scan activity from
  7292. * FW to host
  7293. */
  7294. typedef struct {
  7295. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sscan_evt_message_fixed_param */
  7296. A_UINT32 pdev_id;
  7297. /** Refer Enum wmi_sscan_evt_message_code */
  7298. A_UINT32 sscan_evt_code;
  7299. } wmi_sscan_evt_message_fixed_param;
  7300. #define WMI_BEACON_CTRL_TX_DISABLE 0
  7301. #define WMI_BEACON_CTRL_TX_ENABLE 1
  7302. #define WMI_BEACON_CTRL_SWBA_EVENT_DISABLE 2
  7303. #define WMI_BEACON_CTRL_SWBA_EVENT_ENABLE 3
  7304. typedef struct {
  7305. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_offload_ctrl_cmd_fixed_param */
  7306. /** unique id identifying the VDEV, generated by the caller */
  7307. A_UINT32 vdev_id;
  7308. A_UINT32 bcn_ctrl_op; /* fw default 1 (see WMI_BEACON_CTRL defs) */
  7309. } wmi_bcn_offload_ctrl_cmd_fixed_param;
  7310. /** common structure used for wmi_vedv_get_tx_power_event */
  7311. typedef struct {
  7312. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_tx_power_event_fixed_param */
  7313. A_UINT32 tx_power; /** units: 0.5 dBm, per-chain tx power */
  7314. A_UINT32 vdev_id; /** unique id identifying the VDEV, generated by the caller */
  7315. } wmi_vdev_get_tx_power_event_fixed_param;
  7316. typedef enum {
  7317. /** Limit the offchannel duration */
  7318. WMI_VDEV_LIMIT_OFFCHAN_ENABLE = 0x1,
  7319. /** Skip DFS channels from Scan channel list.
  7320. * valid for both host scans and FW scans */
  7321. WMI_VDEV_LIMIT_OFFCHAN_SKIP_DFS = 0x2,
  7322. } wmi_vdev_limit_offchan_flags;
  7323. typedef struct {
  7324. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_vdev_limit_offchan_cmd_fixed_param */
  7325. /** Limit the duration of offchannel events requested by the vdev corresponding to the specified vdev_id */
  7326. A_UINT32 vdev_id;
  7327. /** see enum wmi_vdev_limit_offchan_flags */
  7328. A_UINT32 flags;
  7329. /** max offchannel time allowed in msec when WMI_VDEV_LIMIT_OFFCHAN_ENABLE flag is set */
  7330. A_UINT32 max_offchan_time;
  7331. /** rest time in msec on the BSS channel */
  7332. A_UINT32 rest_time;
  7333. } wmi_vdev_limit_offchan_cmd_fixed_param;
  7334. #define WMI_CSA_EVENT_QSBW_ISE_ID_MASK 0x000000FF /* information sub element id for QSBW, expected value is 0x02 */
  7335. #define WMI_CSA_EVENT_QSBW_ISE_LEN_MASK 0x0000FF00 /* length of QSBW ISE data, expected value is 0x02 */
  7336. #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) */
  7337. #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) */
  7338. #define WMI_CSA_EVENT_QSBW_ISE_ID 0x02
  7339. #define WMI_CSA_EVENT_QSBW_ISE_LEN 0x02
  7340. #define WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK 0x01
  7341. #define WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK 0x02
  7342. #define WMI_CSA_EVENT_QSBW_ISE_CAP_5M(qsbw_ise) \
  7343. (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
  7344. #define WMI_CSA_EVENT_QSBW_ISE_CAP_10M(qsbw_ise) \
  7345. (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
  7346. #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_5M(qsbw_ise) \
  7347. (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
  7348. #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_10M(qsbw_ise) \
  7349. (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
  7350. typedef enum {
  7351. WMI_CSA_IE_PRESENT = 0x00000001,
  7352. WMI_XCSA_IE_PRESENT = 0x00000002,
  7353. WMI_WBW_IE_PRESENT = 0x00000004,
  7354. WMI_CSWRAP_IE_PRESENT = 0x00000008,
  7355. WMI_CSWARP_IE_PRESENT = WMI_CSWRAP_IE_PRESENT, /* deprecated: typo */
  7356. WMI_QSBW_ISE_PRESENT = 0x00000010,
  7357. WMI_CSWRAP_IE_EXTENDED_PRESENT = 0x00000020, /* Added bitmask to verify if the additional information is filled in */
  7358. WMI_CSWRAP_IE_EXT_VER_2_PRESENT = 0x00000040 /* Added bitmask to see if additional info is present in CS wrap IE */
  7359. } WMI_CSA_EVENT_IES_PRESENT_FLAG;
  7360. /* wmi CSA receive event from beacon frame */
  7361. typedef struct {
  7362. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_event_fixed_param */
  7363. A_UINT32 i_fc_dur; /* Bit 0-15: FC, Bit 16-31: DUR */
  7364. wmi_mac_addr i_addr1;
  7365. wmi_mac_addr i_addr2;
  7366. /* NOTE: size of array of csa_ie[], xcsa_ie[], and wb_ie[] cannot be
  7367. * changed in the future without breaking WMI compatibility */
  7368. A_UINT32 csa_ie[2];
  7369. A_UINT32 xcsa_ie[2];
  7370. A_UINT32 wb_ie[2];
  7371. union {
  7372. A_UINT32 cswrap_ie; /* use this */
  7373. A_UINT32 cswarp_ie; /* deprecated (typo) */
  7374. };
  7375. A_UINT32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */
  7376. A_UINT32 qsbw_ise;
  7377. /* cswrap_ie_extended:
  7378. * Stores full IEEE80211_ELEMID_CHAN_SWITCH_WRAP information element.
  7379. * The first two octets host the Element ID and Length fields.
  7380. * The IE comprises New Country Subelement (optional and max length 6),
  7381. * Wide Bandwidth Channel Subelement (optional and max length 5) and
  7382. * New Transmit Power Envelope subelement (optional and max length 7)
  7383. * The 4-byte words within cswrap_ie_extended[] use little endian ordering;
  7384. * the first octect of the IE resides in bits 7:0 of cswrap_ie_extended[0],
  7385. * the second octet resides in bits 15:8 of cswrap_ie_extended[0] and so on.
  7386. */
  7387. A_UINT32 cswrap_ie_extended[5];
  7388. /* num_bytes_valid_in_cswrap_ie_ext_ver2:
  7389. * This fixed_param TLV can be followed by a VAR length TLV
  7390. * variable-length byte-array TLV for CS WRAP IE.
  7391. * Since the variable-length byte-array TLVs are always padded, if needed,
  7392. * to contain a multiple of 4 bytes, this field shows how many of the bytes
  7393. * contain valid data, versus how many are only for alignment padding.
  7394. */
  7395. A_UINT32 num_bytes_valid_in_cswrap_ie_ext_ver2;
  7396. /*
  7397. * Add link id, mld address and link address
  7398. * fields for N link CSA support
  7399. */
  7400. A_UINT32 link_id; /* Link id associated with AP */
  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 mld_mac_address_present :1,
  7404. link_mac_address_present :1,
  7405. link_id_present :1,
  7406. reserved :29;
  7407. /*
  7408. * This initial fixed_param TLV may be followed by the below TLVs:
  7409. * - cs_wrap_ie variable-length byte-array TLV
  7410. */
  7411. } wmi_csa_event_fixed_param;
  7412. #define WMI_GET_MLD_MAC_ADDRESS_PRESENT(mld_mac_address_present) \
  7413. WMI_GET_BITS(mld_mac_address_present, 0, 1)
  7414. #define WMI_SET_MLD_MAC_ADDRESS_PRESENT(mld_mac_address_present, value) \
  7415. WMI_SET_BITS(mld_mac_address_present, 0, 1, value)
  7416. #define WMI_GET_LINK_ADDRESS_PRESENT(link_mac_address_present) \
  7417. WMI_GET_BITS(link_mac_address_present, 1, 1)
  7418. #define WMI_SET_LINK_ADDRESS_PRESENT(link_mac_address_present, value) \
  7419. WMI_SET_BITS(link_mac_address_present, 1, 1, value)
  7420. #define WMI_GET_LINK_ID_PRESENT(link_id_present) \
  7421. WMI_GET_BITS(link_id_present, 2, 1)
  7422. #define WMI_SET_LINK_ID_PRESENT(link_id_present, value) \
  7423. WMI_SET_BITS(link_id_present, 2, 1, value)
  7424. typedef enum {
  7425. WMI_QUIET_EVENT_START = 0,
  7426. WMI_QUIET_EVENT_STOP = 1,
  7427. } WMI_QUIET_EVENT_FLAG;
  7428. /* WMI Quiet receive event from beacon frame */
  7429. typedef struct {
  7430. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_quiet_event_fixed_param */
  7431. wmi_mac_addr mld_mac_address; /* AP mld mac address */
  7432. wmi_mac_addr link_mac_address; /* AP link mac address */
  7433. A_UINT32 linkid; /* Link id associated with AP */
  7434. A_UINT32 mld_mac_address_present :1,
  7435. link_mac_address_present :1,
  7436. linkid_present :1,
  7437. reserved :29;
  7438. A_UINT32 quiet_status; /* WMI_QUIET_EVENT_FLAG: quiet start or stop */
  7439. } wmi_quiet_event_fixed_param;
  7440. typedef enum {
  7441. WAL_PEER_MCAST2UCAST_DISABLED = 0,
  7442. WAL_PEER_MCAST2UCAST_DROP_EMPTY = 1, /* Drop the frames if match is not found */
  7443. WAL_PEER_MCAST2UCAST_MCAST_EMPTY = 2, /* Send as mcast if match is not found */
  7444. } WMI_PEER_MCAST2UCAST_MODE;
  7445. typedef enum {
  7446. PKT_PWR_SAVE_NAP_ENABLE = 0x00000001,
  7447. PKT_PWR_SAVE_LS_ENABLE = 0x00000002,
  7448. PKT_PWR_SAVE_DS_ENABLE = 0x00000004,
  7449. PKT_PWR_SAVE_BTCOEX_ENABLE = 0x00000008,
  7450. PKT_PWR_SAVE_FSM_ENABLE = 0x80000000,
  7451. } WMI_PDEV_PKT_PWR_SAVE_LEVEL;
  7452. /** MACROs to get user setting for enabling/disabling Secondary Rate Feature set
  7453. * Bit-0 : Enable/Disable Control for "PPDU Secondary Retry Support"
  7454. * Bit-1 : Enable/Disable Control for "RTS Black/White-listing Support"
  7455. * Bit-2 : Enable/Disable Control for "Higher MCS retry restriction on XRETRY failures"
  7456. * Bit 3-5 : "Xretry threshold" to use
  7457. * Bit 6~31 : reserved for future use.
  7458. */
  7459. #define WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT_S 0
  7460. #define WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT 0x00000001
  7461. #define WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT_S 1
  7462. #define WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT 0x00000002
  7463. #define WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION_S 2
  7464. #define WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION 0x00000004
  7465. #define WMI_PDEV_PARAM_XRETRY_THRESHOLD_S 3
  7466. #define WMI_PDEV_PARAM_XRETRY_THRESHOLD 0x00000038
  7467. #define WMI_PDEV_PARAM_IS_SECONDARY_RATE_ENABLED(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT)
  7468. #define WMI_PDEV_PARAM_IS_RTS_BL_WL_ENABLED(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT)
  7469. #define WMI_PDEV_PARAM_IS_HIGHER_MCS_XRETRY_RESTRICTION_SET(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION)
  7470. #define WMI_PDEV_PARAM_GET_XRETRY_THRESHOLD(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_XRETRY_THRESHOLD)
  7471. /*
  7472. * The WMI_SCHED_MODE_FLAGS enum is used by the following WMI commands:
  7473. *
  7474. * WMI_VDEV_PARAM_SET_DISABLED_SCHED_MODES
  7475. * WMI_PDEV_PARAM_SET_DISABLED_SCHED_MODES
  7476. * WMI_PEER_SCHED_MODE_DISABLE_CMDID
  7477. * WMI_SAWF_SVC_CLASS_CFG_CMDID
  7478. */
  7479. typedef enum {
  7480. WMI_SCHED_MODE_DL_MU_MIMO = 0x00000001,
  7481. WMI_SCHED_MODE_UL_MU_MIMO = 0x00000002,
  7482. WMI_SCHED_MODE_DL_OFDMA = 0x00000004,
  7483. WMI_SCHED_MODE_UL_OFDMA = 0x00000008,
  7484. } WMI_SCHED_MODE_FLAGS;
  7485. typedef enum {
  7486. /** TX chain mask */
  7487. WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
  7488. /** RX chain mask */
  7489. WMI_PDEV_PARAM_RX_CHAIN_MASK, /* 0x2 */
  7490. /** TX power limit for 2G Radio */
  7491. WMI_PDEV_PARAM_TXPOWER_LIMIT2G, /* 0x3 */
  7492. /** TX power limit for 5G Radio */
  7493. WMI_PDEV_PARAM_TXPOWER_LIMIT5G, /* 0x4 */
  7494. /** TX power scale */
  7495. WMI_PDEV_PARAM_TXPOWER_SCALE, /* 0x5 */
  7496. /** Beacon generation mode . 0: host, 1: target */
  7497. WMI_PDEV_PARAM_BEACON_GEN_MODE, /* 0x6 */
  7498. /** Beacon generation mode . 0: staggered 1: bursted */
  7499. WMI_PDEV_PARAM_BEACON_TX_MODE, /* 0x7 */
  7500. /** Resource manager off chan mode .
  7501. * 0: turn off off chan mode. 1: turn on offchan mode
  7502. */
  7503. WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE, /* 0x8 */
  7504. /** Protection mode 0: no protection 1:use CTS-to-self 2: use RTS/CTS */
  7505. WMI_PDEV_PARAM_PROTECTION_MODE, /* 0x9 */
  7506. /** Dynamic bandwidth 0: disable 1: enable */
  7507. WMI_PDEV_PARAM_DYNAMIC_BW, /* 0xa */
  7508. /** Non aggregrate/ 11g sw retry threshold.0-disable */
  7509. WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH, /* 0xb */
  7510. /** aggregrate sw retry threshold. 0-disable*/
  7511. WMI_PDEV_PARAM_AGG_SW_RETRY_TH, /* 0xc */
  7512. /** Station kickout threshold (non of consecutive failures).0-disable */
  7513. WMI_PDEV_PARAM_STA_KICKOUT_TH, /* 0xd */
  7514. /** Aggerate size scaling configuration per AC */
  7515. WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING, /* 0xe */
  7516. /** LTR enable */
  7517. WMI_PDEV_PARAM_LTR_ENABLE, /* 0xf */
  7518. /** LTR latency for BE, in us */
  7519. WMI_PDEV_PARAM_LTR_AC_LATENCY_BE, /* 0x10 */
  7520. /** LTR latency for BK, in us */
  7521. WMI_PDEV_PARAM_LTR_AC_LATENCY_BK, /* 0x11 */
  7522. /** LTR latency for VI, in us */
  7523. WMI_PDEV_PARAM_LTR_AC_LATENCY_VI, /* 0x12 */
  7524. /** LTR latency for VO, in us */
  7525. WMI_PDEV_PARAM_LTR_AC_LATENCY_VO, /* 0x13 */
  7526. /** LTR AC latency timeout, in ms */
  7527. WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT, /* 0x14 */
  7528. /** LTR platform latency override, in us */
  7529. WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE, /* 0x15 */
  7530. /** LTR-M override, in us */
  7531. WMI_PDEV_PARAM_LTR_RX_OVERRIDE, /* 0x16 */
  7532. /** Tx activity timeout for LTR, in us */
  7533. WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT, /* 0x17 */
  7534. /** L1SS state machine enable */
  7535. WMI_PDEV_PARAM_L1SS_ENABLE, /* 0x18 */
  7536. /** Deep sleep state machine enable */
  7537. WMI_PDEV_PARAM_DSLEEP_ENABLE, /* 0x19 */
  7538. /** RX buffering flush enable */
  7539. WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH, /* 0x1a */
  7540. /** RX buffering matermark */
  7541. WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK, /* 0x1b */
  7542. /** RX buffering timeout enable */
  7543. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN, /* 0x1c */
  7544. /** RX buffering timeout value */
  7545. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE, /* 0x1d */
  7546. /** pdev level stats update period in ms */
  7547. WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD, /* 0x1e */
  7548. /** vdev level stats update period in ms */
  7549. WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD, /* 0x1f */
  7550. /** peer level stats update period in ms */
  7551. WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD, /* 0x20 */
  7552. /** beacon filter status update period */
  7553. WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD, /* 0x21 */
  7554. /** QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
  7555. WMI_PDEV_PARAM_PMF_QOS, /* 0x22 */
  7556. /** Access category on which ARP frames are sent */
  7557. WMI_PDEV_PARAM_ARP_AC_OVERRIDE, /* 0x23 */
  7558. /** DCS configuration */
  7559. WMI_PDEV_PARAM_DCS, /* 0x24 */
  7560. /** Enable/Disable ANI on target */
  7561. WMI_PDEV_PARAM_ANI_ENABLE, /* 0x25 */
  7562. /** configure the ANI polling period */
  7563. WMI_PDEV_PARAM_ANI_POLL_PERIOD, /* 0x26 */
  7564. /** configure the ANI listening period */
  7565. WMI_PDEV_PARAM_ANI_LISTEN_PERIOD, /* 0x27 */
  7566. /** configure OFDM immunity level */
  7567. WMI_PDEV_PARAM_ANI_OFDM_LEVEL, /* 0x28 */
  7568. /** configure CCK immunity level */
  7569. WMI_PDEV_PARAM_ANI_CCK_LEVEL, /* 0x29 */
  7570. /** Enable/Disable CDD for 1x1 STAs in rate control module */
  7571. WMI_PDEV_PARAM_DYNTXCHAIN, /* 0x2a */
  7572. /** Enable/Disable proxy STA */
  7573. WMI_PDEV_PARAM_PROXY_STA, /* 0x2b */
  7574. /** Enable/Disable low power state when all VDEVs are inactive/idle. */
  7575. WMI_PDEV_PARAM_IDLE_PS_CONFIG, /* 0x2c */
  7576. /** Enable/Disable power gating sleep */
  7577. WMI_PDEV_PARAM_POWER_GATING_SLEEP, /* 0x2d */
  7578. /** Enable/Disable Rfkill */
  7579. WMI_PDEV_PARAM_RFKILL_ENABLE, /* 0x2e */
  7580. /** Set Bursting DUR */
  7581. WMI_PDEV_PARAM_BURST_DUR, /* 0x2f */
  7582. /** Set Bursting ENABLE */
  7583. WMI_PDEV_PARAM_BURST_ENABLE, /* 0x30 */
  7584. /** HW rfkill config */
  7585. WMI_PDEV_PARAM_HW_RFKILL_CONFIG, /* 0x31 */
  7586. /** Enable radio low power features */
  7587. WMI_PDEV_PARAM_LOW_POWER_RF_ENABLE, /* 0x32 */
  7588. /** L1SS entry and residency time track */
  7589. WMI_PDEV_PARAM_L1SS_TRACK, /* 0x33 */
  7590. /** set hyst at runtime, requirement from SS */
  7591. WMI_PDEV_PARAM_HYST_EN, /* 0x34 */
  7592. /** Enable/ Disable POWER COLLAPSE */
  7593. WMI_PDEV_PARAM_POWER_COLLAPSE_ENABLE, /* 0x35 */
  7594. /** configure LED system state */
  7595. WMI_PDEV_PARAM_LED_SYS_STATE, /* 0x36 */
  7596. /** Enable/Disable LED */
  7597. WMI_PDEV_PARAM_LED_ENABLE, /* 0x37 */
  7598. /** set DIRECT AUDIO time latency */
  7599. WMI_PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY, /* DEPRECATED */ /* 0x38 */
  7600. /** set DIRECT AUDIO Feature ENABLE */
  7601. WMI_PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE, /* DEPRECATED */ /* 0x39 */
  7602. /** pdev level whal mib stats update enable */
  7603. WMI_PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE, /* 0x3a */
  7604. /** ht/vht info based on vdev */
  7605. WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD, /* 0x3b */
  7606. /** Set CTS channel BW for dynamic BW adjustment feature */
  7607. WMI_PDEV_PARAM_CTS_CBW, /* 0x3c */
  7608. /** Set GPIO pin info used by WNTS */
  7609. WMI_PDEV_PARAM_WNTS_CONFIG, /* 0x3d */
  7610. /** Enable/Disable hardware adaptive early rx feature */
  7611. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE, /* 0x3e */
  7612. /** The minimum early rx duration, to ensure early rx duration is non-zero */
  7613. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP, /* 0x3f */
  7614. /** Increasing/decreasing step used by hardware */
  7615. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP, /* 0x40 */
  7616. /** The fixed early rx duration when adaptive early rx is disabled */
  7617. WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP, /* 0x41 */
  7618. /** Enable/Disable bmiss based adaptive beacon timeout feature */
  7619. WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE, /* 0x42 */
  7620. /** The minimum beacon timeout duration, to ensure beacon timeout duration is non-zero */
  7621. WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT, /* 0x43 */
  7622. /** Increasing/decreasing step used by hardware */
  7623. WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP, /* 0x44 */
  7624. /** The fixed beacon timeout duration when bmiss based adaptive beacon timeout is disabled */
  7625. WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT, /* 0x45 */
  7626. /** Enable/Disable Congestion Estimator based adaptive beacon timeout feature */
  7627. WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE, /* 0x46 */
  7628. /** combo value of ce_id, ce_threshold, ce_time, refer to WMI_CE_BTO_CE_ID_MASK */
  7629. WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE, /* 0x47 */
  7630. /** 2G TX chain mask */
  7631. WMI_PDEV_PARAM_TX_CHAIN_MASK_2G, /* 0x48 */
  7632. /** 2G RX chain mask */
  7633. WMI_PDEV_PARAM_RX_CHAIN_MASK_2G, /* 0x49 */
  7634. /** 5G TX chain mask */
  7635. WMI_PDEV_PARAM_TX_CHAIN_MASK_5G, /* 0x4a */
  7636. /** 5G RX chain mask */
  7637. WMI_PDEV_PARAM_RX_CHAIN_MASK_5G, /* 0x4b */
  7638. /* Set tx chain mask for CCK rates */
  7639. WMI_PDEV_PARAM_TX_CHAIN_MASK_CCK, /* 0x4c */
  7640. /* Set tx chain mask for 1SS stream */
  7641. WMI_PDEV_PARAM_TX_CHAIN_MASK_1SS, /* 0x4d */
  7642. /* Enable/Disable CTS2Self for P2P GO when Non-P2P Client is connected */
  7643. WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG, /* 0x4e */
  7644. /** TX power backoff in dB: tx power -= param value
  7645. * Host passes values(DB) to Halphy, Halphy reduces the power table by
  7646. * the values. Safety check will happen in Halphy
  7647. */
  7648. WMI_PDEV_PARAM_TXPOWER_DECR_DB, /* 0x4f */
  7649. /** enable and disable aggregate burst along with duration */
  7650. WMI_PDEV_PARAM_AGGR_BURST, /* 0x50 */
  7651. /** Set the global RX decap mode */
  7652. WMI_PDEV_PARAM_RX_DECAP_MODE, /* 0x51 */
  7653. /** Enable/Disable Fast channel reset */
  7654. WMI_PDEV_PARAM_FAST_CHANNEL_RESET, /* 0x52 */
  7655. /** Default antenna for Smart antenna */
  7656. WMI_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA, /* 0x53 */
  7657. /** Set the user-specified antenna gain */
  7658. WMI_PDEV_PARAM_ANTENNA_GAIN, /* 0x54 */
  7659. /** Set the user-specified RX filter */
  7660. WMI_PDEV_PARAM_RX_FILTER, /* 0x55 */
  7661. /** configure the user-specified MCAST tid for managed mcast feature
  7662. * 0-15 is the valid range. 0xff will clear the tid setting */
  7663. WMI_PDEV_SET_MCAST_TO_UCAST_TID, /* 0x56 */
  7664. /** Enable/Disable Proxy sta mode */
  7665. WMI_PDEV_PARAM_PROXY_STA_MODE, /* 0x57 */
  7666. /** configure the mcast2ucast mode for the pdev->peer_mcast.
  7667. * See WMI_PEER_MCAST2UCAST_MODE for possible values */
  7668. WMI_PDEV_PARAM_SET_MCAST2UCAST_MODE, /* 0x58 */
  7669. /** Sets the Mcast buffers for cloning, to support Mcast enhancement */
  7670. WMI_PDEV_PARAM_SET_MCAST2UCAST_BUFFER, /* 0x59 */
  7671. /** Remove the Mcast buffers added by host */
  7672. WMI_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER, /* 0x5a */
  7673. /** En/disable station power save state indication */
  7674. WMI_PDEV_PEER_STA_PS_STATECHG_ENABLE, /* 0x5b */
  7675. /** Access category on which ARP frames are sent */
  7676. WMI_PDEV_PARAM_IGMPMLD_AC_OVERRIDE, /* 0x5c */
  7677. /** allow or disallow interbss frame forwarding */
  7678. WMI_PDEV_PARAM_BLOCK_INTERBSS, /* 0x5d */
  7679. /** Enable/Disable reset */
  7680. WMI_PDEV_PARAM_SET_DISABLE_RESET_CMDID, /* 0x5e */
  7681. /** Enable/Disable/Set MSDU_TTL in milliseconds. */
  7682. WMI_PDEV_PARAM_SET_MSDU_TTL_CMDID, /* 0x5f */
  7683. /** Set global PPDU duration limit (usec). */
  7684. WMI_PDEV_PARAM_SET_PPDU_DURATION_CMDID, /* 0x60 */
  7685. /** set txbf sounding period of vap in milliseconds */
  7686. WMI_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID, /* 0x61 */
  7687. /** Set promiscuous mode */
  7688. WMI_PDEV_PARAM_SET_PROMISC_MODE_CMDID, /* 0x62 */
  7689. /** Set burst mode */
  7690. WMI_PDEV_PARAM_SET_BURST_MODE_CMDID, /* 0x63 */
  7691. /** enable enhanced stats */
  7692. WMI_PDEV_PARAM_EN_STATS, /* 0x64 */
  7693. /** Set mu-grouping policy */
  7694. WMI_PDEV_PARAM_MU_GROUP_POLICY, /* 0x65 */
  7695. /** Channel Hopping Enable */
  7696. WMI_PDEV_PARAM_NOISE_DETECTION, /* 0x66 */
  7697. /** Set Channel Hopping NF threshold in dBm */
  7698. WMI_PDEV_PARAM_NOISE_THRESHOLD, /* 0x67 */
  7699. /** Set PAPRD policy */
  7700. WMI_PDEV_PARAM_DPD_ENABLE, /* 0x68 */
  7701. /** Enable/disable mcast/bcast echo, used by ProxySTA */
  7702. WMI_PDEV_PARAM_SET_MCAST_BCAST_ECHO, /* 0x69 */
  7703. /** ATF enable/disable strict schedule */
  7704. WMI_PDEV_PARAM_ATF_STRICT_SCH, /* 0x6a */
  7705. /** ATF set access category duration, B0-B29 duration, B30-B31: AC */
  7706. WMI_PDEV_PARAM_ATF_SCHED_DURATION, /* 0x6b */
  7707. /** Default antenna polarization */
  7708. WMI_PDEV_PARAM_ANT_PLZN, /* 0x6c */
  7709. /** Set mgmt retry limit */
  7710. WMI_PDEV_PARAM_MGMT_RETRY_LIMIT, /* 0x6d */
  7711. /** Set CCA sensitivity level in dBm */
  7712. WMI_PDEV_PARAM_SENSITIVITY_LEVEL, /* 0x6e */
  7713. /** Set 2G positive and negative Tx power in 0.5dBm units */
  7714. WMI_PDEV_PARAM_SIGNED_TXPOWER_2G, /* 0x6f */
  7715. /** Set 5G positive and negative Tx power in 0.5dBm
  7716. * units */
  7717. WMI_PDEV_PARAM_SIGNED_TXPOWER_5G, /* 0x70 */
  7718. /** Enable/disable AMSDU for tids */
  7719. WMI_PDEV_PARAM_ENABLE_PER_TID_AMSDU, /* 0x71 */
  7720. /** Enable/disable AMPDU for tids */
  7721. WMI_PDEV_PARAM_ENABLE_PER_TID_AMPDU, /* 0x72 */
  7722. /** Set CCA threshold in dBm */
  7723. WMI_PDEV_PARAM_CCA_THRESHOLD, /* 0x73 */
  7724. /** RTS Fixed rate setting */
  7725. WMI_PDEV_PARAM_RTS_FIXED_RATE, /* 0x74 */
  7726. /** Pdev reset */
  7727. WMI_PDEV_PARAM_PDEV_RESET, /* 0x75 */
  7728. /** wapi mbssid offset **/
  7729. WMI_PDEV_PARAM_WAPI_MBSSID_OFFSET, /* 0x76 */
  7730. /** ARP DEBUG source address*/
  7731. WMI_PDEV_PARAM_ARP_DBG_SRCADDR, /* 0x77 */
  7732. /** ARP DEBUG destination address*/
  7733. WMI_PDEV_PARAM_ARP_DBG_DSTADDR, /* 0x78 */
  7734. /** ATF enable/disable obss noise scheduling */
  7735. WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCH, /* 0x79 */
  7736. /** ATF obss noise scaling factor */
  7737. WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR, /* 0x7a */
  7738. /**
  7739. * TX power reduction scaling exponent - final tx power is the
  7740. * nominal tx power (A_MIN(reg_pow,ctl,etc..)) divided by
  7741. * 2^(scale exponent). For example:
  7742. * If this scale exponent is 0, the power is unchanged (divided by 2^0)
  7743. * If this factor is 1, the power is scaled down by 2^1, i.e. 3 dB
  7744. * If this factor is 2, the power is scaled down by 2^2, i.e. 6 dB
  7745. * If this factor is 3, the power is scaled down by 2^3, i.e. 9 dB
  7746. */
  7747. WMI_PDEV_PARAM_CUST_TXPOWER_SCALE, /* 0x7b */
  7748. /** ATF enabe/disable dynamically */
  7749. WMI_PDEV_PARAM_ATF_DYNAMIC_ENABLE, /* 0x7c */
  7750. /** Set tx retry limit for control frames. 0 = disable, 31 = max */
  7751. WMI_PDEV_PARAM_CTRL_RETRY_LIMIT, /* 0x7d */
  7752. /** Set propagation delay for 2G / 5G band.
  7753. * The propagation delay is fundamentally a per-peer property, but
  7754. * the target may not support per-peer settings for ack timeouts.
  7755. * This pdev parameter allows the MAC-level ack timeout to be set to
  7756. * a value suitable for the worst-case propagation delay of any peer
  7757. * within that pdev.
  7758. * Units are microseconds.
  7759. */
  7760. WMI_PDEV_PARAM_PROPAGATION_DELAY, /* 0x7e */
  7761. /**
  7762. * Host can enable/disable ANT DIV feature
  7763. * if it's been enabled in BDF
  7764. */
  7765. WMI_PDEV_PARAM_ENA_ANT_DIV, /* 0x7f */
  7766. /** Host can force one chain to select a specific ANT */
  7767. WMI_PDEV_PARAM_FORCE_CHAIN_ANT, /* 0x80 */
  7768. /**
  7769. * Start a cycle ANT self test periodically.
  7770. * In the test, the FW would select each ANT pair
  7771. * one by one, the cycle time could be configured
  7772. * via WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL
  7773. */
  7774. WMI_PDEV_PARAM_ANT_DIV_SELFTEST, /* 0x81 */
  7775. /**
  7776. * Configure the cycle time of ANT self test,
  7777. * the unit is micro second. Per the timer
  7778. * limitation, too small value could be not so
  7779. * accurate.
  7780. */
  7781. WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL, /* 0x82 */
  7782. /**
  7783. * wlan stats observation period, the unit is millisecond.
  7784. * The value of 0 is used to turn off periodic stats report.
  7785. */
  7786. WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD, /* 0x83 */
  7787. /**
  7788. * Set tx_ppdu_delay[] bin size to specify how many
  7789. * milliseconds each bin of the wmi_tx_stats.tx_ppdu_delay[]
  7790. * histogram represents.
  7791. */
  7792. WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS, /* 0x84 */
  7793. /** set wmi_tx_stats.tx_ppdu_delay[] array length */
  7794. WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN, /* 0x85 */
  7795. /** set wmi_tx_stats.tx_mpdu_aggr[] array length */
  7796. WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN, /* 0x86 */
  7797. /** set wmi_rx_stats.rx_mpdu_aggr[] array length */
  7798. WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN, /* 0x87 */
  7799. /** Set TX delay value in TX sch module, unit is microseconds */
  7800. WMI_PDEV_PARAM_TX_SCH_DELAY, /* 0x88 */
  7801. /** Set RTS enable for SIFS bursting */
  7802. WMI_PDEV_PARAM_ENABLE_RTS_SIFS_BURSTING, /* 0x89 */
  7803. /** Set Maximum number of MPDUs in an AMPDU*/
  7804. WMI_PDEV_PARAM_MAX_MPDUS_IN_AMPDU, /* 0x8a */
  7805. /** Enable/disable peer stats info mechanism
  7806. * A zero value disables; a non-zero value enables.
  7807. */
  7808. WMI_PDEV_PARAM_PEER_STATS_INFO_ENABLE, /* 0x8b */
  7809. /** Configure Fast PWR Transition mode
  7810. * 0x0 -> inidcates Fast PWR transition disabled
  7811. * 0x1 -> indicates Static mode enabled
  7812. * 0x2 -> indicates Dynamic mode enabled
  7813. */
  7814. WMI_PDEV_PARAM_FAST_PWR_TRANSITION, /* 0x8c */
  7815. /** Enable/disable radio channel stats mechanism
  7816. * A zero value disables; a non-zero value enables.
  7817. */
  7818. WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE, /* 0x8d */
  7819. /** Enable/disable radio diagnosis feature
  7820. * which allows retrieving the status of radio.
  7821. * A zero value disables; a non-zero value enables.
  7822. */
  7823. WMI_PDEV_PARAM_RADIO_DIAGNOSIS_ENABLE, /* 0x8e */
  7824. /** Enable/Disable mesh mcast traffic
  7825. * 1 - Allow mesh mcast traffic
  7826. * 0 - Disallow mesh mcast traffic
  7827. */
  7828. WMI_PDEV_PARAM_MESH_MCAST_ENABLE, /* 0x8f */
  7829. /** Enable/Disable smart chainmask scheme
  7830. * 1 - Enable smart chainmask scheme
  7831. * 0 - Disable smart chainmask scheme
  7832. */
  7833. WMI_PDEV_PARAM_SMART_CHAINMASK_SCHEME, /* 0x90 */
  7834. /** Enable/Disable alternate chainmask scheme
  7835. * 1 - Enable alternate chainmask scheme
  7836. * 0 - Disable alternate chainmask scheme
  7837. */
  7838. WMI_PDEV_PARAM_ALTERNATIVE_CHAINMASK_SCHEME, /* 0x91 */
  7839. /** User configured parameters for antenna diversity algorithm
  7840. * BIT[25..13]: Probe period (milliseconds units)
  7841. * BIT[12..0]: Stay period (milliseconds units)
  7842. */
  7843. WMI_PDEV_PARAM_ANT_DIV_USRCFG, /* 0x92 */
  7844. /** pdev packet power save levels,
  7845. * refer to WMI_PDEV_PKT_PWR_SAVE_LEVEL
  7846. */
  7847. WMI_PDEV_PARAM_PACKET_POWER_SAVE_LEVEL, /* 0x93 */
  7848. /** Define IOT pattern to be enabled/disabled
  7849. * bit values: 0 - disable, 1 - enable
  7850. * BIT[0..31]: each bit represents an IOT pattern
  7851. * -----
  7852. * Bit 0 - avoid SMPS with certain APs
  7853. * Bits 31:1 - reserved
  7854. */
  7855. WMI_PDEV_PARAM_SET_IOT_PATTERN, /* 0x94 */
  7856. /** ACK timeout - change wireless packet ack timeout configuration,
  7857. * units are microseconds
  7858. */
  7859. WMI_PDEV_PARAM_ACK_TIMEOUT, /* 0x95 */
  7860. /** Number of TX chains to use for a/b/g rates.
  7861. * bit 0~15 : 11b mode TX chain number.
  7862. * bit 16~31 : 11ag mode TX chain number.
  7863. */
  7864. WMI_PDEV_PARAM_ABG_MODE_TX_CHAIN_NUM, /* 0x96 */
  7865. /** Enable/Disable cck txfir override
  7866. * bit 0 - enable (1) or disable (0) CCK tx FIR
  7867. * bits 31:1 - unused / reserved (set to 0)
  7868. */
  7869. WMI_PDEV_PARAM_ENABLE_CCK_TXFIR_OVERRIDE, /* 0x97 */
  7870. /** Enable/Disable DTIM Synth
  7871. * 1- Enable DTIM Synth
  7872. * 0- Disable DTIM Synth
  7873. */
  7874. WMI_PDEV_PARAM_DTIM_SYNTH, /* 0x98 */
  7875. /** Configure auto detect power failure feature.
  7876. * 0 - FW will trigger crash if power failure happens.
  7877. * 1 - FW will send a failure notification to host, and the host
  7878. * framework determines how to respond to the power failure
  7879. * 2 - Silently rejuvenate if power failure occurs.
  7880. * 3 - Feature disabled.
  7881. */
  7882. WMI_PDEV_AUTO_DETECT_POWER_FAILURE, /* 0x99 */
  7883. /** Configure operating voltage corner mode based on phymode and bw.
  7884. * bit 0-1 - operating voltage corner mode for 11a/b.
  7885. * bit 2-3 - operating voltage corner mode for 11g.
  7886. * bit 4-5 - operating voltage corner mode for 11n, 20MHz, 1x1.
  7887. * bit 6-7 - operating voltage corner mode for 11n, 20MHz, 2x2.
  7888. * bit 8-9 - operating voltage corner mode for 11n, 40MHz, 1x1.
  7889. * bit 10-11 - operating voltage corner mode for 11n, 40MHz, 2x2.
  7890. * bit 12-13 - operating voltage corner mode for 11ac, 20MHz, 1x1.
  7891. * bit 14-15 - operating voltage corner mode for 11ac, 20MHz, 2x2.
  7892. * bit 16-17 - operating voltage corner mode for 11ac, 40MHz, 1x1.
  7893. * bit 18-19 - operating voltage corner mode for 11ac, 40MHz, 2x2.
  7894. * bit 20-21 - operating voltage corner mode for 11ac, 80MHz, 1x1.
  7895. * bit 22-23 - operating voltage corner mode for 11ac, 80MHz, 2x2.
  7896. * bit 24-25 - operating voltage corner mode for 11ac, 160MHz, 1x1.
  7897. * bit 26-27 - operating voltage corner mode for 11ac, 160MHz, 2x2.
  7898. * ---------------------------------------------
  7899. * 00 - Static voltage corner SVS
  7900. * 01 - static voltage corner LOW SVS
  7901. * 10 - Dynamic voltage corner selection based on TPUT
  7902. * 11 - Dynamic voltage corner selection based on TPUT and Tx Flush counters
  7903. */
  7904. WMI_PDEV_UPDATE_WDCVS_ALGO, /* 0x9a */
  7905. /* Enable/Disable data stall detection */
  7906. WMI_PDEV_PARAM_DATA_STALL_DETECT_ENABLE, /* 0x9b */
  7907. /* GCMP Support indication to FW */
  7908. WMI_PDEV_PARAM_GCMP_SUPPORT_ENABLE, /* 0x9c */
  7909. /** Enable/Disable chain selection optimization for one chain dtim
  7910. * non-zero - Enable optimization and use this non-zero value as the
  7911. * chain imbalance threshold for optimization to kick in
  7912. * (units = dB)
  7913. * 0- Disable optimization
  7914. */
  7915. WMI_PDEV_PARAM_1CH_DTIM_OPTIMIZED_CHAIN_SELECTION,/* 0x9d */
  7916. /*
  7917. * Override default FW behavior and explicitly enable / disable
  7918. * the use of CCK for PPDU transmissions.
  7919. *
  7920. * When CCK transmissions are disabled, the default OFDM legacy
  7921. * rate will be used instead.
  7922. */
  7923. WMI_PDEV_PARAM_CCK_TX_ENABLE, /* 0x9e */
  7924. /*
  7925. * Set the user-specified antenna gain, but in 0.5 dB units.
  7926. * This is a finer-granularity version of WMI_PDEV_PARAM_ANTENNA_GAIN.
  7927. * E.g. to set a gain of 15.5 dB, a value of 31 could be provided as the
  7928. * value accompanying the PDEV_PARAM_ANTENNA_GAIN_HALF_DB parameter type.
  7929. */
  7930. WMI_PDEV_PARAM_ANTENNA_GAIN_HALF_DB, /* 0x9f */
  7931. /*
  7932. * Global Enable/Disable control for Secondary Retry Feature Set
  7933. *
  7934. * Bit-0 : Enable/Disable Control for "PPDU Secondary Retry Support"
  7935. * Bit-1 : Enable/Disable Control for "RTS Black/White-listing Support"
  7936. * Bit-2 : Enable/Disable Control for "Higher MCS retry restriction on XRETRY failures"
  7937. * Bit 3-5: "Xretry threshold" to use
  7938. */
  7939. WMI_PDEV_PARAM_SECONDARY_RETRY_ENABLE, /* 0xA0 */
  7940. /** Set global uplink triggered PPDU duration limit (usec). */
  7941. WMI_PDEV_PARAM_SET_UL_PPDU_DURATION, /* 0xA1 */
  7942. /** Set target buffer status report trigger interval (ms) */
  7943. WMI_PDEV_PARAM_SET_UL_BSR_TRIG_INTERVAL, /* 0xA2 */
  7944. /** Use simplified equal RU allocation for DL and UL OFDMA */
  7945. WMI_PDEV_PARAM_EQUAL_RU_ALLOCATION_ENABLE, /* 0xA3 */
  7946. /** Enable/disable MWS-COEX 4G (LTE) Quick FTDM.
  7947. * 0 - Don't allow quick FTDM Policy (Default)
  7948. * 1 - Allow quick FTDM policy.
  7949. */
  7950. WMI_PDEV_PARAM_MWSCOEX_4G_ALLOW_QUICK_FTDM, /* 0xA4 */
  7951. /** Set MWS-COEX 5G-NR power limit.
  7952. * 0: Don't apply user specific power limit,
  7953. * use internal power limit (Default)
  7954. * 1-2: invalid value (ignored)
  7955. * 3-21: apply the specified value as the external power limit, in dBm
  7956. * >21: invalid value (ignored)
  7957. */
  7958. WMI_PDEV_PARAM_MWSCOEX_SET_5GNR_PWR_LIMIT, /* 0xA5 */
  7959. /** Set max msdus available for cong ctrl in target */
  7960. WMI_PDEV_PARAM_SET_CONG_CTRL_MAX_MSDUS, /* 0xA6 */
  7961. /*
  7962. * Configures the Estimated Throughput Calculation indication (802.11mc) settings.
  7963. * The accompanying A_UINT32 parameter, in units of seconds, specifies how often FW needs to send the ESP estimation indication to the host.
  7964. * Value 0: Disable this feature
  7965. * Non zero Value: Periodicity (seconds)
  7966. */
  7967. WMI_PDEV_PARAM_ESP_INDICATION_PERIOD, /* 0xA7 */
  7968. /*
  7969. * Enable/Disable periodic peer CFR capture
  7970. * WMI_PEER_CFR_CAPTURE_ENABLE - Enable per peer periodic CFR capture
  7971. * WMI_PEER_CFR_CAPTURE_DISABLE - Disable per peer periodic CFR capture
  7972. */
  7973. WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE,
  7974. /*
  7975. * Set the base timer for the periodic CFR capture. By default this is 10ms.
  7976. * The period ('periodicity' param in wmi_peer_cfr_capture_cmd) of
  7977. * CFR measurement of other peers will be in multiples of this base timer.
  7978. * The unit is in milliseconds.
  7979. */
  7980. WMI_PDEV_PARAM_PERIODIC_CFR_BASE_TIMER,
  7981. /*
  7982. * Once the periodic capture is enabled using
  7983. * WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE, the timer starts running in
  7984. * the target. This parameter will ensure that the timer stops if there are
  7985. * no active peers in the capture list. Once the peers are added again to
  7986. * the capture list, the timer will not start again. The timer has to be
  7987. * started again using WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE.
  7988. * Value 1: Enable this feature
  7989. * Value 0: Disable this feature
  7990. */
  7991. WMI_PDEV_PARAM_ENABLE_OPTIMIZED_PERIODIC_CFR_TIMER,
  7992. /*
  7993. * Configures a portion of the Estimated Service Params indication
  7994. * (802.11mc) settings, which together specify estimated throughput.
  7995. * The accompanying A_UINT32 parameter is the ESP BA WINDOW size advertised
  7996. * Value 0: Disable this feature
  7997. * Non zero Value: ESP BA WINDOW size
  7998. */
  7999. WMI_PDEV_PARAM_ESP_BA_WINDOW,
  8000. /*
  8001. * Configures a portion of the Estimated Service Params indication
  8002. * (802.11mc) settings, which together specify estimated throughput.
  8003. * The accompanying A_UINT32 parameter is the air time fraction to be
  8004. * advertised in the ESP IE
  8005. * Value 0: Disable this feature
  8006. * Non zero Value: Air time fraction in percentage
  8007. */
  8008. WMI_PDEV_PARAM_ESP_AIRTIME_FRACTION,
  8009. /*
  8010. * Configures a portion of the Estimated Service Params indication
  8011. * (802.11mc) settings, which together specify estimated throughput.
  8012. * The accompanying A_UINT32 parameter specifies PPDU duration in units
  8013. * of milliseconds.
  8014. * Value 0: Disable this feature
  8015. * Non zero Value: PPDU duration in milliseconds
  8016. */
  8017. WMI_PDEV_PARAM_ESP_PPDU_DURATION,
  8018. /*
  8019. * Enable/Disable NOL(Non Occupancy list) in firmware
  8020. * 1- Use NOL in firmware
  8021. * 0- Don't use NOL in firmware
  8022. */
  8023. WMI_PDEV_PARAM_USE_NOL,
  8024. /*
  8025. * Allow / Not Allow RU26 in any user's RU allocation field in UL OFDMA
  8026. * trigger frames sent by AP
  8027. * 1 - Allow RU26
  8028. * 0 - Do not allow RU26
  8029. */
  8030. WMI_PDEV_PARAM_UL_RU26_ALLOWED,
  8031. /*
  8032. * Enable/Disable sub channel marking
  8033. * 1 - Enable sub channel marking
  8034. * 0 - Disable sub channel marking (default value)
  8035. */
  8036. WMI_PDEV_PARAM_SUB_CHANNEL_MARKING,
  8037. /*
  8038. * Enable/Disable/Set MGMT_TTL in milliseconds.
  8039. * non_zero - Enable, with the specified value
  8040. * 0 - Disable
  8041. */
  8042. WMI_PDEV_PARAM_SET_MGMT_TTL,
  8043. /*
  8044. * Enable/Disable/Set PROBE_RESP_TTL in milliseconds.
  8045. * non_zero - Enable, with the specified value
  8046. * 0 - Disable
  8047. */
  8048. WMI_PDEV_PARAM_SET_PROBE_RESP_TTL,
  8049. /*
  8050. * TBTT_CTRL_CFG
  8051. * BITS 0 - 2 (refer to WMI_TBTT_CTRL_CFG enum)
  8052. * 0 - DEFAULT -> HW_TBTT
  8053. * 1 - SW_TBTT -> HW_TBTT disabled,
  8054. * software would truncate BURST near TBTT
  8055. * 2 - IGNORE_TBTT
  8056. *
  8057. * BITS 3 - 31 Reserved, must be set to 0x0
  8058. */
  8059. WMI_PDEV_PARAM_SET_TBTT_CTRL,
  8060. /*
  8061. * BITS0 ~1 (refer to enum)
  8062. * 0 - default --> always update
  8063. * 1 - ignore to update
  8064. * 2 - update if larger than threshould
  8065. * 3 - update if less or equal than threshould
  8066. *
  8067. * BITS 2 ~ 31 Threshould
  8068. */
  8069. WMI_PDEV_PARAM_NAV_OVERRIDE_CONFIG,
  8070. /* Set global MU PPDU duration for DL (usec units) */
  8071. WMI_PDEV_PARAM_SET_MU_PPDU_DURATION,
  8072. /*
  8073. * Enable / disable test mode configuration.
  8074. * By default FW will always send triggers dynamically (mix of BSR/Basic).
  8075. * The below testmode are only used for certain tests.
  8076. * A value of 1 in a given bit enables corresponding test mode.
  8077. * bit | test mode
  8078. * ---------------
  8079. * 0 | FW only sends BSR triggers.
  8080. * 1 | FW only sends Basic triggers.
  8081. * 2 | If set, FW enables MU-RTS trigger.
  8082. * | If cleared, FW uses implementation-specific internal default setting.
  8083. * 3 | FW enables unicast embedded trigger in HE MU PPDU.
  8084. * 4-31| reserved.
  8085. */
  8086. WMI_PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_TYPE_ENABLE,
  8087. /*
  8088. * Configure test command to set LSIG len.
  8089. * Value 0: Dynamic LSIG based on STA's qdepth.
  8090. * Non zero Value: LSIG length to be configured
  8091. * as part of trigger frame.
  8092. * bit |
  8093. * ---------------
  8094. * 0 - 30 | Bits storing the host supplied <value>.
  8095. * 31 | If set: The legitimate value closest to the value specified in
  8096. * | in bits 30:0 is directly set in UL len in trigger frame.
  8097. * | The FW performs calculations to determine which legitimate
  8098. * | value is closest to the specified value, if the specified
  8099. * | value is not already legitimate.
  8100. * | If not set: The value in lower bits is the duration (in ms),
  8101. * | from which the UL len is derived.
  8102. * | Example: if host sets 2000 (2ms), then UL Len in trigger
  8103. * | will be derived to accommodate the given duration.
  8104. */
  8105. WMI_PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_LSIG_LEN,
  8106. /*
  8107. * Configure test cmd for fixed rate setting used for UL Trigger
  8108. * (only Basic/BSR triggers).
  8109. * The top nibble is used to select which format to use for encoding
  8110. * the rate specification: 0xVXXXXXXX, V must be 1 for the UL
  8111. * format.
  8112. * If V == 0b0001: format is: 0x1000RRRR.
  8113. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  8114. *
  8115. */
  8116. WMI_PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_FIXED_RATE,
  8117. /*
  8118. * Configure test command to set the mac padding duration.
  8119. * 0 - FW set Mac Padding to 0us
  8120. * 1 - FW set Mac Padding to 8us
  8121. * 2 - FW set Mac Padding to 16us
  8122. */
  8123. WMI_PDEV_PARAM_SET_TEST_CMD_UL_MAC_PADDING,
  8124. /*
  8125. * Configure test command to set the fc duration in BSR trigger frame.
  8126. * value 0 - FW calculates the duration (default).
  8127. * Non zero Value: Duration to be configured.
  8128. */
  8129. WMI_PDEV_PARAM_SET_TEST_CMD_UL_BSR_FC_DURATION,
  8130. /* Parameter used for configuring TWT scheduling properties
  8131. * bit | config_mode
  8132. * -----------------
  8133. * 0 | Disables DL MU for TWT peers within TWT SP
  8134. * 1 | Disables UL MU for TWT peers within TWT SP
  8135. * 2 | Disables scheduling from WMM sched context for TWT peers
  8136. * 3 | If set, FW only sends Basic triggers in TWT SP.
  8137. * 4-31| reserved.
  8138. */
  8139. WMI_PDEV_PARAM_SET_TEST_CMD_TWT_SCHED_CONFIG,
  8140. /* Parameter used to configure OBSS Packet Detect threshold
  8141. * for Non-SRG / SRG based Spatial Reuse feature.
  8142. * (SRG = Spatial Reuse Group)
  8143. * The accepted values are in between 0x00 and 0xFF, inclusive.
  8144. * The parameter value is programmed into the appropriate spatial reuse
  8145. * register, to specify how low the background signal strength from
  8146. * neighboring BSS cells must be, for this AP to employ spatial reuse.
  8147. *
  8148. * The value of the parameter is compared against the OBSS RSSI in dB.
  8149. * It is a 8-bit value whose
  8150. * range is -128 to 127 (after two's complement operation).
  8151. * For example, if the parameter value is 0xF5, the target will
  8152. * allow spatial reuse if the RSSI detected from other BSS
  8153. * is below -10 dB.
  8154. * Similarly, if the parameter value is 0x0A, the target will
  8155. * allow spatial reuse only if the RSSI detected from neighboring
  8156. * BSS cells is no more than 10 dB.
  8157. *
  8158. * If Bit 29 is set, then input value will be in dBm. This is used
  8159. * for chipsets that uses dBm for comparison across MAC/Phy blocks.
  8160. * Older chipsets support input in dB units. For newer chipsets, dBm
  8161. * units will be used.
  8162. * The host will use the WMI_SERVICE_SRG_SRP_SPATIAL_REUSE_SUPPORT
  8163. * service ready bit to differentiate between providing input as dB or dBm.
  8164. *
  8165. * bit | purpose
  8166. * -----------------
  8167. * 0 - 7 | Param Value for non-SRG based Spatial Reuse
  8168. * 8 - 15| Param value for SRG based Spatial Reuse
  8169. * 16 - 28| Reserved
  8170. * 29 | Param value is in dBm units rather than dB units
  8171. * 30 | Enable/Disable SRG based spatial reuse.
  8172. * | If set to 0, ignore bits 8-15.
  8173. * 31 | Enable/Disable Non-SRG based spatial reuse.
  8174. * | If set to 0, ignore bits 0-7.
  8175. */
  8176. WMI_PDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD,
  8177. /* Parameter used for enabling/disabling non wlan coex from boot */
  8178. WMI_PDEV_PARAM_ENABLE_NON_WLAN_COEX_FROM_BOOT,
  8179. /* Parameter used to configure OBSS Packet Detection per Access Category
  8180. * for SRP based and OBSS_PD based spatial reuse feature.
  8181. * (SRP = Spatial Reuse Parameter)
  8182. * Based on the bits set, the corresponding Access Category Queues will have
  8183. * spatial reuse enabled / disabled.
  8184. * bit | AC
  8185. * ------------
  8186. * 0 | BK for SRG/Non-SRG
  8187. * 1 | BE for SRG/Non-SRG
  8188. * 2 | VI for SRG/Non-SRG
  8189. * 3 | VO for SRG/Non-SRG
  8190. * 4 - 15 | Reserved
  8191. * 16 | BK for SRP
  8192. * 17 | BE for SRP
  8193. * 18 | VI for SRP
  8194. * 19 | VO for SRP
  8195. * 20 - 31 | Reserved
  8196. */
  8197. WMI_PDEV_PARAM_SET_CMD_OBSS_PD_PER_AC,
  8198. /*
  8199. * Parameter used to enable/disable FW control of MU-EDCA and AP back-off
  8200. * parameters.
  8201. * If set to zero, FW mode is disabled; if set to 1, FW mode is enabled.
  8202. * Default setting is to have it enabled, and user can disable it in
  8203. * favor of manual mode or host control mode.
  8204. */
  8205. WMI_PDEV_PARAM_ENABLE_FW_DYNAMIC_HE_EDCA,
  8206. /*
  8207. * Parameter used to set default 6 GHz rate.
  8208. * Applies to all non data transmissions in 6 GHz unless
  8209. * overwritten by respective VDEV params.
  8210. */
  8211. WMI_PDEV_PARAM_DEFAULT_6GHZ_RATE,
  8212. /*
  8213. * Configures the duration (in seconds) to delay the channel avoidance
  8214. * indication at WLAN firmware before indicating it to WLAN host,
  8215. * when WWAN (LTE/5GNR) PCC is in conflict due to WWAN-WLAN coexistence.
  8216. * Default value is 60 seconds.
  8217. * If set to zero, FW sends channel avoidance indcation immediately to Host.
  8218. */
  8219. WMI_PDEV_PARAM_MWSCOEX_PCC_CHAVD_DELAY,
  8220. /*
  8221. * Configures the duration (in seconds) to delay the channel avoidance
  8222. * indication at WLAN firmware before indicating it to WLAN host,
  8223. * when WWAN (LTE/5GNR) SCC is in conflict due to WWAN-WLAN coexistence.
  8224. * Default value is 120 seconds.
  8225. * If set to zero, FW sends channel avoidance indcation immediately to Host.
  8226. */
  8227. WMI_PDEV_PARAM_MWSCOEX_SCC_CHAVD_DELAY,
  8228. /*
  8229. * Parameter used to set ageout timer value from host (units = seconds).
  8230. * If not set, FW use default value 2 seconds.
  8231. * ageout time: the time upto which DFS channel information such as
  8232. * beacon found is remembered
  8233. */
  8234. WMI_PDEV_PARAM_SET_DFS_CHAN_AGEOUT_TIME,
  8235. /* Parameter used for enabling/disabling xlna bypass for SAP mode*/
  8236. WMI_PDEV_PARAM_SET_SAP_XLNA_BYPASS,
  8237. /* Parameter used to enable/disable SRP feature */
  8238. WMI_PDEV_PARAM_ENABLE_SRP,
  8239. /* Parameter used to enable/disable SR prohibit feature */
  8240. WMI_PDEV_PARAM_ENABLE_SR_PROHIBIT,
  8241. /*
  8242. * Parameter used to enable/disable UL OFDMA mBSSID support for
  8243. * trigger frames. It is disabled by default.
  8244. * bit | config_mode
  8245. * -----------------
  8246. * 0 | Enable/Disable mBSSID trigger support for basic triggers.
  8247. * 1 | Enable/Disable mBSSID trigger support for BSR triggers.
  8248. * 2 | Enable/Disable mBSSID trigger support for MU RTS.
  8249. * 3 | Enable/Disable mBSSID trigger support for UL MUMIMO triggers.
  8250. */
  8251. WMI_PDEV_PARAM_ENABLE_MBSSID_CTRL_FRAME,
  8252. /*
  8253. * Parameter to set preamble punctured band as a bitmask, i.e.
  8254. * which 20MHz in the 80MHz bandwidth or 40MHz in 160MHz bandwidth.
  8255. * E.g. if first 20MHz is the primary and preamble puncturing is
  8256. * desired for 3rd 20Mhz, then the host will send 0x0100.
  8257. * FW doesn't expect the primary 20MHz to be punctured.
  8258. * This param is required only for 11ax release.
  8259. */
  8260. WMI_PDEV_PARAM_SET_PREAM_PUNCT_BW,
  8261. /*
  8262. * Parameter used to set the Margin dB value to be included for calculating
  8263. * the spatial reuse value in common info field of the UL Trigger frame.
  8264. * Accepted value as per Spec are 0 to 5 dB (inclusive).
  8265. */
  8266. WMI_PDEV_PARAM_SR_TRIGGER_MARGIN,
  8267. /* Param to enable/disable PCIE HW ILP */
  8268. WMI_PDEV_PARAM_PCIE_HW_ILP,
  8269. /*
  8270. * Configure the TXTD_START_TIMESTAMP parameters
  8271. * The timestamp units are nanoseconds.
  8272. * This parameter can be used to adjust at what point the TXTD module
  8273. * will start operating after the STA connects to an AP.
  8274. */
  8275. WMI_PDEV_PARAM_SET_TXTD_START_TIMESTAMP,
  8276. /*
  8277. * Parameter to configure and enable/disable features for mesh usecases
  8278. * bit | config_mode
  8279. * -----------------
  8280. * 0 | Set to 1 to disable BSSID based spatial reuse.
  8281. * 1-31 | Reserved.
  8282. */
  8283. WMI_PDEV_PARAM_SET_MESH_PARAMS,
  8284. /* Param to enable low latency mode */
  8285. WMI_PDEV_PARAM_LOW_LATENCY_SCHED_MODE,
  8286. /* Param to enable per USERPD SSR - for MultiPD enabled chips */
  8287. WMI_PDEV_PARAM_MPD_USERPD_SSR,
  8288. /*
  8289. * Param to disable Hardware Assist feature,
  8290. * i.e. Disables HW feature that reconstructs the PPDU
  8291. * by picking failing MPDUs from prior FES attempt.
  8292. */
  8293. WMI_PDEV_PARAM_DISABLE_HW_ASSIST,
  8294. /*
  8295. * Param to Enable/Disable Tx on DFS for Scan Radio RDP
  8296. * Send MGMT frames on the DFS channel before Tx on the said channel
  8297. * when in monitor mode.
  8298. * Scan Radio RDP should do Tx on DFS channel based on available
  8299. * Tx frame on DFS without doing CAC.
  8300. * Host should ensure to send this param only for Scan Radio RDP.
  8301. * This param used to inform Scan Radio Supports Tx on DFS channel.
  8302. */
  8303. WMI_PDEV_PARAM_SCAN_RADIO_TX_ON_DFS,
  8304. /*
  8305. * Param to configure Minimum OBSS ppdu time below which
  8306. * spatial reuse will not happen over the TXOP duration of the OBSS frame.
  8307. * If the incoming OBSS frame ppdu duration is greater then the value
  8308. * configured, then spatial reuse can happen over the OBSS PPDU.
  8309. * The value is configured in microseconds.
  8310. */
  8311. WMI_PDEV_PARAM_OBSS_MIN_DURATION_CHECK_FOR_SR,
  8312. /*
  8313. * Param to Enable/Disable Truncate SR feature.
  8314. * PPDUs transmitted using SR opportunity will be truncated at the end
  8315. * of OBSS frame duration and will not extend beyond.
  8316. */
  8317. WMI_PDEV_PARAM_TRUNCATE_SR,
  8318. /* Parameter used to configure separate NON_SRG/SRG OBSS PD threshold for
  8319. * for Control Frame.
  8320. * (SRG = Spatial Reuse Group)
  8321. * The accepted values are in between 0x00 and 0xFF, inclusive.
  8322. * The parameter value is checked against the RSSI of the OBSS Control
  8323. * frame. If RSSI is below the parameter value, then the Control frame is
  8324. * aborted and NAV is ignored. Separate OBSS PD threshold for Control frame
  8325. * is added to account for the higher TX power used for such control frames
  8326. * when compared with data frames.
  8327. *
  8328. * The input value will be interpreted as a signed value in dBm units.
  8329. *
  8330. * The values will be reflected in the registers only if
  8331. * SRG / non-srg based spatial reuse is enabled via
  8332. * WMI_PDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD cmd.
  8333. * bit | purpose
  8334. * -----------------
  8335. * 0 - 7 | Param Value for non-srg OBSS PD threshold for non-SRG
  8336. * | control frames
  8337. * 8 - 15| Param Value for srg OBSS PD threshold for SRG control frames
  8338. * 16 - 29| Reserved
  8339. * 30 | Enable/Disable separate SRG based spatial reuse for OBSS
  8340. * | control frames.
  8341. * | If set to 0, ignore bits 8-15.
  8342. * 31 | Enable/Disable separate non-SRG based spatial reuse for OBSS
  8343. * | control frames.
  8344. * | If set to 0, ignore bits 0-7.
  8345. */
  8346. WMI_PDEV_PARAM_CTRL_FRAME_OBSS_PD_THRESHOLD,
  8347. /* Param to configure the access category for the TWT queue */
  8348. WMI_PDEV_PARAM_TWT_AC_CONFIG,
  8349. /*
  8350. * TX xretry extension parameter to allow product specific adjustment.
  8351. * I.e. multiply the xretry counter by N% for a requirement from framework.
  8352. */
  8353. WMI_PDEV_PARAM_PDEV_STATS_TX_XRETRY_EXT,
  8354. /*
  8355. * Per PDEV level, set the highest rate cap allowed.
  8356. * The accepted input values NSS are between 1-8, inclusive.
  8357. * The accepted input values MCS are between 0-15, inclusive.
  8358. * FW will use the input values as is.
  8359. * The rate cap is specified in NSS, MCS format each 4bits.
  8360. * i.e., NSS and MCS combined as shown below:
  8361. * b'0-b'7 indicate the NSS (NSS value can be from 1-8)
  8362. * b'8-b'15 indicate the MCS (MCS value can be from 0-15)
  8363. * b'16 Enable or disable nss cap
  8364. * b'17 Enable or disable mcs cap
  8365. * b'18 To determine the direction for caping DL_direction
  8366. * b'19 To determine the direction for caping UL_direction
  8367. *
  8368. * For backwards compatibility, if bits 18+19 are both
  8369. * cleared, then the rate cap applies to both DL and UL.
  8370. * To summarize:
  8371. * bit 19 | bit 18 | rate cap applied
  8372. * -------+--------+------------------
  8373. * 0 | 0 | cap rates only for DL
  8374. * 0 | 1 | cap rates only for DL
  8375. * 1 | 0 | cap rates only for UL
  8376. * 1 | 1 | cap rates for both UL and DL
  8377. */
  8378. WMI_PDEV_PARAM_RATE_UPPER_CAP,
  8379. /*
  8380. * Per PDEV level, set number of MCS to be dropped based
  8381. * on configured retries.
  8382. * bit | config_mode
  8383. * -----------------
  8384. * 0-7 | param value for number MCS to be dropped
  8385. * 8-15| param value for excess retries
  8386. * 16 | If set to 0, number of MCS to be dropped is disabled, i.e.
  8387. * | fall back to default mode.
  8388. * | The default value of MCS to be dropped is 1.
  8389. * 17 | if set to 0, retries is disabled/use default retries.
  8390. * | The default value of retries is 3.
  8391. */
  8392. WMI_PDEV_PARAM_SET_RATE_DROP_DOWN_RETRY_THRESH,
  8393. /*
  8394. * Param value to configure min/max probe interval for MCS of current NSS.
  8395. * If probe interval expired, ratectrl will probe for MCS of current NSS.
  8396. * If probe was successful, rate control updates the probe time with a
  8397. * min of probe interval.
  8398. * If probe failed for MCS of current NSS, rate control updates the probe
  8399. * time by multiplying the probe period with 2, which is not greater than
  8400. * max probe interval.
  8401. * units = milliseconds
  8402. * bits | config_mode
  8403. * 0-15 | minimum probe time for MCS
  8404. * 16-31| maximum probe time for MCS
  8405. */
  8406. WMI_PDEV_PARAM_MIN_MAX_MCS_PROBE_INTERVAL,
  8407. /* Param value to configure min/max probe interval for NSS.
  8408. * Rate control will probe for alternate NSS if probe time is expired.
  8409. * If probe for an alternate NSS was successful, rate control updates
  8410. * the probe time with a min of probe interval.
  8411. * If probe failed for alternate NSS, rate control updates the probe time
  8412. * by multiplying the probe period with 2, which is not greater than
  8413. * max probe interval.
  8414. * units = milliseconds
  8415. * bits | config_mode
  8416. * 0-15 | minimum probe time for alternate NSS
  8417. * 16-32| maximum probe time for alternate NSS
  8418. */
  8419. WMI_PDEV_PARAM_MIN_MAX_NSS_PROBE_INTERVAL,
  8420. /* Param to enable/disable probing on all BW */
  8421. WMI_PDEV_PARAM_EN_PROBE_ALL_BW,
  8422. /* Param to enable/disable updating scrambler seed feature */
  8423. WMI_PDEV_PARAM_EN_UPDATE_SCRAM_SEED,
  8424. /*
  8425. * Param to set the GPIO Drive Configuration value for
  8426. * Smart Antenna Parallel Mode
  8427. */
  8428. WMI_PDEV_PARAM_SA_PARALLEL_MODE_GPIO_DRIVE_CFG,
  8429. /*
  8430. * Param to disable LPI antenna optimizations
  8431. * In 6G LPI mode, additional antenna optimizations are done to
  8432. * improve range. Param is provided to disable the added
  8433. * optimizations.
  8434. */
  8435. WMI_PDEV_PARAM_DISABLE_LPI_ANT_OPTIMIZATION,
  8436. /*
  8437. * Param to configure exclusive RSID range for 11az TB ranging.
  8438. * RSID's are subset of total AID space and must not be used
  8439. * for any other purpose by Host. FW uses these IDs for trigger
  8440. * based ranging.
  8441. */
  8442. WMI_PDEV_PARAM_RTT_11AZ_RSID_RANGE,
  8443. /*
  8444. * Disable the indicated DL and UL scheduler for the PDEV.
  8445. *
  8446. * This command is not supported in STA mode.
  8447. *
  8448. * A value of 1 in a given bit position disables the corresponding mode,
  8449. * and a value of 0 enables the mode. The WMI_SCHED_MODE_FLAGS enum defines
  8450. * the bit positions for each mode.
  8451. *
  8452. * A single 32 bit value is used to store the following configuration
  8453. * bitmap.
  8454. *
  8455. * This command differs from WMI_VDEV_PARAM_SET_HEMU_MODE and
  8456. * WMI_VDEV_PARAM_SET_EHT_MU_MODE in that it is intended for use during
  8457. * normal AP operation, and will never cause a VAP restart or other
  8458. * capability bit modification. It simply controls the scheduler
  8459. * behavior.
  8460. *
  8461. * bit | sched mode
  8462. * ---------------
  8463. * 0 | DL MU-MIMO
  8464. * 1 | UL MU-MIMO
  8465. * 2 | DL OFDMA
  8466. * 3 | UL OFDMA
  8467. * 4..31 | RESERVED
  8468. */
  8469. WMI_PDEV_PARAM_SET_DISABLED_SCHED_MODES,
  8470. /*
  8471. * Override default FW behavior and explicitly enable / disable
  8472. * to allow frames without encryption when no encryption is set.
  8473. *
  8474. */
  8475. WMI_PDEV_PARAM_BYPASS_ENCRYPTION,
  8476. /*
  8477. * Param to Enable/Disable scan blanking feature on the Scan Radio
  8478. * Host should ensure to send this param only for Scan Radio
  8479. * The WMI_SCAN_BLANKING_MODE enum specifies the possible values for this parameter.
  8480. * Based on the received input, the scan blanking feature will be carried out as explained in the enum WMI_SCAN_BLANKING_MODE
  8481. */
  8482. WMI_PDEV_PARAM_SET_SCAN_BLANKING_MODE,
  8483. /*
  8484. * Parameter to enable/disable Multi-Channel Concurrency low latency mode
  8485. * bit | config_mode
  8486. * -----------------
  8487. * 0 | 0:disable, 1:enable.
  8488. * 1-31 | Reserved.
  8489. */
  8490. WMI_PDEV_PARAM_SET_CONC_LOW_LATENCY_MODE,
  8491. /*
  8492. * Parameter to enable/disable low power listen mode
  8493. * bit | config_mode
  8494. * -----------------
  8495. * 0 | 0:disable, 1:enable.
  8496. * 1-31 | Reserved.
  8497. */
  8498. WMI_PDEV_PARAM_LPL_SETTING,
  8499. /** Set Probe Resp retry limit */
  8500. WMI_PDEV_PARAM_PROBE_RESP_RETRY_LIMIT,
  8501. /*
  8502. * Parameter for configure PCIE
  8503. *
  8504. * 0 - Default Value(FW Control).
  8505. * 1 - Force PCIE Gen Speed and Lane Width to maximum supported value.
  8506. */
  8507. WMI_PDEV_PARAM_PCIE_CONFIG,
  8508. /** CTS timeout - change wireless packet cts timeout configuration,
  8509. * units are microseconds
  8510. */
  8511. WMI_PDEV_PARAM_CTS_TIMEOUT,
  8512. /** Slot time - change wireless packet slot time value dynamically,
  8513. * units are microseconds
  8514. */
  8515. WMI_PDEV_PARAM_SLOT_TIME,
  8516. /** VO dedicated time -
  8517. * allocate dedicated time slots for VO access category across all
  8518. * ATF groups in a pdev.
  8519. * Note :
  8520. * 1. Per AC airtime per group is already available through
  8521. * ATF WMM WMI commands
  8522. * 2. The dedicated time slot is applicable per second
  8523. * 3. Units are in milli-seconds
  8524. */
  8525. WMI_PDEV_PARAM_ATF_VO_DEDICATED_TIME,
  8526. /** VI dedicated time -
  8527. * allocate dedicated time slots for VI access category across all
  8528. * ATF groups in a pdev.
  8529. * Note :
  8530. * 1. Per AC airtime per group is already given through ATF WMM WMI cmds
  8531. * 2. The dedicated time slot is applicable per second
  8532. * 3. Units are in milli-seconds
  8533. */
  8534. WMI_PDEV_PARAM_ATF_VI_DEDICATED_TIME,
  8535. /** Parameter used for enabling/disabling RFA toggle for SAP mode */
  8536. WMI_PDEV_PARAM_SET_SAP_RFA_TOGGLE,
  8537. /** Parameter to set PDEV level UL OFDMA RTD */
  8538. WMI_PDEV_PARAM_UL_OFDMA_RTD,
  8539. /** Parameter to enable/disable tid0 and tid3 mapping to work 3 Link MLO */
  8540. WMI_PDEV_PARAM_TID_MAPPING_3LINK_MLO,
  8541. /** Parameter to enable/disable small OFDMA M-RUs **/
  8542. WMI_PDEV_PARAM_ENABLE_SMALL_MRU,
  8543. /** Parameter to enable/disable large OFDMA M-RUs **/
  8544. WMI_PDEV_PARAM_ENABLE_LARGE_MRU,
  8545. /** Parameter to enable/disable delayed LMR feedback.
  8546. * Note: Delayed LMR feedback is supported only up to two ranging peers to
  8547. * enable Location certification
  8548. * 0 - Immediate LMR feedback is enabled for all ranging peers.
  8549. * 1 (non zero) - delayed LMR feedback is enabled. Third peer onward will
  8550. * default to immediate LMR feedback.
  8551. **/
  8552. WMI_PDEV_PARAM_ENABLE_DELAYED_LMR_FEEDBACK,
  8553. /* DFS_RADAR_MASK: Radar mask setting programmed in HW registers.
  8554. * bit | config_mode
  8555. * -----------------------
  8556. * 0 - 15 | Each bit represents a 20 MHz portion of the channel.
  8557. * | 0-Unmasked 1-Masked
  8558. * 16 - 31 | Reserved.
  8559. * Bit 0 represents the highest 20 MHz portion within the channel.
  8560. * For example...
  8561. * For a 80 MHz channel, bit0 = highest 20 MHz, bit3 = lowest 20 MHz
  8562. * For a 320 MHz channel, bit0 = highest 20 MHz, bit15 = lowest 20 MHz
  8563. */
  8564. WMI_PDEV_PARAM_DFS_RADAR_MASK,
  8565. /** PWR_REDUCTION_IN_QUARTER_DB:
  8566. * Reduce final Tx power (derived after all considerations)
  8567. * by specified value in units of 0.25 dB.
  8568. * E.g. a value of 4 will result in a 1.0 dB tx power reduction.
  8569. */
  8570. WMI_PDEV_PARAM_PWR_REDUCTION_IN_QUARTER_DB,
  8571. WMI_PDEV_PARAM_ENABLE_CHIPSET_LOGGING,
  8572. /** SCAN MODE:
  8573. * bit | scan_mode
  8574. * -----------------
  8575. * 0 | SISO SCAN - 1x1 scan
  8576. * | If this bit is 0, then use default scan (NxN).
  8577. * 1-31 | Reserved.
  8578. */
  8579. WMI_PDEV_PARAM_SCAN_MODE,
  8580. /** configure datastall consecutive no ack interval (units = ms) */
  8581. WMI_PDEV_PARAM_DSTALL_CONSECUTIVE_TX_NO_ACK_INTERVAL,
  8582. /** configure datastall consecutive no ack threshold */
  8583. WMI_PDEV_PARAM_DSTALL_CONSECUTIVE_TX_NO_ACK_THRESHOLD,
  8584. WMI_PDEV_PARAM_MGMT_SRNG_REAP_EVENT_THRESHOLD,
  8585. } WMI_PDEV_PARAM;
  8586. #define WMI_PDEV_ONLY_BSR_TRIG_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 0, 1)
  8587. #define WMI_PDEV_ONLY_BSR_TRIG_ENABLE(trig_type) WMI_SET_BITS(trig_type, 0, 1, 1)
  8588. #define WMI_PDEV_ONLY_BSR_TRIG_DISABLE(trig_type) WMI_SET_BITS(trig_type, 0, 1, 0)
  8589. #define WMI_PDEV_ONLY_BASIC_TRIG_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 1, 1)
  8590. #define WMI_PDEV_ONLY_BASIC_TRIG_ENABLE(trig_type) WMI_SET_BITS(trig_type, 1, 1, 1)
  8591. #define WMI_PDEV_ONLY_BASIC_TRIG_DISABLE(trig_type) WMI_SET_BITS(trig_type, 1, 1, 0)
  8592. #define WMI_PDEV_MU_RTS_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 2, 1)
  8593. #define WMI_PDEV_MU_RTS_ENABLE(trig_type) WMI_SET_BITS(trig_type, 2, 1, 1)
  8594. #define WMI_PDEV_MU_RTS_DISABLE(trig_type) WMI_SET_BITS(trig_type, 2, 1, 0)
  8595. #define WMI_PDEV_EMBEDDED_TRIGGER_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 3, 1)
  8596. #define WMI_PDEV_EMBEDDED_TRIGGER_ENABLE(trig_type) WMI_SET_BITS(trig_type, 3, 1, 1)
  8597. #define WMI_PDEV_EMBEDDED_TRIGGER_DISABLE(trig_type) WMI_SET_BITS(trig_type, 3, 1, 0)
  8598. #define WMI_PDEV_TWT_SCHED_CFG_IS_DL_MU_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 0, 1)
  8599. #define WMI_PDEV_TWT_SCHED_CFG_DL_MU_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 0, 1, 1)
  8600. #define WMI_PDEV_TWT_SCHED_CFG_DL_MU_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 0, 1, 0)
  8601. #define WMI_PDEV_TWT_SCHED_CFG_IS_UL_MU_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 1, 1)
  8602. #define WMI_PDEV_TWT_SCHED_CFG_UL_MU_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 1, 1, 1)
  8603. #define WMI_PDEV_TWT_SCHED_CFG_UL_MU_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 1, 1, 0)
  8604. #define WMI_PDEV_TWT_SCHED_CFG_IS_WMM_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 2, 1)
  8605. #define WMI_PDEV_TWT_SCHED_CFG_WMM_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 2, 1, 1)
  8606. #define WMI_PDEV_TWT_SCHED_CFG_WMM_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 2, 1, 0)
  8607. #define WMI_PDEV_TWT_SCHED_CFG_IS_USE_ONLY_BASIC_TRIGGER_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 3, 1)
  8608. #define WMI_PDEV_TWT_SCHED_CFG_USE_ONLY_BASIC_TRIGGER_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 3, 1, 1)
  8609. #define WMI_PDEV_TWT_SCHED_CFG_USE_ONLY_BASIC_TRIGGER_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 3, 1, 0)
  8610. #define WMI_PDEV_LSIG_LEN_DURATION_ENABLE(lsig_len) WMI_SET_BITS(lsig_len, 0, 31, 1)
  8611. #define WMI_PDEV_LSIG_LEN_DURATION_DISABLE(lsig_len) WMI_SET_BITS(lsig_len, 0, 31, 0)
  8612. #define WMI_PDEV_LSIG_LEN_DURATION_GET(lsig_len) WMI_GET_BITS(lsig_len, 0, 30)
  8613. #define WMI_PDEV_LSIG_LEN_DURATION_SET(lsig_len, value) WMI_SET_BITS(lsig_len, 0, 30, value)
  8614. #define WMI_PDEV_IS_NON_SRG_ENABLED(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 31, 1)
  8615. #define WMI_PDEV_NON_SRG_ENABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 31, 1, 1)
  8616. #define WMI_PDEV_NON_SRG_DISABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 31, 1, 0)
  8617. #define WMI_PDEV_NON_SRG_PD_THRESHOLD_SET(pd_threshold_cfg, value) WMI_SET_BITS(pd_threshold_cfg, 0, 8, value)
  8618. #define WMI_PDEV_NON_SRG_PD_THRESHOLD_GET(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 0, 8)
  8619. #define WMI_PDEV_IS_SRG_ENABLED(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 30, 1)
  8620. #define WMI_PDEV_SRG_ENABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 30, 1, 1)
  8621. #define WMI_PDEV_SRG_DISABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 30, 1, 0)
  8622. #define WMI_PDEV_SRG_PD_THRESHOLD_SET(pd_threshold_cfg, value) WMI_SET_BITS(pd_threshold_cfg, 8, 8, value)
  8623. #define WMI_PDEV_SRG_PD_THRESHOLD_GET(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 8, 8)
  8624. #define WMI_PDEV_IS_PD_THRESHOLD_IN_DBM(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 29, 1)
  8625. #define WMI_PDEV_SET_PD_THRESHOLD_IN_DBM(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 29, 1, 1)
  8626. #define WMI_PDEV_OBSS_PD_ENABLE_PER_AC_SET(per_ac_cfg, value) WMI_SET_BITS(per_ac_cfg, 0, 4, value)
  8627. #define WMI_PDEV_OBSS_PD_ENABLE_PER_AC_GET(per_ac_cfg) WMI_GET_BITS(per_ac_cfg, 0, 4)
  8628. #define WMI_PDEV_SRP_ENABLE_PER_AC_SET(per_ac_cfg, value) WMI_SET_BITS(per_ac_cfg, 16, 4, value)
  8629. #define WMI_PDEV_SRP_ENABLE_PER_AC_GET(per_ac_cfg) WMI_GET_BITS(per_ac_cfg, 16, 4)
  8630. #define WMI_PDEV_IS_NON_SRG_SEP_PD_THRESH_CTRL_FRAME_ENABLED(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 31, 1)
  8631. #define WMI_PDEV_NON_SRG_SEP_PD_THRESH_CTRL_FRAME_ENABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 31, 1, 1)
  8632. #define WMI_PDEV_NON_SRG_SEP_PD_THRESH_CTRL_FRAME_DISABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 31, 1, 0)
  8633. #define WMI_PDEV_NON_SRG_SEP_PD_THRESH_CTRL_FRAME_SET(pd_threshold_cfg, value) WMI_SET_BITS(pd_threshold_cfg, 0, 8, value)
  8634. #define WMI_PDEV_NON_SRG_SEP_PD_THRESH_CTRL_FRAME_GET(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 0, 8)
  8635. #define WMI_PDEV_IS_SRG_SEP_PD_THRESH_CTRL_FRAME_ENABLED(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 30, 1)
  8636. #define WMI_PDEV_SRG_SEP_PD_THRESH_CTRL_FRAME_ENABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 30, 1, 1)
  8637. #define WMI_PDEV_SRG_SEP_PD_THRESH_CTRL_FRAME_DISABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 30, 1, 0)
  8638. #define WMI_PDEV_SRG_SEP_PD_THRESH_CTRL_FRAME_SET(pd_threshold_cfg, value) WMI_SET_BITS(pd_threshold_cfg, 8, 8, value)
  8639. #define WMI_PDEV_SRG_SEP_PD_THRESH_CTRL_FRAME_GET(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 8, 8)
  8640. #define WMI_PDEV_UPPER_CAP_NSS_GET(value) WMI_GET_BITS(value, 0, 8)
  8641. #define WMI_PDEV_UPPER_CAP_NSS_SET(_value, value) WMI_SET_BITS(_value, 0, 8, value)
  8642. #define WMI_PDEV_UPPER_CAP_MCS_GET(value) WMI_GET_BITS(value, 8, 8)
  8643. #define WMI_PDEV_UPPER_CAP_MCS_SET(_value, value) WMI_SET_BITS(_value, 8, 8, value)
  8644. #define WMI_PDEV_UPPER_CAP_NSS_VALID_GET(value) WMI_GET_BITS(value, 16, 1)
  8645. #define WMI_PDEV_UPPER_CAP_NSS_VALID_SET(_value, value) WMI_SET_BITS(_value, 16, 1, value)
  8646. #define WMI_PDEV_UPPER_CAP_MCS_VALID_GET(value) WMI_GET_BITS(value, 17, 1)
  8647. #define WMI_PDEV_UPPER_CAP_MCS_VALID_SET(_value, value) WMI_SET_BITS(_value, 17, 1, value)
  8648. #define WMI_PDEV_UPPER_CAP_DL_DIR_GET(value) WMI_GET_BITS(value, 18, 1)
  8649. #define WMI_PDEV_UPPER_CAP_DL_DIR_SET(_value, value) WMI_SET_BITS(_value, 18, 1, value)
  8650. #define WMI_PDEV_UPPER_CAP_UL_DIR_GET(value) WMI_GET_BITS(value, 19, 1)
  8651. #define WMI_PDEV_UPPER_CAP_UL_DIR_SET(_value, value) WMI_SET_BITS(_value, 19, 1, value)
  8652. #define WMI_PDEV_RATE_DROP_NUM_MCS_GET(value) WMI_GET_BITS(value, 0, 8)
  8653. #define WMI_PDEV_RATE_DROP_NUM_MCS_SET(_value, value) WMI_SET_BITS(_value, 0, 8, value)
  8654. #define WMI_PDEV_RATE_DROP_RETRY_THRSH_GET(value) WMI_GET_BITS(value, 8, 8)
  8655. #define WMI_PDEV_RATE_DROP_RETRY_THRSH_SET(_value, value) WMI_SET_BITS(_value, 8, 8, value)
  8656. #define WMI_PDEV_RATE_DROP_NUM_MCS_VALID_GET(value) WMI_GET_BITS(value, 16, 1)
  8657. #define WMI_PDEV_RATE_DROP_NUM_MCS_VALID_SET(_value, value) WMI_SET_BITS(_value, 16, 1, value)
  8658. #define WMI_PDEV_RATE_DROP_RETRY_THRSH_VALID_GET(value) WMI_GET_BITS(value, 17, 1)
  8659. #define WMI_PDEV_RATE_DROP_RETRY_THRSH_VALID_SET(_value, value) WMI_SET_BITS(_value, 17, 1, value)
  8660. #define WMI_PDEV_RATE_MIN_MCS_PROBE_INTERVAL_GET(value) WMI_GET_BITS(value, 0, 16)
  8661. #define WMI_PDEV_RATE_MIN_MCS_PROBE_INTERVAL_SET(_value, value) WMI_SET_BITS(_value, 0, 16, value)
  8662. #define WMI_PDEV_RATE_MAX_MCS_PROBE_INTERVAL_GET(value) WMI_GET_BITS(value, 16, 16)
  8663. #define WMI_PDEV_RATE_MAX_MCS_PROBE_INTERVAL_SET(_value, value) WMI_SET_BITS(_value, 16, 16, value)
  8664. #define WMI_PDEV_RATE_MIN_NSS_PROBE_INTERVAL_GET(value) WMI_GET_BITS(value, 0, 16)
  8665. #define WMI_PDEV_RATE_MIN_NSS_PROBE_INTERVAL_SET(_value, value) WMI_SET_BITS(_value, 0, 16, value)
  8666. #define WMI_PDEV_RATE_MAX_NSS_PROBE_INTERVAL_GET(value) WMI_GET_BITS(value, 16, 16)
  8667. #define WMI_PDEV_RATE_MAX_NSS_PROBE_INTERVAL_SET(_value, value) WMI_SET_BITS(_value, 16, 16, value)
  8668. #define WMI_MBSSID_CTRL_FRAME_BASIC_TRIGGER ((A_UINT32) 1 << 0)
  8669. #define WMI_MBSSID_CTRL_FRAME_BSR_TRIGGER ((A_UINT32) 1 << 1)
  8670. #define WMI_MBSSID_CTRL_FRAME_MU_RTS_TRIGGER ((A_UINT32) 1 << 2)
  8671. #define WMI_MBSSID_CTRL_FRAME_UL_MU_MIMO_TRIGGER ((A_UINT32) 1 << 3)
  8672. typedef struct {
  8673. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param */
  8674. /** pdev_id for identifying the MAC
  8675. * See macros starting with WMI_PDEV_ID_ for values.
  8676. */
  8677. A_UINT32 pdev_id;
  8678. /** parameter id */
  8679. A_UINT32 param_id; /* WMI_PDEV_PARAM */
  8680. /** parameter value */
  8681. A_UINT32 param_value;
  8682. } wmi_pdev_set_param_cmd_fixed_param;
  8683. /* param values for WMI_PDEV_PARAM_SET_TBTT_CTRL's TBTT_CTRL_CFG bit-field */
  8684. typedef enum {
  8685. WMI_TBTT_CTRL_HW_TRUNCATE = 0,
  8686. WMI_TBTT_CTRL_SW_TRUNCATE,
  8687. WMI_TBTT_CTRL_IGNORE_TBTT,
  8688. WMI_TBTT_CTRL_MAX = 0x7,
  8689. } WMI_TBTT_CTRL_CFG;
  8690. /** MACRO to set / get TBTT_CTRL_CFG bit-field within
  8691. * WMI_PDEV_PARAM_SET_TBTT_CTRL:
  8692. * bits 0~2 : TBTT_CTRL_CFG
  8693. * bits 3~31: Reserved (set to 0x0)
  8694. */
  8695. #define WMI_PDEV_PARAM_TBTT_CTRL_CFG_S 0
  8696. #define WMI_PDEV_PARAM_TBTT_CTRL_CFG 0x00000007
  8697. #define WMI_PDEV_PARAM_GET_TBTT_CTRL_CFG(word32) \
  8698. WMI_F_MS(word32, WMI_PDEV_PARAM_TBTT_CTRL_CFG)
  8699. #define WMI_PDEV_PARAM_SET_TBTT_CTRL_CFG(word32, value) \
  8700. WMI_F_RMW(word32,value,WMI_PDEV_PARAM_TBTT_CTRL_CFG)
  8701. /** MACRO define to set / get 11b and 11ag mode TX chain number:
  8702. * bit 0~15 : 11b mode TX chain number.
  8703. * bit 16~31: 11ag mode TX chain number.
  8704. */
  8705. #define WMI_PDEV_PARAM_11B_TX_CHAIN_NUM_S 0
  8706. #define WMI_PDEV_PARAM_11B_TX_CHAIN_NUM 0x0000FFFF
  8707. #define WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM_S 16
  8708. #define WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM 0xFFFF0000
  8709. #define WMI_PDEV_PARAM_GET_11B_TX_CHAIN_NUM(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_11B_TX_CHAIN_NUM)
  8710. #define WMI_PDEV_PARAM_SET_11B_TX_CHAIN_NUM(word32, value) WMI_F_RMW(word32,value,WMI_PDEV_PARAM_11B_TX_CHAIN_NUM)
  8711. #define WMI_PDEV_PARAM_GET_11AG_TX_CHAIN_NUM(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM)
  8712. #define WMI_PDEV_PARAM_SET_11AG_TX_CHAIN_NUM(word32, value) WMI_F_RMW(word32,value,WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM)
  8713. /* param_value for param_id WMI_PDEV_PARAM_CTS_CBW */
  8714. typedef enum {
  8715. WMI_CTS_CBW_INVALID = 0,
  8716. WMI_CTS_CBW_20,
  8717. WMI_CTS_CBW_40,
  8718. WMI_CTS_CBW_80,
  8719. WMI_CTS_CBW_80_80,
  8720. WMI_CTS_CBW_160,
  8721. } WMI_CTS_CBW;
  8722. typedef struct {
  8723. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param */
  8724. /** pdev_id for identifying the MAC
  8725. * See macros starting with WMI_PDEV_ID_ for values.
  8726. */
  8727. A_UINT32 pdev_id;
  8728. /** parameter */
  8729. A_UINT32 param;
  8730. } wmi_pdev_get_tpc_config_cmd_fixed_param;
  8731. typedef struct {
  8732. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_div_get_rssi_antid_fixed_param */
  8733. /** pdev_id for identifying the MAC */
  8734. A_UINT32 pdev_id;
  8735. /** RSSI (rssi_chain_x_pri20) on each chain (units: dB above noise floor) */
  8736. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  8737. /** index of the last-used antenna for each chain */
  8738. A_UINT32 ant_id[WMI_MAX_CHAINS];
  8739. /** mac address of diversity peer */
  8740. wmi_mac_addr macaddr;
  8741. } wmi_pdev_div_get_rssi_antid_fixed_param;
  8742. typedef enum {
  8743. WMI_TPC_STATS_EVENT_SEND_REG = 0x00000001,
  8744. WMI_TPC_STATS_EVENT_SEND_RATE = 0x00000002,
  8745. WMI_TPC_STATS_EVENT_SEND_CTL = 0x00000004,
  8746. WMI_TPC_STATS_EVENT_SEND_REG_RATE_CTL = 0x00000007, /* REG | RATE | CTL */
  8747. } WMI_PDEV_TPC_STATS_PARAMS;
  8748. typedef enum {
  8749. WMI_HALPHY_TPC_STATS_SUPPORT_160 = 0,
  8750. WMI_HALPHY_TPC_STATS_SUPPORT_320,
  8751. WMI_HALPHY_TPC_STATS_SUPPORT_AX,
  8752. WMI_HALPHY_TPC_STATS_SUPPORT_AX_EXTRA_MCS,
  8753. WMI_HALPHY_TPC_STATS_SUPPORT_BE,
  8754. WMI_HALPHY_TPC_STATS_SUPPORT_BE_PUNC,
  8755. WMI_HALPHY_TPC_STATS_SUPPORT_CTL_DESIGN_1,
  8756. } WMI_HALPHY_TPC_STATS_SUPPORT_BITF; /* support bit fields */
  8757. typedef struct {
  8758. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_stats_cmd_fixed_param */
  8759. /** pdev_id for identifying the MAC
  8760. * See macros starting with WMI_PDEV_ID_ for values.
  8761. */
  8762. A_UINT32 pdev_id;
  8763. /** parameter -
  8764. * This is to specify whether we want only the target power
  8765. * information (rates array) or the CTL power or the regulatory
  8766. * power information. At present, we send all of them.
  8767. */
  8768. A_UINT32 param; /* Currently expect WMI_TPC_STATS_EVENT_SEND_REG_RATE_CTL
  8769. * as a host specification that rates array, regulatory
  8770. * power array, and ctl power array are all to be sent.
  8771. * See WMI_PDEV_TPC_STATS_PARAMS.
  8772. */
  8773. } wmi_pdev_get_tpc_stats_cmd_fixed_param;
  8774. typedef struct {
  8775. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_stats_event_fixed_param */
  8776. A_UINT32 pdev_id; /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values */
  8777. 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 */
  8778. A_UINT32 event_count; /* Incremented for every event chunk for Host to know the sequence */
  8779. /* wmi_tpc_configs TLV to optionally follow */
  8780. /* wmi_max_reg_power_allowed TLVs to optionally follow */
  8781. /* wmi_tpc_rates_array TLVs to optionally follow */
  8782. /* wmi_tpc_ctl_pwr_table TLVs to optionally follow */
  8783. } wmi_pdev_get_tpc_stats_event_fixed_param;
  8784. typedef struct {
  8785. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tpc_configs */
  8786. A_UINT32 regDomain;
  8787. A_UINT32 chanFreq; /* current channel in MHz */
  8788. A_UINT32 phyMode; /* current phy mode - See WLAN_PHY_MODE for the different phy modes */
  8789. A_UINT32 maxAntennaGain; /* Maximum antenna gain for the current regulatory in 0.25 dBm steps */
  8790. A_UINT32 twiceMaxRDPower; /* Maximum transmit power allowed in the regulatory domain in 0.25 dBm steps */
  8791. A_INT32 userAntennaGain; /* User specified antenna gain in 0.25 dBm steps */
  8792. A_UINT32 powerLimit; /* The overall power limit in 0.25 dBm steps */
  8793. A_UINT32 rateMax; /* The total number of rates supported */
  8794. A_UINT32 numTxChain; /* The total number of active chains */
  8795. A_UINT32 ctl; /* See CONFORMANCE_TEST_LIMITS enumeration */
  8796. A_UINT32 flags; /* See WMI_TPC_CONFIG_EVENT_FLAG */
  8797. /* support_bits:
  8798. * Tells info about BE, HE, HE_EXTRA_MCS, 160, 320, 11BE PUNC.
  8799. * Refer to enum WMI_HALPHY_TPC_STATS_SUPPORT_BITF.
  8800. */
  8801. A_UINT32 support_bits;
  8802. A_UINT32 nss; /* target specific NUM_SPATIAL_STREAM flag */
  8803. } wmi_tpc_configs;
  8804. typedef struct {
  8805. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_max_reg_power_allowed */
  8806. A_UINT32 reg_power_type; /* 0: maxRegAllowedPower (1D array),
  8807. * 1: maxRegAllowedPowerAGCDD (2D array),
  8808. * 2: maxRegAllowedPowerAGSTBC (2D array),
  8809. * 3: maxRegAllowedPowerAGTXBF (2D array)
  8810. */
  8811. A_UINT32 reg_power_array_len; /* Length of the regulatory power array being sent in bytes */
  8812. A_UINT32 d1; /* the length of 1st (innermost) dimension array */
  8813. A_UINT32 d2; /* the length of 2nd dimension array */
  8814. A_UINT32 d3; /* the length of 3rd dimension array (for future use) */
  8815. A_UINT32 d4; /* the length of 4th dimension array (for future use) */
  8816. /*
  8817. * This TLV is followed by an A_INT16 TLV-array that will carry
  8818. * one of the four types of regulatory power arrays.
  8819. *
  8820. * The multi-dimensional regulatory power array will be communicated
  8821. * as a flat array: Host to stitch it back as 2D array.
  8822. * For an array[a][b][c][d], d1 = d, d2 = c, d3 = b, d4 = a
  8823. * For a 2D array, array[a][b], d1 = b, d2 = a, d3 = 1, d4 = 1
  8824. * The possible types of following A_INT16 TLV arrays are
  8825. * 1. A_INT16 maxRegAllowedPower[WHAL_TPC_TX_NUM_CHAIN];
  8826. * 2. A_INT16 maxRegAllowedPowerAGCDD[WHAL_TPC_TX_NUM_CHAIN - 1][WHAL_TPC_TX_NUM_CHAIN - 1];
  8827. * 3. A_INT16 maxRegAllowedPowerAGSTBC[WHAL_TPC_TX_NUM_CHAIN - 1][WHAL_TPC_TX_NUM_CHAIN - 1];
  8828. * 4. A_INT16 maxRegAllowedPowerAGTXBF[WHAL_TPC_TX_NUM_CHAIN - 1][WHAL_TPC_TX_NUM_CHAIN - 1];
  8829. * where WHAL_TPC_TX_NUM_CHAIN=2 for CYP and 8 for HK.
  8830. */
  8831. } wmi_max_reg_power_allowed;
  8832. typedef struct {
  8833. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tpc_rates_array */
  8834. A_UINT32 rate_array_type; /* 0: ratesArray,
  8835. * 1: ratesArray2 (for chain > 4),
  8836. * 2: dl_ofdma rate array
  8837. */
  8838. A_UINT32 rate_array_len;
  8839. /* This TLV will be followed by an A_UINT16 TLV array that will
  8840. * carry one of the types of TPC rate arrays.
  8841. * All the rates arrays are 1D arrays.
  8842. * The possible types of following A_UINT16 TLV arrays are
  8843. * 1. A_UINT16 ratesArray[WHAL_TPC_RATE_MAX];
  8844. * This array has to be referred when number of active chains is < 4
  8845. * 2. A_UINT16 ratesArray2[WHAL_TPC_RATE_MAX];
  8846. * This array has to be referred when number of active chains is > 4
  8847. * 3. A_UINT16 ratesArray_DL_OFDMA[72];
  8848. * WHAL_TPC_RATE_MAX is 748 for HK (considering PHY A0 8x8)
  8849. * WHAL_TPC_RATE_MAX is 188 for CYP (considering PHY A0 2x2)
  8850. * Each 16 bit value in the rates array carries both SU and MU
  8851. * target power information.
  8852. * Bits 0:7 contained the SU target power (signed value, 0.25 dBm units),
  8853. * bits 8:15 denote the MU target power (signed value, 0.25 dBm units).
  8854. */
  8855. } wmi_tpc_rates_array;
  8856. typedef struct {
  8857. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tpc_ctl_pwr_table */
  8858. A_UINT32 ctl_array_type; /* 0: ctl_array,
  8859. * 1: ctl_160 array,
  8860. * 2: ctl_dlOfdma array,
  8861. * 3: ctl_ulOfdma array
  8862. */
  8863. A_UINT32 ctl_array_len; /* Length of the CTL array being sent in bytes */
  8864. A_UINT32 end_of_ctl_pwr; /* Message MAY be split into smaller chunks
  8865. * to fit in the WMI svc msg size limit:
  8866. * 0 indicates more chunks of CTL info to follow,
  8867. * 1 indicates end of CTL info.
  8868. */
  8869. A_UINT32 ctl_pwr_count; /* Incremented for every CTL info chunk
  8870. * for Host to know the sequence.
  8871. */
  8872. A_UINT32 d1; /* the length of 1st (innermost) dimension array */
  8873. A_UINT32 d2; /* the length of 2nd dimension array */
  8874. A_UINT32 d3; /* the length of 3rd dimension array */
  8875. A_UINT32 d4; /* the length of 4th dimension array */
  8876. /* This TLV will be followed by an A_INT8 TLV-array that will
  8877. * carry one the types of CTL power arrays.
  8878. * The CTL array will be multi-dimensional, but will be communicated as
  8879. * a flat array; the host has to stitch it back into a 4D array.
  8880. * The possible types of following A_INT8 arrays are
  8881. * 1. A_INT8 ctlEdgePwrBF[WHAL_MAX_NUM_CHAINS][2][10][8];
  8882. * 2. A_INT8 ctlEdgePwr160[WHAL_MAX_NUM_CHAINS/2][2][2][4];
  8883. * 3. A_INT8 ctlEdgePwrBF_dlOFDMA[WHAL_MAX_NUM_CHAINS][2][3][8];
  8884. * For e.g., in ctlEdgePwrBF
  8885. * D4 = WHAL_MAX_NUM_CHAINS = 8 for HK, 2 for CYP, 4 for Pine
  8886. * D3 = BF on/off = 2
  8887. * D2 = 10 which the number of different tx modes,
  8888. * like cck, legacy, HT20, HT40, VHT80, etc.
  8889. * D1 = NSS = 8, number of spatial streams
  8890. * Total number of elements = D4*D3*D2*D1
  8891. * The same will apply for ctl_dlOfdma array, except that the values
  8892. * of d1,d2,d3,d4 will be different.
  8893. */
  8894. } wmi_tpc_ctl_pwr_table;
  8895. typedef struct {
  8896. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_bss_chan_info_request_fixed_param */
  8897. A_UINT32 param; /* 1 = read only, 2= read and clear */
  8898. A_UINT32 pdev_id; /* pdev_id for identifying mac */
  8899. } wmi_pdev_bss_chan_info_request_fixed_param;
  8900. typedef struct {
  8901. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_update_ctltable_request_fixed_param */
  8902. A_UINT32 total_len; /* the total number of ctl table bytes to be transferred */
  8903. A_UINT32 len; /* the number of ctltable bytes in current payload */
  8904. A_UINT32 seq; /* the number of current transfers */
  8905. /*
  8906. * This TLV is followed by the following additional TLVs:
  8907. * ARRAY_BYTE TLV of ctltable_data
  8908. */
  8909. } wmi_pdev_update_ctltable_request_fixed_param;
  8910. #define WMI_ESP_ESTIMATE_GET_BE(airtime) WMI_GET_BITS(airtime, 0, 8)
  8911. #define WMI_ESP_ESTIMATE_SET_BE(airtime, value) WMI_SET_BITS(airtime, 0, 8, value)
  8912. #define WMI_ESP_ESTIMATE_GET_BK(airtime) WMI_GET_BITS(airtime, 8, 8)
  8913. #define WMI_ESP_ESTIMATE_SET_BK(airtime, value) WMI_SET_BITS(airtime, 8, 8, value)
  8914. #define WMI_ESP_ESTIMATE_GET_VI(airtime) WMI_GET_BITS(airtime, 16, 8)
  8915. #define WMI_ESP_ESTIMATE_SET_VI(airtime, value) WMI_SET_BITS(airtime, 16, 8, value)
  8916. #define WMI_ESP_ESTIMATE_GET_VO(airtime) WMI_GET_BITS(airtime, 24, 8)
  8917. #define WMI_ESP_ESTIMATE_SET_VO(airtime, value) WMI_SET_BITS(airtime, 24, 8, value)
  8918. typedef struct {
  8919. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_esp_estimate_event_fixed_param */
  8920. /** pdev_id for identifying the MAC
  8921. * See macros starting with WMI_PDEV_ID_ for values.
  8922. * In non-DBDC case host should set it to 0
  8923. */
  8924. A_UINT32 pdev_id;
  8925. /*
  8926. * Percentage of air time available for each AC
  8927. * BIT[0-7] : AC_BE
  8928. * BIT[8-15] : AC_BK
  8929. * BIT[16-23] : AC_VI
  8930. * BIT[24-31] : AC_VO
  8931. */
  8932. A_UINT32 ac_airtime_percentage;
  8933. } wmi_esp_estimate_event_fixed_param;
  8934. #define WMI_FAST_DIVERSITY_BIT_OFFSET 0
  8935. #define WMI_SLOW_DIVERSITY_BIT_OFFSET 1
  8936. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT 2
  8937. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
  8938. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_GET_BITS(word32) \
  8939. (((word32) & WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
  8940. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SET_BITS(word32, value) \
  8941. do { \
  8942. (word32) &= ~WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
  8943. (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT) & \
  8944. WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
  8945. } while (0)
  8946. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT 6
  8947. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
  8948. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_GET_BITS(word32) \
  8949. (((word32) & WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
  8950. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SET_BITS(word32, value) \
  8951. do { \
  8952. (word32) &= ~WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
  8953. (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT) & \
  8954. WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
  8955. } while (0)
  8956. typedef struct {
  8957. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param */
  8958. union {
  8959. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  8960. /** pdev_id for identifying the MAC
  8961. * See macros starting with WMI_PDEV_ID_ for values.
  8962. */
  8963. A_UINT32 pdev_id;
  8964. };
  8965. /**
  8966. * The following "value" field is divided into bit fields as follows:
  8967. * bits | purpose
  8968. * -----+---------------------------------------
  8969. * 0 | enable/disable FAST diversity
  8970. * 1 | enable/disable SLOW diversity
  8971. * 5:2 | chain0 slow-diversity weighting factor
  8972. * 9:6 | chain1 slow-diversity weighting factor
  8973. * 31:10| currently unused (set to 0x0)
  8974. * Refer to the above WMI_[FAST/SLOW]_DIVERSITY constants.
  8975. */
  8976. A_UINT32 value;
  8977. } wmi_pdev_set_antenna_diversity_cmd_fixed_param;
  8978. #define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3
  8979. typedef struct {
  8980. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param */
  8981. A_UINT32 vdev_id; /* vdev_id, where RSSI monitoring will take place */
  8982. A_UINT32 request_id; /* host will configure request_id and firmware echo this id in RSSI_BREACH_EVENT */
  8983. A_UINT32 enabled_bitmap; /* bit [0-2] = low_rssi_breach_enabled[0-2] enabled, bit [3-5] = hi_rssi_breach_enabled[0-2] */
  8984. A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] > [1] > [2] */
  8985. A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] < [1] < [2] */
  8986. 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] */
  8987. 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] */
  8988. A_UINT32 min_report_interval; /* After last event is generated, we wait until this interval to generate next event */
  8989. A_UINT32 max_num_report; /* this is to suppress number of event to be generated */
  8990. } wmi_rssi_breach_monitor_config_fixed_param;
  8991. typedef struct {
  8992. /** parameter */
  8993. A_UINT32 param;
  8994. } wmi_pdev_dump_cmd;
  8995. typedef enum {
  8996. PAUSE_TYPE_CHOP = 0x1, /** for MCC (switch channel), only vdev_map is valid */
  8997. PAUSE_TYPE_PS = 0x2, /** for peer station sleep in sap mode, only peer_id is valid */
  8998. PAUSE_TYPE_UAPSD = 0x3, /** for uapsd, only peer_id and tid_map are valid. */
  8999. PAUSE_TYPE_P2P_CLIENT_NOA = 0x4, /** only vdev_map is valid, actually only one vdev id is set at one time */
  9000. PAUSE_TYPE_P2P_GO_PS = 0x5, /** only vdev_map is valid, actually only one vdev id is set at one time */
  9001. PAUSE_TYPE_STA_ADD_BA = 0x6, /** only peer_id and tid_map are valid, actually only one tid is set at one time */
  9002. PAUSE_TYPE_AP_PS = 0x7, /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */
  9003. PAUSE_TYPE_IBSS_PS = 0x8, /** for pausing IBSS vdev when all the peers are in PS. only vdev_map is valid */
  9004. PAUSE_TYPE_CHOP_TDLS_OFFCHAN = 0x9, /** for TDLS offchannel MCC (switch channel), only vdev_map is valid, TDLS connection tracker needs to be notified */
  9005. PAUSE_TYPE_HOST = 0x15, /* host is requesting vdev pause */
  9006. } wmi_tx_pause_type;
  9007. typedef enum {
  9008. ACTION_PAUSE = 0x0,
  9009. ACTION_UNPAUSE = 0x1,
  9010. } wmi_tx_pause_action;
  9011. typedef struct {
  9012. A_UINT32 tlv_header;
  9013. A_UINT32 pause_type;
  9014. A_UINT32 action;
  9015. A_UINT32 vdev_map;
  9016. A_UINT32 peer_id;
  9017. A_UINT32 tid_map;
  9018. } wmi_tx_pause_event_fixed_param;
  9019. typedef enum {
  9020. WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK = 0,
  9021. WMI_MGMT_TX_COMP_TYPE_DISCARD,
  9022. WMI_MGMT_TX_COMP_TYPE_INSPECT,
  9023. WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK,
  9024. WMI_MGMT_TX_COMP_TYPE_MAX,
  9025. } WMI_MGMT_TX_COMP_STATUS_TYPE;
  9026. #define WMI_VDEV_ID_VALID_FROM_INFO_GET(info) \
  9027. WMI_GET_BITS(info, 3, 1)
  9028. #define WMI_VDEV_ID_VALID_FROM_INFO_SET(info,val) \
  9029. WMI_SET_BITS(info, 3, 1, val)
  9030. #define WMI_VDEV_ID_FROM_INFO_GET(info) \
  9031. WMI_GET_BITS(info, 4, 8)
  9032. #define WMI_VDEV_ID_FROM_INFO_SET(info,val) \
  9033. WMI_SET_BITS(info, 4, 8, val)
  9034. typedef struct {
  9035. A_UINT32 tlv_header;
  9036. A_UINT32 desc_id; /* from tx_send_cmd */
  9037. A_UINT32 status; /* WMI_MGMT_TX_COMP_STATUS_TYPE */
  9038. /** pdev_id for identifying the MAC that transmitted the mgmt frame
  9039. * See macros starting with WMI_PDEV_ID_ for values.
  9040. */
  9041. A_UINT32 pdev_id;
  9042. /* ppdu_id
  9043. * Hardware PPDU ID for tracking the completion stats
  9044. * A ppdu_id value of 0x0 is invalid, and should be ignored.
  9045. */
  9046. A_UINT32 ppdu_id;
  9047. /* ack_rssi
  9048. * TX mgmt ack RSSI report to host.
  9049. * Only valid when status == COMPLETE_OK and the ACK_RSSI report is enabled
  9050. * ACK RSSI is reported as SNR dB, i.e. how many dB the RSSI is above
  9051. * the noise floor.
  9052. */
  9053. A_UINT32 ack_rssi;
  9054. /* xmit rate in kbps */
  9055. A_UINT32 tx_rate;
  9056. /* phy mode WLAN_PHY_MODE of the channel defined in wlan_defs.h */
  9057. A_UINT32 peer_phymode;
  9058. A_UINT32 retries_count;
  9059. /* current 64 bit TSF timestamp */
  9060. A_UINT32 tx_tsf_l32;
  9061. A_UINT32 tx_tsf_u32;
  9062. /* info:
  9063. * Bit[0:2] - band on which frame is sent, band value will be
  9064. * one of the wmi_mlo_band_info_t enum constants.
  9065. * Macros WMI_ROAM_BTM_RESP_MLO_BAND_INFO_GET,SET
  9066. * can be reused for setting mlo band info.
  9067. * Bit[3] - set when vdev_id_info is populated in Bit[4:11]
  9068. * macros WMI_VDEV_ID_VALID_FROM_INFO_GET,SET can be used
  9069. * Bit[4:11] - vdev_id on which frame is sent,
  9070. * Macros WMI_VDEV_ID_FROM_INFO_GET,SET can be used
  9071. * Bit[12:31] - reserved
  9072. */
  9073. A_UINT32 info;
  9074. } wmi_mgmt_tx_compl_event_fixed_param;
  9075. typedef struct {
  9076. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offchan_data_tx_compl_event_fixed_param */
  9077. A_UINT32 desc_id; /* from tx_send_cmd */
  9078. A_UINT32 status; /* same status as WMI_MGMT_TX_COMP_STATUS_TYPE */
  9079. /** pdev_id for identifying the MAC that transmitted the mgmt frame
  9080. * See macros starting with WMI_PDEV_ID_ for values.
  9081. */
  9082. A_UINT32 pdev_id;
  9083. /* ppdu_id
  9084. * Hardware PPDU ID for tracking the completion stats
  9085. * A ppdu_id value of 0x0 is invalid, and should be ignored.
  9086. */
  9087. A_UINT32 ppdu_id;
  9088. } wmi_offchan_data_tx_compl_event_fixed_param;
  9089. typedef struct {
  9090. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_qos_null_frame_tx_compl_event_fixed_param */
  9091. A_UINT32 desc_id; /* echoed from tx_send_cmd */
  9092. A_UINT32 status; /* same status as WMI_MGMT_TX_COMP_STATUS_TYPE */
  9093. /** pdev_id for identifying the MAC that transmitted the QoS NULL frame
  9094. * See macros starting with WMI_PDEV_ID_ for values.
  9095. */
  9096. A_UINT32 pdev_id;
  9097. /* ppdu_id
  9098. * Hardware PPDU ID for tracking the completion stats
  9099. * A ppdu_id value of 0x0 is invalid, and should be ignored.
  9100. */
  9101. A_UINT32 ppdu_id;
  9102. /* ack_rssi
  9103. * TX mgmt ack RSSI report to host.
  9104. * Only valid when status == COMPLETE_OK and the ACK_RSSI report is enabled
  9105. * ack_rssi is reported in dBm.
  9106. */
  9107. A_INT32 ack_rssi;
  9108. } wmi_qos_null_frame_tx_compl_event_fixed_param;
  9109. typedef struct {
  9110. A_UINT32 tlv_header;
  9111. A_UINT32 num_reports;
  9112. /* tlv for completion
  9113. * A_UINT32 desc_ids[num_reports]; <- from tx_send_cmd
  9114. * A_UINT32 status[num_reports]; <- WMI_MGMT_TX_COMP_STATUS_TYPE
  9115. * A_UINT32 ppdu_id[num_reports]; <- list of PPDU IDs
  9116. * A_UINT32 ack_rssi[num_reports]; <- list of ack RSSI
  9117. * RSSI units = dB w.r.t. noise floor
  9118. */
  9119. } wmi_mgmt_tx_compl_bundle_event_fixed_param;
  9120. #define WMI_TPC_RATE_MAX 160
  9121. /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
  9122. #define WMI_TPC_TX_NUM_CHAIN 4
  9123. typedef enum {
  9124. /* bits 0-7 for table flags */
  9125. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
  9126. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
  9127. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
  9128. /* bits 8-11 for interface version flags */
  9129. WMI_TPC_CONFIG_EVENT_FLAG_IF_MASK = 0x0F00,
  9130. WMI_TPC_CONFIG_EVENT_FLAG_IF_V1 = 0x0100,
  9131. } WMI_TPC_CONFIG_EVENT_FLAG;
  9132. typedef struct {
  9133. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param */
  9134. A_UINT32 regDomain;
  9135. A_UINT32 chanFreq;
  9136. A_UINT32 phyMode;
  9137. A_UINT32 twiceAntennaReduction;
  9138. A_UINT32 twiceMaxRDPower;
  9139. A_INT32 twiceAntennaGain;
  9140. A_UINT32 powerLimit;
  9141. A_UINT32 rateMax;
  9142. A_UINT32 numTxChain;
  9143. A_UINT32 ctl;
  9144. A_UINT32 flags;
  9145. /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
  9146. A_INT8 maxRegAllowedPower[WMI_TPC_TX_NUM_CHAIN];
  9147. A_INT8 maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  9148. A_INT8 maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  9149. A_INT8 maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  9150. /** pdev_id for identifying the MAC
  9151. * See macros starting with WMI_PDEV_ID_ for values.
  9152. */
  9153. A_UINT32 pdev_id;
  9154. /* This TLV is followed by further TLVs:
  9155. * 1. byte array:
  9156. * A_UINT8 ratesArray[];
  9157. * 2a. multi-dimensional array dimension spec:
  9158. * wmi_tlv_arrays_len_param ctlPwrTbl_param[0 or 1]
  9159. *
  9160. * 2b. ctl power table
  9161. * A_UINT8 ctlPwrTbl_buf[bf][modes][nss], i.e.
  9162. * A_UINT8 ctlPwrTbl_buf[d3_len * d2_len * d1_len]
  9163. * bf is [0 or 1] for [on or off].
  9164. * For 2G, modes is [0, 1, 2, or 3] for
  9165. * [cck, legacy, (v)ht20, or (v)ht40]
  9166. * For 5G, modes is [0, 1, 2, or 3] for
  9167. * [legacy, (v)ht20, (v)ht40, or vht80]
  9168. * nss is [0, 1, 2, or 3] for the number of streams 1~4.
  9169. */
  9170. } wmi_pdev_tpc_config_event_fixed_param;
  9171. typedef struct {
  9172. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_div_rssi_antid_event_fixed_param */
  9173. A_UINT32 tlv_header;
  9174. /** how many elements in the MAX_CHAINS arrays below contain valid info */
  9175. A_UINT32 num_chains_valid;
  9176. /** RSSI (rssi_chain_x_pri20) on each chain (units: dB above noise floor) */
  9177. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  9178. /** index of the last-used antenna for each chain */
  9179. A_UINT32 ant_id[WMI_MAX_CHAINS];
  9180. /** mac address of diversity peer */
  9181. wmi_mac_addr macaddr;
  9182. /* EVM value for stream0 and stream1 20Mhz, dB units */
  9183. A_INT32 chain_evm[WMI_MAX_CHAINS];
  9184. } wmi_pdev_div_rssi_antid_event_fixed_param;
  9185. typedef struct {
  9186. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_bss_chan_info_event_fixed_param */
  9187. A_UINT32 freq; /* Units in MHz */
  9188. A_INT32 noise_floor; /* units are dBm */
  9189. /* rx clear - how often the channel was unused */
  9190. A_UINT32 rx_clear_count_low; /* low 31 bits of rx_clear cnt in 64bits format */
  9191. A_UINT32 rx_clear_count_high; /* high 31 bits of rx_clear cnt in 64bits format */
  9192. /* cycle count - elapsed time during the measured period, in clock ticks */
  9193. A_UINT32 cycle_count_low; /* low 31 bits of cycle cnt in 64bits format */
  9194. A_UINT32 cycle_count_high; /* high 31 bits of cycle cnt in 64bits format */
  9195. /* tx cycle count - elapsed time spent in tx, in clock ticks */
  9196. A_UINT32 tx_cycle_count_low; /* low 31 bits of tx_cycle cnt in 64bits format */
  9197. A_UINT32 tx_cycle_count_high; /* high 31 bits of tx_cycle cnt in 64bits format */
  9198. /* rx cycle count - elapsed time spent in rx, in clock ticks */
  9199. A_UINT32 rx_cycle_count_low; /* low 31 bits of rx_cycle cnt in 64bits format */
  9200. A_UINT32 rx_cycle_count_high; /* high 31 bits of rx_cycle cnt in 64bits format */
  9201. A_UINT32 rx_bss_cycle_count_low; /* low 31 bits of rx cycle cnt for my bss in 64bits format */
  9202. A_UINT32 rx_bss_cycle_count_high; /* high 31 bits of rx_cycle cnt for my bss in 64bits format */
  9203. A_UINT32 pdev_id; /* pdev_id for identifying the MAC */
  9204. } wmi_pdev_bss_chan_info_event_fixed_param;
  9205. typedef struct {
  9206. /* WMI event response update ctltable request to host */
  9207. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_update_ctltable_event_fixed_param */
  9208. A_UINT32 total_len; /* the total number of bytes to be transferred */
  9209. A_UINT32 len; /* the number of FW received bytes from host */
  9210. A_UINT32 seq; /* the number of current transfers */
  9211. } wmi_pdev_update_ctltable_event_fixed_param;
  9212. typedef struct {
  9213. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param */
  9214. A_UINT32 periodCnt;
  9215. A_UINT32 L1Cnt;
  9216. A_UINT32 L11Cnt;
  9217. A_UINT32 L12Cnt;
  9218. A_UINT32 L1Entry;
  9219. A_UINT32 L11Entry;
  9220. A_UINT32 L12Entry;
  9221. /** pdev_id for identifying the MAC
  9222. * See macros starting with WMI_PDEV_ID_ for values.
  9223. */
  9224. A_UINT32 pdev_id;
  9225. } wmi_pdev_l1ss_track_event_fixed_param;
  9226. typedef struct {
  9227. A_UINT32 len;
  9228. A_UINT32 msgref;
  9229. A_UINT32 segmentInfo;
  9230. } wmi_pdev_seg_hdr_info;
  9231. /*
  9232. * Transmit power scale factor.
  9233. *
  9234. */
  9235. typedef enum {
  9236. WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
  9237. WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
  9238. WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
  9239. WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
  9240. WMI_TP_SCALE_MIN = 4, /* min, but still on */
  9241. WMI_TP_SCALE_SIZE = 5, /* max num of enum */
  9242. } WMI_TP_SCALE;
  9243. #define WMI_MAX_DEBUG_MESG (sizeof(A_UINT32) * 32)
  9244. typedef struct {
  9245. /** message buffer, NULL terminated */
  9246. char bufp[WMI_MAX_DEBUG_MESG];
  9247. } wmi_debug_mesg_event;
  9248. enum {
  9249. /** P2P device */
  9250. VDEV_SUBTYPE_P2PDEV = 0,
  9251. /** P2P client */
  9252. VDEV_SUBTYPE_P2PCLI,
  9253. /** P2P GO */
  9254. VDEV_SUBTYPE_P2PGO,
  9255. /** BT3.0 HS */
  9256. VDEV_SUBTYPE_BT,
  9257. };
  9258. typedef struct {
  9259. /** idnore power , only use flags , mode and freq */
  9260. wmi_channel chan;
  9261. } wmi_pdev_set_channel_cmd;
  9262. typedef struct {
  9263. A_UINT32 tlv_header;
  9264. /* DBW puncture bitmap */
  9265. A_UINT32 dbw_puncture_20mhz_bitmap;
  9266. } wmi_dbw_chan_info;
  9267. typedef enum {
  9268. WMI_PKTLOG_EVENT_RX = 0x00000001,
  9269. WMI_PKTLOG_EVENT_TX = 0x00000002,
  9270. WMI_PKTLOG_EVENT_RCF = 0x00000004, /* Rate Control Find */
  9271. WMI_PKTLOG_EVENT_RCU = 0x00000008, /* Rate Control Update */
  9272. /* 0x10 used by deprecated DBG_PRINT */
  9273. WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x00000020, /* To support Smart Antenna */
  9274. WMI_PKTLOG_EVENT_SW = 0x00000040, /* To support SW defined events */
  9275. WMI_PKTLOG_EVENT_PHY = 0x00000080, /* To support PHY stats */
  9276. WMI_PKTLOG_EVENT_CBF = 0x00000100, /* To support CBF's filter in */
  9277. /* To support hybrid of events from FW and tx monitor status ring */
  9278. WMI_PKTLOG_EVENT_HYBRID_TX = 0x00000200,
  9279. } WMI_PKTLOG_EVENT;
  9280. typedef enum {
  9281. WMI_PKTLOG_ENABLE_AUTO = 0, /* (default) FW will decide under what conditions to enable pktlog */
  9282. WMI_PKTLOG_ENABLE_FORCE = 1, /* pktlog unconditionally enabled */
  9283. } WMI_PKTLOG_ENABLE;
  9284. typedef enum {
  9285. WMI_PKTLOG_FILTER_IN = 0, /* capture only for the MAC addresses in pktlog_mac_addr_list*/
  9286. WMI_PKTLOG_FILTER_OUT = 1, /* capture for all MAC addresses except those in pktlog_mac_addr_list */
  9287. } WMI_PKTLOG_FILTER_TYPE;
  9288. typedef struct {
  9289. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param */
  9290. /** pdev_id for identifying the MAC
  9291. * See macros starting with WMI_PDEV_ID_ for values.
  9292. */
  9293. A_UINT32 pdev_id;
  9294. A_UINT32 evlist; /* WMI_PKTLOG_EVENT */
  9295. A_UINT32 enable; /* WMI_PKTLOG_ENABLE */
  9296. } wmi_pdev_pktlog_enable_cmd_fixed_param;
  9297. typedef struct {
  9298. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param */
  9299. /** pdev_id for identifying the MAC
  9300. * See macros starting with WMI_PDEV_ID_ for values.
  9301. */
  9302. A_UINT32 pdev_id;
  9303. } wmi_pdev_pktlog_disable_cmd_fixed_param;
  9304. typedef struct {
  9305. /** TLV tag and len; tag equals
  9306. * WMITLV_TAG_STRUC_wmi_pdev_pktlog_filter_info */
  9307. A_UINT32 tlv_header;
  9308. /** mac addr of the peer to be filtered */
  9309. wmi_mac_addr peer_mac_address;
  9310. } wmi_pdev_pktlog_filter_info;
  9311. typedef struct {
  9312. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_filter_cmd_fixed_param */
  9313. /** pdev_id for identifying the MAC
  9314. * See macros starting with WMI_PDEV_ID_ for values.
  9315. */
  9316. A_UINT32 pdev_id;
  9317. /** 0 - disable filtering, 1 - enable filtering */
  9318. A_UINT32 enable;
  9319. A_UINT32 filter_type; /* WMI_PKTLOG_FILTER_TYPE */
  9320. A_UINT32 num_of_mac_addresses;
  9321. /* This TLV is followed by another TLV of array of structs
  9322. * wmi_pdev_pktlog_filter_info pdev_pktlog_filter_info[];
  9323. */
  9324. } wmi_pdev_pktlog_filter_cmd_fixed_param;
  9325. /**
  9326. * WMI event to send packet log decode information to Host.
  9327. * This sends the metadata which will be embedded by Host in the file-level
  9328. * header of the pktlog trace file (i.e. the ath_pktlog_bufhdr struct).
  9329. * This will be later used by the pktlog post-processing scripts to get
  9330. * prerequisite pktlog_defs*.JSON files for decoding the trace.
  9331. */
  9332. typedef struct {
  9333. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_decode_info_evt_fixed_param */
  9334. /** pdev_id for identifying the MAC
  9335. * See macros starting with WMI_PDEV_ID_ for values.
  9336. */
  9337. A_UINT32 pdev_id;
  9338. /** Forty byte field for storing software image as null terminated string */
  9339. A_UINT8 software_image[40];
  9340. /** Forty byte field for storing chip info as null terminated string */
  9341. A_UINT8 chip_info[40];
  9342. /** Four byte field for storing JSON version */
  9343. A_UINT32 pktlog_defs_json_version;
  9344. } wmi_pdev_pktlog_decode_info_evt_fixed_param;
  9345. typedef enum {
  9346. WMI_ROGUE_AP_ON_STA_PS = 1, /* rogue ap on sta ps module */
  9347. } WMI_ROGUE_AP_TYPE;
  9348. typedef struct {
  9349. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rap_config_fixed_param */
  9350. /** pdev_id for identifying the MAC, the default value is WMI_PDEV_ID_SOC
  9351. * See macros starting with WMI_PDEV_ID_ for values.
  9352. */
  9353. A_UINT32 pdev_id;
  9354. /** rogue ap type, see WMI_ROGUE_AP_TYPE */
  9355. A_UINT32 type;
  9356. /** Enable detection of rogue ap in the ps module
  9357. *
  9358. * 0 -> disabled
  9359. * 1 -> enabled (default)
  9360. */
  9361. A_UINT32 sta_ps_detection_enabled;
  9362. /* This TLV is followed by rap_param for each rogue ap:
  9363. * wmi_pdev_set_rap_config_on_sta_ps_tlv_param rap_param[];
  9364. */
  9365. } wmi_pdev_set_rap_config_fixed_param;
  9366. typedef struct {
  9367. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rap_config_on_sta_ps_tlv_param */
  9368. /** bssid of rogue ap */
  9369. wmi_mac_addr bssid;
  9370. } wmi_pdev_set_rap_config_on_sta_ps_tlv_param;
  9371. typedef struct {
  9372. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mib_stats_enable_cmd_fixed_param */
  9373. /** pdev_id for identifying the MAC
  9374. * See macros starting with WMI_PDEV_ID_ for values.
  9375. */
  9376. A_UINT32 pdev_id;
  9377. A_UINT32 enable_Mib; /** enable for mib stats collection. Stats are delivered to host in wmi_mib_stats structure.
  9378. * If enable_Mib=1, stats collection is enabled. If enable_Mib=0, stats collection does not happen */
  9379. } wmi_mib_stats_enable_cmd_fixed_param;
  9380. /** Customize the DSCP (bit) to TID (0-7) mapping for QOS.
  9381. * NOTE: This constant cannot be changed without breaking
  9382. * WMI Compatibility. */
  9383. #define WMI_DSCP_MAP_MAX (64)
  9384. /*
  9385. * @brief dscp_tid_map_cmdid - command to send the dscp to tid map to the target
  9386. * @details
  9387. * Create an API for sending the custom DSCP-to-TID map to the target
  9388. * If this is a request from the user space or from above the UMAC
  9389. * then the best place to implement this is in the umac_if_offload of the OL path.
  9390. * Provide a place holder for this API in the ieee80211com (ic).
  9391. *
  9392. * This API will be a function pointer in the ieee80211com (ic). Any user space calls for manually setting the DSCP-to-TID mapping
  9393. * in the target should be directed to the function pointer in the ic.
  9394. *
  9395. * Implementation details of the API to send the map to the target are as described-
  9396. *
  9397. * 1. The function will have 2 arguments- struct ieee80211com, DSCP-to-TID map.
  9398. * DSCP-to-TID map is a one dimensional u_int32_t array of length 64 to
  9399. * accommodate 64 TID values for 2^6 (64) DSCP ids.
  9400. * Example:
  9401. * A_UINT32 dscp_tid_map[WMI_DSCP_MAP_MAX] = {
  9402. * 0, 0, 0, 0, 0, 0, 0, 0,
  9403. * 1, 1, 1, 1, 1, 1, 1, 1,
  9404. * 2, 2, 2, 2, 2, 2, 2, 2,
  9405. * 3, 3, 3, 3, 3, 3, 3, 3,
  9406. * 4, 4, 4, 4, 4, 4, 4, 4,
  9407. * 5, 5, 5, 5, 5, 5, 5, 5,
  9408. * 6, 6, 6, 6, 6, 6, 6, 6,
  9409. * 7, 7, 7, 7, 7, 7, 7, 7,
  9410. * };
  9411. *
  9412. * 2. Request for the WMI buffer of size equal to the size of the DSCP-to-TID map.
  9413. *
  9414. * 3. Copy the DSCP-to-TID map into the WMI buffer.
  9415. *
  9416. * 4. Invoke the wmi_unified_cmd_send to send the cmd buffer to the target with the
  9417. * WMI_PDEV_SET_DSCP_TID_MAP_CMDID. Arguments to the wmi send cmd API
  9418. * (wmi_unified_send_cmd) are wmi handle, cmd buffer, length of the cmd buffer and
  9419. * the WMI_PDEV_SET_DSCP_TID_MAP_CMDID id.
  9420. *
  9421. */
  9422. /* DEPRECATED - use VDEV level command instead
  9423. * (wmi_vdev_set_dscp_tid_map_cmd_fixed_param)
  9424. */
  9425. typedef struct {
  9426. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param */
  9427. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  9428. /* map indicating DSCP to TID conversion */
  9429. A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  9430. } wmi_pdev_set_dscp_tid_map_cmd_fixed_param;
  9431. typedef struct {
  9432. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_dscp_tid_map_cmd_fixed_param */
  9433. A_UINT32 vdev_id;
  9434. /** map indicating DSCP to TID conversion */
  9435. A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  9436. A_UINT32 enable_override;
  9437. } wmi_vdev_set_dscp_tid_map_cmd_fixed_param;
  9438. enum WMI_WAKE_GPIO_TYPE {
  9439. WMI_WAKE_GPIO_LOW = 1,
  9440. WMI_WAKE_GPIO_HIGH = 2,
  9441. WMI_WAKE_GPIO_RISING_EDGE = 3,
  9442. WMI_WAKE_GPIO_FALLING_EDGE = 4,
  9443. };
  9444. /**
  9445. * Set GPIO numbers used to wakeup host and wakeup target.
  9446. */
  9447. typedef struct {
  9448. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param */
  9449. A_UINT32 host_wakeup_gpio; /* gpio num used to wakeup host, 0xff disable wakeup gpio */
  9450. A_UINT32 host_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
  9451. A_UINT32 target_wakeup_gpio; /* gpio num used to wakeup target, 0xff disable wakeup gpio */
  9452. A_UINT32 target_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
  9453. } WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param;
  9454. /** Fixed rate (rate-code) for broadcast/ multicast data frames */
  9455. /* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames
  9456. * @details
  9457. * Create an API for setting the custom rate for the MCAST and BCAST frames
  9458. * in the target. If this is a request from the user space or from above the UMAC
  9459. * then the best place to implement this is in the umac_if_offload of the OL path.
  9460. * Provide a place holder for this API in the ieee80211com (ic).
  9461. *
  9462. * Implementation details of the API to set custom rates for MCAST and BCAST in
  9463. * the target are as described-
  9464. *
  9465. * 1. The function will have 3 arguments-
  9466. * vap structure,
  9467. * MCAST/ BCAST identifier code,
  9468. * 8 bit rate code
  9469. *
  9470. * The rate-code is a 1-byte field in which:for given rate, nss and preamble
  9471. * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
  9472. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
  9473. * b'3-b'0 indicate the rate, which is indicated as follows:
  9474. * OFDM : 0: OFDM 48 Mbps
  9475. * 1: OFDM 24 Mbps
  9476. * 2: OFDM 12 Mbps
  9477. * 3: OFDM 6 Mbps
  9478. * 4: OFDM 54 Mbps
  9479. * 5: OFDM 36 Mbps
  9480. * 6: OFDM 18 Mbps
  9481. * 7: OFDM 9 Mbps
  9482. * CCK (pream == 1)
  9483. * 0: CCK 11 Mbps Long
  9484. * 1: CCK 5.5 Mbps Long
  9485. * 2: CCK 2 Mbps Long
  9486. * 3: CCK 1 Mbps Long
  9487. * 4: CCK 11 Mbps Short
  9488. * 5: CCK 5.5 Mbps Short
  9489. * 6: CCK 2 Mbps Short
  9490. * HT/VHT (pream == 2/3)
  9491. * 0..7: MCS0..MCS7 (HT)
  9492. * 0..9: MCS0..MCS9 (VHT)
  9493. *
  9494. * 2. Invoke the wmi_unified_vdev_set_param_send to send the rate value
  9495. * to the target.
  9496. * Arguments to the API are-
  9497. * wmi handle,
  9498. * VAP interface id (av_if_id) defined in ol_ath_vap_net80211,
  9499. * WMI_VDEV_PARAM_BCAST_DATA_RATE/ WMI_VDEV_PARAM_MCAST_DATA_RATE,
  9500. * rate value.
  9501. */
  9502. typedef enum {
  9503. WMI_SET_MCAST_RATE,
  9504. WMI_SET_BCAST_RATE
  9505. } MCAST_BCAST_RATE_ID;
  9506. typedef struct {
  9507. MCAST_BCAST_RATE_ID rate_id;
  9508. A_UINT32 rate;
  9509. } mcast_bcast_rate;
  9510. typedef struct {
  9511. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_params */
  9512. A_UINT32 cwmin;
  9513. A_UINT32 cwmax;
  9514. A_UINT32 aifs;
  9515. A_UINT32 txoplimit;
  9516. A_UINT32 acm;
  9517. A_UINT32 no_ack;
  9518. } wmi_wmm_params;
  9519. /* DEPRECATED - use VDEV level command instead
  9520. * (wmi_vdev_set_wmm_params_cmd_fixed_param)
  9521. */
  9522. typedef struct {
  9523. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */
  9524. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  9525. A_UINT32 dg_type;
  9526. /* The TLVs for the 4 AC follows:
  9527. * wmi_wmm_params wmm_params_ac_be;
  9528. * wmi_wmm_params wmm_params_ac_bk;
  9529. * wmi_wmm_params wmm_params_ac_vi;
  9530. * wmi_wmm_params wmm_params_ac_vo;
  9531. */
  9532. } wmi_pdev_set_wmm_params_cmd_fixed_param;
  9533. typedef struct {
  9534. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pifs_params */
  9535. /* The unit of this offset is PIFS slot time */
  9536. A_UINT32 sap_pifs_offset;
  9537. A_UINT32 leb_pifs_offset;
  9538. A_UINT32 reb_pifs_offset;
  9539. } wmi_pifs_params;
  9540. typedef enum {
  9541. WMI_EDCA_PARAM_TYPE_AGGRESSIVE = 0,
  9542. WMI_EDCA_PARAM_TYPE_PIFS = 1,
  9543. } WMI_EDCA_PARAM_TYPE;
  9544. typedef struct {
  9545. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_twt_edca_params_cmd_fixed_param */
  9546. A_UINT32 tlv_header;
  9547. A_UINT32 vdev_id;
  9548. A_UINT32 type; /* contains a WMI_EDCA_PARAM_TYPE value */
  9549. /*
  9550. * This TLV is (optionally) followed by other TLVs as below:
  9551. * wmi_wmm_params wmm_params[0/1];
  9552. * present if type is WMI_EDCA_PARAM_TYPE_AGGRESSIVE
  9553. * wmi_pifs_params pifs_params[0/1];
  9554. * present if type is WMI_EDCA_PARAM_TYPE_PIFS
  9555. */
  9556. } wmi_vdev_set_twt_edca_params_cmd_fixed_param;
  9557. typedef struct {
  9558. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_twt_session_stats_info_cmd_fixed_param */
  9559. A_UINT32 tlv_header;
  9560. A_UINT32 vdev_id;
  9561. } wmi_vdev_get_twt_session_stats_info_cmd_fixed_param;
  9562. typedef enum {
  9563. WMI_REQUEST_PEER_STAT = 0x00001,
  9564. WMI_REQUEST_AP_STAT = 0x00002,
  9565. WMI_REQUEST_PDEV_STAT = 0x00004,
  9566. WMI_REQUEST_VDEV_STAT = 0x00008,
  9567. WMI_REQUEST_BCNFLT_STAT = 0x00010,
  9568. WMI_REQUEST_VDEV_RATE_STAT = 0x00020,
  9569. WMI_REQUEST_INST_STAT = 0x00040,
  9570. WMI_REQUEST_MIB_STAT = 0x00080,
  9571. WMI_REQUEST_RSSI_PER_CHAIN_STAT = 0x00100,
  9572. WMI_REQUEST_CONGESTION_STAT = 0x00200,
  9573. WMI_REQUEST_PEER_EXTD_STAT = 0x00400,
  9574. WMI_REQUEST_BCN_STAT = 0x00800,
  9575. WMI_REQUEST_BCN_STAT_RESET = 0x01000,
  9576. WMI_REQUEST_PEER_EXTD2_STAT = 0x02000,
  9577. WMI_REQUEST_MIB_EXTD_STAT = 0x04000,
  9578. WMI_REQUEST_PMF_BCN_PROTECT_STAT = 0x08000,
  9579. WMI_REQUEST_VDEV_EXTD_STAT = 0x10000,
  9580. WMI_REQUEST_PDEV_EXTD_STAT = 0x20000,
  9581. WMI_REQUEST_PDEV_TELEMETRY_STAT = 0x40000,
  9582. } wmi_stats_id;
  9583. /*
  9584. * cfg_retry_count is set to max number of times the AP should try sending
  9585. * QoS Null frames to the STA for measuring the instantaneous RSSI
  9586. *
  9587. * retry_count is used to maintain the number of times the AP has tried sending
  9588. * QoS Null frames to the STA for measuring the instantaneous RSSI
  9589. */
  9590. typedef struct {
  9591. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_sub_struc_param */
  9592. A_UINT32 cfg_retry_count;
  9593. A_UINT32 retry_count;
  9594. } wmi_inst_rssi_stats_params;
  9595. typedef struct {
  9596. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param */
  9597. wmi_stats_id stats_id;
  9598. /** unique id identifying the VDEV, generated by the caller */
  9599. A_UINT32 vdev_id;
  9600. /** peer MAC address */
  9601. wmi_mac_addr peer_macaddr;
  9602. 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. */
  9603. /*
  9604. * This TLV is (optionally) followed by other TLVs:
  9605. * wmi_inst_rssi_stats_params inst_rssi_params;
  9606. * A_UINT32 vdev_id_bitmap[];
  9607. * This array is present and non-zero length in MLO case, stats should
  9608. * only be provided from the vdev_id_bitmap in the bitmap when it is
  9609. * present.
  9610. * wmi_mac_addr mld_macaddr[];
  9611. * This array is present and non-zero length in MLO case, stats should
  9612. * only be provided from the peers with the MLD MAC addresses specified
  9613. * in the array.
  9614. */
  9615. } wmi_request_stats_cmd_fixed_param;
  9616. /* stats type bitmap */
  9617. #define WMI_LINK_STATS_RADIO 0x00000001
  9618. #define WMI_LINK_STATS_IFACE 0x00000002
  9619. #define WMI_LINK_STATS_ALL_PEER 0x00000004
  9620. #define WMI_LINK_STATS_PER_PEER 0x00000008
  9621. #define WMI_LINK_STATS_IPA 0x00000010
  9622. /* wifi clear statistics bitmap */
  9623. #define WIFI_STATS_RADIO 0x00000001 /** all radio statistics */
  9624. #define WIFI_STATS_RADIO_CCA 0x00000002 /** cca_busy_time (within radio statistics) */
  9625. #define WIFI_STATS_RADIO_CHANNELS 0x00000004 /** all channel statistics (within radio statistics) */
  9626. #define WIFI_STATS_RADIO_SCAN 0x00000008 /** all scan statistics (within radio statistics) */
  9627. #define WIFI_STATS_IFACE 0x00000010 /** all interface statistics */
  9628. #define WIFI_STATS_IFACE_TXRATE 0x00000020 /** all tx rate statistics (within interface statistics) */
  9629. #define WIFI_STATS_IFACE_AC 0x00000040 /** all ac statistics (within interface statistics) */
  9630. #define WIFI_STATS_IFACE_CONTENTION 0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */
  9631. #define WMI_STATS_IFACE_ALL_PEER 0x00000100 /** All peer stats on this interface */
  9632. #define WMI_STATS_IFACE_PER_PEER 0x00000200 /** Clear particular peer stats depending on the peer_mac */
  9633. /** Default value for stats if the stats collection has not started */
  9634. #define WMI_STATS_VALUE_INVALID 0xffffffff
  9635. #define WMI_DIAG_ID_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 0, 16)
  9636. #define WMI_DIAG_ID_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 0, 16, value)
  9637. #define WMI_DIAG_TYPE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 16, 1)
  9638. #define WMI_DIAG_TYPE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 16, 1, value)
  9639. #define WMI_DIAG_ID_ENABLED_DISABLED_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
  9640. #define WMI_DIAG_ID_ENABLED_DISABLED_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
  9641. typedef struct {
  9642. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param */
  9643. A_UINT32 num_of_diag_events_logs;
  9644. /* The TLVs will follow.
  9645. * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
  9646. * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
  9647. * Bit 17 Indicate if the DIAG type is Enabled/Disabled.
  9648. */
  9649. } wmi_diag_event_log_config_fixed_param;
  9650. #define WMI_DIAG_FREQUENCY_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
  9651. #define WMI_DIAG_FREQUENCY_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
  9652. #define WMI_DIAG_EXT_FEATURE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 18, 1)
  9653. #define WMI_DIAG_EXT_FEATURE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 18, 1, value)
  9654. typedef struct {
  9655. A_UINT32 tlv_header;
  9656. A_UINT32 num_of_diag_events_logs;
  9657. /* The TLVs will follow.
  9658. * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
  9659. * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
  9660. * Bit 17 - Frequency of the DIAG EVENT/LOG High Frequency -1, Low Frequency - 0
  9661. * Bit 18 - Set if the EVENTS/LOGs are used for EXT DEBUG Framework
  9662. */
  9663. } wmi_diag_event_log_supported_event_fixed_params;
  9664. typedef struct {
  9665. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param*/
  9666. A_UINT32 reserved0; /** placeholder for future */
  9667. } wmi_debug_mesg_flush_fixed_param;
  9668. typedef struct {
  9669. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_fw_data_stall_param */
  9670. A_UINT32 vdev_id_bitmap; /** bitmap representation for vdev_id's where data stall happened */
  9671. A_UINT32 data_stall_type; /** wlan_dbg_data_stall_type_e */
  9672. /** reason_code1:
  9673. * The information stored in reason_code1 varies based on the data stally
  9674. * type values:
  9675. * data_stall_type | reason_code1
  9676. * -----------------------------------------------------
  9677. * HWSCHED_CMD_FLUSH | flush req reason (0-40)
  9678. * RX_REFILL_FAILED | ring_id (0-7)
  9679. * RX_FCS_LEN_ERROR | exact error type
  9680. */
  9681. A_UINT32 reason_code1;
  9682. A_UINT32 reason_code2; /** on which tid/hwq stall happened */
  9683. A_UINT32 recovery_type; /** wlan_dbg_data_stall_recovery_type_e */
  9684. } wmi_debug_mesg_fw_data_stall_param;
  9685. typedef struct {
  9686. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_fw_cal_failure_param */
  9687. A_UINT32 tlv_header;
  9688. /* wmi_ctrl_path_stats_cal_type_ids enum defines possible cal type IDs */
  9689. A_UINT32 cal_type;
  9690. /* wmi_cal_failure_reason_code enum defines possible failure reason codes */
  9691. A_UINT32 cal_failure_reason_code;
  9692. } wmi_debug_mesg_fw_cal_failure_param;
  9693. typedef struct {
  9694. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param*/
  9695. A_UINT32 reserved0; /** placeholder for future */
  9696. } wmi_debug_mesg_flush_complete_fixed_param;
  9697. typedef struct {
  9698. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param */
  9699. /* vdev_id, where RSSI breach event occurred */
  9700. A_UINT32 vdev_id;
  9701. /* request id */
  9702. A_UINT32 request_id;
  9703. /* bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is corresponding to hi_rssi[0-2]*/
  9704. A_UINT32 event_bitmap;
  9705. /* rssi at the time of RSSI breach. Unit dBm */
  9706. A_UINT32 rssi;
  9707. /* bssid of the monitored AP's */
  9708. wmi_mac_addr bssid;
  9709. } wmi_rssi_breach_event_fixed_param;
  9710. typedef struct {
  9711. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fw_mem_dump */
  9712. /** unique id identifying the segment */
  9713. A_UINT32 seg_id;
  9714. /** Start address of the segment to be read */
  9715. A_UINT32 seg_start_addr_lo;
  9716. A_UINT32 seg_start_addr_hi;
  9717. /** Length of the segment to be read */
  9718. A_UINT32 seg_length;
  9719. /** Host bufeer address to which the segment will be read and dumped */
  9720. A_UINT32 dest_addr_lo;
  9721. A_UINT32 dest_addr_hi;
  9722. } wmi_fw_mem_dump;
  9723. /* Command to get firmware memory dump*/
  9724. typedef struct {
  9725. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */
  9726. /** unique id identifying the request */
  9727. A_UINT32 request_id;
  9728. /** number of memory dump segments */
  9729. A_UINT32 num_fw_mem_dump_segs;
  9730. /**
  9731. * This TLV is followed by another TLV
  9732. * wmi_fw_mem_dump fw_mem_dump[];
  9733. */
  9734. } wmi_get_fw_mem_dump_fixed_param;
  9735. /** Event to indicate the completion of fw mem dump */
  9736. typedef struct {
  9737. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */
  9738. /** unique id identifying the request, given in the request stats command */
  9739. A_UINT32 request_id;
  9740. /*In case of Firmware memory dump */
  9741. A_UINT32 fw_mem_dump_complete;
  9742. } wmi_update_fw_mem_dump_fixed_param;
  9743. typedef enum {
  9744. WMI_ROAMING_IDLE = 0,
  9745. WMI_ROAMING_ACTIVE = 1,
  9746. } wmi_roam_state;
  9747. /* access categories */
  9748. typedef enum {
  9749. WMI_AC_VO = 0,
  9750. WMI_AC_VI = 1,
  9751. WMI_AC_BE = 2,
  9752. WMI_AC_BK = 3,
  9753. WMI_AC_MAX = 4,
  9754. } wmi_traffic_ac;
  9755. typedef enum {
  9756. WMI_STA_STATS = 0,
  9757. WMI_SOFTAP_STATS = 1,
  9758. WMI_IBSS_STATS = 2,
  9759. WMI_P2P_CLIENT_STATS = 3,
  9760. WMI_P2P_GO_STATS = 4,
  9761. WMI_NAN_STATS = 5,
  9762. WMI_MESH_STATS = 6,
  9763. } wmi_link_iface_type;
  9764. /* channel operating width */
  9765. typedef enum {
  9766. WMI_CHAN_WIDTH_20 = 0,
  9767. WMI_CHAN_WIDTH_40 = 1,
  9768. WMI_CHAN_WIDTH_80 = 2,
  9769. WMI_CHAN_WIDTH_160 = 3,
  9770. WMI_CHAN_WIDTH_80P80 = 4,
  9771. WMI_CHAN_WIDTH_5 = 5,
  9772. WMI_CHAN_WIDTH_10 = 6,
  9773. WMI_CHAN_WIDTH_165 = 7,
  9774. WMI_CHAN_WIDTH_160P160 = 8,
  9775. WMI_CHAN_WIDTH_320 = 9,
  9776. WMI_CHAN_WIDTH_MAX,
  9777. } wmi_channel_width;
  9778. /* Clear stats */
  9779. typedef struct {
  9780. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */
  9781. /** unique id identifying the VDEV, generated by the caller */
  9782. A_UINT32 vdev_id;
  9783. /** stop_stats_collection_req = 1 will imply stop the statistics collection */
  9784. A_UINT32 stop_stats_collection_req;
  9785. /** identifies what stats to be cleared */
  9786. A_UINT32 stats_clear_req_mask;
  9787. /** identifies which peer stats to be cleared. Valid only while clearing PER_REER */
  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
  9793. * only be cleared for the VDEVs in vdev_id_bitmap in the bitmap when
  9794. * it is present.
  9795. * wmi_mac_addr mld_macaddr[];
  9796. * This array is present and non-zero length in MLO case, stats should
  9797. * only be cleared for the peers with the MLD MAC addresses specified
  9798. * in the array.
  9799. */
  9800. } wmi_clear_link_stats_cmd_fixed_param;
  9801. /* Link Stats configuration params. Trigger the link layer statistics collection*/
  9802. typedef struct {
  9803. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param */
  9804. /** threshold to classify the pkts as short or long */
  9805. A_UINT32 mpdu_size_threshold;
  9806. /** set for field debug mode. Driver should collect all statistics regardless of performance impact.*/
  9807. A_UINT32 aggressive_statistics_gathering;
  9808. } wmi_start_link_stats_cmd_fixed_param;
  9809. typedef struct {
  9810. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_link_stats_cmd_fixed_param */
  9811. /** Type of stats required. This is a bitmask WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
  9812. A_UINT32 stats_type;
  9813. /** unique id identifying the VDEV, generated by the caller */
  9814. A_UINT32 vdev_id;
  9815. /** unique id identifying the request, generated by the caller */
  9816. A_UINT32 request_id;
  9817. /** peer MAC address */
  9818. wmi_mac_addr peer_macaddr;
  9819. /*
  9820. * This TLV is (optionally) followed by other TLVs:
  9821. * A_UINT32 vdev_id_bitmap[];
  9822. * This array is present and non-zero length in MLO case, stats should only
  9823. * be provided from the vdev_id_bitmap in the bitmap when it is present.
  9824. * wmi_mac_addr mld_macaddr[];
  9825. * This array is present and non-zero length in MLO case, stats should only
  9826. * be provided from the peers with the MLD MAC addresses specified
  9827. * in the array.
  9828. */
  9829. } wmi_request_link_stats_cmd_fixed_param;
  9830. typedef struct {
  9831. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unified_request_ll_get_sta_cmd_fixed_param */
  9832. /** Type of stats required. This is a bitmask of WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
  9833. A_UINT32 link_stats_type;
  9834. /** unique id identifying the VDEV, generated by the caller */
  9835. A_UINT32 vdev_id;
  9836. /** unique id identifying the request, generated by the caller */
  9837. A_UINT32 request_id;
  9838. /** peer MAC address */
  9839. wmi_mac_addr peer_macaddr;
  9840. /** Type of stats required for get station cmd (see wmi_stats_id enum) */
  9841. A_UINT32 get_sta_stats_id;
  9842. /** 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. */
  9843. A_UINT32 pdev_id;
  9844. /*
  9845. * This TLV is (optionally) followed by other TLVs:
  9846. * A_UINT32 vdev_id_bitmap[];
  9847. * This array is present and non-zero length in MLO case, stats should only
  9848. * be provided from the vdev_id_bitmap in the bitmap when it is present.
  9849. * wmi_mac_addr mld_macaddr[];
  9850. * This array is present and non-zero length in MLO case, stats should only
  9851. * be provided from the peers with the MLD MAC addresses specified
  9852. * in the array.
  9853. */
  9854. } wmi_request_unified_ll_get_sta_cmd_fixed_param;
  9855. #define WLM_STATS_REQ_LINK 0x00000001
  9856. typedef struct {
  9857. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlm_stats_cmd_fixed_param */
  9858. /** unique id identifying the VDEV, generated by the caller */
  9859. A_UINT32 vdev_id;
  9860. /** WLM event request bitmask
  9861. * Used by host to customize the wlm stats report.
  9862. * Filled with a combination of WLM_STATS_xxx values.
  9863. */
  9864. A_UINT32 request_bitmask;
  9865. } wmi_request_wlm_stats_cmd_fixed_param;
  9866. /* channel statistics */
  9867. typedef struct {
  9868. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */
  9869. /** Channel width (20, 40, 80, 80+80, 160) enum wmi_channel_width*/
  9870. A_UINT32 channel_width;
  9871. /** Primary 20 MHz channel */
  9872. A_UINT32 center_freq;
  9873. /** center frequency (MHz) first segment */
  9874. A_UINT32 center_freq0;
  9875. /** center frequency (MHz) second segment */
  9876. A_UINT32 center_freq1;
  9877. /** msecs the radio is awake (32 bits number accruing over time) */
  9878. A_UINT32 radio_awake_time;
  9879. /** msecs the CCA register is busy (32 bits number accruing over time)
  9880. * Includes rx_time but not tx_time.
  9881. */
  9882. A_UINT32 cca_busy_time;
  9883. /** msecs the radio is transmitting (32 bits number accruing over time) */
  9884. A_UINT32 tx_time;
  9885. /** msecs the radio is in active receive (32 bits number accruing over time) */
  9886. A_UINT32 rx_time;
  9887. /*** NOTE ***
  9888. * Be cautious about adding new fields in wmi_channel_stats.
  9889. * STA-centric targets may instantiate many instances of per-channel
  9890. * stats, and consequently may consume a non-trivial amount of on-chip
  9891. * memory for storing the channel stats.
  9892. */
  9893. } wmi_channel_stats;
  9894. /* this structure used for pass vdev id in stats events */
  9895. typedef struct {
  9896. union {
  9897. struct {
  9898. A_UINT32 id : 31, /* the vdev ID */
  9899. validate: 1; /* validate bit, the vdev ID is only valid if this bit set as 1 */
  9900. };
  9901. A_UINT32 vdev_id;
  9902. };
  9903. } wmi_vdev_id_info;
  9904. #define WMI_VDEV_ID_INFO_GET_VDEV_ID(vdev_id_info) WMI_GET_BITS(vdev_id_info, 0, 31)
  9905. #define WMI_VDEV_ID_INFO_SET_VDEV_ID(vdev_id_info, value) WMI_SET_BITS(vdev_id_info, 0, 31, value)
  9906. #define WMI_VDEV_ID_INFO_GET_VALIDATE(vdev_id_info) WMI_GET_BITS(vdev_id_info, 31, 1)
  9907. #define WMI_VDEV_ID_INFO_SET_VALIDATE(vdev_id_info, value) WMI_SET_BITS(vdev_id_info, 31, 1, value)
  9908. typedef struct {
  9909. union {
  9910. struct {
  9911. A_UINT32
  9912. id: 8, /* the vdev ID */
  9913. /* validate:
  9914. * validate bit, the vdev ID (id and link_status) is only valid
  9915. * if this bit set as 1.
  9916. */
  9917. validate: 1,
  9918. /* link_status:
  9919. * 0 -> link inactive
  9920. * 1 -> link active
  9921. */
  9922. link_status: 1,
  9923. reserved:22;
  9924. };
  9925. A_UINT32 vdev_info_word0;
  9926. };
  9927. } wmi_vdev_id_info_v2;
  9928. #define WMI_VDEV_ID_INFO_V2_GET_VDEV_ID(vdev_id_info_v2) WMI_GET_BITS(vdev_id_info_v2, 0, 8)
  9929. #define WMI_VDEV_ID_INFO_V2_SET_VDEV_ID(vdev_id_info_v2, value) WMI_SET_BITS(vdev_id_info_v2, 0, 8, value)
  9930. #define WMI_VDEV_ID_INFO_V2_GET_VALIDATE(vdev_id_info_v2) WMI_GET_BITS(vdev_id_info_v2, 8, 1)
  9931. #define WMI_VDEV_ID_INFO_V2_SET_VALIDATE(vdev_id_info_v2, value) WMI_SET_BITS(vdev_id_info_v2, 8, 1, value)
  9932. #define WMI_VDEV_ID_INFO_V2_GET_LINK_STATUS(vdev_id_info_v2) WMI_GET_BITS(vdev_id_info_v2, 9, 1)
  9933. #define WMI_VDEV_ID_INFO_V2_SET_LINK_STATUS(vdev_id_info_v2, value) WMI_SET_BITS(vdev_id_info_v2, 9, 1, value)
  9934. /*
  9935. * Each step represents 0.5 dB. The starting value is 0 dBm.
  9936. * Thus the TPC levels cover 0 dBm to 31.5 dBm inclusive in 0.5 dB steps.
  9937. */
  9938. #define MAX_TPC_LEVELS 64
  9939. /* radio statistics */
  9940. typedef struct {
  9941. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats */
  9942. /** Wifi radio (if multiple radio supported) */
  9943. A_UINT32 radio_id;
  9944. /** msecs the radio is awake (32 bits number accruing over time) */
  9945. A_UINT32 on_time;
  9946. /** msecs the radio is transmitting (32 bits number accruing over time) */
  9947. A_UINT32 tx_time;
  9948. /** msecs the radio is in active receive (32 bits number accruing over time) */
  9949. A_UINT32 rx_time;
  9950. /** msecs the radio is awake due to all scan (32 bits number accruing over time) */
  9951. A_UINT32 on_time_scan;
  9952. /** msecs the radio is awake due to NAN (32 bits number accruing over time) */
  9953. A_UINT32 on_time_nbd;
  9954. /** msecs the radio is awake due to G?scan (32 bits number accruing over time) */
  9955. A_UINT32 on_time_gscan;
  9956. /** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */
  9957. A_UINT32 on_time_roam_scan;
  9958. /** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */
  9959. A_UINT32 on_time_pno_scan;
  9960. /** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */
  9961. A_UINT32 on_time_hs20;
  9962. /** number of channels */
  9963. A_UINT32 num_channels;
  9964. /** tx time per TPC level - DEPRECATED
  9965. * This field is deprecated.
  9966. * It is superseded by the WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID message.
  9967. */
  9968. A_UINT32 tx_time_per_tpc[MAX_TPC_LEVELS];
  9969. /** msecs the radio is awake due to Host initiated scan (accruing over time) */
  9970. A_UINT32 on_time_host_scan;
  9971. /** msecs the radio is awake due to LPI scan (accruing over time) */
  9972. A_UINT32 on_time_lpi_scan;
  9973. } wmi_radio_link_stats;
  9974. /** tx time per power level statistics */
  9975. typedef struct {
  9976. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_power_level_stats_evt_fixed_param */
  9977. /** total number of tx power levels */
  9978. A_UINT32 total_num_tx_power_levels;
  9979. /** number of tx power levels that are carried in this event */
  9980. A_UINT32 num_tx_power_levels;
  9981. /** offset of current stats
  9982. * If ((num_tx_power_levels + power_level_offset)) ==
  9983. * total_num_tx_power_levels)
  9984. * this message completes the report of tx time per power levels.
  9985. * Otherwise, additional WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID messages
  9986. * will be sent by the target to deliver the remainder of the tx time
  9987. * per power level stats.
  9988. */
  9989. A_UINT32 power_level_offset;
  9990. /* radio id for this tx time per power level statistics (if multiple radio supported) */
  9991. A_UINT32 radio_id;
  9992. /** Indicates the vdev id of the stats for MLO stats query */
  9993. wmi_vdev_id_info vdev_id_info;
  9994. /*
  9995. * This TLV will be followed by a TLV containing a variable-length array of
  9996. * A_UINT32 with tx time per power level data
  9997. * A_UINT32 tx_time_per_power_level[num_tx_power_levels]
  9998. * The tx time is in units of milliseconds.
  9999. * The power levels are board-specific values; a board-specific translation
  10000. * has to be applied to determine what actual power corresponds to each
  10001. * power level.
  10002. * Just as the host has a BDF file available, the host should also have
  10003. * a data file available that provides the power level to power translations.
  10004. */
  10005. } wmi_tx_power_level_stats_evt_fixed_param;
  10006. /** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */
  10007. typedef struct {
  10008. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats_event_fixed_param */
  10009. /** unique id identifying the request, given in the request stats command */
  10010. A_UINT32 request_id;
  10011. /** Number of radios*/
  10012. A_UINT32 num_radio;
  10013. /** more_data will be set depending on the number of radios */
  10014. A_UINT32 more_radio_events;
  10015. /*
  10016. * For the event WMI_RADIO_LINK_STATS_EVENTID = 0x16004,
  10017. * FW may not be able to send all the channels (2 GHz, 5 GHz & 6 GHz)
  10018. * together in one event message, due to buffer size limitations.
  10019. * To avoid this limitation, FW will send multiple events to HOST
  10020. * depending upon the number of channels.
  10021. * If more_channels is set to 0 means FW has indicated all the
  10022. * channels for this radio.
  10023. * If more_channels is set to 1, it indicates FW will send another
  10024. * event having additional channels for the same radio.
  10025. */
  10026. A_UINT32 more_channels;
  10027. /** Indicates the vdev id of the stats for MLO stats query */
  10028. wmi_vdev_id_info vdev_id_info;
  10029. /*
  10030. * This TLV is followed by another TLV of array of bytes
  10031. * size of(struct wmi_radio_link_stats);
  10032. *
  10033. * This TLV is followed by another TLV of array of bytes
  10034. * num_channels * size of(struct wmi_channel_stats)
  10035. */
  10036. } wmi_radio_link_stats_event_fixed_param;
  10037. /* per rate statistics */
  10038. typedef struct {
  10039. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rate_stats */
  10040. /** rate information
  10041. * The rate-code is a 1-byte field in which:for given rate, nss and preamble
  10042. * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
  10043. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
  10044. * b'3-b'0 indicate the rate, which is indicated as follows:
  10045. * OFDM : 0: OFDM 48 Mbps
  10046. * 1: OFDM 24 Mbps
  10047. * 2: OFDM 12 Mbps
  10048. * 3: OFDM 6 Mbps
  10049. * 4: OFDM 54 Mbps
  10050. * 5: OFDM 36 Mbps
  10051. * 6: OFDM 18 Mbps
  10052. * 7: OFDM 9 Mbps
  10053. * CCK (pream == 1)
  10054. * 0: CCK 11 Mbps Long
  10055. * 1: CCK 5.5 Mbps Long
  10056. * 2: CCK 2 Mbps Long
  10057. * 3: CCK 1 Mbps Long
  10058. * 4: CCK 11 Mbps Short
  10059. * 5: CCK 5.5 Mbps Short
  10060. * 6: CCK 2 Mbps Short
  10061. * HT/VHT (pream == 2/3)
  10062. * 0..7: MCS0..MCS7 (HT)
  10063. * 0..9: MCS0..MCS9 (VHT)
  10064. */
  10065. A_UINT32 rate;
  10066. /** units of 100 Kbps */
  10067. A_UINT32 bitrate;
  10068. /** number of successfully transmitted data pkts (ACK rcvd) */
  10069. A_UINT32 tx_mpdu;
  10070. /** number of received data pkts */
  10071. A_UINT32 rx_mpdu;
  10072. /** number of data packet losses (no ACK) */
  10073. A_UINT32 mpdu_lost;
  10074. /** total number of data pkt retries */
  10075. A_UINT32 retries;
  10076. /** number of short data pkt retries */
  10077. A_UINT32 retries_short;
  10078. /** number of long data pkt retries */
  10079. A_UINT32 retries_long;
  10080. } wmi_rate_stats;
  10081. typedef struct {
  10082. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_link_stats */
  10083. /** peer type (AP, TDLS, GO etc.) enum wmi_peer_type*/
  10084. A_UINT32 peer_type;
  10085. /** mac address */
  10086. wmi_mac_addr peer_mac_address;
  10087. /** peer wmi_CAPABILITY_XXX */
  10088. A_UINT32 capabilities;
  10089. /** number of rates */
  10090. A_UINT32 num_rates;
  10091. } wmi_peer_link_stats;
  10092. /** PEER statistics (once started) reset and start afresh after each connection */
  10093. typedef struct {
  10094. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_stats_event_fixed_param */
  10095. /** unique id identifying the request, given in the request stats command */
  10096. A_UINT32 request_id;
  10097. /** number of peers accomidated in this particular event */
  10098. A_UINT32 num_peers;
  10099. /** Indicates the fragment number */
  10100. A_UINT32 peer_event_number;
  10101. /** Indicates if there are more peers which will be sent as separate peer_stats event */
  10102. A_UINT32 more_data;
  10103. /** Indicates the vdev id of the stats for MLO stats query */
  10104. wmi_vdev_id_info vdev_id_info;
  10105. /**
  10106. * This TLV is followed by another TLV
  10107. * num_peers * size of(struct wmi_peer_stats)
  10108. * num_rates * size of(struct wmi_rate_stats). num_rates is the sum of the rates of all the peers.
  10109. */
  10110. } wmi_peer_stats_event_fixed_param;
  10111. /* per access category statistics */
  10112. typedef struct {
  10113. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_ac_stats */
  10114. /** access category (VI, VO, BE, BK) enum wmi_traffic_ac*/
  10115. A_UINT32 ac_type;
  10116. /** number of successfully transmitted unicast data pkts (ACK rcvd) */
  10117. A_UINT32 tx_mpdu;
  10118. /** number of received unicast mpdus */
  10119. A_UINT32 rx_mpdu;
  10120. /** number of successfully transmitted multicast data packets */
  10121. /** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */
  10122. A_UINT32 tx_mcast;
  10123. /** number of received multicast data packets */
  10124. A_UINT32 rx_mcast;
  10125. /** number of received unicast a-mpdus */
  10126. A_UINT32 rx_ampdu;
  10127. /** number of transmitted unicast a-mpdus */
  10128. A_UINT32 tx_ampdu;
  10129. /** number of data pkt losses (no ACK) */
  10130. A_UINT32 mpdu_lost;
  10131. /** total number of data pkt retries */
  10132. A_UINT32 retries;
  10133. /** number of short data pkt retries */
  10134. A_UINT32 retries_short;
  10135. /** number of long data pkt retries */
  10136. A_UINT32 retries_long;
  10137. /** data pkt min contention time (usecs) */
  10138. A_UINT32 contention_time_min;
  10139. /** data pkt max contention time (usecs) */
  10140. A_UINT32 contention_time_max;
  10141. /** data pkt avg contention time (usecs) */
  10142. A_UINT32 contention_time_avg;
  10143. /** num of data pkts used for contention statistics */
  10144. A_UINT32 contention_num_samples;
  10145. /** number of pending pkts */
  10146. A_UINT32 tx_pending_msdu;
  10147. } wmi_wmm_ac_stats;
  10148. /* interface statistics */
  10149. typedef struct {
  10150. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats */
  10151. /** access point beacon received count from connected AP */
  10152. A_UINT32 beacon_rx;
  10153. /** access point mgmt frames received count from connected AP (including Beacon) */
  10154. A_UINT32 mgmt_rx;
  10155. /** action frames received count */
  10156. A_UINT32 mgmt_action_rx;
  10157. /** action frames transmit count */
  10158. A_UINT32 mgmt_action_tx;
  10159. /** access Point Beacon and Management frames RSSI (averaged) */
  10160. A_UINT32 rssi_mgmt;
  10161. /** access Point Data Frames RSSI (averaged) from connected AP */
  10162. A_UINT32 rssi_data;
  10163. /** access Point ACK RSSI (averaged) from connected AP */
  10164. A_UINT32 rssi_ack;
  10165. /** number of peers */
  10166. A_UINT32 num_peers;
  10167. /** Indicates how many peer_stats events will be sent depending on the num_peers. */
  10168. A_UINT32 num_peer_events;
  10169. /** number of ac */
  10170. A_UINT32 num_ac;
  10171. /** Roaming Stat */
  10172. A_UINT32 roam_state;
  10173. /** Average Beacon spread offset is the averaged time delay between TBTT and beacon TSF */
  10174. /** Upper 32 bits of averaged 64 bit beacon spread offset */
  10175. A_UINT32 avg_bcn_spread_offset_high;
  10176. /** Lower 32 bits of averaged 64 bit beacon spread offset */
  10177. A_UINT32 avg_bcn_spread_offset_low;
  10178. /** Takes value of 1 if AP leaks packets after sending an ACK for PM=1 otherwise 0 */
  10179. A_UINT32 is_leaky_ap;
  10180. /** Average number of frames received from AP after receiving the ACK for a frame with PM=1 */
  10181. A_UINT32 avg_rx_frms_leaked;
  10182. /** Rx leak watch window currently in force to minimize data loss because of leaky AP. Rx leak window is the
  10183. time driver waits before shutting down the radio or switching the channel and after receiving an ACK for
  10184. a data frame with PM bit set) */
  10185. A_UINT32 rx_leak_window;
  10186. A_UINT32 tx_rts_succ_cnt;
  10187. A_UINT32 tx_rts_fail_cnt;
  10188. A_UINT32 tx_ppdu_succ_cnt;
  10189. A_UINT32 tx_ppdu_fail_cnt;
  10190. /** msecs the interface is in Connected state (accruing over time) */
  10191. A_UINT32 connected_duration;
  10192. /** msecs the interface is in DisConnected state (accruing over time) */
  10193. A_UINT32 disconnected_duration;
  10194. /** msecs the interface is doing RTT ranging (accruing over time) */
  10195. A_UINT32 rtt_ranging_duration;
  10196. /** msecs the interface is in RTT responder mode (accruing over time) */
  10197. A_UINT32 rtt_responder_duration;
  10198. /** Number of Probes (Tx) sent on the interface (accruing over time) */
  10199. A_UINT32 num_probes_tx;
  10200. /** Number of Beacon misses on this interface (accruing over time) */
  10201. A_UINT32 num_beacon_miss;
  10202. /** time slice duty cycle percentage of this interface */
  10203. A_UINT32 time_slice_duty_cycle;
  10204. /**
  10205. * Current home channel noise floor value report to host
  10206. * Units are dBm, values 0x0000ffff and 0x0 are invalid.
  10207. */
  10208. A_INT32 nf_cal_val;
  10209. } wmi_iface_link_stats;
  10210. typedef enum {
  10211. WMI_OFFLOAD_STATS_TYPE_SOC_BCAST = 0,
  10212. WMI_OFFLOAD_STATS_TYPE_SOC_MCAST = 1,
  10213. WMI_OFFLOAD_STATS_TYPE_SOC_UCAST = 2,
  10214. WMI_OFFLOAD_STATS_TYPE_ARP = 3,
  10215. WMI_OFFLOAD_STATS_TYPE_NS = 4,
  10216. WMI_OFFLOAD_STATS_TYPE_APF_BCAST = 5,
  10217. WMI_OFFLOAD_STATS_TYPE_APF_MCAST = 6,
  10218. WMI_OFFLOAD_STATS_TYPE_APF_UCAST = 7,
  10219. /* Add New offload stat type here */
  10220. WMI_OFFLOAD_STATS_TYPE_MAX,
  10221. } wmi_offload_stats_type;
  10222. typedef struct {
  10223. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_offload_stats */
  10224. /** Type of offload stat. enum wmi_offload_stats_type **/
  10225. A_UINT32 type;
  10226. /** Number of (MSDUs) frames Received **/
  10227. A_UINT32 rx_count;
  10228. /** Number of frames Dropped **/
  10229. A_UINT32 drp_count;
  10230. /** Number of frames for which FW Responded (Valid for ARP and NS only). (or)
  10231. * Number of frames forwarded to Host (Valid for stats type except ARP and NS). **/
  10232. A_UINT32 fwd_count;
  10233. } wmi_iface_offload_stats;
  10234. typedef struct {
  10235. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_powersave_stats */
  10236. /** Total TIM beacon event that wlan ps received **/
  10237. A_UINT32 tot_tim_bcn;
  10238. /** Total error TIM beacon found by wlan ps including no rx in TIM wakeup and TIM event in active state **/
  10239. A_UINT32 tot_err_tim_bcn;
  10240. } wmi_iface_powersave_stats;
  10241. typedef struct {
  10242. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_link_stats */
  10243. /** IPA tx channel 0 buffer hp/tp */
  10244. A_UINT32 wbm2sw_ring_ch0_hp;
  10245. A_UINT32 wbm2sw_ring_ch0_tp;
  10246. /** IPA tx channel 1 buffer hp/tp */
  10247. A_UINT32 wbm2sw_ring_ch1_hp;
  10248. A_UINT32 wbm2sw_ring_ch1_tp;
  10249. /** IPA rx channel 0 buffer hp/tp */
  10250. A_UINT32 reo2sw_ring_ch0_hp;
  10251. A_UINT32 reo2sw_ring_ch0_tp;
  10252. /** IPA rx channel 1 buffer hp/tp */
  10253. A_UINT32 reo2sw_ring_ch1_hp;
  10254. A_UINT32 reo2sw_ring_ch1_tp;
  10255. /** IPA rx channel 0 ring full counter */
  10256. A_UINT32 reo2sw_ch0_producer_full_cnt;
  10257. /** IPA rx channel 1 ring full counter */
  10258. A_UINT32 reo2sw_ch1_producer_full_cnt;
  10259. /** IPA rx path drop feature enable */
  10260. A_UINT32 ipa_drop_enabled;
  10261. /** Counter for IPA rx path switch to drop-enabled state */
  10262. A_UINT32 ipa_switch_to_drop_cnt;
  10263. /** Counter for IPA rx path switch from drop-enabled state to normal state */
  10264. A_UINT32 ipa_switch_from_drop_cnt;
  10265. } wmi_ipa_link_stats;
  10266. typedef struct {
  10267. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_per_mac_stats */
  10268. /** TCL total enqueued packet number */
  10269. A_UINT32 tcl_enqueue_packets;
  10270. /** TCL total discarded packet number during enqueue */
  10271. A_UINT32 tcl_enqueue_discard;
  10272. /** Total tx duration time, usec */
  10273. A_UINT32 total_ppdu_duration_us;
  10274. /** IPA rx no resource debug counter */
  10275. A_UINT32 wmac_no_resource_drop_ppdu_cnt_ix0;
  10276. A_UINT32 wmac_no_resource_drop_ppdu_cnt_ix1;
  10277. A_UINT32 wmac_no_resource_drop_mpdu_cnt_ix0;
  10278. A_UINT32 wmac_no_resource_drop_mpdu_cnt_ix1;
  10279. A_UINT32 wmac_rxdma2reo_producer_full_cnt;
  10280. } wmi_ipa_per_mac_stats;
  10281. /** IPA statistics (once started) reset and start afresh after each connection */
  10282. typedef struct {
  10283. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_link_stats_event_fixed_param */
  10284. /** unique id identifying the request, given in the request stats command */
  10285. A_UINT32 request_id;
  10286. /** number of MACs */
  10287. A_UINT32 num_macs;
  10288. /*
  10289. * This TLV is followed by other TLVs:
  10290. * wmi_ipa_link_stats ipa_link_stats;
  10291. * wmi_ipa_per_mac_stats ipa_per_mac_stats[num_macs];
  10292. */
  10293. } wmi_ipa_link_stats_event_fixed_param;
  10294. /** Interface statistics (once started) reset and start afresh after each connection */
  10295. typedef struct {
  10296. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param */
  10297. /** unique id identifying the request, given in the request stats command */
  10298. A_UINT32 request_id;
  10299. /** unique id identifying the VDEV, generated by the caller */
  10300. A_UINT32 vdev_id;
  10301. /** Number of offload stats **/
  10302. A_UINT32 num_offload_stats;
  10303. /*
  10304. * This TLV is followed by other TLVs:
  10305. * wmi_iface_link_stats iface_link_stats;
  10306. * num_ac * size of(struct wmi_wmm_ac_stats)
  10307. * wmi_iface_offload_stats iface_offload_stats[num_offload_stats]
  10308. * wmi_iface_powersave_stats iface_powersave_stats[]
  10309. */
  10310. } wmi_iface_link_stats_event_fixed_param;
  10311. typedef struct {
  10312. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlm_stats_event_fixed_param */
  10313. /** bitmask listing which WLM stats are provided.
  10314. * Copied from wlm_stats_cmd_fixed_param.
  10315. * (This field is provided for convenience rather than necessity, since
  10316. * the recipient can directly check which TLV arrays have non-zero length.)
  10317. */
  10318. A_UINT32 request_bitmask;
  10319. /** unique id identifying the VDEV, generated by the caller */
  10320. A_UINT32 vdev_id;
  10321. /**
  10322. * timestamp of event report, in microseconds units
  10323. * This timestamp is for debugging purposes only.
  10324. * It can be used to correlate this WLM stats event data with
  10325. * other WLM information uploaded through other means.
  10326. */
  10327. A_UINT32 timestamp;
  10328. /**
  10329. * Interval between two consecutive WLM stats query requests,
  10330. * in microseconds units.
  10331. * This interval is used for converting the scan_period and pwr_on_period
  10332. * values from within wmi_wlm_link_stats from percentage units to time
  10333. * units.
  10334. */
  10335. A_UINT32 req_interval;
  10336. /*
  10337. * This TLV is followed by an A_UINT32 array TLV carrying an opaque payload.
  10338. */
  10339. } wmi_wlm_stats_event_fixed_param;
  10340. /** Suspend option */
  10341. enum {
  10342. WMI_PDEV_SUSPEND, /* suspend */
  10343. WMI_PDEV_SUSPEND_AND_DISABLE_INTR, /* suspend and disable all interrupts */
  10344. };
  10345. typedef struct {
  10346. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_suspend_cmd_fixed_param */
  10347. /* suspend option sent to target */
  10348. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  10349. A_UINT32 suspend_opt;
  10350. } wmi_pdev_suspend_cmd_fixed_param;
  10351. typedef struct {
  10352. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_cmd_fixed_param */
  10353. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  10354. } wmi_pdev_resume_cmd_fixed_param;
  10355. typedef struct {
  10356. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, */
  10357. A_UINT32 num_vdev_stats; /* number of vdevs */
  10358. } wmi_vdev_rate_stats_event_fixed_param;
  10359. typedef struct {
  10360. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_ht_info*/
  10361. A_UINT32 vdevid; /* Id of the wlan vdev*/
  10362. A_UINT32 tx_nss; /* Bit 28 of tx_rate_kbps has this info - based on last data packet transmitted*/
  10363. A_UINT32 rx_nss; /* Bit 24 of rx_rate_kbps - same as above*/
  10364. A_UINT32 tx_preamble; /* Bits 30-29 from tx_rate_kbps */
  10365. A_UINT32 rx_preamble; /* Bits 26-25 from rx_rate_kbps */
  10366. } wmi_vdev_rate_ht_info;
  10367. typedef struct {
  10368. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_rx_aggr_failure_event_fixed_param */
  10369. A_UINT32 num_failure_info; /* How many holes on rx aggregation */
  10370. } wmi_rx_aggr_failure_event_fixed_param;
  10371. typedef struct {
  10372. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_wmi_rx_aggr_failure_info */
  10373. A_UINT32 start_seq; /* start sequence number of the hole */
  10374. A_UINT32 end_seq; /* end sequence number of the hole */
  10375. } wmi_rx_aggr_failure_info;
  10376. typedef struct {
  10377. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_pn_request_cmd_fixed_param */
  10378. /** unique id identifying the VDEV, generated by the caller */
  10379. A_UINT32 vdev_id;
  10380. /** peer MAC address */
  10381. wmi_mac_addr peer_macaddr;
  10382. A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
  10383. /** key index **/
  10384. A_UINT32 key_ix;
  10385. } wmi_peer_tx_pn_request_cmd_fixed_param;
  10386. typedef struct {
  10387. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_pn_request_cmd_fixed_param */
  10388. /** unique id identifying the VDEV, generated by the caller */
  10389. A_UINT32 vdev_id;
  10390. /** peer MAC address */
  10391. wmi_mac_addr peer_macaddr;
  10392. A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
  10393. /** key index **/
  10394. A_UINT32 key_ix;
  10395. } wmi_peer_rx_pn_request_cmd_fixed_param;
  10396. typedef struct {
  10397. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_pn_response_event_fixed_param */
  10398. /** unique id identifying the VDEV, generated by the caller */
  10399. A_UINT32 vdev_id;
  10400. /** peer MAC address */
  10401. wmi_mac_addr peer_macaddr;
  10402. A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
  10403. /** Packet Number
  10404. * The PN is provided in little endian order, with bits 7:0 of the PN
  10405. * residing in pn[0].
  10406. * The key_type indirectly specifies the packet number length, and thus
  10407. * how many bytes within pn[] are filled with valid data.
  10408. */
  10409. A_UINT8 pn[16];
  10410. /** key index **/
  10411. A_UINT32 key_ix;
  10412. } wmi_peer_tx_pn_response_event_fixed_param;
  10413. typedef struct {
  10414. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_pn_response_event_fixed_param */
  10415. /** unique id identifying the VDEV, generated by the caller */
  10416. A_UINT32 vdev_id;
  10417. /** peer MAC address */
  10418. wmi_mac_addr peer_macaddr;
  10419. A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
  10420. A_UINT32 key_idx;
  10421. /** Packet Number
  10422. * The PN is provided in little endian order, with bits 7:0 of the PN
  10423. * residing in pn[0].
  10424. * The key_type indirectly specifies the packet number length, and thus
  10425. * how many bytes within pn[] are filled with valid data.
  10426. */
  10427. A_UINT8 pn[WMI_MAX_PN_LEN];
  10428. } wmi_peer_rx_pn_response_event_fixed_param;
  10429. typedef struct {
  10430. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
  10431. wmi_stats_id stats_id;
  10432. /** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */
  10433. A_UINT32 num_pdev_stats;
  10434. /** number of vdev stats event structures (wmi_vdev_stats) 0 or max vdevs */
  10435. A_UINT32 num_vdev_stats;
  10436. /** number of peer stats event structures (wmi_peer_stats) 0 or max peers */
  10437. A_UINT32 num_peer_stats;
  10438. A_UINT32 num_bcnflt_stats;
  10439. /** number of chan stats event structures (wmi_chan_stats) 0 to MAX MCC CHANS */
  10440. A_UINT32 num_chan_stats;
  10441. /** number of MIB stats event structures (wmi_mib_stats) */
  10442. A_UINT32 num_mib_stats;
  10443. 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. */
  10444. /** number of beacon stats event structures (wmi_bcn_stats) */
  10445. A_UINT32 num_bcn_stats;
  10446. /** number of extended peer stats event structures (wmi_peer_extd_stats) */
  10447. A_UINT32 num_peer_extd_stats;
  10448. /** number of extd2 peer stats event structures (wmi_peer_extd2_stats) */
  10449. A_UINT32 num_peer_extd2_stats;
  10450. /** last_event
  10451. * The most significant bit is set to 1 to indicate whether the last_event
  10452. * field contains valid data. The least significant bit is set to 1 to
  10453. * indicate this is the final WMI_STATS_EVENT in a series.
  10454. */
  10455. A_UINT32 last_event;
  10456. /** number of extended MIB stats event structures (wmi_mib_extd_stats) */
  10457. A_UINT32 num_mib_extd_stats;
  10458. /** Indicates the vdev id of the stats for MLO stats query */
  10459. wmi_vdev_id_info vdev_id_info;
  10460. /** Indicates the vdev id of the stats for MLO stats query v2 */
  10461. wmi_vdev_id_info_v2 vdev_id_info_v2;
  10462. /* This TLV is followed by another TLV of array of bytes
  10463. * A_UINT8 data[];
  10464. * This data array contains
  10465. * num_pdev_stats * size of(struct wmi_pdev_stats)
  10466. * num_vdev_stats * size of(struct wmi_vdev_stats)
  10467. * num_peer_stats * size of(struct wmi_peer_stats)
  10468. * num_bcnflt_stats * size_of()
  10469. * num_chan_stats * size of(struct wmi_chan_stats)
  10470. * num_mib_stats * size of(struct wmi_mib_stats)
  10471. * num_bcn_stats * size of(struct wmi_bcn_stats)
  10472. */
  10473. /* If WMI_REQUEST_PEER_EXTD_STAT is set in stats_id,
  10474. * the data[] array also contains num_peer_stats * size of wmi_peer_extd_stats
  10475. * following the information elements listed above.
  10476. */
  10477. /* If WMI_REQUEST_MIB_EXTD_STAT is set in stats_id,
  10478. * the data[] array also contains
  10479. * num_mib_extd_stats * size of(struct wmi_mib_extd_stats)
  10480. * following the information elements listed above.
  10481. */
  10482. /* If WMI_REQUEST_PMF_BCN_PROTECT_STAT is set in stats_id, then TLV
  10483. * wmi_pmf_bcn_protect_stats pmf_bcn_protect_stats[]
  10484. * follows the other TLVs
  10485. */
  10486. /* If WMI_REQUEST_VDEV_EXTD_STAT is set in stats_id, then TLV
  10487. * wmi_vdev_extd_stats wmi_vdev_extd_stats[]
  10488. * follows the other TLVs
  10489. */
  10490. /* If WMI_REQUEST_PDEV_EXTD_STAT is set in stats_id, then TLV
  10491. * wmi_pdev_extd_stats wmi_pdev_extd_stats[]
  10492. * follows the other TLVs
  10493. */
  10494. /* If WMI_REQUEST_PDEV_TELEMETRY_STAT is set in stats_id, then TLV
  10495. * wmi_pdev_telemetry_stats wmi_pdev_telemetry_stats[]
  10496. * follows the other TLVs
  10497. */
  10498. } wmi_stats_event_fixed_param;
  10499. /* WLAN channel CCA stats bitmap */
  10500. #define WLAN_STATS_IDLE_TIME_SHIFT 0
  10501. #define WLAN_STATS_IDLE_TIME_TIME 0x00000001
  10502. #define WLAN_STATS_TX_TIME_SHIFT 1
  10503. #define WLAN_STATS_TX_TIME_MASK 0x00000002
  10504. #define WLAN_STATS_RX_IN_BSS_TIME_SHIFT 2
  10505. #define WLAN_STATS_RX_IN_BSS_TIME_MASK 0x00000004
  10506. #define WLAN_STATS_RX_OUT_BSS_TIME_SHIFT 3
  10507. #define WLAN_STATS_RX_OUT_BSS_TIME_MASK 0x00000008
  10508. #define WLAN_STATS_RX_BUSY_TIME_SHIFT 4
  10509. #define WLAN_STATS_RX_BUSY_TIME_MASK 0x00000010
  10510. #define WLAN_STATS_RX_IN_BAD_COND_TIME_SHIFT 5
  10511. #define WLAN_STATS_RX_IN_BAD_COND_TIME_MASK 0x00000020
  10512. #define WLAN_STATS_TX_IN_BAD_COND_TIME_SHIFT 6
  10513. #define WLAN_STATS_TX_IN_BAD_COND_TIME_MASK 0x00000040
  10514. #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_SHIFT 7
  10515. #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_MASK 0x00000080
  10516. /* WLAN peer signal stats bitmap */
  10517. #define WLAN_STATS_PER_CHAIN_SNR_SHIFT 0
  10518. #define WLAN_STATS_PER_CHAIN_SNR_MASK 0x00000001
  10519. #define WLAN_STATS_PER_CHAIN_NF_SHIFT 1
  10520. #define WLAN_STATS_PER_CHAIN_NF_MASK 0x00000002
  10521. /* WLAN TX stats bitmap */
  10522. #define WLAN_STATS_TX_MSDU_CNT_SHIFT 0
  10523. #define WLAN_STATS_TX_MSDU_CNT_MASK 0x00000001
  10524. #define WLAN_STATS_TX_MPDU_CNT_SHIFT 1
  10525. #define WLAN_STATS_TX_MPDU_CNT_MASK 0x00000002
  10526. #define WLAN_STATS_TX_PPDU_CNT_SHIFT 2
  10527. #define WLAN_STATS_TX_PPDU_CNT_MASK 0x00000004
  10528. #define WLAN_STATS_TX_BYTES_SHIFT 3
  10529. #define WLAN_STATS_TX_BYTES_MASK 0x00000008
  10530. #define WLAN_STATS_TX_MSDU_DROP_CNT_SHIFT 4
  10531. #define WLAN_STATS_TX_MSDU_DROP_CNT_MASK 0x00000010
  10532. #define WLAN_STATS_TX_DROP_BYTES_SHIFT 5
  10533. #define WLAN_STATS_TX_DROP_BYTES_MASK 0x00000020
  10534. #define WLAN_STATS_TX_MPDU_RETRY_CNT_SHIFT 6
  10535. #define WLAN_STATS_TX_MPDU_RETRY_CNT_MASK 0x00000040
  10536. #define WLAN_STATS_TX_MPDU_FAIL_CNT_SHIFT 7
  10537. #define WLAN_STATS_TX_MPDU_FAIL_CNT_MASK 0x00000080
  10538. #define WLAN_STATS_TX_PPDU_FAIL_CNT_SHIFT 8
  10539. #define WLAN_STATS_TX_PPDU_FAIL_CNT_MASK 0x00000100
  10540. #define WLAN_STATS_TX_MPDU_AGGR_SHIFT 9
  10541. #define WLAN_STATS_TX_MPDU_AGGR_MASK 0x00000200
  10542. #define WLAN_STATS_TX_SUCC_MCS_SHIFT 10
  10543. #define WLAN_STATS_TX_SUCC_MCS_MASK 0x00000400
  10544. #define WLAN_STATS_TX_FAIL_MCS_SHIFT 11
  10545. #define WLAN_STATS_TX_FAIL_MCS_MASK 0x00000800
  10546. #define WLAN_STATS_TX_PPDU_DELAY_SHIFT 12
  10547. #define WLAN_STATS_TX_PPDU_DELAY_MASK 0x00001000
  10548. /* WLAN RX stats bitmap */
  10549. #define WLAN_STATS_MAC_RX_MPDU_CNT_SHIFT 0
  10550. #define WLAN_STATS_MAC_RX_MPDU_CNT_MASK 0x00000001
  10551. #define WLAN_STATS_MAC_RX_BYTES_SHIFT 1
  10552. #define WLAN_STATS_MAC_RX_BYTES_MASK 0x00000002
  10553. #define WLAN_STATS_PHY_RX_PPDU_CNT_SHIFT 2
  10554. #define WLAN_STATS_PHY_RX_PPDU_CNT_MASK 0x00000004
  10555. #define WLAN_STATS_PHY_RX_BYTES_SHIFT 3
  10556. #define WLAN_STATS_PHY_RX_BYTES_MASK 0x00000008
  10557. #define WLAN_STATS_RX_DISORDER_CNT_SHIFT 4
  10558. #define WLAN_STATS_RX_DISORDER_CNT_MASK 0x00000010
  10559. #define WLAN_STATS_RX_MPDU_RETRY_CNT_SHIFT 5
  10560. #define WLAN_STATS_RX_MPDU_RETRY_CNT_MASK 0x00000020
  10561. #define WLAN_STATS_RX_MPDU_DUP_CNT_SHIFT 6
  10562. #define WLAN_STATS_RX_MPDU_DUP_CNT_MASK 0x00000040
  10563. #define WLAN_STATS_RX_MPDU_DISCARD_CNT_SHIFT 7
  10564. #define WLAN_STATS_RX_MPDU_DISCARD_CNT_MASK 0x00000080
  10565. #define WLAN_STATS_RX_MPDU_AGGR_SHIFT 8
  10566. #define WLAN_STATS_RX_MPDU_AGGR_MASK 0x00000100
  10567. #define WLAN_STATS_RX_MCS_SHIFT 9
  10568. #define WLAN_STATS_RX_MCS_MASK 0x00000200
  10569. #define WLAN_STATS_STA_PS_INDS_SHIFT 10
  10570. #define WLAN_STATS_STA_PS_INDS_MASK 0x00000400
  10571. #define WLAN_STATS_STA_PS_DURS_SHIFT 11
  10572. #define WLAN_STATS_STA_PS_DURS_MASK 0x00000800
  10573. #define WLAN_STATS_RX_PROBE_REQS_SHIFT 12
  10574. #define WLAN_STATS_RX_PROBE_REQS_MASK 0x00001000
  10575. #define WLAN_STATS_RX_OTH_MGMTS_SHIFT 13
  10576. #define WLAN_STATS_RX_OTH_MGMTS_MASK 0x00002000
  10577. typedef struct
  10578. {
  10579. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats */
  10580. A_UINT32 vdev_id;
  10581. /** Percentage of idle time, no TX, no RX, no interference */
  10582. A_UINT32 idle_time;
  10583. /** Percentage of time transmitting packets */
  10584. A_UINT32 tx_time;
  10585. /** Percentage of time receiving packets in current BSSs */
  10586. A_UINT32 rx_in_bss_time;
  10587. /** Percentage of time receiving packets not in current BSSs */
  10588. A_UINT32 rx_out_bss_time;
  10589. /** Percentage of time interference detected. */
  10590. A_UINT32 rx_busy_time;
  10591. /** Percentage of time receiving packets with errors
  10592. * or packets flagged as retransmission or seqnum discontinued. */
  10593. A_UINT32 rx_in_bad_cond_time;
  10594. /** Percentage of time the device transmitted packets that haven't been ACKed. */
  10595. A_UINT32 tx_in_bad_cond_time;
  10596. /** Percentage of time the chip is unable to work in normal conditions. */
  10597. A_UINT32 wlan_not_avail_time;
  10598. } wmi_chan_cca_stats;
  10599. /** Thresholds of cca stats, stands for percentages of stats variation.
  10600. * Check wmi_chan_cca_stats for each stats's meaning.
  10601. */
  10602. typedef struct
  10603. {
  10604. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats_thresh */
  10605. A_UINT32 idle_time; /* units = percent */
  10606. A_UINT32 tx_time; /* units = percent */
  10607. A_UINT32 rx_in_bss_time; /* units = percent */
  10608. A_UINT32 rx_out_bss_time; /* units = percent */
  10609. A_UINT32 rx_busy_time; /* units = percent */
  10610. A_UINT32 rx_in_bad_cond_time; /* units = percent */
  10611. A_UINT32 tx_in_bad_cond_time; /* units = percent */
  10612. A_UINT32 wlan_not_avail_time; /* units = percent */
  10613. } wmi_chan_cca_stats_thresh;
  10614. typedef struct
  10615. {
  10616. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats */
  10617. A_UINT32 vdev_id;
  10618. A_UINT32 peer_id;
  10619. /** per chain SNR in current bss, units are dB */
  10620. A_INT32 per_chain_snr[WMI_MAX_CHAINS];
  10621. /** per chain background noise, units are dBm */
  10622. A_INT32 per_chain_nf[WMI_MAX_CHAINS];
  10623. /** per antenna rx MPDUs */
  10624. A_UINT32 per_antenna_rx_mpdus[WMI_MAX_CHAINS];
  10625. /** per antenna tx MPDUs */
  10626. A_UINT32 per_antenna_tx_mpdus[WMI_MAX_CHAINS];
  10627. /** num of valid chains for per antenna rx/tx MPDU cnts*/
  10628. A_UINT32 num_chains_valid;
  10629. } wmi_peer_signal_stats;
  10630. /** Thresholds of signal stats, stand for percentage of stats variation.
  10631. * Check wmi_peer_signal_stats for each stats's meaning.
  10632. */
  10633. typedef struct
  10634. {
  10635. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats_thresh */
  10636. A_UINT32 per_chain_snr; /* units = dB */
  10637. A_UINT32 per_chain_nf; /* units = dBm */
  10638. } wmi_peer_signal_stats_thresh;
  10639. typedef struct
  10640. {
  10641. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats */
  10642. /** Number of total TX MSDUs on MAC layer in the period */
  10643. A_UINT32 tx_msdu_cnt;
  10644. /** Number of total TX MPDUs on MAC layer in the period */
  10645. A_UINT32 tx_mpdu_cnt;
  10646. /** Number of total TX PPDUs on MAC layer in the period */
  10647. A_UINT32 tx_ppdu_cnt;
  10648. /** Bytes of tx data on MAC layer in the period */
  10649. A_UINT32 tx_bytes;
  10650. /** Number of TX MSDUs cancelled due to any reason in the period,
  10651. * such as WMM limitation/bandwidth limitation/radio congestion */
  10652. A_UINT32 tx_msdu_drop_cnt;
  10653. /** Bytes of dropped TX packets in the period */
  10654. A_UINT32 tx_drop_bytes;
  10655. /** Number of unacked transmissions of MPDUs */
  10656. A_UINT32 tx_mpdu_retry_cnt;
  10657. /** Number of MPDUs have not been ACKed despite retried */
  10658. A_UINT32 tx_mpdu_fail_cnt;
  10659. /** Number of PPDUs which received no block ack */
  10660. A_UINT32 tx_ppdu_fail_cnt;
  10661. /* This TLV is followed by TLVs below: :
  10662. * A_UINT32 tx_mpdu_aggr[tx_mpdu_aggr_array_len];
  10663. * A_UINT32 tx_succ_mcs[tx_succ_mcs_array_len];
  10664. * A_UINT32 tx_fail_mcs[tx_fail_mcs_array_len];
  10665. * A_UINT32 tx_ppdu_delay[tx_ppdu_delay_array_len];
  10666. */
  10667. } wmi_tx_stats;
  10668. /** Thresholds of tx stats, stand for percentage of stats variation.
  10669. * Check wmi_tx_stats for each stats's meaning.
  10670. */
  10671. typedef struct
  10672. {
  10673. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats_thresh */
  10674. A_UINT32 tx_msdu_cnt;
  10675. A_UINT32 tx_mpdu_cnt;
  10676. A_UINT32 tx_ppdu_cnt;
  10677. A_UINT32 tx_bytes;
  10678. A_UINT32 tx_msdu_drop_cnt;
  10679. A_UINT32 tx_drop_bytes;
  10680. A_UINT32 tx_mpdu_retry_cnt;
  10681. A_UINT32 tx_mpdu_fail_cnt;
  10682. A_UINT32 tx_ppdu_fail_cnt;
  10683. A_UINT32 tx_mpdu_aggr;
  10684. A_UINT32 tx_succ_mcs;
  10685. A_UINT32 tx_fail_mcs;
  10686. A_UINT32 tx_ppdu_delay;
  10687. } wmi_tx_stats_thresh;
  10688. typedef struct
  10689. {
  10690. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_tx_stats */
  10691. A_UINT32 vdev_id;
  10692. A_UINT32 peer_id;
  10693. /* The TLVs for the 4 AC follows:
  10694. * wmi_tx_stats tx_stats[]; wmi_tx_stats for BE/BK/VI/VO
  10695. */
  10696. } wmi_peer_ac_tx_stats;
  10697. typedef struct
  10698. {
  10699. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats */
  10700. /** Number of RX MPDUs on MAC layer */
  10701. A_UINT32 mac_rx_mpdu_cnt;
  10702. /** Bytes of RX packets on MAC layer */
  10703. A_UINT32 mac_rx_bytes;
  10704. /** Number of RX PPDU on PHY layer */
  10705. A_UINT32 phy_rx_ppdu_cnt;
  10706. /** Bytes of RX packets on PHY layer */
  10707. A_UINT32 phy_rx_bytes;
  10708. /** Number of discontinuity in seqnum */
  10709. A_UINT32 rx_disorder_cnt;
  10710. /** Number of RX MPDUs flagged as retransmissions */
  10711. A_UINT32 rx_mpdu_retry_cnt;
  10712. /** Number of RX MPDUs identified as duplicates */
  10713. A_UINT32 rx_mpdu_dup_cnt;
  10714. /** Number of RX MPDUs discarded */
  10715. A_UINT32 rx_mpdu_discard_cnt;
  10716. /* This TLV is followed by TLVs below:
  10717. * A_UINT32 rx_mpdu_aggr[rx_mpdu_aggr_array_len];
  10718. * A_UINT32 rx_mcs[rx_mcs_array_len];
  10719. */
  10720. } wmi_rx_stats;
  10721. /** Thresholds of rx stats, stands for percentage of stats variation.
  10722. * Check wmi_rx_stats for each stats's meaning.
  10723. */
  10724. typedef struct
  10725. {
  10726. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats_thresh */
  10727. A_UINT32 mac_rx_mpdu_cnt;
  10728. A_UINT32 mac_rx_bytes;
  10729. A_UINT32 phy_rx_ppdu_cnt;
  10730. A_UINT32 phy_rx_bytes;
  10731. A_UINT32 rx_disorder_cnt;
  10732. A_UINT32 rx_mpdu_retry_cnt;
  10733. A_UINT32 rx_mpdu_dup_cnt;
  10734. A_UINT32 rx_mpdu_discard_cnt;
  10735. A_UINT32 rx_mpdu_aggr;
  10736. A_UINT32 rx_mcs;
  10737. A_UINT32 sta_ps_inds;
  10738. A_UINT32 sta_ps_durs;
  10739. A_UINT32 rx_probe_reqs;
  10740. A_UINT32 rx_oth_mgmts;
  10741. } wmi_rx_stats_thresh;
  10742. typedef struct
  10743. {
  10744. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_rx_stats */
  10745. A_UINT32 vdev_id;
  10746. A_UINT32 peer_id;
  10747. /** How many times STAs go to sleep */
  10748. A_UINT32 sta_ps_inds;
  10749. /** Total sleep time of STAs, milliseconds units */
  10750. A_UINT32 sta_ps_durs;
  10751. /** Number of probe requests received */
  10752. A_UINT32 rx_probe_reqs;
  10753. /** Number of other management frames received, not including probe requests */
  10754. A_UINT32 rx_oth_mgmts;
  10755. /* The TLVs for the 4 AC follows:
  10756. * wmi_rx_stats rx_stats[]; wmi_rx_stats for BE/BK/VI/VO
  10757. */
  10758. } wmi_peer_ac_rx_stats;
  10759. typedef struct
  10760. {
  10761. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_period */
  10762. /*
  10763. * This struct provides the timestamps from a low-frequency timer
  10764. * for the start and end of a stats period.
  10765. * Each timestamp is reported twice, with different units.
  10766. * The _msec timestamp is in millisecond units.
  10767. * The _count timestamp is in clock tick units.
  10768. * The timestamp is reported in clock ticks as well as in milliseconds
  10769. * so that if the stats start and end times fall within the same
  10770. * millisecond, the clock tick timestamps can still be used to
  10771. * determine what fraction of a millisecond the stats period occupied.
  10772. */
  10773. A_UINT32 start_low_freq_msec;
  10774. A_UINT32 start_low_freq_count;
  10775. A_UINT32 end_low_freq_msec;
  10776. A_UINT32 end_low_freq_count;
  10777. } wmi_stats_period;
  10778. typedef enum {
  10779. /** Periodic timer timed out, based on the period specified
  10780. * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
  10781. */
  10782. TRIGGER_COND_ID_TIMER_TIMED_OUT = 0x1,
  10783. /** Any of the (enabled) stats thresholds specified
  10784. * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
  10785. * within the current stats period.
  10786. */
  10787. TRIGGER_COND_ID_THRESH_EXCEEDED = 0x2,
  10788. /** In Response to the one-time wlan stats request of
  10789. * WMI_REQUEST_WLAN_STATS_CMDID from host.
  10790. */
  10791. TRIGGER_COND_ID_ONE_TIME_REQUEST = 0x3,
  10792. } wmi_report_stats_event_trigger_cond_id;
  10793. typedef struct
  10794. {
  10795. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_interference */
  10796. /** For cases where a single rx chain has options to be connected to
  10797. * different rx antennas, show which rx antennas were in use during
  10798. * receipt of a given PPDU.
  10799. * This sa_ant_matrix provides a bitmask of the antennas used while
  10800. * receiving this frame.
  10801. */
  10802. A_UINT32 sa_ant_matrix;
  10803. /** Count how many times the hal_rxerr_phy is marked, in this time period.
  10804. * The counter value is reset each period. The host specifies the period
  10805. * via WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD.
  10806. */
  10807. A_UINT32 phyerr_count;
  10808. /** The timestamp at which the WMI event is reported.
  10809. * In targets that have a WBTIMER_1 timer, this timestamp is taken
  10810. * from WBTIMER_1.
  10811. */
  10812. A_UINT32 timestamp;
  10813. } wmi_stats_interference;
  10814. typedef struct {
  10815. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_report_stats_event_fixed_param */
  10816. /** Indicate what triggered this event, check wmi_report_stats_event_trigger_cond_id for details */
  10817. A_UINT32 trigger_cond_id;
  10818. /** Bitmap to indicate changed channel CCA stats which exceeded the thresholds */
  10819. A_UINT32 cca_chgd_bitmap;
  10820. /** Bitmap to indicate changed peer signal stats which exceeded the thresholds */
  10821. A_UINT32 sig_chgd_bitmap;
  10822. /** Bitmap to indicate changed TX counters which exceeded the thresholds */
  10823. A_UINT32 tx_chgd_bitmap;
  10824. /** Bitmap to indicate changed RX counters which exceeded the thresholds */
  10825. A_UINT32 rx_chgd_bitmap;
  10826. /** number of per channel CCA stats structures (wmi_chan_cca_stats), 0 to max vdevs*/
  10827. A_UINT32 num_chan_cca_stats;
  10828. /** number of per peer signal stats structures (wmi_peer_signal_stats), 0 to max peers*/
  10829. A_UINT32 num_peer_signal_stats;
  10830. /** number of per peer ac TX stats structures (wmi_peer_ac_tx_stats), 0 to max peers*/
  10831. A_UINT32 num_peer_ac_tx_stats;
  10832. /** Array length of tx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
  10833. * The array indicates number of MPDUs sent on specified aggregation size
  10834. * (per number of MPDUs per AMPDUs / 1 to 7 and 8+).
  10835. * Array length can be set per WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN */
  10836. A_UINT32 tx_mpdu_aggr_array_len;
  10837. /** Array length of tx_succ_mcs[] which is histogram of encoding rate.
  10838. * The array indicates number of acked PPDUs sent at a specific rate */
  10839. A_UINT32 tx_succ_mcs_array_len;
  10840. /** Array length of tx_fail_mcs[] which is histogram of encoding rate.
  10841. * The array indicates number of unacked PPDUs sent at a specific rate */
  10842. A_UINT32 tx_fail_mcs_array_len;
  10843. /** tx_ppdu_delay[]is a histogram of delays on MAC layer.
  10844. * The array counts numbers of PPDUs encountering different TX time delays.
  10845. * TX delay here means time interval between the time a PPDU is queued
  10846. * to the MAC HW for transmission and the time the lower layers of
  10847. * tx FW return a tx status.
  10848. *
  10849. * The bin size tx_ppdu_delay_bin_size_ms specifies how many milliseconds
  10850. * each bin of the tx_ppdu_delay histogram represents.
  10851. * By default the bin size is 10ms.
  10852. * tx_ppdu_delay[0] -> delays between 0-9 ms
  10853. * tx_ppdu_delay[1] -> delays between 10-19 ms
  10854. * ...
  10855. * tx_ppdu_delay[9] -> delays between 90-99 ms
  10856. * tx_ppdu_delay[10] -> delays >= 100 ms
  10857. * Bin size can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS.
  10858. */
  10859. A_UINT32 tx_ppdu_delay_bin_size_ms;
  10860. /** Array length of tx_ppdu_delay[]. It can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN */
  10861. A_UINT32 tx_ppdu_delay_array_len;
  10862. /** number of per peer ac RX stats structures (wmi_peer_ac_rx_stats), 0 to max peers*/
  10863. A_UINT32 num_peer_ac_rx_stats;
  10864. /** Array length of rx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
  10865. * It can be set per WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN */
  10866. A_UINT32 rx_mpdu_aggr_array_len;
  10867. /** Array size of rx_mcs[] which is histogram of encoding rate.
  10868. * The array indicates number of PPDUs received at a specific rate */
  10869. A_UINT32 rx_mcs_array_len;
  10870. /** Array size of stats_period[] which contains several stats periods. */
  10871. A_UINT32 stats_period_array_len;
  10872. /** Indicates the vdev id for MLO case */
  10873. wmi_vdev_id_info vdev_id_info;
  10874. /**
  10875. * This TLV is followed by TLVs below:
  10876. * wmi_chan_cca_stats chan_cca_stats[]; Array length is specified by num_chan_cca_stats
  10877. * wmi_peer_signal_stats peer_signal_stats[]; Array length is specified by num_peer_signal_stats
  10878. * wmi_peer_ac_tx_stats peer_ac_tx_stats[]; Array length is specified by num_peer_ac_tx_stats
  10879. * 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)
  10880. * A_UINT32 tx_mpdu_aggr[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_mpdu_aggr_array_len,
  10881. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_mpdu_aggr_array_len + A-MPDU aggregation index
  10882. * A_UINT32 tx_succ_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_succ_mcs_array_len,
  10883. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_succ_mcs_array_len + MCS index
  10884. * A_UINT32 tx_fail_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_fail_mcs_array_len,
  10885. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_fail_mcs_array_len + MCS index
  10886. * A_UINT32 tx_ppdu_delay[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_ppdu_delay_array_len,
  10887. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_ppdu_delay_array_len + tx delay index
  10888. * wmi_peer_ac_rx_stats peer_ac_rx_stats[]; Array length is specified by num_peer_ac_rx_stats
  10889. * 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)
  10890. * A_UINT32 rx_mpdu_aggr[][][]; Array length is num_peer_ac_rx_stats * WLAN_MAX_AC * rx_mpdu_aggr_array_len,
  10891. * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mpdu_aggr_array_len + A-MPDU aggregation index
  10892. * A_UINT32 rx_mcs[][][]; Array length is (num_peer_ac_rx_stats * WLAN_MAX_AC) * rx_mcs_array_len,
  10893. * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mcs_array_len + MCS index
  10894. * wmi_stats_period stats_period[]; Array length is specified by stats_period_array_len
  10895. * 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.
  10896. **/
  10897. } wmi_report_stats_event_fixed_param;
  10898. typedef struct {
  10899. /** TLV tag and len; tag equals
  10900. * WMITLV_TAG_STRUC_wmi_peer_stats_info */
  10901. A_UINT32 tlv_header;
  10902. /** peer MAC address */
  10903. wmi_mac_addr peer_macaddr;
  10904. /** bytes (size of MPDUs) transmitted to this peer */
  10905. struct {
  10906. /* lower 32 bits of the tx_bytes value */
  10907. A_UINT32 low_32;
  10908. /* upper 32 bits of the tx_bytes value */
  10909. A_UINT32 high_32;
  10910. } tx_bytes;
  10911. /** packets (MSDUs) transmitted to this peer */
  10912. struct {
  10913. /* lower 32 bits of the tx_packets value */
  10914. A_UINT32 low_32;
  10915. /* upper 32 bits of the tx_packets value */
  10916. A_UINT32 high_32;
  10917. } tx_packets;
  10918. /** bytes (size of MPDUs) received from this peer */
  10919. struct {
  10920. /* lower 32 bits of the rx_bytes value */
  10921. A_UINT32 low_32;
  10922. /* upper 32 bits of the rx_bytes value */
  10923. A_UINT32 high_32;
  10924. } rx_bytes;
  10925. /** packets (MSDUs) received from this peer */
  10926. struct {
  10927. /* lower 32 bits of the rx_packets value */
  10928. A_UINT32 low_32;
  10929. /* upper 32 bits of the rx_packets value */
  10930. A_UINT32 high_32;
  10931. } rx_packets;
  10932. /** cumulative retry counts (MPDUs) */
  10933. A_UINT32 tx_retries;
  10934. /** number of failed transmissions (MPDUs) (retries exceeded, no ACK) */
  10935. A_UINT32 tx_failed;
  10936. /** rate information, it is output of WMI_ASSEMBLE_RATECODE_V1
  10937. * (in format of 0x1000RRRR)
  10938. * The rate-code is a 4-bytes field in which,
  10939. * for given rate, nss and preamble
  10940. *
  10941. * b'31-b'29 unused / reserved
  10942. * b'28 indicate the version of rate-code (1 = RATECODE_V1)
  10943. * b'27-b'11 unused / reserved
  10944. * b'10-b'8 indicate the preamble (0 OFDM, 1 CCK, 2 HT, 3 VHT)
  10945. * b'7-b'5 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3, 3 - 4x4)
  10946. * b'4-b'0 indicate the rate, which is indicated as follows:
  10947. * OFDM : 0: OFDM 48 Mbps
  10948. * 1: OFDM 24 Mbps
  10949. * 2: OFDM 12 Mbps
  10950. * 3: OFDM 6 Mbps
  10951. * 4: OFDM 54 Mbps
  10952. * 5: OFDM 36 Mbps
  10953. * 6: OFDM 18 Mbps
  10954. * 7: OFDM 9 Mbps
  10955. * CCK (pream == 1)
  10956. * 0: CCK 11 Mbps Long
  10957. * 1: CCK 5.5 Mbps Long
  10958. * 2: CCK 2 Mbps Long
  10959. * 3: CCK 1 Mbps Long
  10960. * 4: CCK 11 Mbps Short
  10961. * 5: CCK 5.5 Mbps Short
  10962. * 6: CCK 2 Mbps Short
  10963. * HT/VHT (pream == 2/3)
  10964. * 0..7: MCS0..MCS7 (HT)
  10965. * 0..9: MCS0..MCS9 (11AC VHT)
  10966. * 0..11: MCS0..MCS11 (11AX VHT)
  10967. */
  10968. /** rate-code of the last transmission */
  10969. A_UINT32 last_tx_rate_code;
  10970. /** rate-code of the last received PPDU */
  10971. A_UINT32 last_rx_rate_code;
  10972. /** bitrate of the last transmission, in units of kbps */
  10973. A_UINT32 last_tx_bitrate_kbps;
  10974. /** bitrate of the last received PPDU, in units of kbps */
  10975. A_UINT32 last_rx_bitrate_kbps;
  10976. /** combined RSSI of the last received PPDU, in unit of dBm */
  10977. A_INT32 peer_rssi;
  10978. /** number of succeed transmissions (MPDUs) (ACK) */
  10979. A_UINT32 tx_succeed;
  10980. /**
  10981. * The RSSI values are in dBm units, and are exponentially time-averaged.
  10982. * The averaging is performed on the dB values (rather than the linear
  10983. * values).
  10984. */
  10985. A_INT32 peer_rssi_per_chain[WMI_MAX_CHAINS];
  10986. /* show how many elements in the tx_rate_counts array belong to this peer */
  10987. A_UINT32 num_tx_rate_counts;
  10988. /* show how many elements in the rx_rate_counts array belong to this peer */
  10989. A_UINT32 num_rx_rate_counts;
  10990. /* This TLV array is followed by other TLVs:
  10991. * A_UINT32 tx_rate_counts[sum(num_tx_rate_counts)];
  10992. * The above num_tx_rate_counts field shows which elements
  10993. * within the tx_rate_counts array belong to a given peer.
  10994. * Elements tx_rate_counts[0] to tx_rate_counts[N0-1] belong to
  10995. * peer 0, where N0 = peer_stats_info[0].num_tx_rate_counts.
  10996. * Elements tx_rate_counts[N0] to tx_rate_counts[N0+N1-1] belong to
  10997. * peer 1, where N1 = peer_stats_info[1].num_tx_rate_counts.
  10998. * etc.
  10999. * A_UINT32 rx_rate_counts[sum(num_rx_rate_counts)];
  11000. * The above num_rx_rate_counts field shows which elements
  11001. * within the rx_rate_counts array belong to a given peer.
  11002. * Elements rx_rate_counts[0] to rx_rate_counts[N0-1] belong to
  11003. * peer 0, where N0 = peer_stats_info[0].num_rx_rate_counts.
  11004. * Elements rx_rate_counts[N0] to rx_rate_counts[N0+N1-1] belong to
  11005. * peer 1, where N1 = peer_stats_info[1].num_rx_rate_counts.
  11006. * etc.
  11007. */
  11008. } wmi_peer_stats_info;
  11009. typedef struct {
  11010. /** TLV tag and len; tag equals
  11011. * WMITLV_TAG_STRUC_wmi_peer_stats_info_event_fixed_param */
  11012. A_UINT32 tlv_header;
  11013. /** VDEV to which the peers belong to */
  11014. A_UINT32 vdev_id;
  11015. /** number of peers in peer_stats_info[] */
  11016. A_UINT32 num_peers;
  11017. /** flag to indicate if there are more peers which will
  11018. * be sent a following separate peer_stats_info event */
  11019. A_UINT32 more_data;
  11020. /* This TLV is followed by another TLV of array of structs
  11021. * wmi_peer_stats_info peer_stats_info[];
  11022. */
  11023. } wmi_peer_stats_info_event_fixed_param;
  11024. /**
  11025. * WMI arrays of length WMI_MGMT_FRAME_SUBTYPE_MAX use the
  11026. * IEEE802.11 standard's enumeration of mgmt frame subtypes:
  11027. * 0 -> IEEE80211_FC0_SUBTYPE_ASSOC_REQ
  11028. * 1 -> IEEE80211_FC0_SUBTYPE_ASSOC_RESP
  11029. * 2 -> IEEE80211_FC0_SUBTYPE_REASSOC_REQ
  11030. * 3 -> IEEE80211_FC0_SUBTYPE_REASSOC_RESP
  11031. * 4 -> IEEE80211_FC0_SUBTYPE_PROBE_REQ
  11032. * 5 -> IEEE80211_FC0_SUBTYPE_PROBE_RESP
  11033. * 6 -> Reserved
  11034. * 7 -> Reserved
  11035. * 8 -> IEEE80211_FC0_SUBTYPE_BEACON
  11036. * 9 -> IEEE80211_FC0_SUBTYPE_ATIM
  11037. * 10 -> IEEE80211_FC0_SUBTYPE_DISASSOC
  11038. * 11 -> IEEE80211_FC0_SUBTYPE_AUTH
  11039. * 12 -> IEEE80211_FC0_SUBTYPE_DEAUTH
  11040. * 13 -> IEEE80211_FCO_SUBTYPE_ACTION
  11041. * 14 -> IEEE80211_FC0_SUBTYPE_ACTION_NOACK
  11042. * 15 -> IEEE80211_FC0_SUBTYPE_RESERVED
  11043. */
  11044. #define WMI_MGMT_FRAME_SUBTYPE_MAX 16
  11045. typedef struct {
  11046. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_pdev_stats_struct*/
  11047. A_UINT32 tlv_header;
  11048. /** pdev_id for identifying the MAC */
  11049. A_UINT32 pdev_id;
  11050. /** counter of how many times this pdev has
  11051. * transmitted each management frame sub-type */
  11052. A_UINT32 tx_mgmt_subtype[WMI_MGMT_FRAME_SUBTYPE_MAX];
  11053. /** counter of how many times this pdev has
  11054. * received each management frame sub-type */
  11055. A_UINT32 rx_mgmt_subtype[WMI_MGMT_FRAME_SUBTYPE_MAX];
  11056. /** scan fail dfs violation time in ms */
  11057. A_UINT32 scan_fail_dfs_violation_time_ms;
  11058. /** NOL check failed latest channel frequency in MHz */
  11059. A_UINT32 nol_check_fail_last_chan_freq;
  11060. /** NOL check failed timestamp in ms */
  11061. A_UINT32 nol_check_fail_time_stamp_ms;
  11062. /** total peer create count */
  11063. A_UINT32 total_peer_create_cnt;
  11064. /** total peer delete count */
  11065. A_UINT32 total_peer_delete_cnt;
  11066. /** total peer delete response count */
  11067. A_UINT32 total_peer_delete_resp_cnt;
  11068. /** sched algo FIFO full count */
  11069. A_UINT32 vdev_pause_fail_rt_to_sched_algo_fifo_full_cnt;
  11070. /** total number of qos null tx frame queued over WMI */
  11071. A_UINT32 qos_null_tx_over_wmi;
  11072. /** total qos null tx frame completion received count */
  11073. A_UINT32 qos_null_tx_send_compl_over_wmi;
  11074. /** total event alloc failure count for qos null tx send */
  11075. A_UINT32 qos_null_tx_send_event_alloc_failed;
  11076. /** wlan_pdev fields num_macs, vdev_up_count and vdev_active_count
  11077. * num_macs_phy_vdev_up_active:
  11078. * This word contains the following bitfields:
  11079. * number of macs from wlan_pdev
  11080. * (WMI_PDEV_STATS_NUM_MACS_SET,GET)
  11081. * number of vdev up count
  11082. * (WMI_PDEV_STATS_VDEV_UP_CNT_SET,GET)
  11083. * number of vdev active count
  11084. * (WMI_PDEV_STATS_VDEV_UP_CNT_SET,GET)
  11085. */
  11086. A_UINT32 opaque_debug_num_macs_phy_vdev_up_active;
  11087. /** refer wlan_pdev ic flags */
  11088. A_UINT32 opaque_debug_ic_flags;
  11089. /** vdev_id that are paused per pdev */
  11090. A_UINT32 opaque_debug_paused_ap_vdev_bitmap;
  11091. /** opaque_debug_flags:
  11092. * refer to WLAN_PS_DESC_BIN_HWM_HIT or WLAN_PS_DESC_BIN_LWM_HIT
  11093. */
  11094. A_UINT32 opaque_debug_flags;
  11095. /** wlan_pdev fields remote_peer_cnt, max_rf_chains_2G and max_rf_chains_5G
  11096. * remote_peer_cnt_max_rf_chains_2G_5G:
  11097. * This word contains the following bitfields:
  11098. * max chains supported in the 2.4 GHz band
  11099. * (WMI_PDEV_STATS_MAX_RF_CHAIN_2G_SET,GET)
  11100. * max chains supported in the 5 GHz band,
  11101. * (WMI_PDEV_STATS_MAX_RF_CHAIN_5G_SET,GET)
  11102. * number of remote peers
  11103. * (WMI_PDEV_STATS_REMOTE_PEER_CNT_SET,GET)
  11104. */
  11105. A_UINT32 opaque_debug_remote_peer_cnt_max_rf_chains_2G_5G;
  11106. /** wlan_pdev max HT Capability info, WMI_HT_CAP defines */
  11107. A_UINT32 opaque_debug_max_ht_cap_info;
  11108. /** wlan_pdev max VHT capability info, WMI_VHT_CAP defines */
  11109. A_UINT32 opaque_debug_max_vht_cap_info;
  11110. /** opaque_debug_max_vht_supp_mcs:
  11111. * wlan_pdev max VHT Supported MCS which is
  11112. * vht_supp_mcs_2G or vht_supp_mcs_5G
  11113. */
  11114. A_UINT32 opaque_debug_max_vht_supp_mcs;
  11115. /** wlan_pdev max HE capability info, WMI_HE_CAP defines */
  11116. A_UINT32 opaque_debug_max_he_cap_info;
  11117. A_UINT32 opaque_debug_max_he_cap_info_ext;
  11118. /** the nominal chain mask for transmit */
  11119. A_UINT32 opaque_debug_tx_chain_mask;
  11120. /** the nominal chain mask for receive */
  11121. A_UINT32 opaque_debug_rx_chain_mask;
  11122. /** opaque_debug_ema_flags:
  11123. * This word contains the following bitfields:
  11124. * ema_flags: ema_max_vap_cnt and ema_max_profile_period from wlan_pdev
  11125. * ema_max_vap_cnt- number of maximum EMA Tx vaps (VAPs having both
  11126. * VDEV_FLAGS_EMA_MODE and VDEV_FLAGS_TRANSMIT_AP set)
  11127. * (WMI_PDEV_STATS_EMA_MAX_VAP_CNT_SET,GET)
  11128. * ema_max_profile_period - maximum profile periodicity
  11129. * (maximum number of beacons after which VAP profiles repeat)
  11130. * for any EMA VAP on any pdev.
  11131. * (WMI_PDEV_STATS_EMA_MAX_PROFILE_PERIOD_SET,GET)
  11132. */
  11133. A_UINT32 opaque_debug_ema_flags;
  11134. /** wlan_pdev - maximum ML peers supported */
  11135. A_UINT32 opaque_debug_num_ml_peer_entries;
  11136. /** This word contains the following bitfields:
  11137. * wlan_pdev fields - num_max_hw_links, current_chip_id and max_num_chips
  11138. * (related to MLO)
  11139. * Max number of HW links
  11140. * (WMI_PDEV_STATS_NUM_MAX_HW_LINKS_SET,GET)
  11141. * Current Chip Id
  11142. * (WMI_PDEV_STATS_CURRENT_CHIP_ID_SET,GET)
  11143. * Max number of chips
  11144. * (WMI_PDEV_STATS_MAX_NUM_CHIPS_SET,GET)
  11145. */
  11146. A_UINT32 opaque_debug_mlo_flags;
  11147. /** Indicate beacon size in bytes */
  11148. A_UINT32 opaque_debug_large_bcn_size;
  11149. /** proposed by the host value of MSDUQs per each LinkView peer's TID */
  11150. A_UINT32 opaque_debug_num_of_linkview_msduqs_per_tid;
  11151. /** bcn_filter_context variables */
  11152. A_UINT32 opaque_debug_bcns_dropped;
  11153. A_UINT32 opaque_debug_bcns_recvd;
  11154. A_UINT32 opaque_debug_bcns_delivered;
  11155. /** Tids that are paused/unpaused based on module_id */
  11156. A_UINT32 opaque_debug_vdev_all_tid_pause_bitmap;
  11157. /** Tids that are blocked/unblocked based on module_id */
  11158. A_UINT32 opaque_debug_vdev_all_tid_block_bitmap;
  11159. /** wal_pdev rx filter, WAL_RX_FILTER_FLAGS defines */
  11160. A_UINT32 opaque_debug_rx_filter;
  11161. /** This word contains the following bitfields:
  11162. * aggr_nonaggr_retry_th:
  11163. * wal_pdev fields - agg_retry_th and non_agg_retry_th
  11164. * This value holds max retry threshold up to which a Data packet
  11165. * will be retried when ack is not received.
  11166. * agg_retry_th - Threshold value used when aggregation is enabled
  11167. * (WMI_PDEV_STATS_AGG_RETRY_TH_SET,GET)
  11168. * non_agg_retry_th - Threshold value used for non-aggregation.
  11169. * (WMI_PDEV_STATS_NON_AGG_RETRY_TH_SET)
  11170. */
  11171. A_UINT32 opaque_debug_aggr_nonaggr_retry_th;
  11172. /** This word contains the following bitfields:
  11173. * num_max_rx_ba_sessions:
  11174. * Number of rx BA session establised
  11175. * (WMI_PDEV_STATS_NUM_RX_BA_SESSIONS_SET,GET)
  11176. * Max number of rx BA session from wal_pdev
  11177. * (WMI_PDEV_STATS_MAX_RX_BA_SESSIONS_SET,GET)
  11178. */
  11179. A_UINT32 opaque_debug_num_max_rx_ba_sessions;
  11180. /** It holds WHAL_CHANNEL_SWITCH_FLAGS values */
  11181. A_UINT32 opaque_debug_chan_switch_flags;
  11182. /** reset_cause holds PDEV_RESET_CONSEC_FAILURE or PDEV_RESET_TXQ_TIMEOUT */
  11183. A_UINT32 opaque_debug_consecutive_failure_reset_cause;
  11184. /** PPDU duration limit, in us */
  11185. A_UINT32 opaque_debug_mu_ppdu_dur_limit_us;
  11186. /** pdev reset in progress */
  11187. A_UINT32 opaque_debug_reset_in_progress;
  11188. /** wal_dev - vdev_migrate_state refer to WAL_VDEV_MIGRATE_STATE */
  11189. A_UINT32 opaque_debug_vdev_migrate_state;
  11190. /** opaque_debug_rts_rc_flag:
  11191. * wal_pdev rts ratecode - this value reflects whatever
  11192. * WMI_PDEV_PARAM_RTS_FIXED_RATE value the host has specified for the pdev.
  11193. */
  11194. A_UINT32 opaque_debug_rts_rc_flag;
  11195. /* Num of peer delete in progress */
  11196. A_UINT32 opaque_debug_num_of_peer_delete_in_progress;
  11197. /** wal_pdev total number of active vdev count */
  11198. A_UINT32 opaque_debug_total_active_vdev_cnt;
  11199. /** wal_pdev - max number of vdevs per pdev */
  11200. A_UINT32 opaque_debug_max_vdevs;
  11201. /* NonOccupancyList(NOL) context */
  11202. A_UINT32 opaque_debug_dfs_nol_count;
  11203. /** NOL timeout in seconds */
  11204. A_UINT32 opaque_debug_dfs_nol_timeout;
  11205. A_UINT32 opaque_debug_dfs_use_nol;
  11206. /** channel availability check mode, refer enum WMI_ADFS_OCAC_MODE */
  11207. A_UINT32 opaque_debug_cac_mode;
  11208. A_UINT32 opaque_debug_dyn_ppdu_dur; /* in ms */
  11209. /** This word contains the following bitfields:
  11210. * wal_pdev home channel info
  11211. * home_chan_mhz_flags:
  11212. * primary channel frequency in mhz
  11213. * (WMI_PDEV_STATS_HOME_CHAN_MHZ_SET,GET)
  11214. * flags to specify other channel attributes
  11215. * (WMI_PDEV_STATS_HOME_CHAN_FLAGS_SET, GET)
  11216. */
  11217. A_UINT32 opaque_debug_home_chan_mhz_flags;
  11218. /** home channel center frequency in MHz */
  11219. A_UINT32 opaque_debug_home_band_center_freq;
  11220. /** home channel phy_mode, refer enum WLAN_PHY_MODE */
  11221. A_UINT32 opaque_debug_home_phy_mode;
  11222. /** This word contains the following bitfields:
  11223. * wal_pdev current channel info
  11224. * cur_chan_mhz_flags:
  11225. * primary channel frequency in mhz
  11226. * (WMI_PDEV_STATS_CUR_CHAN_MHZ_SET,GET)
  11227. * flags to specify other channel attributes
  11228. * (WMI_PDEV_STATS_CUR_CHAN_FLAGS_SET,GET)
  11229. */
  11230. A_UINT32 opaque_debug_cur_chan_mhz_flags;
  11231. /** current channel center frequency in MHz */
  11232. A_UINT32 opaque_debug_cur_band_center_freq;
  11233. /** current channel phy_mode, refer enum WLAN_PHY_MODE */
  11234. A_UINT32 opaque_debug_cur_phy_mode;
  11235. /* Beacon context info */
  11236. A_UINT32 opaque_debug_bcn_q_num_bcns_queued_to_hw;
  11237. /** beacon queue AIFS */
  11238. A_UINT32 opaque_debug_aifs;
  11239. /** beacon queue cwmin */
  11240. A_UINT32 opaque_debug_cwmin;
  11241. /** beacon queue cwmax */
  11242. A_UINT32 opaque_debug_cwmax;
  11243. /** FILS discovery period in TU */
  11244. A_UINT32 opaque_debug_fils_period;
  11245. /** Beacon interval in TU */
  11246. A_UINT32 opaque_debug_beacon_period;
  11247. A_UINT32 opaque_debug_staggered_beacon_intvl;
  11248. /** wal_pdev tx context, refer enum WAL_TX_CTXT_FLAGS */
  11249. A_UINT32 opaque_debug_tx_ctxt_flags;
  11250. /** opaque_debug_burst_mode_pending_isr
  11251. * wal_pdev tx_ctxt fields - burst_mode refer enum WAL_TX_BURST_MODE
  11252. * and pending_isr_status count
  11253. */
  11254. A_UINT32 opaque_debug_burst_mode_pending_isr;
  11255. /** max burst duration from ppdu duration in us */
  11256. A_UINT32 opaque_debug_burst_dur;
  11257. /** counter for tx hw stuck */
  11258. A_UINT32 opaque_debug_tx_hw_stuck_cnt;
  11259. /** counter for tx consecutive lifetime expiry */
  11260. A_UINT32 opaque_debug_consecutive_lifetime_expiries;
  11261. /** wal_pdev rx context, refer enum WAL_RX_CTXT_FLAGS */
  11262. A_UINT32 opaque_debug_rx_ctxt_flags;
  11263. /** wal_pdev fields in rx context for rx_suspend or resume count */
  11264. A_UINT32 opaque_debug_rx_suspend_cnt;
  11265. A_UINT32 opaque_debug_rx_resume_cnt;
  11266. A_UINT32 opaque_debug_rx_pcie_suspend_cnt;
  11267. A_UINT32 opaque_debug_rx_pcie_resume_cnt;
  11268. /** This word contains the following bitfields:
  11269. * wal_pdev fields
  11270. * pdev paused - WMI_PDEV_STATS_PAUSED_SET,GET
  11271. * pdev suspend - WMI_PDEV_STATS_SUSPENDED_SET,GET
  11272. * cac_enabed - MI_PDEV_STATS_CAC_ENABLED_SET,GET
  11273. * monitor VAP present - WMI_PDEV_STATS_IS_MONITOR_TYPE_PRESENT_SET,GET
  11274. * beacon tx mode - WMI_PDEV_STATS_BCN_TX_MODE_SET,GET
  11275. * isTXsuspended - WMI_PDEV_STATS_IS_TXSUSPENDED_SET,GET
  11276. * isSCHEDsuspended - WMI_PDEV_STATS_IS_SCHEDSUSPENDED_SET,GET
  11277. * sched_algo_resume_needed -
  11278. * WMI_PDEV_STATS_SCHED_ALGO_RESUME_NEEDED_SET,GET
  11279. * abort_reason - WMI_PDEV_STATS_ABORT_REASON_SET,GET
  11280. * atf_cfg - WMI_PDEV_STATS_ATF_CONFIG_SET,GET
  11281. * Green AP TX chainmask valid - WMI_PDEV_STATS_GAP_TX_CH_MASK_VALID_SET,GET
  11282. * Green AP RX chainmask valid - WMI_PDEV_STATS_GAP_RX_CH_MASK_VALID_SET,GET
  11283. * Green AP Phy mode valid - WMI_PDEV_STATS_GAP_PHY_MODE_VALID_SET,GET
  11284. * burst_enable - WMI_PDEV_STATS_BURST_ENABLE_SET,GET
  11285. */
  11286. A_UINT32 opaque_debug_wal_pdev_bitfield;
  11287. /** This word contains the following bitfields:
  11288. * gap_phy_mode_freq:
  11289. * When GreenAP is enabled, phy_mode (WMI_PDEV_STATS_GAP_PHY_MODE_SET,GET)
  11290. * and center freq(MHz) (WMI_PDEV_STATS_GAP_BAND_CENTER_FREQ1_SET,GET)
  11291. * in GAP context is displayed
  11292. */
  11293. A_UINT32 opaque_debug_gap_phy_mode_freq;
  11294. /**
  11295. * The following 5 opaque_debug_reserved_field variables are provided
  11296. * purely for debugging by technicians who have outside knowledge of
  11297. * what kind of values the target has placed into these fields.
  11298. */
  11299. A_UINT32 opaque_debug_reserved_field_1;
  11300. A_UINT32 opaque_debug_reserved_field_2;
  11301. A_UINT32 opaque_debug_reserved_field_3;
  11302. A_UINT32 opaque_debug_reserved_field_4;
  11303. A_UINT32 opaque_debug_reserved_field_5;
  11304. } wmi_ctrl_path_pdev_stats_struct;
  11305. #define WMI_PDEV_STATS_NUM_MACS_GET(flag) \
  11306. WMI_GET_BITS(flag, 0, 8)
  11307. #define WMI_PDEV_STATS_NUM_MACS_SET(flag, val) \
  11308. WMI_SET_BITS(flag, 0, 8, val)
  11309. #define WMI_PDEV_STATS_NUM_PHY_GET(flag) \
  11310. WMI_GET_BITS(flag, 8, 8)
  11311. #define WMI_PDEV_STATS_NUM_PHY_SET(flag, val) \
  11312. WMI_SET_BITS(flag, 8, 8, val)
  11313. #define WMI_PDEV_STATS_VDEV_UP_CNT_GET(flag) \
  11314. WMI_GET_BITS(flag, 16, 8)
  11315. #define WMI_PDEV_STATS_VDEV_UP_CNT_SET(flag, val) \
  11316. WMI_SET_BITS(flag, 16, 8, val)
  11317. #define WMI_PDEV_STATS_VDEV_ACTIVE_CNT_GET(flag) \
  11318. WMI_GET_BITS(flag, 24, 8)
  11319. #define WMI_PDEV_STATS_VDEV_ACTIVE_CNT_SET(flag, val) \
  11320. WMI_SET_BITS(flag, 24, 8, val)
  11321. #define WMI_PDEV_STATS_REMOTE_PEER_CNT_GET(flag) \
  11322. WMI_GET_BITS(flag, 0, 16)
  11323. #define WMI_PDEV_STATS_REMOTE_PEER_CNT_SET(flag, val) \
  11324. WMI_SET_BITS(flag, 0, 16, val)
  11325. #define WMI_PDEV_STATS_MAX_RF_CHAIN_2G_GET(flag) \
  11326. WMI_GET_BITS(flag, 16, 8)
  11327. #define WMI_PDEV_STATS_MAX_RF_CHAIN_2G_SET(flag, val) \
  11328. WMI_SET_BITS(flag, 16, 8, val)
  11329. #define WMI_PDEV_STATS_MAX_RF_CHAIN_5G_GET(flag) \
  11330. WMI_GET_BITS(flag, 24, 8)
  11331. #define WMI_PDEV_STATS_MAX_RF_CHAIN_5G_SET(flag, val) \
  11332. WMI_SET_BITS(flag, 24, 8, val)
  11333. #define WMI_PDEV_STATS_EMA_MAX_VAP_CNT_GET(flag) \
  11334. WMI_GET_BITS(flag, 0, 8 )
  11335. #define WMI_PDEV_STATS_EMA_MAX_VAP_CNT_SET(flag, val) \
  11336. WMI_SET_BITS(flag, 0, 8 , val)
  11337. #define WMI_PDEV_STATS_EMA_MAX_PROFILE_PERIOD_GET(flag) \
  11338. WMI_GET_BITS(flag, 8, 8)
  11339. #define WMI_PDEV_STATS_EMA_MAX_PROFILE_PERIOD_SET(flag, val) \
  11340. WMI_SET_BITS(flag, 8, 8, val)
  11341. #define WMI_PDEV_STATS_NUM_SELF_PEERS_GET(flag) \
  11342. WMI_GET_BITS(flag, 16, 8)
  11343. #define WMI_PDEV_STATS_NUM_SELF_PEERS_SET(flag, val) \
  11344. WMI_SET_BITS(flag, 16, 8, val)
  11345. #define WMI_PDEV_STATS_MAX_ACTIVE_VDEVS_GET(flag) \
  11346. WMI_GET_BITS(flag, 24, 8)
  11347. #define WMI_PDEV_STATS_MAX_ACTIVE_VDEVS_SET(flag, val) \
  11348. WMI_SET_BITS(flag, 24, 8, val)
  11349. #define WMI_PDEV_STATS_NUM_MAX_HW_LINKS_GET(flag) \
  11350. WMI_GET_BITS(flag, 0, 8)
  11351. #define WMI_PDEV_STATS_NUM_MAX_HW_LINKS_SET(flag, val) \
  11352. WMI_SET_BITS(flag, 0, 8, val)
  11353. #define WMI_PDEV_STATS_CURRENT_CHIP_ID_GET(flag) \
  11354. WMI_GET_BITS(flag, 8, 8)
  11355. #define WMI_PDEV_STATS_CURRENT_CHIP_ID_SET(flag, val) \
  11356. WMI_SET_BITS(flag, 8, 8, val)
  11357. #define WMI_PDEV_STATS_MAX_NUM_CHIPS_GET(flag) \
  11358. WMI_GET_BITS(flag, 16, 8)
  11359. #define WMI_PDEV_STATS_MAX_NUM_CHIPS_SET(flag, val) \
  11360. WMI_SET_BITS(flag, 16, 8, val)
  11361. #define WMI_PDEV_STATS_NUM_HOME_CHANS_GET(flag) \
  11362. WMI_GET_BITS(flag, 24, 8)
  11363. #define WMI_PDEV_STATS_NUM_HOME_CHANS_SET(flag, val) \
  11364. WMI_SET_BITS(flag, 24, 8, val)
  11365. #define WMI_PDEV_STATS_AGG_RETRY_TH_GET(flag) \
  11366. WMI_GET_BITS(flag, 0, 8)
  11367. #define WMI_PDEV_STATS_AGG_RETRY_TH_SET(flag, val) \
  11368. WMI_SET_BITS(flag, 0, 8, val)
  11369. #define WMI_PDEV_STATS_NON_AGG_RETRY_TH_GET(flag) \
  11370. WMI_GET_BITS(flag, 8, 8)
  11371. #define WMI_PDEV_STATS_NON_AGG_RETRY_TH_SET(flag, val) \
  11372. WMI_SET_BITS(flag, 8, 8, val)
  11373. #define WMI_PDEV_STATS_MAX_NON_DATA_RETRY_TH_GET(flag) \
  11374. WMI_GET_BITS(flag, 16, 8)
  11375. #define WMI_PDEV_STATS_MAX_NON_DATA_RETRY_TH_SET(flag, val) \
  11376. WMI_SET_BITS(flag, 16, 8, val)
  11377. #define WMI_PDEV_STATS_NUM_CONSECUTIVE_BCN_TX_FILT_GET(flag) \
  11378. WMI_GET_BITS(flag, 24, 8)
  11379. #define WMI_PDEV_STATS_NUM_CONSECUTIVE_BCN_TX_FILT_SET(flag, val) \
  11380. WMI_SET_BITS(flag, 24, 8, val)
  11381. #define WMI_PDEV_STATS_NUM_RX_BA_SESSIONS_GET(flag) \
  11382. WMI_GET_BITS(flag, 0, 16)
  11383. #define WMI_PDEV_STATS_NUM_RX_BA_SESSIONS_SET(flag, val) \
  11384. WMI_SET_BITS(flag, 0, 16, val)
  11385. #define WMI_PDEV_STATS_MAX_RX_BA_SESSIONS_GET(flag) \
  11386. WMI_GET_BITS(flag, 16, 16)
  11387. #define WMI_PDEV_STATS_MAX_RX_BA_SESSIONS_SET(flag, val) \
  11388. WMI_SET_BITS(flag, 16, 16, val)
  11389. #define WMI_PDEV_STATS_PPDU_DUR_LIMIT_US_GET(flag) \
  11390. WMI_GET_BITS(flag, 0, 16)
  11391. #define WMI_PDEV_STATS_PPDU_DUR_LIMIT_US_SET(flag, val) \
  11392. WMI_SET_BITS(flag, 0, 16, val)
  11393. #define WMI_PDEV_STATS_MU_PPDU_DUR_LIMIT_US_GET(flag) \
  11394. WMI_GET_BITS(flag, 16, 16)
  11395. #define WMI_PDEV_STATS_MU_PPDU_DUR_LIMIT_US_SET(flag, val) \
  11396. WMI_SET_BITS(flag, 16, 16, val)
  11397. #define WMI_PDEV_STATS_RTS_RC_FLAGS_GET(flag) \
  11398. WMI_GET_BITS(flag, 0, 8)
  11399. #define WMI_PDEV_STATS_RTS_RC_FLAGS_SET(flag, val) \
  11400. WMI_SET_BITS(flag, 0, 8, val)
  11401. #define WMI_PDEV_STATS_RTS_RC_SET(flag, val) \
  11402. WMI_SET_BITS(flag, 8, 8, val)
  11403. #define WMI_PDEV_STATS_RTS_RC_GET(flag) \
  11404. WMI_GET_BITS(flag, 8, 8)
  11405. #define WMI_PDEV_STATS_GAP_TX_CH_MASK_SET(flag, val) \
  11406. WMI_SET_BITS(flag, 16, 8, val)
  11407. #define WMI_PDEV_STATS_GAP_TX_CH_MASK_GET(flag) \
  11408. WMI_GET_BITS(flag, 16, 8)
  11409. #define WMI_PDEV_STATS_GAP_RX_CH_MASK_SET(flag, val) \
  11410. WMI_SET_BITS(flag, 24, 8, val)
  11411. #define WMI_PDEV_STATS_GAP_RX_CH_MASK_GET(flag) \
  11412. WMI_GET_BITS(flag, 24, 8)
  11413. #define WMI_PDEV_STATS_GAP_PHY_MODE_SET(flag, val) \
  11414. WMI_SET_BITS(flag, 0, 16, val)
  11415. #define WMI_PDEV_STATS_GAP_PHY_MODE_GET(flag) \
  11416. WMI_GET_BITS(flag, 0, 16)
  11417. #define WMI_PDEV_STATS_GAP_BAND_CENTER_FREQ1_SET(flag, val) \
  11418. WMI_SET_BITS(flag, 16, 16, val)
  11419. #define WMI_PDEV_STATS_GAP_BAND_CENTER_FREQ1_GET(flag) \
  11420. WMI_GET_BITS(flag, 16, 16)
  11421. #define WMI_PDEV_STATS_CONSECUTIVE_FAILURE_SET(flag, val) \
  11422. WMI_SET_BITS(flag, 0, 16, val)
  11423. #define WMI_PDEV_STATS_CONSECUTIVE_FAILURE_GET(flag) \
  11424. WMI_GET_BITS(flag, 0, 16)
  11425. #define WMI_PDEV_STATS_NUM_FILS_DISC_ENQD_GET(flag) \
  11426. WMI_GET_BITS(flag, 24, 8)
  11427. #define WMI_PDEV_STATS_NUM_FILS_DISC_ENQD_SET(flag, val) \
  11428. WMI_SET_BITS(flag, 24, 8, val)
  11429. #define WMI_PDEV_STATS_RESET_CAUSE_BITMAP_GET(flag) \
  11430. WMI_GET_BITS(flag, 16, 8)
  11431. #define WMI_PDEV_STATS_RESET_CAUSE_BITMAP_SET(flag, val) \
  11432. WMI_SET_BITS(flag, 16, 8, val)
  11433. #define WMI_PDEV_STATS_SWBA_NUM_OF_VDEVS_GET(flag) \
  11434. WMI_GET_BITS(flag, 24, 8)
  11435. #define WMI_PDEV_STATS_SWBA_NUM_OF_VDEVS_SET(flag, val) \
  11436. WMI_SET_BITS(flag, 24, 8, val)
  11437. #define WMI_PDEV_STATS_HOME_CHAN_MHZ_GET(flag) \
  11438. WMI_GET_BITS(flag, 0, 16)
  11439. #define WMI_PDEV_STATS_HOME_CHAN_MHZ_SET(flag, val) \
  11440. WMI_SET_BITS(flag, 0, 16, val)
  11441. #define WMI_PDEV_STATS_HOME_CHAN_FLAGS_GET(flag) \
  11442. WMI_GET_BITS(flag, 16, 16)
  11443. #define WMI_PDEV_STATS_HOME_CHAN_FLAGS_SET(flag, val) \
  11444. WMI_SET_BITS(flag, 16, 16, val)
  11445. #define WMI_PDEV_STATS_HOME_CHAN_BAND_FREQ_1_GET(flag) \
  11446. WMI_GET_BITS(flag, 0, 16)
  11447. #define WMI_PDEV_STATS_HOME_CHAN_BAND_FREQ_1_SET(flag,val) \
  11448. WMI_SET_BITS(flag, 0, 16, val)
  11449. #define WMI_PDEV_STATS_HOME_CHAN_BAND_FREQ_2_GET(flag) \
  11450. WMI_GET_BITS(flag, 16, 16)
  11451. #define WMI_PDEV_STATS_HOME_CHAN_BAND_FREQ_2_SET(flag, val) \
  11452. WMI_SET_BITS(flag, 16, 16, val)
  11453. #define WMI_PDEV_STATS_CUR_CHAN_MHZ_GET(flag) \
  11454. WMI_GET_BITS(flag, 0, 16)
  11455. #define WMI_PDEV_STATS_CUR_CHAN_MHZ_SET(flag, val) \
  11456. WMI_SET_BITS(flag, 0, 16, val)
  11457. #define WMI_PDEV_STATS_CUR_CHAN_FLAGS_GET(flag) \
  11458. WMI_GET_BITS(flag, 16, 16)
  11459. #define WMI_PDEV_STATS_CUR_CHAN_FLAGS_SET(flag, val) \
  11460. WMI_SET_BITS(flag, 16, 16, val)
  11461. #define WMI_PDEV_STATS_CUR_CHAN_BAND_FREQ_1_GET(flag) \
  11462. WMI_GET_BITS(flag, 0, 16)
  11463. #define WMI_PDEV_STATS_CUR_CHAN_BAND_FREQ_1_SET(flag,val) \
  11464. WMI_SET_BITS(flag, 0, 16, val)
  11465. #define WMI_PDEV_STATS_CUR_CHAN_BAND_FREQ_2_GET(flag) \
  11466. WMI_GET_BITS(flag, 16, 16)
  11467. #define WMI_PDEV_STATS_CUR_CHAN_BAND_FREQ_2_SET(flag, val) \
  11468. WMI_SET_BITS(flag, 16, 16, val)
  11469. #define WMI_PDEV_STATS_BURST_MODE_GET(flag) \
  11470. WMI_GET_BITS(flag, 0, 8)
  11471. #define WMI_PDEV_STATS_BURST_MODE_SET(flag, val) \
  11472. WMI_SET_BITS(flag, 0, 8, val)
  11473. #define WMI_PDEV_STATS_PENDING_ISR_STATUS_GET(flag) \
  11474. WMI_GET_BITS(flag, 8, 16)
  11475. #define WMI_PDEV_STATS_PENDING_ISR_STATUS_SET(flag, val) \
  11476. WMI_SET_BITS(flag, 8, 16, val)
  11477. #define WMI_PDEV_STATS_BCN_Q_NUM_GET(flag) \
  11478. WMI_GET_BITS(flag, 0, 8)
  11479. #define WMI_PDEV_STATS_BCN_Q_NUM_SET(flag, val) \
  11480. WMI_SET_BITS(flag, 0, 8, val)
  11481. #define WMI_PDEV_STATS_NUM_BCNS_QUEUED_TO_HW_GET(flag) \
  11482. WMI_GET_BITS(flag, 8, 8)
  11483. #define WMI_PDEV_STATS_NUM_BCNS_QUEUED_TO_HW_SET(flag, val) \
  11484. WMI_SET_BITS(flag, 8, 8, val)
  11485. #define WMI_PDEV_STATS_SWFDA_VDEV_ID_GET(flag) \
  11486. WMI_GET_BITS(flag, 16, 8)
  11487. #define WMI_PDEV_STATS_SWFDA_VDEV_ID_SET(flag, val) \
  11488. WMI_SET_BITS(flag, 16, 8, val)
  11489. #define WMI_PDEV_STATS_ABORT_RESULT_GET(flag) \
  11490. WMI_GET_BITS(flag, 0, 1)
  11491. #define WMI_PDEV_STATS_ABORT_RESULT_SET(flag, val) \
  11492. WMI_SET_BITS(flag, 0, 1, val)
  11493. #define WMI_PDEV_STATS_SCHED_ALGO_RESUME_NEEDED_GET(flag) \
  11494. WMI_GET_BITS(flag, 1, 1)
  11495. #define WMI_PDEV_STATS_SCHED_ALGO_RESUME_NEEDED_SET(flag, val) \
  11496. WMI_SET_BITS(flag, 1, 1, val)
  11497. #define WMI_PDEV_STATS_ABORT_REASON_GET(flag) \
  11498. WMI_GET_BITS(flag, 2, 3)
  11499. #define WMI_PDEV_STATS_ABORT_REASON_SET(flag, val) \
  11500. WMI_SET_BITS(flag, 2, 3, val)
  11501. #define WMI_PDEV_STATS_IS_TXSUSPENDED_GET(flag) \
  11502. WMI_GET_BITS(flag, 5, 1)
  11503. #define WMI_PDEV_STATS_IS_TXSUSPENDED_SET(flag, val) \
  11504. WMI_SET_BITS(flag, 5, 1, val)
  11505. #define WMI_PDEV_STATS_IS_SCHEDSUSPENDED_GET(flag) \
  11506. WMI_GET_BITS(flag, 6, 1)
  11507. #define WMI_PDEV_STATS_IS_SCHEDSUSPENDED_SET(flag, val) \
  11508. WMI_SET_BITS(flag, 6, 1, val)
  11509. #define WMI_PDEV_STATS_IS_TXSUSPENDED_WITH_AFC_GET(flag) \
  11510. WMI_GET_BITS(flag, 7, 1)
  11511. #define WMI_PDEV_STATS_IS_TXSUSPENDED_WITH_AFC_SET(flag, val) \
  11512. WMI_SET_BITS(flag, 7, 1, val)
  11513. #define WMI_PDEV_STATS_IS_SCHEDSUSPENDED_WITH_AFC_GET(flag) \
  11514. WMI_GET_BITS(flag, 8, 1)
  11515. #define WMI_PDEV_STATS_IS_SCHEDSUSPENDED_WITH_AFC_SET(flag, val) \
  11516. WMI_SET_BITS(flag, 8, 1, val)
  11517. #define WMI_PDEV_STATS_SW_RETRY_MPDU_COUNT_TH_GET(flag) \
  11518. WMI_GET_BITS(flag, 9, 1)
  11519. #define WMI_PDEV_STATS_SW_RETRY_MPDU_COUNT_TH_SET(flag, val) \
  11520. WMI_SET_BITS(flag, 9, 1, val)
  11521. #define WMI_PDEV_STATS_SENDBAR_COMPL_IN_PROGRESS_GET(flag) \
  11522. WMI_GET_BITS(flag, 10, 1)
  11523. #define WMI_PDEV_STATS_SENDBAR_COMPL_IN_PROGRESS_SET(flag, val) \
  11524. WMI_SET_BITS(flag, 10, 1, val)
  11525. #define WMI_PDEV_STATS_CAC_ENABLED_GET(flag) \
  11526. WMI_GET_BITS(flag, 11, 1)
  11527. #define WMI_PDEV_STATS_CAC_ENABLED_SET(flag, val) \
  11528. WMI_SET_BITS(flag, 11, 1, val)
  11529. #define WMI_PDEV_STATS_PAUSED_GET(flag) \
  11530. WMI_GET_BITS(flag, 12, 1)
  11531. #define WMI_PDEV_STATS_PAUSED_SET(flag, val) \
  11532. WMI_SET_BITS(flag, 12, 1, val)
  11533. #define WMI_PDEV_STATS_SUSPENDED_GET(flag) \
  11534. WMI_GET_BITS(flag, 13, 1)
  11535. #define WMI_PDEV_STATS_SUSPENDED_SET(flag, val) \
  11536. WMI_SET_BITS(flag, 13, 1, val)
  11537. #define WMI_PDEV_STATS_MAC_COLD_RESET_GET(flag) \
  11538. WMI_GET_BITS(flag, 14, 1)
  11539. #define WMI_PDEV_STATS_MAC_COLD_RESET_SET(flag, val) \
  11540. WMI_SET_BITS(flag, 14, 1, val)
  11541. #define WMI_PDEV_STATS_SAFE_TO_ACCESS_HW_GET(flag) \
  11542. WMI_GET_BITS(flag, 15, 1)
  11543. #define WMI_PDEV_STATS_SAFE_TO_ACCESS_HW_SET(flag, val) \
  11544. WMI_SET_BITS(flag, 15, 1, val)
  11545. #define WMI_PDEV_STATS_STA_PS_STATECHG_ENABLE_GET(flag) \
  11546. WMI_GET_BITS(flag, 16, 1)
  11547. #define WMI_PDEV_STATS_STA_PS_STATECHG_ENABLE_SET(flag, val) \
  11548. WMI_SET_BITS(flag, 16, 1, val)
  11549. #define WMI_PDEV_STATS_WAL_HOST_SCAN_IN_PROGRESS_GET(flag) \
  11550. WMI_GET_BITS(flag, 17, 1)
  11551. #define WMI_PDEV_STATS_WAL_HOST_SCAN_IN_PROGRESS_SET(flag, val) \
  11552. WMI_SET_BITS(flag, 17, 1, val)
  11553. #define WMI_PDEV_STATS_ATF_CONFIG_GET(flag) \
  11554. WMI_GET_BITS(flag, 18, 1)
  11555. #define WMI_PDEV_STATS_ATF_CONFIG_SET(flag, val) \
  11556. WMI_SET_BITS(flag, 18, 1, val)
  11557. #define WMI_PDEV_STATS_EAPOL_AC_OVERRIDE_GET(flag) \
  11558. WMI_GET_BITS(flag, 19, 1)
  11559. #define WMI_PDEV_STATS_EAPOL_AC_OVERRIDE_SET(flag, val) \
  11560. WMI_SET_BITS(flag, 19, 1, val)
  11561. #define WMI_PDEV_STATS_CALC_NEXT_DTIM_CNT_GET(flag) \
  11562. WMI_GET_BITS(flag, 20, 1)
  11563. #define WMI_PDEV_STATS_CALC_NEXT_DTIM_CNT_SET(flag, val) \
  11564. WMI_SET_BITS(flag, 20, 1, val)
  11565. #define WMI_PDEV_STATS_ATF_STRICT_SCH_GET(flag) \
  11566. WMI_GET_BITS(flag, 21, 1)
  11567. #define WMI_PDEV_STATS_ATF_STRICT_SCH_SET(flag, val) \
  11568. WMI_SET_BITS(flag, 21, 1, val)
  11569. #define WMI_PDEV_STATS_BCN_TX_MODE_GET(flag) \
  11570. WMI_GET_BITS(flag, 22, 2)
  11571. #define WMI_PDEV_STATS_BCN_TX_MODE_SET(flag, val) \
  11572. WMI_SET_BITS(flag, 22, 2, val)
  11573. #define WMI_PDEV_STATS_IS_MONITOR_TYPE_PRESENT_GET(flag) \
  11574. WMI_GET_BITS(flag, 24, 1)
  11575. #define WMI_PDEV_STATS_IS_MONITOR_TYPE_PRESENT_SET(flag, val) \
  11576. WMI_SET_BITS(flag, 24, 1, val)
  11577. #define WMI_PDEV_STATS_DYN_BW_GET(flag) \
  11578. WMI_GET_BITS(flag, 25, 1)
  11579. #define WMI_PDEV_STATS_DYN_BW_SET(flag, val) \
  11580. WMI_SET_BITS(flag, 25, 1, val)
  11581. #define WMI_PDEV_STATS_IS_MLO_SUPPORTED_GET(flag) \
  11582. WMI_GET_BITS(flag, 26, 1)
  11583. #define WMI_PDEV_STATS_IS_MLO_SUPPORTED_SET(flag, val) \
  11584. WMI_SET_BITS(flag, 26, 1, val)
  11585. #define WMI_PDEV_STATS_GAP_TX_CH_MASK_VALID_GET(flag) \
  11586. WMI_GET_BITS(flag, 27, 1)
  11587. #define WMI_PDEV_STATS_GAP_TX_CH_MASK_VALID_SET(flag, val) \
  11588. WMI_SET_BITS(flag, 27, 1, val)
  11589. #define WMI_PDEV_STATS_GAP_RX_CH_MASK_VALID_GET(flag) \
  11590. WMI_GET_BITS(flag, 28, 1)
  11591. #define WMI_PDEV_STATS_GAP_RX_CH_MASK_VALID_SET(flag, val) \
  11592. WMI_SET_BITS(flag, 28, 1, val)
  11593. #define WMI_PDEV_STATS_GAP_PHY_MODE_VALID_GET(flag) \
  11594. WMI_GET_BITS(flag, 29, 1)
  11595. #define WMI_PDEV_STATS_GAP_PHY_MODE_VALID_SET(flag, val) \
  11596. WMI_SET_BITS(flag, 29, 1, val)
  11597. #define WMI_PDEV_STATS_GAP_CLKGATE_VALID_GET(flag) \
  11598. WMI_GET_BITS(flag, 30, 1)
  11599. #define WMI_PDEV_STATS_GAP_CLKGATE_VALID_SET(flag, val) \
  11600. WMI_SET_BITS(flag, 30, 1, val)
  11601. #define WMI_PDEV_STATS_BURST_ENABLE_GET(flag) \
  11602. WMI_GET_BITS(flag, 31, 1)
  11603. #define WMI_PDEV_STATS_BURST_ENABLE_SET(flag, val) \
  11604. WMI_SET_BITS(flag, 31, 1, val)
  11605. typedef struct {
  11606. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_btcoex_stats_struct*/
  11607. A_UINT32 tlv_header;
  11608. /** pdev_id for identifying the MAC */
  11609. A_UINT32 pdev_id;
  11610. /** Counts the number of BT TX requests */
  11611. A_UINT32 bt_tx_req_cntr;
  11612. /** Counts the number of BT RX requests */
  11613. A_UINT32 bt_rx_req_cntr;
  11614. /** Counts the number of BT requests that got NACKed */
  11615. A_UINT32 bt_req_nack_cntr;
  11616. /** Counts the number of WLAN TX request denied due to scheduled BT activity */
  11617. A_UINT32 wl_tx_req_nack_schd_bt_reason_cntr;
  11618. /** Counts the number of WLAN TX request denied due to current BT activity */
  11619. A_UINT32 wl_tx_req_nack_current_bt_reason_cntr;
  11620. /** Counts the number of WLAN TX request denied due to other WLAN in TX reason */
  11621. A_UINT32 wl_tx_req_nack_other_wlan_tx_reason_cntr;
  11622. /** Counts the number of times the WLAN in TX is aborted after getting ACKed */
  11623. A_UINT32 wl_in_tx_abort_cntr;
  11624. /** Counts the number of Auto Response WLAN TX requests */
  11625. A_UINT32 wl_tx_auto_resp_req_cntr;
  11626. /** Counts the number of ACKed WLAN TX requests */
  11627. A_UINT32 wl_tx_req_ack_cntr;
  11628. /** Counts the number of WLAN TX requests */
  11629. A_UINT32 wl_tx_req_cntr;
  11630. } wmi_ctrl_path_btcoex_stats_struct;
  11631. /* Send diag event based on trigger reasons */
  11632. typedef enum {
  11633. WMI_DIAG_TRIGGER_MIN = 0x1000,
  11634. WMI_DIAG_TRIGGER_HOST_REQUESTED = WMI_DIAG_TRIGGER_MIN,
  11635. WMI_DIAG_TRIGGER_BEACON_MISS,
  11636. WMI_DIAG_TRIGGER_SCAN_FAIL,
  11637. WMI_DIAG_TRIGGER_DISCONNECT,
  11638. WMI_DIAG_TRIGGER_ENTER_BMPS_IMPS_FAIL,
  11639. WMI_DIAG_TRIGGER_BUFFER_FULL,
  11640. WMI_DIAG_TRIGGER_DATA_STALL,
  11641. WMI_DIAG_TRIGGER_TIMER_TRIGGERED,
  11642. WMI_DIAG_TRIGGER_REMOTE_COPY,
  11643. WMI_DIAG_TRIGGER_CAL_FAILURE,
  11644. WMI_DIAG_TRIGGER_FES_BKPRESS_DEV_RESET_IND,
  11645. WMI_DIAG_TRIGGER_MAX,
  11646. } wmi_diag_trigger_e;
  11647. typedef enum {
  11648. WMI_CTRL_PATH_STATS_ARENA_HRAM,
  11649. WMI_CTRL_PATH_STATS_ARENA_HCRAM,
  11650. WMI_CTRL_PATH_STATS_ARENA_HREMOTE,
  11651. WMI_CTRL_PATH_STATS_ARENA_HCREMOTE,
  11652. WMI_CTRL_PATH_STATS_ARENA_REMOTE,
  11653. WMI_CTRL_PATH_STATS_ARENA_SRAM,
  11654. WMI_CTRL_PATH_STATS_ARENA_SRAM_AUX,
  11655. WMI_CTRL_PATH_STATS_ARENA_PAGEABLE,
  11656. WMI_CTRL_PATH_STATS_ARENA_CMEM,
  11657. WMI_CTRL_PATH_STATS_ARENA_TRAM,
  11658. WMI_CTRL_PATH_STATS_ARENA_HWIO,
  11659. WMI_CTRL_PATH_STATS_ARENA_CALDB,
  11660. WMI_CTRL_PATH_STATS_ARENA_M3,
  11661. WMI_CTRL_PATH_STATS_ARENA_ETMREMOTE,
  11662. WMI_CTRL_PATH_STATS_ARENA_M3_DUMP,
  11663. WMI_CTRL_PATH_STATS_ARENA_EMUPHY,
  11664. WMI_CTRL_PATH_STATS_ARENA_DBG_SRAM,
  11665. WMI_CTRL_PATH_STATS_ARENA_DBG_SRAM_AUX,
  11666. WMI_CTRL_PATH_STATS_ARENA_SRAM_AUX_OVERFLOW,
  11667. WMI_CTRL_PATH_STATS_ARENA_AMSS,
  11668. WMI_CTRL_PATH_STATS_ARENA_MLO_SHMEM,
  11669. WMI_CTRL_PATH_STATS_ARENA_MLO_H_SHMEM,
  11670. WMI_CTRL_PATH_STATS_ARENA_MLO_HC_SHMEM,
  11671. WMI_CTRL_PATH_STATS_ARENA_RRI_CMD,
  11672. WMI_CTRL_PATH_STATS_ARENA_SRAM_CLADE,
  11673. WMI_CTRL_PATH_STATS_ARENA_MAX,
  11674. } wmi_ctrl_path_fw_arena_ids;
  11675. /*
  11676. * Used by some hosts to print names of arenas, based on
  11677. * wmi_ctrl_path_fw_arena_ids values specified in
  11678. * wmi_ctrl_path_mem_stats_struct in ctrl_path_stats event msg.
  11679. */
  11680. static INLINE A_UINT8 *wmi_ctrl_path_fw_arena_id_to_name(A_UINT32 arena_id)
  11681. {
  11682. switch(arena_id)
  11683. {
  11684. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HRAM);
  11685. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HCRAM);
  11686. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HREMOTE);
  11687. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HCREMOTE);
  11688. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_REMOTE);
  11689. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_SRAM);
  11690. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_SRAM_AUX);
  11691. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_PAGEABLE);
  11692. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_CMEM);
  11693. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_TRAM);
  11694. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HWIO);
  11695. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_CALDB);
  11696. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_M3);
  11697. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_ETMREMOTE);
  11698. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_M3_DUMP);
  11699. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_EMUPHY);
  11700. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_DBG_SRAM);
  11701. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_DBG_SRAM_AUX);
  11702. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_SRAM_AUX_OVERFLOW);
  11703. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_AMSS);
  11704. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_MLO_SHMEM);
  11705. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_MLO_H_SHMEM);
  11706. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_MLO_HC_SHMEM);
  11707. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_RRI_CMD);
  11708. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_SRAM_CLADE);
  11709. }
  11710. return (A_UINT8 *) "WMI_CTRL_PATH_STATS_ARENA_UNKNOWN";
  11711. }
  11712. typedef struct {
  11713. /** TLV tag and len; tag equals
  11714. * WMITLV_TAG_STRUC_wmi_ctrl_path_mem_stats_struct */
  11715. A_UINT32 tlv_header;
  11716. A_UINT32 arena_id; /* see wmi_ctrl_path_fw_arena_ids */
  11717. A_UINT32 total_bytes; /* total bytes in each arena */
  11718. A_UINT32 allocated_bytes; /* allocated bytes in each arena */
  11719. } wmi_ctrl_path_mem_stats_struct;
  11720. /* status code of Get stats TWT dialog */
  11721. typedef enum _WMI_GET_STATS_TWT_STATUS_T {
  11722. WMI_GET_STATS_TWT_STATUS_OK, /* Get status TWT dialog successfully completed */
  11723. WMI_GET_STATS_TWT_STATUS_DIALOG_ID_NOT_EXIST,/* TWT dialog ID does not exist */
  11724. WMI_GET_STATS_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  11725. } WMI_GET_STATS_TWT_STATUS_T;
  11726. /* Resp type of ODD command operation */
  11727. typedef enum _WMI_ODD_ADDR_READ_OPTION_TYPE_T {
  11728. WMI_ODD_ADDR_READ_OPTION_TYPE_ADD_ADDR_COMMAND, /* Resp for the command to add/configure address space */
  11729. WMI_ODD_ADDR_READ_OPTION_TYPE_DEL_ADDR_COMMAND, /* Resp for the command to del/reset address space */
  11730. WMI_ODD_ADDR_READ_OPTION_TYPE_DISP_ADDR_COMMAND, /* Resp for the command to display address space */
  11731. WMI_ODD_ADDR_READ_OPTION_TYPE_DISP_VAL_COMMAND, /* Resp for the command to display value at address space */
  11732. } WMI_ODD_ADDR_READ_OPTION_TYPE_T;
  11733. typedef struct {
  11734. /** TLV tag and len; tag equals
  11735. * WMITLV_TAG_STRUC_wmi_ctrl_path_twt_stats_struct */
  11736. A_UINT32 tlv_header;
  11737. A_UINT32 dialog_id; /* TWT dialog ID */
  11738. A_UINT32 status; /* refer to WMI_GET_STATS_TWT_STATUS_T */
  11739. A_UINT32 num_sp_cycles; /* Number of TWT SP's*/
  11740. A_UINT32 avg_sp_dur_us; /* Average SP time */
  11741. A_UINT32 min_sp_dur_us; /* Minimum SP time */
  11742. A_UINT32 max_sp_dur_us; /* Maximum SP time */
  11743. A_UINT32 tx_mpdu_per_sp; /* Average pkts tx per SP */
  11744. A_UINT32 rx_mpdu_per_sp; /* Average pkts rx per SP */
  11745. A_UINT32 tx_bytes_per_sp; /* Average tx bytes per SP */
  11746. A_UINT32 rx_bytes_per_sp; /* Average rx bytes per SP */
  11747. } wmi_ctrl_path_twt_stats_struct;
  11748. #define BMISS_STATS_RSSI_SAMPLE_MAX 10
  11749. typedef struct {
  11750. A_INT32 rssi; /* dBm units */
  11751. A_UINT32 sample_time; /* timestamp from host/target shared qtimer */
  11752. } bmiss_stats_rssi_samples_t;
  11753. typedef struct {
  11754. A_UINT32 num_of_bmiss_sequences; /* number of consecutive bmiss > 2 */
  11755. A_UINT32 num_bitmask_wraparound; /* number of times bitmask wrapped around */
  11756. A_UINT32 num_bcn_hist_lost; /* number of beacons history we have lost */
  11757. } consecutive_bmiss_stats_t;
  11758. typedef struct {
  11759. /** TLV tag and len; tag equals
  11760. * WMITLV_TAG_STRUC_wmi_ctrl_path_bmiss_stats_struct */
  11761. A_UINT32 tlv_header;
  11762. A_UINT32 num_pre_bmiss; /* number of pre_bmiss */
  11763. bmiss_stats_rssi_samples_t rssi_samples[BMISS_STATS_RSSI_SAMPLE_MAX]; /* RSSI samples at pre bmiss*/
  11764. /* rssi_sample_curr_index:
  11765. * index of the element in rssi_samples array containing the oldest sample
  11766. */
  11767. A_UINT32 rssi_sample_curr_index;
  11768. A_UINT32 num_first_bmiss; /* number of first bmiss */
  11769. A_UINT32 num_final_bmiss; /* number of final bmiss */
  11770. A_UINT32 num_null_sent_in_first_bmiss; /* number of null frames sent in first bmiss */
  11771. A_UINT32 num_null_failed_in_first_bmiss; /* number of failed null frames in first bmiss */
  11772. A_UINT32 num_null_sent_in_final_bmiss; /* number of null frames sent in final bmiss */
  11773. A_UINT32 num_null_failed_in_final_bmiss; /* number of failed null frames in final bmiss */
  11774. consecutive_bmiss_stats_t cons_bmiss_stats;
  11775. } wmi_ctrl_path_bmiss_stats_struct;
  11776. typedef enum {
  11777. WMI_CTRL_PATH_STATS_CAL_PROFILE_COLD_BOOT_CAL = 0x0,
  11778. WMI_CTRL_PATH_STATS_CAL_PROFILE_FULL_CHAN_SWITCH = 0x1,
  11779. WMI_CTRL_PATH_STATS_CAL_PROFILE_SCAN_CHAN_SWITCH = 0x2,
  11780. WMI_CTRL_PATH_STATS_CAL_PROFILE_DPD_SPLIT_CAL = 0x3,
  11781. WMI_CTRL_PATH_STATS_CAL_PROFILE_TEMP_TRIGEER_CAL = 0x4,
  11782. WMI_CTRL_PATH_STATS_CAL_PROFILE_POWER_SAVE_WAKE_UP = 0x5,
  11783. WMI_CTRL_PATH_STATS_CAL_PROFILE_TIMER_TRIGGER_CAL = 0x6,
  11784. WMI_CTRL_PATH_STATS_CAL_PROFILE_FTM_TRIGGER_CAL = 0x7,
  11785. WMI_CTRL_PATH_STATS_CAL_PROFILE_AGILE_OR_POWER_DOWN_DTIM = 0x8,
  11786. WMI_CTRL_PATH_STATS_CAL_PROFILE_NOISY_ENV_RXDO = 0x9,
  11787. /* add new cal profiles above this line */
  11788. WMI_CTRL_PATH_STATS_CAL_PROFILE_INVALID = 0x1F
  11789. } wmi_ctrl_path_stats_cal_profile_ids;
  11790. typedef enum {
  11791. WMI_CTRL_PATH_STATS_CAL_TYPE_ADC = 0x0,
  11792. WMI_CTRL_PATH_STATS_CAL_TYPE_DAC = 0x1,
  11793. WMI_CTRL_PATH_STATS_CAL_TYPE_PROCESS = 0x2,
  11794. WMI_CTRL_PATH_STATS_CAL_TYPE_NOISE_FLOOR = 0x3,
  11795. WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO = 0x4,
  11796. WMI_CTRL_PATH_STATS_CAL_TYPE_COMB_TXLO_TXIQ_RXIQ = 0x5,
  11797. WMI_CTRL_PATH_STATS_CAL_TYPE_TXLO = 0x6,
  11798. WMI_CTRL_PATH_STATS_CAL_TYPE_TXIQ = 0x7,
  11799. WMI_CTRL_PATH_STATS_CAL_TYPE_RXIQ = 0x8,
  11800. WMI_CTRL_PATH_STATS_CAL_TYPE_IM2 = 0x9,
  11801. WMI_CTRL_PATH_STATS_CAL_TYPE_LNA = 0xa,
  11802. WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXDCO = 0xb,
  11803. WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXIQ = 0xc,
  11804. WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORYLESS = 0xd,
  11805. WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORY = 0xe,
  11806. WMI_CTRL_PATH_STATS_CAL_TYPE_IBF = 0xf,
  11807. WMI_CTRL_PATH_STATS_CAL_TYPE_PDET_AND_PAL = 0x10,
  11808. WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO_IQ = 0x11,
  11809. WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO_DTIM = 0x12,
  11810. WMI_CTRL_PATH_STATS_CAL_TYPE_TPC_CAL = 0x13,
  11811. WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_TIMEREQ = 0x14,
  11812. WMI_CTRL_PATH_STATS_CAL_TYPE_BWFILTER = 0x15,
  11813. WMI_CTRL_PATH_STATS_CAL_TYPE_PEF = 0x16,
  11814. WMI_CTRL_PATH_STATS_CAL_TYPE_PADROOP = 0x17,
  11815. WMI_CTRL_PATH_STATS_CAL_TYPE_SELFCALTPC = 0x18,
  11816. WMI_CTRL_PATH_STATS_CAL_TYPE_RXSPUR = 0x19,
  11817. /* add new cal types above this line */
  11818. WMI_CTRL_PATH_STATS_CAL_TYPE_INVALID = 0xFF
  11819. } wmi_ctrl_path_stats_cal_type_ids;
  11820. typedef enum {
  11821. WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_NOISE_FLOOR = 0x0,
  11822. WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_DPD_MEMORYLESS = 0x1,
  11823. WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_DPD_MEMORY = 0x2,
  11824. /* add new periodic cal types above this line */
  11825. WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_INVALID = 0xFF
  11826. } wmi_ctrl_path_stats_periodic_cal_type_ids;
  11827. typedef enum {
  11828. WMI_CAL_FAILURE_REASON_ERROR_MIN = 0x0,
  11829. /* DPD failure reasons */
  11830. WMI_CAL_FAILURE_REASON_DPD_NMSE_FAIL = 0x1,
  11831. WMI_CAL_FAILURE_REASON_DPD_SQ_FAIL = 0x2,
  11832. WMI_CAL_FAILURE_REASON_DPD_HW_FAIL = 0x3,
  11833. WMI_CAL_FAILURE_REASON_DPD_EXCESSIVE_RETRY = 0x4,
  11834. /* RXDCO failure reasons */
  11835. WMI_CAL_FAILURE_REASON_RXDCO_HW_CAL_EXCESSIVE_RETRY = 0x5,
  11836. WMI_CAL_FAILURE_REASON_RXDCO_INVALID_HW_CAL = 0x6,
  11837. WMI_CAL_FAILURE_REASON_RXDCO_HW_AND_SWPP_FAILURE = 0x7,
  11838. /* ADC failure reasons */
  11839. WMI_CAL_FAILURE_REASON_TIADC_INVALID_BAND = 0x8,
  11840. /* BWFILTER failure reasons */
  11841. WMI_CAL_FAILURE_REASON_TXBBF = 0x9,
  11842. WMI_CAL_FAILURE_REASON_RXBBF = 0xa,
  11843. /* PKDET failure reasons */
  11844. WMI_CAL_FAILURE_REASON_PKDET = 0xb,
  11845. /* COMBCAL failure reasons */
  11846. WMI_CAL_FAILURE_REASON_COMB = 0xc,
  11847. /* add new cal failure error reasons above this line */
  11848. WMI_CAL_FAILURE_REASON_ERROR_MAX = 0xff,
  11849. } wmi_cal_failure_reason_code;
  11850. /*
  11851. * Used by some hosts to print names of cal profile, based on
  11852. * wmi_ctrl_path_cal_profile_ids values specified in
  11853. * wmi_ctrl_path_calibration_stats_struct in ctrl_path_stats event msg.
  11854. */
  11855. static INLINE
  11856. A_UINT8 *wmi_ctrl_path_cal_profile_id_to_name(A_UINT32 cal_profile_id)
  11857. {
  11858. switch (cal_profile_id)
  11859. {
  11860. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_COLD_BOOT_CAL);
  11861. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_FULL_CHAN_SWITCH);
  11862. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_SCAN_CHAN_SWITCH);
  11863. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_DPD_SPLIT_CAL);
  11864. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_TEMP_TRIGEER_CAL);
  11865. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_POWER_SAVE_WAKE_UP);
  11866. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_TIMER_TRIGGER_CAL);
  11867. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_FTM_TRIGGER_CAL);
  11868. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_AGILE_OR_POWER_DOWN_DTIM);
  11869. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_NOISY_ENV_RXDO);
  11870. }
  11871. return (A_UINT8 *) "WMI_CTRL_PATH_STATS_CAL_PROFILE_UNKNOWN";
  11872. }
  11873. /*
  11874. * Used by some hosts to print names of cal type, based on
  11875. * wmi_ctrl_path_cal_type_ids values specified in
  11876. * wmi_ctrl_path_calibration_stats_struct in ctrl_path_stats event msg.
  11877. */
  11878. static INLINE A_UINT8 *wmi_ctrl_path_cal_type_id_to_name(A_UINT32 cal_type_id)
  11879. {
  11880. switch (cal_type_id)
  11881. {
  11882. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_ADC);
  11883. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DAC);
  11884. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_PROCESS);
  11885. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_NOISE_FLOOR);
  11886. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO);
  11887. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_COMB_TXLO_TXIQ_RXIQ);
  11888. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_TXLO);
  11889. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_TXIQ);
  11890. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXIQ);
  11891. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_IM2);
  11892. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_LNA);
  11893. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXDCO);
  11894. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXIQ);
  11895. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORYLESS);
  11896. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORY);
  11897. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_IBF);
  11898. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_PDET_AND_PAL);
  11899. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO_IQ);
  11900. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO_DTIM);
  11901. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_TPC_CAL);
  11902. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_TIMEREQ);
  11903. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_BWFILTER);
  11904. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_PEF);
  11905. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_PADROOP);
  11906. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_SELFCALTPC);
  11907. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXSPUR);
  11908. }
  11909. return (A_UINT8 *) "WMI_CTRL_PATH_STATS_CAL_TYPE_UNKNOWN";
  11910. }
  11911. /*
  11912. * Used by some hosts to print names of peridodic cal type, based on
  11913. * wmi_ctrl_path_periodic_cal_type_ids values specified in
  11914. * wmi_ctrl_path_calibration_stats_struct in ctrl_path_stats event msg.
  11915. */
  11916. static INLINE A_UINT8 *wmi_ctrl_path_periodic_cal_type_id_to_name(A_UINT32 periodic_cal_type_id)
  11917. {
  11918. switch (periodic_cal_type_id)
  11919. {
  11920. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_NOISE_FLOOR);
  11921. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_DPD_MEMORYLESS);
  11922. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_DPD_MEMORY);
  11923. }
  11924. return (A_UINT8 *) "WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_UNKNOWN";
  11925. }
  11926. /*
  11927. * Used by some hosts to print names of cal failure reason code, based on
  11928. * wmi_ctrl_path_cal_failure_reason_codes values specified in cal fail event msg
  11929. */
  11930. static INLINE A_UINT8 *wmi_cal_failure_reason_code_to_name(A_UINT32 cal_failure_reason_code)
  11931. {
  11932. switch (cal_failure_reason_code)
  11933. {
  11934. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_ERROR_MIN);
  11935. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_DPD_NMSE_FAIL);
  11936. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_DPD_SQ_FAIL);
  11937. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_DPD_HW_FAIL);
  11938. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_DPD_EXCESSIVE_RETRY);
  11939. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_RXDCO_HW_CAL_EXCESSIVE_RETRY);
  11940. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_RXDCO_INVALID_HW_CAL);
  11941. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_RXDCO_HW_AND_SWPP_FAILURE);
  11942. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_TIADC_INVALID_BAND);
  11943. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_TXBBF);
  11944. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_RXBBF);
  11945. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_PKDET);
  11946. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_COMB);
  11947. }
  11948. return (A_UINT8 *) "WMI_CAL_FAILURE_REASON_UNKNOWN";
  11949. }
  11950. typedef struct {
  11951. /** TLV tag and len; tag equals
  11952. * WMITLV_TAG_STRUC_wmi_ctrl_path_calibration_stats_struct*/
  11953. A_UINT32 tlv_header;
  11954. /** pdev_id for identifying the MAC/PHY */
  11955. A_UINT32 pdev_id;
  11956. /** Bit 0 - 7 : cal type / periodic cal type
  11957. * These bits hold either a wmi_ctrl_path_stats_cal_type_ids
  11958. * value for generic cal (if bit 13 is cleared) or a
  11959. * wmi_ctrl_path_stats_periodic_cal_type_ids value for
  11960. * periodic cal (if bit 13 is set).
  11961. * Signifies the type of calibration
  11962. * cal_type : 8
  11963. * Bit 8 - 12 : These bits hold a wmi_ctrl_path_stats_cal_profile_ids value.
  11964. * Signifies the type of cal profile
  11965. * cal_profile : 5
  11966. * Bit 13 : Signifies whether stats is for generic cal or periodic cal
  11967. * is_cal_periodic : 1
  11968. * 0 -> generic cal
  11969. * 1 -> periodic cal
  11970. * Bit 14 - 31: Reserved for future
  11971. */
  11972. A_UINT32 cal_info;
  11973. A_UINT32 cal_triggered_cnt; /* Count of number of times calibration triggered */
  11974. A_UINT32 cal_fail_cnt; /* Count of number of times calibration failed */
  11975. A_UINT32 cal_fcs_cnt; /* Count of number of times FCS done for cal */
  11976. A_UINT32 cal_fcs_fail_cnt; /* Count of number of times FCS failed for cal */
  11977. } wmi_ctrl_path_calibration_stats_struct;
  11978. #define WMI_CTRL_PATH_CALIBRATION_STATS_CAL_TYPE_GET(cal_info) WMI_GET_BITS(cal_info, 0, 8)
  11979. #define WMI_CTRL_PATH_CALIBRATION_STATS_CAL_TYPE_SET(cal_info, cal_type) WMI_SET_BITS(cal_info, 0, 8, cal_type)
  11980. #define WMI_CTRL_PATH_CALIBRATION_STATS_CAL_PROFILE_GET(cal_info) WMI_GET_BITS(cal_info, 8, 5)
  11981. #define WMI_CTRL_PATH_CALIBRATION_STATS_CAL_PROFILE_SET(cal_info, cal_profile) WMI_SET_BITS(cal_info, 8, 5, cal_profile)
  11982. #define WMI_CTRL_PATH_CALIBRATION_STATS_IS_PERIODIC_CAL_GET(cal_info) WMI_GET_BITS(cal_info, 13, 1)
  11983. #define WMI_CTRL_PATH_CALIBRATION_STATS_IS_PERIODIC_CAL_SET(cal_info, is_periodic) WMI_SET_BITS(cal_info, 13, 1, is_periodic)
  11984. /* 0=20MHz, 1=40MHz, 2=80MHz, 3=160MHz, 4=240MHz, 5=320MHz */
  11985. #define WMI_AWGN_MAX_BW 6
  11986. typedef struct {
  11987. /* TLV tag and len; tag equals
  11988. * WMITLV_TAG_STRUC_wmi_ctrl_path_awgn_stats_struct
  11989. * For 6G FCC test we have to monitor channel interference and switch
  11990. * to non-interference channel.
  11991. * Additive White Gaussian Noise (AWGN) interference detection logic
  11992. * is used to detect interference based upon CCA / BW drop / packet drop.
  11993. * Once AWGN interference is detected, the target sends
  11994. * WMI_DCS_INTERFERENCE_EVENTID to host for channel change/BW change.
  11995. * This stats struct is used to get info about how many times these
  11996. * CCA_Interference/BW_Drop/Pkt_Drop indicators of AWGN occur.
  11997. */
  11998. A_UINT32 tlv_header;
  11999. /*
  12000. * AWGN WMI event sent count
  12001. * This is used to inform how many WMI_DCS_INTERFERENCE_EVENTID have been
  12002. * sent to the host.
  12003. * WMI_DCS_INTERFERENCE_EVENTID is sent whenever one or more of
  12004. * CCA_Int/BW_Drop/Channel_Change(Pkt_Drop) happen.
  12005. */
  12006. A_UINT32 awgn_send_evt_cnt;
  12007. /* AWGN primary int count */
  12008. A_UINT32 awgn_pri_int_cnt;
  12009. /* AWGN secondary int count */
  12010. A_UINT32 awgn_sec_int_cnt;
  12011. /*
  12012. * AWGN pkt drop trigger count
  12013. * This shows how many times the presence of interference on the
  12014. * primary BW has been inferred due to pkt drops.
  12015. * WMI_DCS_INTERFERENCE_EVENTID will be sent whenever there is
  12016. * interference on Primary Channel.
  12017. */
  12018. A_UINT32 awgn_pkt_drop_trigger_cnt;
  12019. /* awgn pkt drop trigger reset count */
  12020. A_UINT32 awgn_pkt_drop_trigger_reset_cnt;
  12021. /*
  12022. * AWGN bandwidth drop count
  12023. * This is used to inform count for any frame transmitted on lower BW
  12024. * than configured BW.
  12025. * WMI_DCS_INTERFERENCE_EVENTID will be sent whenever there is BW drop.
  12026. */
  12027. A_UINT32 awgn_bw_drop_cnt;
  12028. /* AWGN bandwidth drop reset count */
  12029. A_UINT32 awgn_bw_drop_reset_cnt;
  12030. /*
  12031. * AWGN CCA int count
  12032. * This is used to inform the interference based on CCA registers.
  12033. * WMI_DCS_INTERFERENCE_EVENTID will be sent whenever there is CCA
  12034. * interference.
  12035. */
  12036. A_UINT32 awgn_cca_int_cnt;
  12037. /* AWGN cca int reset count */
  12038. A_UINT32 awgn_cca_int_reset_cnt;
  12039. /* AWGN cca ack blk count */
  12040. A_UINT32 awgn_cca_ack_blk_cnt;
  12041. /* AWGN cca ack blk reset count */
  12042. A_UINT32 awgn_cca_ack_reset_cnt;
  12043. /*
  12044. * AWGN int BW cnt used to store interference occurred at 20/40/80/160MHz
  12045. * awgn_int_bw_cnt[0] counts interference detections in 20 MHz BW,
  12046. * awgn_int_bw_cnt[1] counts interference detections in 40 MHz BW,
  12047. * awgn_int_bw_cnt[2] counts interference detections in 80 MHz BW,
  12048. * awgn_int_bw_cnt[3] counts interference detections in 160 MHz BW,
  12049. * awgn_int_bw_cnt[4] is reserved for 240 MHz BW,
  12050. * awgn_int_bw_cnt[5] counts interference detections in 320 MHz BW.
  12051. */
  12052. A_UINT32 awgn_int_bw_cnt[WMI_AWGN_MAX_BW];
  12053. /* Number of OBSS interference occurred */
  12054. A_UINT32 obss_int_cnt;
  12055. /* Number of OBSS interference Sent to host */
  12056. A_UINT32 obss_int_evt_sent_host_cnt;
  12057. /* Number of OBSS interference skiped due to AWGN as high priority */
  12058. A_UINT32 obss_int_evt_skip_awgn_cnt;
  12059. /* Number of OBSS interference skiped due to duplicate OBSS interference */
  12060. A_UINT32 obss_int_evt_skip_dup_cnt;
  12061. /* Current OBSS interference segment details
  12062. * chan_bw_interference_bitmap:
  12063. * Indicates which 20MHz segments contain interference
  12064. * 320 MHz: bits 0-15
  12065. * 160 MHz: bits 0-7
  12066. * 80 MHz: bits 0-3
  12067. * Within the bitmap, Bit-0 represents lowest 20Mhz, Bit-1 represents
  12068. * second lowest 20Mhz and so on.
  12069. * Each bit position will indicate 20MHz in which interference is seen.
  12070. * (Valid 16 bits out of 32 bit integer)
  12071. */
  12072. A_UINT32 obss_int_cur_int_seg;
  12073. /* Previous OBSS Int Segment details
  12074. * chan_bw_interference_bitmap:
  12075. * Indicates which 20MHz segments contain interference
  12076. * 320 MHz: bits 0-15
  12077. * 160 MHz: bits 0-7
  12078. * 80 MHz: bits 0-3
  12079. * Within the bitmap, Bit-0 represents lowest 20Mhz, Bit-1 represents
  12080. * second lowest 20Mhz and so on.
  12081. * Each bit position will indicate 20MHz in which interference is seen.
  12082. * (Valid 16 bits out of 32 bit integer)
  12083. */
  12084. A_UINT32 obss_int_prv_int_seg;
  12085. /*
  12086. * OBSS int BW cnt used to store interference occurred at 20/40/80/160MHz
  12087. * obss_int_bw_cnt[0] counts interference detections in 20 MHz BW,
  12088. * obss_int_bw_cnt[1] counts interference detections in 40 MHz BW,
  12089. * obss_int_bw_cnt[2] counts interference detections in 80 MHz BW,
  12090. * obss_int_bw_cnt[3] counts interference detections in 160 MHz BW,
  12091. * obss_int_bw_cnt[4] counts interference detections in 240 MHz BW,
  12092. * obss_int_bw_cnt[5] counts interference detections in 320 MHz BW,
  12093. */
  12094. A_UINT32 obss_int_bw_cnt[WMI_AWGN_MAX_BW];
  12095. } wmi_ctrl_path_awgn_stats_struct;
  12096. typedef struct {
  12097. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_dfs_channel_stats_struct*/
  12098. A_UINT32 tlv_header;
  12099. /** pdev_id for identifying the PHY */
  12100. A_UINT32 pdev_id;
  12101. /** nol element num */
  12102. A_UINT32 nol;
  12103. /** Channel in MHz */
  12104. A_UINT32 channel;
  12105. /** Channel width in MHz */
  12106. A_UINT32 chwidth;
  12107. /** Time left for the channel to remain in NOL list (in seconds) */
  12108. A_UINT32 timeleft;
  12109. } wmi_ctrl_path_dfs_channel_stats_struct;
  12110. typedef struct {
  12111. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_odd_addr_read_struct*/
  12112. A_UINT32 tlv_header;
  12113. /* resp_type:
  12114. * Response type for each sub option:
  12115. * Add address space, display address, display data, delete address space.
  12116. * Refer to WMI_ODD_ADDR_READ_OPTION_TYPE_T.
  12117. */
  12118. A_UINT32 resp_type;
  12119. /* User configured Entry id */
  12120. A_UINT32 entry_id;
  12121. /* address:
  12122. * User configured Address Space.
  12123. * Any unused elements will be filled with 0x0.
  12124. */
  12125. A_UINT32 address[WMI_MAX_ADDRESS_SPACE];
  12126. /* data
  12127. * Data/Value at the User configured Address Space.
  12128. * Any unused elements will be filled with 0x0.
  12129. */
  12130. A_UINT32 data[WMI_MAX_ADDRESS_SPACE];
  12131. /* Status of the operation performed: 0 = failure, 1 = success */
  12132. A_UINT32 is_success;
  12133. } wmi_ctrl_path_odd_addr_read_struct;
  12134. /*
  12135. * The wmi_ctrl_path_afc_stats_struct is used to send AFC stats within
  12136. * the WMI_CTRL_PATH_STATS_EVENT message, in response to a
  12137. * WMI_REQUEST_CTRL_PATH_STATS_CMD message for the stat type
  12138. * WMI_REQUEST_CTRL_PATH_AFC_STAT.
  12139. */
  12140. typedef struct {
  12141. /* TLV tag and len; tag equals
  12142. * WMITLV_TAG_STRUC_wmi_ctrl_path_afc_stats_struct */
  12143. A_UINT32 tlv_header;
  12144. A_UINT32 pdev_id; /* pdev_id for identifying the MAC/PHY */
  12145. /* Count of new request ID every time it is generated */
  12146. A_UINT32 request_id_count;
  12147. /* Count of total number of AFC payload received */
  12148. A_UINT32 response_count;
  12149. /* Count of total number of invalid AFC response */
  12150. A_UINT32 invalid_response_count;
  12151. /* Count of total number of AFC resets received */
  12152. A_UINT32 reset_count;
  12153. /* AFC Response error counters*/
  12154. /*
  12155. * Count of total number of incorrect payload received due to
  12156. * request ID and response
  12157. * Increments when request ID doesn't match with response.
  12158. */
  12159. A_UINT32 id_mismatch_count;
  12160. /*
  12161. * Count of total number of "local_error_code" success event
  12162. * received as part of the AFC response payload in the below struct
  12163. * "afc_spectrum_inquiry_resp_bin_type"
  12164. */
  12165. A_UINT32 local_err_code_success;
  12166. /*
  12167. * Count of total number of "local_error_code" failure event
  12168. * received as part of the AFC response payload in the below struct
  12169. * "afc_spectrum_inquiry_resp_bin_type"
  12170. */
  12171. A_UINT32 local_err_code_failure;
  12172. /*
  12173. * The below fields are used to denote the count of
  12174. * different server response code received in "afc_serv_resp_code"
  12175. * received as part of "afc_spectrum_inquiry_resp_bin_type"
  12176. * These resp codes are as per the WFA spec
  12177. */
  12178. /* afc_serv_resp_code = version not supported */
  12179. A_UINT32 serv_resp_code_100;
  12180. /* afc_serv_resp_code = Device disallowed */
  12181. A_UINT32 serv_resp_code_101;
  12182. /* afc_serv_resp_code = Missing param */
  12183. A_UINT32 serv_resp_code_102;
  12184. /* afc_serv_resp_code = invalid value */
  12185. A_UINT32 serv_resp_code_103;
  12186. /* afc_serv_resp_code = unexpected param */
  12187. A_UINT32 serv_resp_code_106;
  12188. /* afc_serv_resp_code = unsupported spectrum */
  12189. A_UINT32 serv_resp_code_300;
  12190. /*
  12191. * AFC Compliance tracker
  12192. */
  12193. /* proxy_standalone_0
  12194. * This field displays the value of Request ID check disable received
  12195. * as part of the INI knob
  12196. */
  12197. A_UINT32 proxy_standalone_0;
  12198. /* proxy_standalone_1
  12199. * This field displays the value of Timer check disable received
  12200. * as part of the INI knob
  12201. */
  12202. A_UINT32 proxy_standalone_1;
  12203. /* Count of successful power events sent to host */
  12204. A_UINT32 power_event_counter;
  12205. /* Count of total force LPI power mode switch when grace count expires */
  12206. A_UINT32 force_LPI_counter;
  12207. /*
  12208. * Count of total number of successful host set
  12209. * TPC command received within the compliance timer
  12210. */
  12211. A_UINT32 tpc_wmi_success_count;
  12212. /*
  12213. * Count of total number of failed host set
  12214. * TPC command. This is incremented when compliance timer expires
  12215. */
  12216. A_UINT32 tpc_wmi_failure_count;
  12217. /*
  12218. * These counters are incremented as part of the
  12219. * Regulatory Compliance check done on the AFC payload
  12220. * received from server
  12221. */
  12222. /* Incorrect PSD value received in freq Obj */
  12223. A_UINT32 psd_failure_count;
  12224. /* Incorrect End freq received in freq Obj */
  12225. A_UINT32 psd_end_freq_failure_count;
  12226. /* Incorrect Start freq received in freq Obj */
  12227. A_UINT32 psd_start_freq_failure_count;
  12228. /* Incorrect EIRP received in channel obj */
  12229. A_UINT32 eirp_failure_count;
  12230. /* Incorrect centre freq channel received in channel obj */
  12231. A_UINT32 cfreq_failure_count;
  12232. /*
  12233. * AFC Current status
  12234. */
  12235. /* Current Request ID */
  12236. A_UINT32 request_id;
  12237. /* grace_timer_count
  12238. * This grace counter increments only after TTL expiry.
  12239. * Cleared to zero once valid payload is received.
  12240. */
  12241. A_UINT32 grace_timer_count;
  12242. /* Current TTL Time in seconds from last valid payload response */
  12243. A_UINT32 cur_ttl_timer;
  12244. /* deployment_mode
  12245. * 6G AP deployment mode denoting indoor or outdoor
  12246. * Indoor = 1, Outdoor = 2
  12247. */
  12248. A_UINT32 deployment_mode;
  12249. /*
  12250. * Proxy mode AFC-Response payload clear count
  12251. */
  12252. A_UINT32 payload_clear_count;
  12253. } wmi_ctrl_path_afc_stats_struct;
  12254. /* AT - Airtime */
  12255. /* AA - Available Airtime */
  12256. #define WMI_PMLO_UL_DL_INBSS_AT_GET_BE(airtime) WMI_GET_BITS(airtime, 0, 8)
  12257. #define WMI_PMLO_UL_DL_INBSS_AT_SET_BE(airtime, value) WMI_SET_BITS(airtime, 0, 8, value)
  12258. #define WMI_PMLO_UL_DL_INBSS_AT_GET_BK(airtime) WMI_GET_BITS(airtime, 8, 8)
  12259. #define WMI_PMLO_UL_DL_INBSS_AT_SET_BK(airtime, value) WMI_SET_BITS(airtime, 8, 8, value)
  12260. #define WMI_PMLO_UL_DL_INBSS_AT_GET_VI(airtime) WMI_GET_BITS(airtime, 16, 8)
  12261. #define WMI_PMLO_UL_DL_INBSS_AT_SET_VI(airtime, value) WMI_SET_BITS(airtime, 16, 8, value)
  12262. #define WMI_PMLO_UL_DL_INBSS_AT_GET_VO(airtime) WMI_GET_BITS(airtime, 24, 8)
  12263. #define WMI_PMLO_UL_DL_INBSS_AT_SET_VO(airtime, value) WMI_SET_BITS(airtime, 24, 8, value)
  12264. #define WMI_PMLO_LINK_OBSS_AT_GET(airtime) WMI_GET_BITS(airtime, 0, 8)
  12265. #define WMI_PMLO_LINK_OBSS_AT_SET(airtime, value) WMI_SET_BITS(airtime, 0, 8, value)
  12266. #define WMI_PMLO_LINK_AA_GET(airtime) WMI_GET_BITS(airtime, 8, 8)
  12267. #define WMI_PMLO_LINK_AA_SET(airtime, value) WMI_SET_BITS(airtime, 8, 8, value)
  12268. #define WMI_PMLO_UL_AIRTIME_NON_AC_GET(airtime) WMI_GET_BITS(airtime, 16, 8)
  12269. #define WMI_PMLO_UL_AIRTIME_NON_AC_SET(airtime, value) WMI_SET_BITS(airtime, 16, 8, value)
  12270. #define WMI_PMLO_DL_AIRTIME_NON_AC_GET(airtime) WMI_GET_BITS(airtime, 24, 8)
  12271. #define WMI_PMLO_DL_AIRTIME_NON_AC_SET(airtime, value) WMI_SET_BITS(airtime, 24, 8, value)
  12272. #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_GET_BE(airtime) WMI_GET_BITS(airtime, 0, 8)
  12273. #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_SET_BE(airtime, value) WMI_SET_BITS(airtime, 0, 8, value)
  12274. #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_GET_BK(airtime) WMI_GET_BITS(airtime, 8, 8)
  12275. #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_SET_BK(airtime, value) WMI_SET_BITS(airtime, 8, 8, value)
  12276. #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_GET_VI(airtime) WMI_GET_BITS(airtime, 16, 8)
  12277. #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_SET_VI(airtime, value) WMI_SET_BITS(airtime, 16, 8, value)
  12278. #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_GET_VO(airtime) WMI_GET_BITS(airtime, 24, 8)
  12279. #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_SET_VO(airtime, value) WMI_SET_BITS(airtime, 24, 8, value)
  12280. /** Traffic condition used in estimating the available airtime value */
  12281. typedef enum {
  12282. WMI_PDEV_TRAFFIC_LIGHT = 0,
  12283. WMI_PDEV_TRAFFIC_MEDIUM = 1,
  12284. WMI_PDEV_TRAFFIC_HEAVY = 2,
  12285. WMI_PDEV_TRAFFIC_SATURATION = 3,
  12286. WMI_PDEV_TRAFFIC_MEDIUM_AND_OBSS = 4,
  12287. } wmi_pdev_traffic_condition;
  12288. /*
  12289. * The wmi_ctrl_path_pmlo_stats_struct is used to send Provisional MLO stats
  12290. * the WMI_CTRL_PATH_STATS_EVENT message, in response to a
  12291. * WMI_REQUEST_CTRL_PATH_STATS_CMD message for the stat type
  12292. * WMI_REQUEST_CTRL_PATH_PMLO_STAT.
  12293. */
  12294. typedef struct {
  12295. /* TLV tag and len; tag equals
  12296. * WMITLV_TAG_STRUC_wmi_ctrl_path_pmlo_stats_struct */
  12297. A_UINT32 tlv_header;
  12298. /** pdev_id for identifying the PHY */
  12299. A_UINT32 pdev_id;
  12300. /*
  12301. * Percentage of downlink air time used in each access category
  12302. * calculated InBSS, units in percentage.
  12303. * BIT[0-7] : AC_BE
  12304. * BIT[8-15] : AC_BK
  12305. * BIT[16-23] : AC_VI
  12306. * BIT[24-31] : AC_VO
  12307. * Please refer to WMI_PMLO_UL_DL_INBSS_AT_* macros
  12308. * to retrieve values for each access category in dl_inbss_airtime_per_ac.
  12309. */
  12310. union {
  12311. struct {
  12312. A_UINT32
  12313. dl_inbss_airtime_ac_be: 8,
  12314. dl_inbss_airtime_ac_bk: 8,
  12315. dl_inbss_airtime_ac_vi: 8,
  12316. dl_inbss_airtime_ac_vo: 8;
  12317. };
  12318. A_UINT32 dl_inbss_airtime_per_ac;
  12319. };
  12320. /*
  12321. * Percentage of uplink air time used in each access category
  12322. * calculated InBSS, units in percentage.
  12323. * BIT[0-7] : AC_BE
  12324. * BIT[8-15] : AC_BK
  12325. * BIT[16-23] : AC_VI
  12326. * BIT[24-31] : AC_VO
  12327. * Please refer to WMI_PMLO_UL_DL_INBSS_AT_* macros
  12328. * to set/get values for each access category in ul_inbss_airtime_per_ac.
  12329. */
  12330. union {
  12331. struct {
  12332. A_UINT32
  12333. ul_inbss_airtime_ac_be: 8,
  12334. ul_inbss_airtime_ac_bk: 8,
  12335. ul_inbss_airtime_ac_vi: 8,
  12336. ul_inbss_airtime_ac_vo: 8;
  12337. };
  12338. A_UINT32 ul_inbss_airtime_per_ac;
  12339. };
  12340. /*
  12341. * Percentage of air time available for each AC, units in percentage.
  12342. * BIT[0-7] : AC_BE
  12343. * BIT[8-15] : AC_BK
  12344. * BIT[16-23] : AC_VI
  12345. * BIT[24-31] : AC_VO
  12346. * Please refer to WMI_ESP_ESTIMATE_GET_* and WMI_ESP_ESTIMATE_SET_* macros
  12347. * to retrieve values for each access category in estimated_air_time_per_ac.
  12348. */
  12349. union {
  12350. struct {
  12351. A_UINT32
  12352. estimated_air_time_ac_be: 8,
  12353. estimated_air_time_ac_bk: 8,
  12354. estimated_air_time_ac_vi: 8,
  12355. estimated_air_time_ac_vo: 8;
  12356. };
  12357. A_UINT32 estimated_air_time_per_ac;
  12358. };
  12359. /*
  12360. * Average channel latency per AC, units in micro seconds.
  12361. * avg_chan_lat_per_ac[0] : AC_VO
  12362. * avg_chan_lat_per_ac[1] : AC_VI
  12363. * avg_chan_lat_per_ac[2] : AC_BE
  12364. * avg_chan_lat_per_ac[3] : AC_BK
  12365. */
  12366. A_UINT32 avg_chan_lat_per_ac[WMI_AC_MAX];
  12367. /*
  12368. * link_obss_airtime: Percentage of OBSS used air time per link,
  12369. * units in percentage.
  12370. * Refer to WMI_PMLO_LINK_OBSS_AT_* Macro to set/get values.
  12371. * link_idle_airtime: Idle/free airtime per link, units in percentage.
  12372. * Refer to WMI_PMLO_LINK_AA_* macro to set/get values.
  12373. * ul_inbss_airtime_non_ac: ul inBSS airtime occupied by non-AC traffic,
  12374. * units in percentage.
  12375. * Refer to WMI_PMLO_UL_AIRTIME_NON_AC_* macro to set/get values.
  12376. * dl_inbss_airtime_non_ac: dl inBSS airtime occupied by non-AC traffic,
  12377. * units in percentage.
  12378. * Refer to WMI_PMLO_DL_AIRTIME_NON_AC_* macro to set/get values.
  12379. */
  12380. union {
  12381. struct {
  12382. A_UINT32 link_obss_airtime: 8,
  12383. link_idle_airtime: 8,
  12384. ul_inbss_airtime_non_ac: 8,
  12385. dl_inbss_airtime_non_ac: 8;
  12386. };
  12387. A_UINT32 ul_dl_obss_free_aa_word32;
  12388. };
  12389. /*
  12390. * Traffic condition used in estimating the available airtime value.
  12391. * Refer to enum wmi_pdev_traffic_condition
  12392. * traffic_condition_used_per_ac[0] : AC_VO
  12393. * traffic_condition_used_per_ac[1] : AC_VI
  12394. * traffic_condition_used_per_ac[2] : AC_BE
  12395. * traffic_condition_used_per_ac[3] : AC_BK
  12396. * Saturation Traffic condition is evaluated to true when the number
  12397. * of associated stations and the number of active TIDs per access
  12398. * category crosses a threshold.
  12399. * Light Traffic condition is evaluated to true when the obss_rx_airtime
  12400. * is less than a threshold and the free channel is greater than the sum
  12401. * of DL and UL airtime per client.
  12402. * Heavy Traffic condition is evaluated to true when the free channel is
  12403. * less than a particular threshold and the number of active TIDs per
  12404. * access category crosses a threshold.
  12405. * OBSS (Medium) Traffic condition is evaluated to true when the
  12406. * obss_rx_airtime crosses a threshold.
  12407. * Medium Traffic case is carried out if all the above mentioned
  12408. * conditions evaluate to false.
  12409. */
  12410. A_UINT32 traffic_condition_used_per_ac[WMI_AC_MAX];
  12411. /*
  12412. * Every PPDU has an associated txop overhead value in its PPDU duration.
  12413. * In order to consider only the duration taken to transfer the actual
  12414. * data, we estimate the payload ratio.
  12415. * The packet overhead is accumulated for each PPDU, where it is recorded
  12416. * for each access category separately.
  12417. * The payload_ratio_dl values indicate the percentage of actual data
  12418. * packets' duration in the entire TX duration by omitting the overhead
  12419. * (units are percentage).
  12420. * By estimating the payload ratio, we would be able to further measure
  12421. * the free channel with increased accuracy.
  12422. *
  12423. * BIT[0-7] : AC_BE
  12424. * BIT[8-15] : AC_BK
  12425. * BIT[16-23] : AC_VI
  12426. * BIT[24-31] : AC_VO
  12427. * Please refer to WMI_PMLO_UL_DL_PAYLOAD_RATIO_* macros
  12428. * to retrieve values for each access category in payload_ratio_dl_per_ac.
  12429. */
  12430. union {
  12431. struct {
  12432. A_UINT32
  12433. payload_ratio_dl_ac_be: 8,
  12434. payload_ratio_dl_ac_bk: 8,
  12435. payload_ratio_dl_ac_vi: 8,
  12436. payload_ratio_dl_ac_vo: 8;
  12437. };
  12438. A_UINT32 payload_ratio_dl_per_ac;
  12439. };
  12440. /*
  12441. * Every PPDU has an associated txop overhead value in its PPDU duration.
  12442. * In order to consider only the duration taken to transfer the actual
  12443. * data, we estimate the payload ratio.
  12444. * The packet overhead is accumulated for each PPDU, where it is recorded
  12445. * for each access category separately.
  12446. * The payload_ratio_ul values indicate the percentage of actual data
  12447. * packets' duration in the entire RX duration by omitting the overhead
  12448. * (Units are percentage).
  12449. * By estimating the payload ratio, we would be able to further measure
  12450. * the free channel with increased accuracy.
  12451. *
  12452. * BIT[0-7] : AC_BE
  12453. * BIT[8-15] : AC_BK
  12454. * BIT[16-23] : AC_VI
  12455. * BIT[24-31] : AC_VO
  12456. * Please refer to WMI_PMLO_UL_DL_PAYLOAD_RATIO_* macros
  12457. * to retrieve values for each access category in payload_ratio_ul_per_ac.
  12458. */
  12459. union {
  12460. struct {
  12461. A_UINT32
  12462. payload_ratio_ul_ac_be: 8,
  12463. payload_ratio_ul_ac_bk: 8,
  12464. payload_ratio_ul_ac_vi: 8,
  12465. payload_ratio_ul_ac_vo: 8;
  12466. };
  12467. A_UINT32 payload_ratio_ul_per_ac;
  12468. };
  12469. /*
  12470. * Error margin of the estimated available airtime per AC,
  12471. * units are percentage.
  12472. * error_margin_per_ac[0] : AC_VO
  12473. * error_margin_per_ac[1] : AC_VI
  12474. * error_margin_per_ac[2] : AC_BE
  12475. * error_margin_per_ac[3] : AC_BK
  12476. */
  12477. A_UINT32 error_margin_per_ac[WMI_AC_MAX];
  12478. /*
  12479. * This parameter indicates the number of clients which would be
  12480. * considered to estimate the available airtime value during
  12481. * imbalanced traffic scenarios
  12482. * Value 0 indicates that we do not have imbalanced traffic.
  12483. * num_of_ul/dl_asymmetric_clients_per_ac[0] : AC_VO
  12484. * num_of_ul/dl_asymmetric_clients_per_ac[1] : AC_VI
  12485. * num_of_ul/dl_asymmetric_clients_per_ac[2] : AC_BE
  12486. * num_of_ul/dl_asymmetric_clients_per_ac[3] : AC_BK
  12487. */
  12488. A_UINT32 num_of_ul_asymmetric_clients_per_ac[WMI_AC_MAX];
  12489. A_UINT32 num_of_dl_asymmetric_clients_per_ac[WMI_AC_MAX];
  12490. } wmi_ctrl_path_pmlo_stats_struct;
  12491. typedef struct {
  12492. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_cfr_stats_struct */
  12493. A_UINT32 tlv_header;
  12494. /*
  12495. * This index is used for formatting the printout of this stats TLV.
  12496. * A stats header is added when the index=0.
  12497. */
  12498. A_UINT32 index;
  12499. wmi_mac_addr cfr_peer_mac_addr;
  12500. A_UINT32 peer_in_use;
  12501. A_UINT32 capture_in_progress;
  12502. /* capture_method: 0 means oneshot request, otherwise periodic request */
  12503. A_UINT32 capture_method;
  12504. A_UINT32 periodicity; /* Time in ms */
  12505. A_UINT32 latest_req_timestamp; /* Time in ms */
  12506. A_UINT32 latest_resp_timestamp; /* Time in ms */
  12507. A_UINT32 cfr_req_count;
  12508. A_UINT32 cfr_resp_success_count;
  12509. A_UINT32 cfr_resp_failure_count;
  12510. } wmi_ctrl_path_cfr_stats_struct;
  12511. #define WMI_MAX_MLO_LINKS 5
  12512. #define WMI_HE_MAP_COUNT 3
  12513. #define WMI_EHT_MAP_COUNT 3
  12514. typedef struct {
  12515. /* TLV tag and len; tag equals
  12516. * WMITLV_TAG_STRUC_wmi_ctrl_path_peer_stats_struct
  12517. */
  12518. A_UINT32 tlv_header;
  12519. /* mac address - part of wlan_peer */
  12520. wmi_mac_addr mac_addr;
  12521. /* wlan_peer flags - refer to IEEE80211_NODE_* flags in wlan_peer.h */
  12522. A_UINT32 opaque_debug_flags;
  12523. /* opaque_debug_vht_caps:
  12524. * Negotiated VHT capabilities in the wlan_peer struct
  12525. * Refer to ieee80211_defs.h.
  12526. */
  12527. A_UINT32 opaque_debug_vht_caps;
  12528. /* opaque_debug_flags_ext:
  12529. * Extended flags in the wlan_peer struct
  12530. * Refer to IEEE80211_NODE_* flags in wlan_peer.h.
  12531. */
  12532. A_UINT32 opaque_debug_flags_ext;
  12533. /* TID queues marked for TWT flush, present in wlan_peer */
  12534. A_UINT32 opaque_debug_twt_flush_tidmap;
  12535. /* Number of TWT SPs to be expired, present in wlan_peer */
  12536. A_UINT32 opaque_debug_n_TWT_SPs_to_expire;
  12537. /* opaque_debug_rc_flags:
  12538. * Peer rate information, part of struct rate_node
  12539. * Refer to whal_rate_api.h for complete RC_FLAGS details.
  12540. */
  12541. A_UINT32 opaque_debug_rc_flags;
  12542. /* opaque_debug_sm_event_mask_eosp_cnt:
  12543. * This word contains the following bitfields:
  12544. * - Power save state machine event mask,
  12545. * part of wal_ps_buf_peer_handle_t.
  12546. * Refer to enum wal_ps_buf_peer_reg_ev_handlers.
  12547. * Use WMI_PEER_STATS_SM_MASK_SET,GET macros.
  12548. * - End of service period (EOSP) sent retry counter,
  12549. * part of wal_ps_buf_peer_handle_t.
  12550. * Use WMI_PEER_STATS_EOSP_RETRY_CNT_SET,GET macros.
  12551. */
  12552. A_UINT32 opaque_debug_sm_event_mask_eosp_cnt;
  12553. /* opaque_debug_ps_buf_peer_flag1:
  12554. * Power save related send_n, ps_poll, unscheduled service period
  12555. * related fields;
  12556. * Part of wal_ps_buf_peer_handle_t.
  12557. * Refer to wal_ps_buf_peer_ctx struct definition.
  12558. */
  12559. A_UINT32 opaque_debug_ps_buf_peer_flag1;
  12560. /* opaque_debug_ps_buf_peer_flag2:
  12561. * Power save related trigger/delivery tid related fields.
  12562. * part of wal_ps_buf_peer_handle_t.
  12563. * Refer to wal_ps_buf_peer_ctx struct definition.
  12564. */
  12565. A_UINT32 opaque_debug_ps_buf_peer_flag2;
  12566. /* opaque_debug_ps_buf_peer_flag3:
  12567. * Power save related last trigger related information,
  12568. * part of wal_ps_buf_peer_handle_t.
  12569. * Refer to wal_ps_buf_peer_ctx struct definition.
  12570. */
  12571. A_UINT32 opaque_debug_ps_buf_peer_flag3;
  12572. /* opaque_debug_last_rx_trigger_time:
  12573. * Time of the most recently received uplink trigger frame,
  12574. * part of wal_ps_buf_peer_handle_t - in microseconds units.
  12575. */
  12576. A_UINT32 opaque_debug_last_rx_trigger_time;
  12577. /* opaque_debug_last_poll_time:
  12578. * TSF of the most recently received uplink PS-Poll,
  12579. * part of wal_ps_buf_peer_handle_t - in TU
  12580. */
  12581. A_UINT32 opaque_debug_last_poll_time;
  12582. /* opaque_debug_oldest_tx_buffered_waiting_ms:
  12583. * Enqueue time of most recent MSDU that AP has buffered for
  12584. * sleeping station, part of wal_ps_buf_peer_handle_t, in ms units.
  12585. */
  12586. A_UINT32 opaque_debug_oldest_tx_buffered_waiting_ms;
  12587. /* opaque_debug_last_rxtx_activity:
  12588. * The last time when there was a rx or tx traffic from a client,
  12589. * part of wal_ps_buf_peer_handle_t, in ms units.
  12590. */
  12591. A_UINT32 opaque_debug_last_rxtx_activity;
  12592. /* opaque_debug_twt_flush_expiry_timestamp:
  12593. * Peer's TWT flush expiry timestamp in us,
  12594. * part of peer_twt_flush struct.
  12595. */
  12596. A_UINT32 opaque_debug_twt_flush_expiry_timestamp;
  12597. /* opaque_debug_hw_link_id:
  12598. * Unique link id across SOCs, determined during QMI handshake,
  12599. * part of wlan_peer_ml_info_t.
  12600. */
  12601. A_UINT32 opaque_debug_hw_link_id;
  12602. /* opaque_debug_ml_partner_hw_link_id_bitmap:
  12603. * Hardware link id of the of partner links that are to be cleaned up.
  12604. * This is filled by host during peer delete cmd.
  12605. * It it part of wlan_peer_ml_info_t.
  12606. */
  12607. A_UINT32 opaque_debug_ml_partner_hw_link_id_bitmap;
  12608. /* opaque_debug_link_flags:
  12609. * MLO link flags: related to assoc, anchor, master and primary UMAC links.
  12610. * Refer to resmgr_mlo_link_flags.
  12611. * Part of wlan_peer_ml_info_t.
  12612. */
  12613. A_UINT32 opaque_debug_link_flags;
  12614. /* MLO peer id - part of wlan_ml_peer_t */
  12615. A_UINT32 opaque_debug_ml_peer_id;
  12616. /* MLD mac address - part of wlan_ml_peer_t */
  12617. wmi_mac_addr opaque_debug_mld_mac_addr;
  12618. /* opaque_debug_assoc_id_usage_cnt:
  12619. * Part of wlan_peer.
  12620. * This word contains the following bitfields:
  12621. * - assoc id of the peer
  12622. * Use WMI_PEER_STATS_ASSOCIATE_ID_SET,GET macros.
  12623. * - peer usage count to track if peer alloc command is sent
  12624. * for new or existing peer,
  12625. * Use WMI_PEER_STATS_USAGE_CNT_SET,GET macros.
  12626. */
  12627. A_UINT32 opaque_debug_assoc_id_usage_cnt;
  12628. /* opaque_debug_default_ht_caps:
  12629. * Part of wlan_peer.
  12630. * This word contains the following bitfields:
  12631. * - default peer capabilities of the peer - refer ieee80211_defs.h
  12632. * Use WMI_PEER_STATS_DEF_CAPS_SET,GET macros.
  12633. * - HT capabilities of the peer - refer ieee80211_defs.h
  12634. * Use WMI_PEER_STATS_HT_CAPS_SET,GET macros.
  12635. */
  12636. A_UINT32 opaque_debug_default_ht_caps;
  12637. /* opaque_debug_inact_gen:
  12638. * Part of wlan_peer.
  12639. * This word contains the following bitfields:
  12640. * - Overall tx/rx inactivity time of the peer in seconds
  12641. * Use WMI_PEER_STATS_INACT_GEN_SET,GET macros.
  12642. * - Data tx/rx inactivity time of the peer in seconds.
  12643. * Use WMI_PEER_STATS_DATA_INACT_GEN_SET,GET macros.
  12644. */
  12645. A_UINT32 opaque_debug_inact_gen;
  12646. /* opaque_debug_id_type:
  12647. * Part of wlan_peer.
  12648. * This word contains the following bitfields:
  12649. * - Type of peer whether it is bss,self or remote peer.
  12650. * Refer to enum wmi_peer_type.
  12651. * Use WMI_PEER_STATS_TYPE_SET,GET macros.
  12652. * - MAC ID that the peer belongs to
  12653. * Use WMI_PEER_STATS_MAC_ID_SET,GET macros.
  12654. * - sw peer id of the peer
  12655. * Use WMI_PEER_STATS_ID_SET,GET macros.
  12656. */
  12657. A_UINT32 opaque_debug_id_type;
  12658. /* Deleted tids bitmask within the peer - part of wal_peer */
  12659. A_UINT32 opaque_debug_deleted_tidmask;
  12660. /* number of local pending frames for completions - part of wal_peer */
  12661. A_UINT32 opaque_debug_num_of_local_frames_pending;
  12662. /* flags part of wal_peer - refer to wal_peer_flags_t */
  12663. A_UINT32 opaque_debug_wal_peer_flags;
  12664. /* opaque_debug_keyid0_ast_index:
  12665. * The AST index for key id 0 which is always allocated,
  12666. * part of wal_peer.
  12667. */
  12668. A_UINT32 opaque_debug_keyid0_ast_index;
  12669. /* opaque_debug_all_tids_block_module_bitmap:
  12670. * Bitmap of block IDs requesting block of all TIDs,
  12671. * part of wal_peer.
  12672. * Refer to enum WLAN_PAUSE_ID.
  12673. * This block/pause ID can be mapped to a WLAN_MODULE_ID module ID.
  12674. */
  12675. A_UINT32 opaque_debug_all_tids_block_module_bitmap;
  12676. /* opaque_debug_all_tids_pause_module_bitmap:
  12677. * Bitmap of pause IDs requesting block of all TIDs,
  12678. * part of wal_peer.
  12679. * Refer to enum WLAN_PAUSE_ID.
  12680. * This pause ID can be mapped to a WLAN_MODULE_ID module ID.
  12681. */
  12682. A_UINT32 opaque_debug_all_tids_pause_module_bitmap;
  12683. /* opaque_debug_data_tids_block_module_bitmap:
  12684. * Bitmap of block ids requesting block of data tids,
  12685. * part of wal_peer.
  12686. * Refer to enum WLAN_PAUSE_ID.
  12687. * This block/pause ID can be mapped to a WLAN_MODULE_ID module ID.
  12688. */
  12689. A_UINT32 opaque_debug_data_tids_block_module_bitmap;
  12690. /* opaque_debug_data_tids_pause_module_bitmap:
  12691. * Bitmap of pause ids requesting block of data tids,
  12692. * part of wal_peer.
  12693. * Refer to enum WLAN_PAUSE_ID.
  12694. * This pause ID can be mapped to a WLAN_MODULE_ID module ID.
  12695. */
  12696. A_UINT32 opaque_debug_data_tids_pause_module_bitmap;
  12697. /* The time stamp when first ppdu fails in us, part of wal_peer */
  12698. A_UINT32 opaque_debug_ppdu_fail_time;
  12699. /* opaque_debug_rate_params:
  12700. * This word contains the following bitfields:
  12701. * - Non data rate code of the peer - part of wal_peer
  12702. * Use WMI_PEER_STATS_BSS_NON_DATA_RC_SET,GET macros.
  12703. * - channel bandwidth supported by the peer, part of wal_peer.
  12704. * The mapping is as follows:
  12705. * 0 = 20 MHz, 1 = 40 MHz, 2 = 80 MHz, 3 = 160 MHz, 4 = 320 MHz
  12706. * Use WMI_PEER_STATS_CH_WIDTH_SET,GET macros.
  12707. * - MCS used for the last PPDU received from the peer, part of wal_peer
  12708. * Use WMI_PEER_STATS_RX_MCS_SET,GET macros.
  12709. */
  12710. A_UINT32 opaque_debug_rate_params;
  12711. /* consecutive QOS null frame tx fail count, part of wal_peer */
  12712. A_UINT32 opaque_debug_consecutive_null_failure;
  12713. /* peer delete state refer enum PEER_DELETE_SM_STATE, part of wal_peer */
  12714. A_UINT32 opaque_debug_peer_delete_sm_state;
  12715. /* opaque_debug_cache_rate_info_low32,_high32:
  12716. * Lower/upper 32 bits respectively of cached rate info variable
  12717. * updated by the HTT metadata.
  12718. * This rate_info is based on the values from struct
  12719. * htt_tx_msdu_desc_ext2_t .
  12720. * If htt_tx_desc_ext2->update_peer_cache is set to 1 and
  12721. * HTT_TX_TCL_METADATA_PEER_ID_GET(tcl_cmd_num) returns valid peer ID
  12722. * then rate_info cache of the peer is updated.
  12723. * Part of wal_peer.
  12724. */
  12725. A_UINT32 opaque_debug_cache_rate_info_low32;
  12726. A_UINT32 opaque_debug_cache_rate_info_high32;
  12727. /* opaque_debug_peer_delete_rc4_rekey:
  12728. * This word contains the following bitfields:
  12729. * - Flag that denotes if Peer delete all is in progress or not,
  12730. * part of wal_peer.
  12731. * Use WMI_PEER_STATS_DELETE_ALL_FLAG_SET,GET macros.
  12732. * - RC4 rekey counter, part of wal_peer.
  12733. * Use WMI_PEER_STATS_RC4_REKEY_CNT_SET,GET macros.
  12734. */
  12735. A_UINT32 opaque_debug_peer_delete_rc4_rekey;
  12736. /* opaque_debug_mcbc_tids_pause_bitmap:
  12737. * Bitmap containing Multicast and broadcast tids that are paused,
  12738. * part of wal_peer.
  12739. */
  12740. A_UINT32 opaque_debug_mcbc_tids_pause_bitmap;
  12741. /* opaque_debug_next_to_last_pn_low32,_high32:
  12742. * Lower/upper 32 bits respectively of last used PN value received,
  12743. * part of wal_peer.
  12744. */
  12745. A_UINT32 opaque_debug_next_to_last_pn_low32;
  12746. A_UINT32 opaque_debug_next_to_last_pn_high32;
  12747. /* opaque_debug_last_pn_low32,_high32:
  12748. * Lower/upper 32 bits respectively of current PN value received,
  12749. * part of wal_peer.
  12750. */
  12751. A_UINT32 opaque_debug_last_pn_low32;
  12752. A_UINT32 opaque_debug_last_pn_high32;
  12753. /* opaque_debug_twt_ap_peer_ctx_flags:
  12754. * This word contains the following bitfields:
  12755. * - TWT AP peer's context flags, part of twt_ap_peer_handle_t struct.
  12756. * Refer twt_ap_twt_session_t definition.
  12757. * Use WMI_PEER_STATS_TWT_AP_FLAGS_SET,GET macros.
  12758. * - TWT session counter, part of twt_ap_peer_handle_t struct.
  12759. * Use WMI_PEER_STATS_TWT_AP_SESSION_CNT_SET,GET macros.
  12760. * - TWT frame retry counter, part of twt_ap_peer_handle_t struct.
  12761. * Use WMI_PEER_STATS_TWT_FRM_RETRY_SET,GET macros.
  12762. */
  12763. A_UINT32 opaque_debug_twt_ap_peer_ctx_flags;
  12764. /* opaque_debug_twt_ap_counters:
  12765. * This word contains the following bitfields:
  12766. * - TWT UL trigger counter, part of twt_ap_peer_handle_t struct.
  12767. * Use WMI_PEER_STATS_TWT_UL_TRIGGER_SET,GET macros.
  12768. * - TWT Broadcast session counter, part of twt_ap_peer_handle_t struct.
  12769. * Use WMI_PEER_STATS_TWT_BC_SESSION_SET,GET macros.
  12770. * - TWT pending report counter, part of twt_ap_peer_handle_t struct.
  12771. * Use WMI_PEER_STATS_TWT_PENDING_REPORT_SET,GET macros.
  12772. * - TWT flow IDs, part of twt_ap_peer_handle_t struct.
  12773. * Use WMI_PEER_STATS_TWT_FLOW_IDS_SET,GET macros.
  12774. */
  12775. A_UINT32 opaque_debug_twt_ap_counters;
  12776. /* opaque_debug_tx_state_bmap_low32,_high32:
  12777. * Lower/upper 32 bits respectively of list of currently running
  12778. * BA Tx states for tids in this peer, part of wal_ba_peer_handle_t.
  12779. */
  12780. A_UINT32 opaque_debug_tx_state_bmap_low32;
  12781. A_UINT32 opaque_debug_tx_state_bmap_high32;
  12782. /* opaque_debug_addba_mode:
  12783. * This word contains the following bitfields:
  12784. * - ADDBA mode whether its automatic or manual,
  12785. * WAL_BA_ADDBA_MODE_AUTO = 0 and WAL_BA_ADDBA_MODE_MANUAL = 1
  12786. * Part of wal_ba_peer_handle_t.
  12787. * Use WMI_PEER_STATS_ADDBBA_TX_MODE_SET,GET macros.
  12788. * - ADDBA request's response code, part of wal_ba_peer_handle_t.
  12789. * Use WMI_PEER_STATS_ADDBBA_RESP_MODE_SET,GET macros.
  12790. */
  12791. A_UINT32 opaque_debug_addba_mode;
  12792. /* opaque_debug_tx_retry_bmap:
  12793. * Bitmap of tids and their TX BlockAck retry counters.
  12794. * Each TID uses 2 bits for its BA retry counter.
  12795. * Part of wal_ba_peer_handle_t.
  12796. */
  12797. A_UINT32 opaque_debug_tx_retry_bmap;
  12798. /* opaque_debug_rx_state_bmap:
  12799. * Bitmap of tids and their RX BlockAck retry counters.
  12800. * 00 - BA not setup
  12801. * 01 - BA in progress
  12802. * 10 - reserved
  12803. * 11 - BA setup.
  12804. * Each TID uses 2 bits for its BA RX state;
  12805. * for instance TID 0's BA info occupies bits 1:0 and so on.
  12806. * Part of wal_ba_peer_handle_t.
  12807. */
  12808. A_UINT32 opaque_debug_rx_state_bmap;
  12809. /* opaque_debug_tx_pending_delba_tid_bmap:
  12810. * TID bitmap containaing information DELBA tx pending,
  12811. * part of wal_ba_peer_handle_t.
  12812. */
  12813. A_UINT32 opaque_debug_tx_pending_delba_tid_bmap;
  12814. /* opaque_debug_link_monitor_tid_num:
  12815. * link monitor tid num in bss_peer ba_peer_handle,
  12816. * part of wal_ba_peer_handle_t.
  12817. */
  12818. A_UINT32 opaque_debug_link_monitor_tid_num;
  12819. /* opaque_debug_rc4_eapol_key_complete:
  12820. * Flag that denotes rc4 eapol key exchange is complete,
  12821. * part of wal_peer_ext.
  12822. */
  12823. A_UINT32 opaque_debug_rc4_eapol_key_complete;
  12824. /* qcache peer flags, refer to qpeer_flags_t */
  12825. A_UINT32 opaque_debug_qpeer_flags;
  12826. /* bitmap of TIDs requested for flush, part of wal_qcache_peer */
  12827. A_UINT32 opaque_debug_delete_requested_tidmask;
  12828. /* bitmap of created TIDs, part of wal_qcache_peer */
  12829. A_UINT32 opaque_debug_tid_created_tidmask;
  12830. /* opaque_debug_qpeer_rt_flags0,_flags1,_flags2:
  12831. * RT thread related fields in qpeer, refer to _wal_qcache_peer.
  12832. */
  12833. A_UINT32 opaque_debug_qpeer_rt_flags0;
  12834. A_UINT32 opaque_debug_qpeer_rt_flags1;
  12835. A_UINT32 opaque_debug_qpeer_rt_flags2;
  12836. /* opaque_debug_qpeer_sa_flags0,_flags1:
  12837. * SA thread related fields in qpeer, refer to _wal_qcache_peer.
  12838. */
  12839. A_UINT32 opaque_debug_qpeer_sa_flags0;
  12840. A_UINT32 opaque_debug_qpeer_sa_flags1;
  12841. /* BE thread related fields in qpeer, refer to _wal_qcache_peer */
  12842. A_UINT32 opaque_debug_qpeer_be_flags;
  12843. /* qpeer event bitmap, refer to wal_peer_event_type */
  12844. A_UINT32 opaque_debug_event_bitmap;
  12845. /* tx fail count for a peer, part of dcache peer */
  12846. A_UINT32 opaque_debug_seq_no_tx_fail_cnt;
  12847. /* Last transmission rate in kbps for a peer, part of dcache peer */
  12848. A_UINT32 opaque_debug_last_tx_rate_kbps;
  12849. /* opaque_debug_amsdu_size:
  12850. * This word contains the following bitfields:
  12851. * - MAX AMSDU size of the peer, part of dcache peer.
  12852. * Use WMI_PEER_STATS_MAX_AMSDU_SIZE_SET,GET macros.
  12853. */
  12854. A_UINT32 opaque_debug_amsdu_size;
  12855. /* opaque_debug_fake_sleep_time:
  12856. * Time elapsed in ms after entering into fake sleep after xretry failure,
  12857. * part of dcache peer.
  12858. */
  12859. A_UINT32 opaque_debug_fake_sleep_time;
  12860. /* opaque_debug_tx_frame_qos_ctrl:
  12861. * This word contains the following bitfields:
  12862. * - Tx frame control FC flags in ieee80211_defs.h, part of dcache peer.
  12863. * Use WMI_PEER_STATS_TX_FRAME_CTRL_SET,GET macros.
  12864. * - Tx QOS control FC flags in ieee80211_defs.h, part of dcache peer.
  12865. * Use WMI_PEER_STATS_TX_QOS_CTRL_SET,GET macros.
  12866. */
  12867. A_UINT32 opaque_debug_tx_frame_qos_ctrl;
  12868. /* opaque_debug_consec_fail_subfrm_sz:
  12869. * This word contains the following bitfields:
  12870. * - Consecutive tx fail count for the peer, part of dcache peer.
  12871. * Use WMI_PEER_STATS_CONSEC_FAIL_SET,GET macros.
  12872. * - subframe size configured for the peer, part of dcache peer.
  12873. * Use WMI_PEER_STATS_SUBFRAME_SIZE_SET,GET macros.
  12874. */
  12875. A_UINT32 opaque_debug_consec_fail_subfrm_sz;
  12876. /* opaque_debug_tx_fail_partial_aid:
  12877. * This word contains the following bitfields:
  12878. * - tx fail count for the peer, part of dcache peer.
  12879. * Use WMI_PEER_STATS_TX_FAIL_CNT_SET,GET macros.
  12880. * - Partial AID of the peer, part of dcache peer.
  12881. * Use WMI_PEER_STATS_TX_PARTIAL_AID_SET,GET macros.
  12882. */
  12883. A_UINT32 opaque_debug_tx_fail_partial_aid;
  12884. /* opaque_debug_max_nss:
  12885. * Part of dcache peer.
  12886. * This word contains the following bitfields:
  12887. * - Peer NSS value sent by host during WMI_PEER_ASSOC cmd.
  12888. * Use WMI_PEER_STATS_MAX_NSS_SET,GET macros.
  12889. */
  12890. A_UINT32 opaque_debug_max_nss;
  12891. /* opaque_debug_he_cap_info:
  12892. * Peer HE capabilities info sent during peer assoc cmd.
  12893. * Refer to WMI_HECAP_* macros in wmi_unified.h.
  12894. * Part of dcache peer.
  12895. */
  12896. A_UINT32 opaque_debug_he_cap_info;
  12897. /* opaque_debug_he_cap_info_ext:
  12898. * Peer extended HE capabilities info sent during peer assoc cmd.
  12899. * Refer to WMI_HECAP_* macros in wmi_unified.h.
  12900. * Part of dcache peer.
  12901. */
  12902. A_UINT32 opaque_debug_he_cap_info_ext;
  12903. /* opaque_debug_eht_cap_info:
  12904. * Peer EHT capabilities info.
  12905. * Refer to ieee80211_defs.h, part of dcache peer.
  12906. */
  12907. A_UINT32 opaque_debug_eht_cap_info;
  12908. /* TAC thread related fields in dcache peer refer wal_dcache_peer_t */
  12909. A_UINT32 opaque_debug_dcache_tac_flags;
  12910. /* RT thread related fields in dcache peer refer wal_dcache_peer_t */
  12911. A_UINT32 opaque_debug_dcache_rt_flags;
  12912. /* Supported RC modes for the peer refer enum RC_MODE, part of dcache */
  12913. A_UINT32 opaque_debug_rc_mode_supported_mask;
  12914. /* opaque_debug_wlan_peer_bitfield_mask:
  12915. * Part of wlan peer. This word contains the following bitfields:
  12916. * - Flag that denotes whether peer delete response is being sent
  12917. * to host or not.
  12918. * Use WMI_PEER_STATS_DEL_RESP_TO_HOST_SET,GET macros.
  12919. * - Flag that denotes if peer delete is in progress or not.
  12920. * Use WMI_PEER_STATS_DELETE_IN_PROGRESS_SET,GET macros.
  12921. * - Flag that denotes if peer migration is in progress or not.
  12922. * Use WMI_PEER_STATS_MIGRATION_IN_PROGRESS_SET,GET macros.
  12923. * - Flag that denotes peer's connection/authorized state.
  12924. * Refer WAL_PEER_STATE_* macros in wal_peer.h.
  12925. * Use WMI_PEER_STATS_CONN_STATE_SET,GET macros.
  12926. * - TX chain mask at 160MHz of the peer set during peer assoc command.
  12927. * Use WMI_PEER_STATS_TX_CHAIN_MASK_160_SET,GET macros.
  12928. * - Tx chain mask set during peer assoc command.
  12929. * Use WMI_PEER_STATS_TX_CHAIN_MASK_SET,GET macros.
  12930. * - copy of tx chain mask of peer saved for AP MIMO PS.
  12931. * Use WMI_PEER_STATS_ASSOC_CHAIN_MASK_SET,GET macros.
  12932. */
  12933. A_UINT32 opaque_debug_wlan_peer_bitfield_mask;
  12934. /* opaque_debug_wal_peer_bitfields:
  12935. * Part of wal_peer. This word contains the following bitfields:
  12936. * - Flag that denotes if QOS null is sent over WMI or not.
  12937. * Use WMI_PEER_STATS_QOS_NULL_OVER_WMI_SET,GET macros.
  12938. * - Flag that denotes whether peer assoc is received
  12939. * for the first time or not.
  12940. * Use WMI_PEER_STATS_NEW_ASSOC_SET,GET macros.
  12941. * - Flag that denotes whether TWT filter is enabled or not.
  12942. * Use WMI_PEER_STATS_TWT_FILT_FLAG_SET,GET macros.
  12943. * - Flag that denotes whether TWT is registered or not.
  12944. * Use WMI_PEER_STATS_TWT_REG_FLAG_SET,GET macros.
  12945. * - Flag that denotes whether WMM txQ uplink trigger is disabled or not.
  12946. * Use WMI_PEER_STATS_WMM_UL_TRIG_FLAG_SET,GET macros.
  12947. * - Number of active TIDs that do not have BA setup.
  12948. * Use WMI_PEER_STATS_ACTIVE_NOT_BA_TID_SET,GET macros.
  12949. */
  12950. A_UINT32 opaque_debug_wal_peer_bitfields;
  12951. /* flags in RT context refer wal_peer_ext_t */
  12952. A_UINT32 opaque_debug_wal_peer_rt_flags;
  12953. /* opaque_debug_ml_attributes:
  12954. * Part of wal_ml_peer. This word contains the following bitfields:
  12955. * - Num of MLO links
  12956. * Use WMI_PEER_STATS_NUM_LINKS_SET,GET macros.
  12957. * - ML peer id
  12958. * Use WMI_PEER_STATS_ML_PEER_ID_SET,GET macros.
  12959. * - Primary link ID
  12960. * Use WMI_PEER_STATS_PRI_LINK_ID_SET,GET macros.
  12961. * - Primary chip ID
  12962. * Use WMI_PEER_STATS_PRI_CHIP_ID_SET,GET macros.
  12963. * - Initial link count
  12964. * Use WMI_PEER_STATS_LINK_INIT_CNT_SET,GET macros.
  12965. * - Number of local links
  12966. * Use WMI_PEER_STATS_NUM_LOCAL_LINKS_SET,GET macros.
  12967. * - Bitmap of participating chips
  12968. * Use WMI_PEER_STATS_CHIPS_BITMAP_SET,GET macros.
  12969. */
  12970. A_UINT32 opaque_debug_ml_attributes;
  12971. /* wal peer MLO flags refer ml_peer_flags_t */
  12972. A_UINT32 opaque_debug_ml_flags;
  12973. /* opaque_debug_ml_link_info_flags:
  12974. * Part of link_info in wlan_peer_ml_info_t.
  12975. * This word contains the following bitfields:
  12976. * - flag denoting if MLO-link is valid or not
  12977. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_VALID_SET,GET macros.
  12978. * - flag denoting if MLO-link is active or not
  12979. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_ACTIVE_SET,GET macros.
  12980. * - flag denoting if MLO-link is primary or not
  12981. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_PRI_SET,GET macros.
  12982. * - flag denoting if MLO-link is assoc link or not
  12983. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_ASSOC_LINK_SET,GET macros.
  12984. * - Chip ID of the MLO-link
  12985. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_CHIP_ID_SET,GET macros.
  12986. * - IEEE link ID of the MLO-link
  12987. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_IEEE_LINK_SET,GET macros.
  12988. * - HW link ID of the MLO-link
  12989. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_HW_LINK_SET,GET macros.
  12990. * - logical link ID of the MLO-link
  12991. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_LOGICAL_LINK_SET,GET macros.
  12992. * - flag denoting if MLO-link is master link or not
  12993. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_MASTER_LINK_SET,GET macros.
  12994. * - flag denoting if MLO-link is anchor link or not
  12995. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_ANCHOR_LINK_SET,GET macros.
  12996. * - flag denoting if MLO-link is initialized or not
  12997. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_INIT_SET,GET macros.
  12998. */
  12999. A_UINT32 opaque_debug_ml_link_info_flags[WMI_MAX_MLO_LINKS];
  13000. /* opaque_debug_ml_link_info_id:
  13001. * Part of link_info in wlan_peer_ml_info_t.
  13002. * This word contains the following bitfields:
  13003. * - sw_peer_id corresponding to the link
  13004. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_PEER_ID_SET,GET macros.
  13005. * - vdev id corresponding to the link
  13006. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_VDEV_ID_SET,GET macros.
  13007. */
  13008. A_UINT32 opaque_debug_ml_link_info_id[WMI_MAX_MLO_LINKS];
  13009. /* MLO link info primary tid mask, part of link_info in wlan_peer_ml_info_t */
  13010. A_UINT32 opaque_debug_ml_link_info_pri_tidmask[WMI_MAX_MLO_LINKS];
  13011. /* opaque_debug_rc_node_params:
  13012. * Part of struct TX_PEER_PARAMS.
  13013. * This word contains the following bitfields:
  13014. * - NSS of the peer in 160MHZ
  13015. * Use WMI_PEER_STATS_NSS_160_SET,GET macros.
  13016. * - phymode of the peer - refer enum WLAN_PHY_MODE
  13017. * Use WMI_PEER_STATS_RC_PHYMODE_SET,GET macros.
  13018. * - legacy rate set for the peer
  13019. * Use WMI_PEER_STATS_LEGACY_RATE_SET,GET macros.
  13020. */
  13021. A_UINT32 opaque_debug_rc_node_params;
  13022. /* opaque_debug_rc_vht_mcs_set:
  13023. * Rate node param - negotiated VHT MCS map,
  13024. * part of struct TX_PEER_PARAMS
  13025. */
  13026. A_UINT32 opaque_debug_rc_vht_mcs_set;
  13027. /* opaque_debug_rc_node_params1:
  13028. * Part of link_info in wlan_peer_ml_info_t.
  13029. * This word contains the following bitfields:
  13030. * - Minimum data rate set for the peer in Mbps
  13031. * Use WMI_PEER_STATS_MIN_DATA_RATE_SET,GET macros.
  13032. * - Max VHT rate set for the peer
  13033. * Use WMI_PEER_STATS_VHT_MAX_RATE_SET,GET macros.
  13034. * - Max VHT streams set for the peer
  13035. * Use WMI_PEER_STATS_VHT_MAX_STREAMS_SET,GET macros.
  13036. * - BSS - Channel frequency set for the peer in MHz
  13037. * Use WMI_PEER_STATS_RC_CHAN_FREQ_SET,GET macros.
  13038. */
  13039. A_UINT32 opaque_debug_rc_node_params1;
  13040. /* opaque_debug_he_mcs_nss_set_tx,_rx:
  13041. * Rate node param - negotiated HE MCS tx+rx maps,
  13042. * part of struct TX_PEER_PARAMS.
  13043. * The lower 8 bits (bits 23:16) within the upper 16 bits indicate
  13044. * MCS 12/13 enablement for BW <= 80MHz; the upper 8 bits (bits 31:24)
  13045. * within the 16 bits indicate MCS 12/13 enablement for BW > 80MHz.
  13046. * The 16 bits for the index values are within the upper bits (bits 31:16)
  13047. * of a 32-bit word. and WMI_HE_MAP_COUNT is based on HE_MCS_MAP_CNT
  13048. * in ieee80211_defs.h.
  13049. */
  13050. A_UINT32 opaque_debug_he_mcs_nss_set_tx[WMI_HE_MAP_COUNT];
  13051. A_UINT32 opaque_debug_he_mcs_nss_set_rx[WMI_HE_MAP_COUNT];
  13052. /* opaque_debug_eht_mcs_nss_set_tx,_rx:
  13053. * Rate node param - negotiated EHT MCS tx+rx maps,
  13054. * part of struct TX_PEER_PARAMS.
  13055. * B0-B3 indicates max NSS that supports mcs 0-7
  13056. * B4-B7 indicates max NSS that supports mcs 8-9
  13057. * B8-B11 indicates max NSS that supports mcs 10-11
  13058. * B12-B15 indicates max NSS that supports mcs 12-13
  13059. * B16-B31 reserved.
  13060. * WMI_EHT_MAP_COUNT is based on EHT_MCS_MAP_CNT in ieee80211_defs.h.
  13061. */
  13062. A_UINT32 opaque_debug_eht_mcs_nss_set_tx[WMI_EHT_MAP_COUNT];
  13063. A_UINT32 opaque_debug_eht_mcs_nss_set_rx[WMI_EHT_MAP_COUNT];
  13064. /* opaque_debug_rc_user_start_mcs_rate:
  13065. * Rate node user_start_rate is MCS value set based on phymode.
  13066. * For possible values refer "INITIAL_" macros in ratectrl.h.
  13067. * Part of struct TX_PEER_PARAMS.
  13068. * This is the starting value of MCS that was used by rate control
  13069. * for the first transmissions to the peer, until PER information
  13070. * from the peer allowed the rate control algorithm to determine
  13071. * the suitable MCS.
  13072. */
  13073. A_UINT32 opaque_debug_rc_user_start_mcs_rate;
  13074. /*
  13075. * The following 4 opaque_debug_field variables are provided purely
  13076. * for debugging by technicians who have outside knowledge of what
  13077. * kind of values the target has placed into these fields.
  13078. * They are not to be interpreted by the host driver in any manner.
  13079. */
  13080. A_UINT32 opaque_debug_field_1;
  13081. A_UINT32 opaque_debug_field_2;
  13082. A_UINT32 opaque_debug_field_3;
  13083. A_UINT32 opaque_debug_field_4;
  13084. } wmi_ctrl_path_peer_stats_struct;
  13085. #define WMI_PEER_STATS_SM_MASK_SET(flag, val) \
  13086. WMI_SET_BITS(flag, 0, 16, val)
  13087. #define WMI_PEER_STATS_SM_MASK_GET(flag) \
  13088. WMI_GET_BITS(flag, 0, 16)
  13089. #define WMI_PEER_STATS_EOSP_RETRY_CNT_SET(flag, val) \
  13090. WMI_SET_BITS(flag, 16, 8, val)
  13091. #define WMI_PEER_STATS_EOSP_RETRY_CNT_GET(flag) \
  13092. WMI_GET_BITS(flag, 16, 8)
  13093. /* bits 31:24 unused/reserved */
  13094. #define WMI_PEER_STATS_ASSOCIATE_ID_SET(flag, val) \
  13095. WMI_SET_BITS(flag, 0, 16, val)
  13096. #define WMI_PEER_STATS_ASSOCIATE_ID_GET(flag) \
  13097. WMI_GET_BITS(flag, 0, 16)
  13098. #define WMI_PEER_STATS_USAGE_CNT_SET(flag, val) \
  13099. WMI_SET_BITS(flag, 16, 16, val)
  13100. #define WMI_PEER_STATS_USAGE_CNT_GET(flag) \
  13101. WMI_GET_BITS(flag, 16, 16)
  13102. #define WMI_PEER_STATS_DEF_CAPS_SET(flag, val) \
  13103. WMI_SET_BITS(flag, 0, 16, val)
  13104. #define WMI_PEER_STATS_DEF_CAPS_GET(flag) \
  13105. WMI_GET_BITS(flag, 0, 16)
  13106. #define WMI_PEER_STATS_HT_CAPS_SET(flag, val) \
  13107. WMI_SET_BITS(flag, 16, 16, val)
  13108. #define WMI_PEER_STATS_HT_CAPS_GET(flag) \
  13109. WMI_GET_BITS(flag, 16, 16)
  13110. #define WMI_PEER_STATS_INACT_GEN_SET(flag, val) \
  13111. WMI_SET_BITS(flag, 0, 16, val)
  13112. #define WMI_PEER_STATS_INACT_GEN_GET(flag) \
  13113. WMI_GET_BITS(flag, 0, 16)
  13114. #define WMI_PEER_STATS_DATA_INACT_GEN_SET(flag, val) \
  13115. WMI_SET_BITS(flag, 16, 16, val)
  13116. #define WMI_PEER_STATS_DATA_INACT_GEN_GET(flag) \
  13117. WMI_GET_BITS(flag, 16, 16)
  13118. #define WMI_PEER_STATS_PEER_TYPE_SET(flag, val) \
  13119. WMI_SET_BITS(flag, 0, 8, val)
  13120. #define WMI_PEER_STATS_PEER_TYPE_GET(flag) \
  13121. WMI_GET_BITS(flag, 0, 8)
  13122. #define WMI_PEER_STATS_MAC_ID_SET(flag, val) \
  13123. WMI_SET_BITS(flag, 8, 8, val)
  13124. #define WMI_PEER_STATS_MAC_ID_GET(flag) \
  13125. WMI_GET_BITS(flag, 8, 8)
  13126. #define WMI_PEER_STATS_PEER_ID_SET(flag, val) \
  13127. WMI_SET_BITS(flag, 16, 16, val)
  13128. #define WMI_PEER_STATS_PEER_ID_GET(flag) \
  13129. WMI_GET_BITS(flag, 16, 16)
  13130. #define WMI_PEER_STATS_BSS_NON_DATA_RC_SET(flag, val) \
  13131. WMI_SET_BITS(flag, 0, 8, val)
  13132. #define WMI_PEER_STATS_BSS_NON_DATA_RC_GET(flag) \
  13133. WMI_GET_BITS(flag, 0, 8)
  13134. #define WMI_PEER_STATS_CH_WIDTH_SET(flag, val) \
  13135. WMI_SET_BITS(flag, 8, 8, val)
  13136. #define WMI_PEER_STATS_CH_WIDTH_GET(flag) \
  13137. WMI_GET_BITS(flag, 8, 8)
  13138. #define WMI_PEER_STATS_RX_MCS_SET(flag, val) \
  13139. WMI_SET_BITS(flag, 16, 8, val)
  13140. #define WMI_PEER_STATS_RX_MCS_GET(flag) \
  13141. WMI_GET_BITS(flag, 16, 8)
  13142. /* bits 31:24 unused/reserved */
  13143. #define WMI_PEER_STATS_DELETE_ALL_FLAG_SET(flag, val) \
  13144. WMI_SET_BITS(flag, 0, 8, val)
  13145. #define WMI_PEER_STATS_DELETE_ALL_FLAG_GET(flag) \
  13146. WMI_GET_BITS(flag, 0, 8)
  13147. #define WMI_PEER_STATS_RC4_REKEY_CNT_SET(flag, val) \
  13148. WMI_SET_BITS(flag, 8, 8, val)
  13149. #define WMI_PEER_STATS_RC4_REKEY_CNT_GET(flag) \
  13150. WMI_GET_BITS(flag, 8, 8)
  13151. /* bits 31:16 unused/reserved */
  13152. #define WMI_PEER_STATS_TWT_AP_FLAGS_SET(flag, val) \
  13153. WMI_SET_BITS(flag, 0, 16, val)
  13154. #define WMI_PEER_STATS_TWT_AP_FLAGS_GET(flag) \
  13155. WMI_GET_BITS(flag, 0, 16)
  13156. #define WMI_PEER_STATS_TWT_AP_SESSION_CNT_SET(flag, val) \
  13157. WMI_SET_BITS(flag, 16, 8, val)
  13158. #define WMI_PEER_STATS_TWT_AP_SESSION_CNT_GET(flag) \
  13159. WMI_GET_BITS(flag, 16, 8)
  13160. #define WMI_PEER_STATS_TWT_FRM_RETRY_SET(flag, val) \
  13161. WMI_SET_BITS(flag, 24, 8, val)
  13162. #define WMI_PEER_STATS_TWT_FRM_RETRY_GET(flag) \
  13163. WMI_GET_BITS(flag, 24, 8)
  13164. #define WMI_PEER_STATS_TWT_UL_TRIGGER_SET(flag, val) \
  13165. WMI_SET_BITS(flag, 0, 8, val)
  13166. #define WMI_PEER_STATS_TWT_UL_TRIGGER_GET(flag) \
  13167. WMI_GET_BITS(flag, 0, 8)
  13168. #define WMI_PEER_STATS_TWT_BC_SESSION_SET(flag, val) \
  13169. WMI_SET_BITS(flag, 8, 8, val)
  13170. #define WMI_PEER_STATS_TWT_BC_SESSION_GET(flag) \
  13171. WMI_GET_BITS(flag, 8, 8)
  13172. #define WMI_PEER_STATS_TWT_PENDING_REPORT_SET(flag, val) \
  13173. WMI_SET_BITS(flag, 16, 8, val)
  13174. #define WMI_PEER_STATS_TWT_PENDING_REPORT_GET(flag) \
  13175. WMI_GET_BITS(flag, 16, 8)
  13176. #define WMI_PEER_STATS_TWT_FLOW_IDS_SET(flag, val) \
  13177. WMI_SET_BITS(flag, 24, 8, val)
  13178. #define WMI_PEER_STATS_TWT_FLOW_IDS_GET(flag) \
  13179. WMI_GET_BITS(flag, 24, 8)
  13180. #define WMI_PEER_STATS_ADDBBA_TX_MODE_SET(flag, val) \
  13181. WMI_SET_BITS(flag, 0, 16, val)
  13182. #define WMI_PEER_STATS_ADDBBA_TX_MODE_GET(flag) \
  13183. WMI_GET_BITS(flag, 0, 16)
  13184. #define WMI_PEER_STATS_ADDBBA_RESP_MODE_SET(flag, val) \
  13185. WMI_SET_BITS(flag, 16, 16, val)
  13186. #define WMI_PEER_STATS_ADDBBA_RESP_MODE_GET(flag) \
  13187. WMI_GET_BITS(flag, 16, 16)
  13188. #define WMI_PEER_STATS_MAX_AMSDU_SIZE_SET(flag, val) \
  13189. WMI_SET_BITS(flag, 0, 16, val)
  13190. #define WMI_PEER_STATS_MAX_AMSDU_SIZE_GET(flag) \
  13191. WMI_GET_BITS(flag, 0, 16)
  13192. /* bits 31:16 unused/reserved */
  13193. #define WMI_PEER_STATS_TX_FRAME_CTRL_SET(flag, val) \
  13194. WMI_SET_BITS(flag, 0, 16, val)
  13195. #define WMI_PEER_STATS_TX_FRAME_CTRL_GET(flag) \
  13196. WMI_GET_BITS(flag, 0, 16)
  13197. #define WMI_PEER_STATS_TX_QOS_CTRL_SET(flag, val) \
  13198. WMI_SET_BITS(flag, 16, 16, val)
  13199. #define WMI_PEER_STATS_TX_QOS_CTRL_GET(flag) \
  13200. WMI_GET_BITS(flag, 16, 16)
  13201. #define WMI_PEER_STATS_CONSEC_FAIL_SET(flag, val) \
  13202. WMI_SET_BITS(flag, 0, 16, val)
  13203. #define WMI_PEER_STATS_CONSEC_FAIL_GET(flag) \
  13204. WMI_GET_BITS(flag, 0, 16)
  13205. #define WMI_PEER_STATS_SUBFRAME_SIZE_SET(flag, val) \
  13206. WMI_SET_BITS(flag, 16, 16, val)
  13207. #define WMI_PEER_STATS_SUBFRAME_SIZE_GET(flag) \
  13208. WMI_GET_BITS(flag, 16, 16)
  13209. #define WMI_PEER_STATS_TX_FAIL_CNT_SET(flag, val) \
  13210. WMI_SET_BITS(flag, 0, 16, val)
  13211. #define WMI_PEER_STATS_TX_FAIL_CNT_GET(flag) \
  13212. WMI_GET_BITS(flag, 0, 16)
  13213. #define WMI_PEER_STATS_TX_PARTIAL_AID_SET(flag, val) \
  13214. WMI_SET_BITS(flag, 16, 16, val)
  13215. #define WMI_PEER_STATS_TX_PARTIAL_AID_GET(flag) \
  13216. WMI_GET_BITS(flag, 16, 16)
  13217. #define WMI_PEER_STATS_MAX_NSS_SET(flag, val) \
  13218. WMI_SET_BITS(flag, 0, 8, val)
  13219. #define WMI_PEER_STATS_MAX_NSS_GET(flag) \
  13220. WMI_GET_BITS(flag, 0, 8)
  13221. /* bits 31:8 unused/reserved */
  13222. #define WMI_PEER_STATS_DEL_RESP_TO_HOST_SET(flag, val) \
  13223. WMI_SET_BITS(flag, 0, 1, val)
  13224. #define WMI_PEER_STATS_DEL_RESP_TO_HOST_GET(flag) \
  13225. WMI_GET_BITS(flag, 0, 1)
  13226. #define WMI_PEER_STATS_DELETE_IN_PROGRESS_SET(flag, val) \
  13227. WMI_SET_BITS(flag, 1, 1, val)
  13228. #define WMI_PEER_STATS_DELETE_IN_PROGRESS_GET(flag) \
  13229. WMI_GET_BITS(flag, 1, 1)
  13230. #define WMI_PEER_STATS_MIGRATION_IN_PROGRESS_SET(flag, val) \
  13231. WMI_SET_BITS(flag, 2, 1, val)
  13232. #define WMI_PEER_STATS_MIGRATION_IN_PROGRESS_GET(flag) \
  13233. WMI_GET_BITS(flag, 2, 1)
  13234. #define WMI_PEER_STATS_CONN_STATE_SET(flag, val) \
  13235. WMI_SET_BITS(flag, 3, 4, val)
  13236. #define WMI_PEER_STATS_CONN_STATE_GET(flag) \
  13237. WMI_GET_BITS(flag, 3, 4)
  13238. #define WMI_PEER_STATS_TX_CHAIN_MASK_160_SET(flag, val) \
  13239. WMI_SET_BITS(flag, 8, 8, val)
  13240. #define WMI_PEER_STATS_TX_CHAIN_MASK_160_GET(flag) \
  13241. WMI_GET_BITS(flag, 8, 8)
  13242. #define WMI_PEER_STATS_TX_CHAIN_MASK_SET(flag, val) \
  13243. WMI_SET_BITS(flag, 16, 8, val)
  13244. #define WMI_PEER_STATS_TX_CHAIN_MASK_GET(flag) \
  13245. WMI_GET_BITS(flag, 16, 8)
  13246. #define WMI_PEER_STATS_ASSOC_CHAIN_MASK_SET(flag, val) \
  13247. WMI_SET_BITS(flag, 24, 8, val)
  13248. #define WMI_PEER_STATS_ASSOC_CHAIN_MASK_GET(flag) \
  13249. WMI_GET_BITS(flag, 24, 8)
  13250. #define WMI_PEER_STATS_QOS_NULL_OVER_WMI_SET(flag, val) \
  13251. WMI_SET_BITS(flag, 0, 1, val)
  13252. #define WMI_PEER_STATS_QOS_NULL_OVER_WMI_GET(flag) \
  13253. WMI_GET_BITS(flag, 0, 1)
  13254. #define WMI_PEER_STATS_NEW_ASSOC_SET(flag, val) \
  13255. WMI_SET_BITS(flag, 1, 1, val)
  13256. #define WMI_PEER_STATS_NEW_ASSOC_GET(flag) \
  13257. WMI_GET_BITS(flag, 1, 1)
  13258. #define WMI_PEER_STATS_TWT_FILT_FLAG_SET(flag, val) \
  13259. WMI_SET_BITS(flag, 2, 1, val)
  13260. #define WMI_PEER_STATS_TWT_FILT_FLAG_GET(flag) \
  13261. WMI_GET_BITS(flag, 2, 1)
  13262. #define WMI_PEER_STATS_TWT_REG_FLAG_SET(flag, val) \
  13263. WMI_SET_BITS(flag, 3, 1, val)
  13264. #define WMI_PEER_STATS_TWT_REG_FLAG_GET(flag) \
  13265. WMI_GET_BITS(flag, 3, 1)
  13266. #define WMI_PEER_STATS_WMM_UL_TRIG_FLAG_SET(flag, val) \
  13267. WMI_SET_BITS(flag, 4, 1, val)
  13268. #define WMI_PEER_STATS_WMM_UL_TRIG_FLAG_GET(flag) \
  13269. WMI_GET_BITS(flag, 4, 1)
  13270. #define WMI_PEER_STATS_ACTIVE_NOT_BA_TID_SET(flag, val) \
  13271. WMI_SET_BITS(flag, 5, 4, val)
  13272. #define WMI_PEER_STATS_ACTIVE_NOT_BA_TID_GET(flag) \
  13273. WMI_GET_BITS(flag, 5, 4)
  13274. /* bits 31:10 unused/reserved */
  13275. #define WMI_PEER_STATS_NUM_LINKS_SET(flag, val) \
  13276. WMI_SET_BITS(flag, 0, 2, val)
  13277. #define WMI_PEER_STATS_NUM_LINKS_GET(flag) \
  13278. WMI_GET_BITS(flag, 0, 2)
  13279. #define WMI_PEER_STATS_ML_PEER_ID_SET(flag, val) \
  13280. WMI_SET_BITS(flag, 2, 12, val)
  13281. #define WMI_PEER_STATS_ML_PEER_ID_GET(flag) \
  13282. WMI_GET_BITS(flag, 2, 12)
  13283. #define WMI_PEER_STATS_PRI_LINK_ID_SET(flag, val) \
  13284. WMI_SET_BITS(flag, 14, 3, val)
  13285. #define WMI_PEER_STATS_PRI_LINK_ID_GET(flag) \
  13286. WMI_GET_BITS(flag, 14, 3)
  13287. #define WMI_PEER_STATS_PRI_CHIP_ID_SET(flag, val) \
  13288. WMI_SET_BITS(flag, 17, 2, val)
  13289. #define WMI_PEER_STATS_PRI_CHIP_ID_GET(flag) \
  13290. WMI_GET_BITS(flag, 17, 2)
  13291. #define WMI_PEER_STATS_LINK_INIT_CNT_SET(flag, val) \
  13292. WMI_SET_BITS(flag, 19, 3, val)
  13293. #define WMI_PEER_STATS_LINK_INIT_CNT_GET(flag) \
  13294. WMI_GET_BITS(flag, 19, 3)
  13295. #define WMI_PEER_STATS_NUM_LOCAL_LINKS_SET(flag, val) \
  13296. WMI_SET_BITS(flag, 22, 2, val)
  13297. #define WMI_PEER_STATS_NUM_LOCAL_LINKS_GET(flag) \
  13298. WMI_GET_BITS(flag, 22, 2)
  13299. #define WMI_PEER_STATS_CHIPS_BITMAP_SET(flag, val) \
  13300. WMI_SET_BITS(flag, 24, 8, val)
  13301. #define WMI_PEER_STATS_CHIPS_BITMAP_GET(flag) \
  13302. WMI_GET_BITS(flag, 24, 8)
  13303. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_VALID_SET(flag, val) \
  13304. WMI_SET_BITS(flag, 0, 1, val)
  13305. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_VALID_GET(flag) \
  13306. WMI_GET_BITS(flag, 0, 1)
  13307. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ACTIVE_SET(flag, val) \
  13308. WMI_SET_BITS(flag, 1, 1, val)
  13309. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ACTIVE_GET(flag) \
  13310. WMI_GET_BITS(flag, 1, 1)
  13311. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_PRI_SET(flag, val) \
  13312. WMI_SET_BITS(flag, 2, 1, val)
  13313. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_PRI_GET(flag) \
  13314. WMI_GET_BITS(flag, 2, 1)
  13315. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ASSOC_LINK_SET(flag, val) \
  13316. WMI_SET_BITS(flag, 3, 1, val)
  13317. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ASSOC_LINK_GET(flag) \
  13318. WMI_GET_BITS(flag, 3, 1)
  13319. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_CHIP_ID_SET(flag, val) \
  13320. WMI_SET_BITS(flag, 4, 3, val)
  13321. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_CHIP_ID_GET(flag) \
  13322. WMI_GET_BITS(flag, 4, 3)
  13323. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_IEEE_LINK_SET(flag, val) \
  13324. WMI_SET_BITS(flag, 7, 8, val)
  13325. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_IEEE_LINK_GET(flag) \
  13326. WMI_GET_BITS(flag, 7, 8)
  13327. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_HW_LINK_SET(flag, val) \
  13328. WMI_SET_BITS(flag, 15, 3, val)
  13329. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_HW_LINK_GET(flag) \
  13330. WMI_GET_BITS(flag, 15, 3)
  13331. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_LOGICAL_LINK_SET(flag, val) \
  13332. WMI_SET_BITS(flag, 18, 2, val)
  13333. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_LOGICAL_LINK_GET(flag) \
  13334. WMI_GET_BITS(flag, 18, 2)
  13335. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_MASTER_LINK_SET(flag, val) \
  13336. WMI_SET_BITS(flag, 20, 1, val)
  13337. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_MASTER_LINK_GET(flag) \
  13338. WMI_GET_BITS(flag, 20, 1)
  13339. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ANCHOR_LINK_SET(flag, val) \
  13340. WMI_SET_BITS(flag, 21, 1, val)
  13341. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ANCHOR_LINK_GET(flag) \
  13342. WMI_GET_BITS(flag, 21, 1)
  13343. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_INIT_SET(flag, val) \
  13344. WMI_SET_BITS(flag, 22, 1, val)
  13345. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_INIT_GET(flag) \
  13346. WMI_GET_BITS(flag, 22, 1)
  13347. /* bits 31:23 unused/reserved */
  13348. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_PEER_ID_SET(flag, val) \
  13349. WMI_SET_BITS(flag, 0, 16, val)
  13350. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_PEER_ID_GET(flag) \
  13351. WMI_GET_BITS(flag, 0, 16)
  13352. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_VDEV_ID_SET(flag, val) \
  13353. WMI_SET_BITS(flag, 16, 8, val)
  13354. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_VDEV_ID_GET(flag) \
  13355. WMI_GET_BITS(flag, 16, 8)
  13356. /* bits 31:24 unused/reserved */
  13357. #define WMI_PEER_STATS_NSS_160_SET(flag, val) \
  13358. WMI_SET_BITS(flag, 0, 8, val)
  13359. #define WMI_PEER_STATS_NSS_160_GET(flag) \
  13360. WMI_GET_BITS(flag, 0, 8)
  13361. #define WMI_PEER_STATS_RC_PHYMODE_SET(flag, val) \
  13362. WMI_SET_BITS(flag, 8, 8, val)
  13363. #define WMI_PEER_STATS_RC_PHYMODE_GET(flag) \
  13364. WMI_GET_BITS(flag, 8, 8)
  13365. #define WMI_PEER_STATS_LEGACY_RATE_SET(flag, val) \
  13366. WMI_SET_BITS(flag, 16, 16, val)
  13367. #define WMI_PEER_STATS_LEGACY_RATE_GET(flag) \
  13368. WMI_GET_BITS(flag, 16, 16)
  13369. #define WMI_PEER_STATS_MIN_DATA_RATE_SET(flag, val) \
  13370. WMI_SET_BITS(flag, 0, 8, val)
  13371. #define WMI_PEER_STATS_MIN_DATA_RATE_GET(flag) \
  13372. WMI_GET_BITS(flag, 0, 8)
  13373. #define WMI_PEER_STATS_VHT_MAX_RATE_SET(flag, val) \
  13374. WMI_SET_BITS(flag, 8, 4, val)
  13375. #define WMI_PEER_STATS_VHT_MAX_RATE_GET(flag) \
  13376. WMI_GET_BITS(flag, 8, 4)
  13377. #define WMI_PEER_STATS_VHT_MAX_STREAMS_SET(flag, val) \
  13378. WMI_SET_BITS(flag, 12, 4, val)
  13379. #define WMI_PEER_STATS_VHT_MAX_STREAMS_GET(flag) \
  13380. WMI_GET_BITS(flag, 12, 4)
  13381. #define WMI_PEER_STATS_RC_CHAN_FREQ_SET(flag, val) \
  13382. WMI_SET_BITS(flag, 16, 16, val)
  13383. #define WMI_PEER_STATS_RC_CHAN_FREQ_GET(flag) \
  13384. WMI_GET_BITS(flag, 16, 16)
  13385. typedef struct {
  13386. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_cfr_stats_struct */
  13387. A_UINT32 tlv_header;
  13388. /* blanking_mode:
  13389. * blanking configuration. Refer to WMI_SCAN_BLANKING_MODE
  13390. */
  13391. A_UINT32 blanking_mode;
  13392. /* is_blanking_enabled:
  13393. * current blanking status. 0 = disabled, 1 = enabled
  13394. */
  13395. A_UINT32 is_blanking_enabled;
  13396. A_UINT32 gate_2g_enabled; /* 2.4GHZ gate pin state */
  13397. A_UINT32 gate_5g_enabled; /* 5GHz gate pin state */
  13398. A_UINT32 gate_6g_enabled; /* 6GHz gate pin state */
  13399. A_UINT32 blanking_count; /* scan radio blanking count */
  13400. A_UINT32 blanking_duration; /* scan radio blanking duration in us */
  13401. } wmi_ctrl_path_blanking_stats_struct;
  13402. typedef struct {
  13403. /** TLV tag and len; tag equals
  13404. * WMITLV_TAG_STRUC_wmi_ctrl_path_stats_event_fixed_param */
  13405. A_UINT32 tlv_header;
  13406. /** Request ID */
  13407. A_UINT32 request_id;
  13408. /** more flag
  13409. * 1 - More events sent after this event.
  13410. * 0 - no more events after this event.
  13411. */
  13412. A_UINT32 more;
  13413. /** status:
  13414. * The status field's value shows whether the WMI_REQUEST_CTRL_PATH_STATS
  13415. * request was completed successfully,
  13416. * 0 - status is success
  13417. * 1 - status is failure
  13418. */
  13419. A_UINT32 status;
  13420. /** This TLV is (optionally) followed by TLV arrays containing
  13421. * different types of stats:
  13422. * 1. wmi_ctrl_path_pdev_stats_struct ctrl_path_pdev_stats[];
  13423. * This TLV array contains zero or more pdev stats instances.
  13424. * 2. wmi_vdev_extd_stats vdev_extd_stats[];
  13425. * This TLV array contains zero or more vdev_extd_stats instances.
  13426. */
  13427. } wmi_ctrl_path_stats_event_fixed_param;
  13428. typedef struct {
  13429. /** TLV tag and len; tag equals
  13430. * WMITLV_TAG_STRUC_wmi_halphy_ctrl_path_stats_event_fixed_param
  13431. */
  13432. A_UINT32 tlv_header;
  13433. /** Process id requested */
  13434. A_UINT32 request_id;
  13435. /* end_of_event - single event or Multiple Event */
  13436. A_UINT32 end_of_event;
  13437. /*
  13438. * event_count - If Multiple Events are send, this is to identify
  13439. * particular event out of Multiple Events that are send to host
  13440. */
  13441. A_UINT32 event_count;
  13442. /** Pdev id requested */
  13443. A_UINT32 pdev_id;
  13444. } wmi_halphy_ctrl_path_stats_event_fixed_param;
  13445. typedef struct {
  13446. /** TLV tag and len; tag equals
  13447. * WMITLV_TAG_STRUC_wmi_radio_chan_stats */
  13448. A_UINT32 tlv_header;
  13449. /** primary channel freq of the channel whose stats is sent */
  13450. A_UINT32 chan_mhz;
  13451. /** accumulation of time the radio is tuned to this channel,
  13452. * in units of microseconds */
  13453. A_UINT32 on_chan_us;
  13454. /** accumulation of the TX PPDU duration over the measurement period,
  13455. * in units of microseconds */
  13456. A_UINT32 tx_duration_us;
  13457. /** accumulation of the RX PPDU duration over the measurement period,
  13458. * in units of microseconds */
  13459. A_UINT32 rx_duration_us;
  13460. /** ratio of channel busy time to on_chan_us, in units of percent */
  13461. A_UINT32 chan_busy_ratio;
  13462. /** ratio of on_chan_us to the measurement period, in units of percent */
  13463. A_UINT32 on_chan_ratio;
  13464. /** measurement period, in units of microseconds */
  13465. A_UINT32 measurement_period_us;
  13466. /** MPDUs transmitted on this channel */
  13467. A_UINT32 tx_mpdus;
  13468. /** MSDUs transmitted on this channel */
  13469. A_UINT32 tx_msdus;
  13470. /** MPDUS successfully received on this channel */
  13471. A_UINT32 rx_succ_mpdus;
  13472. /** Failed MPDUs (CRC failures) received on this channel */
  13473. A_UINT32 rx_fail_mpdus;
  13474. } wmi_radio_chan_stats;
  13475. typedef struct {
  13476. /** TLV tag and len; tag equals
  13477. * WMITLV_TAG_STRUC_wmi_radio_chan_stats_event_fixed_param */
  13478. A_UINT32 tlv_header;
  13479. /** number of channel stats in radio_chan_stats[] */
  13480. A_UINT32 num_chans;
  13481. /* This TLV is followed by another TLV of array of structs
  13482. * wmi_radio_chan_stats radio_chan_stats[];
  13483. */
  13484. } wmi_radio_chan_stats_event_fixed_param;
  13485. /**
  13486. * PDEV statistics
  13487. *
  13488. * This struct incorporates the wlan_dbg_stats struct, which is
  13489. * conditionally defined, based on the AR900B flag.
  13490. * The below _v1 struct variant is the unconditional definition
  13491. * that matches what would be conditionally defined by builds that
  13492. * don't use the AR900B flag. The _v2 struct variant is the
  13493. * unconditional definition that matches what would be conditionally
  13494. * defined by builds that use the AR900B flag.
  13495. * The _v2 struct def can be used within host or target builds
  13496. * that don't use the AR900B flag, but needs to interoperate with a
  13497. * target or host build that does use the AR900B flag.
  13498. * Similarly, the _v1 struct def can be used by a host or target build
  13499. * that does use the AR900B flag, but needs to interoperate with a
  13500. * target or host build that doesn't use the AR900B flag.
  13501. *
  13502. * For backwards compatibility, wmi_pdev_stats is still (conditionally)
  13503. * defined, as an alias for either the _v1 or _v2 variant.
  13504. */
  13505. typedef struct {
  13506. /** Channel noise floor */
  13507. A_INT32 chan_nf;
  13508. /** TX frame count */
  13509. A_UINT32 tx_frame_count;
  13510. /** RX frame count */
  13511. A_UINT32 rx_frame_count;
  13512. /** rx clear count */
  13513. A_UINT32 rx_clear_count;
  13514. /** cycle count */
  13515. A_UINT32 cycle_count;
  13516. /** Phy error count */
  13517. A_UINT32 phy_err_count;
  13518. /** Channel Tx Power */
  13519. A_UINT32 chan_tx_pwr;
  13520. /** WAL dbg stats */
  13521. struct wlan_dbg_stats_v1 pdev_stats;
  13522. } wmi_pdev_stats_v1;
  13523. typedef struct {
  13524. /** Channel noise floor */
  13525. A_INT32 chan_nf;
  13526. /** TX frame count */
  13527. A_UINT32 tx_frame_count;
  13528. /** RX frame count */
  13529. A_UINT32 rx_frame_count;
  13530. /** rx clear count */
  13531. A_UINT32 rx_clear_count;
  13532. /** cycle count */
  13533. A_UINT32 cycle_count;
  13534. /** Phy error count */
  13535. A_UINT32 phy_err_count;
  13536. /** Channel Tx Power */
  13537. A_UINT32 chan_tx_pwr;
  13538. /** WAL dbg stats */
  13539. struct wlan_dbg_stats_v2 pdev_stats;
  13540. } wmi_pdev_stats_v2;
  13541. #if defined(AR900B)
  13542. #define wmi_pdev_stats wmi_pdev_stats_v2
  13543. #else
  13544. #define wmi_pdev_stats wmi_pdev_stats_v1
  13545. #endif
  13546. /**
  13547. * pdev extension statistics
  13548. */
  13549. typedef struct {
  13550. A_UINT32 tlv_header;
  13551. /* pdev id */
  13552. A_UINT32 pdev_id;
  13553. /** my_rx_count
  13554. * What portion of time, as measured by the MAC HW clock was occupied
  13555. * by receiving PPDUs addressed to one of the vdevs within this pdev.
  13556. */
  13557. A_UINT32 my_rx_count;
  13558. /** rx_matched_11ax_msdu_cnt
  13559. * number of Rx 11ax MSDUs with matching BSS color counter
  13560. * updated at EOP (end of packet)
  13561. */
  13562. A_UINT32 rx_matched_11ax_msdu_cnt;
  13563. /** rx_other_11ax_msdu_cnt
  13564. * number of Rx 11ax MSDUs with other BSS color counter updated at EOP
  13565. * (end of packet)
  13566. */
  13567. A_UINT32 rx_other_11ax_msdu_cnt;
  13568. } wmi_pdev_extd_stats;
  13569. /**
  13570. * pdev telemetry statistics
  13571. */
  13572. typedef struct{
  13573. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_telemetry_stats */
  13574. A_UINT32 pdev_id;
  13575. /*
  13576. * Average channel latency per AC, units in micro seconds.
  13577. * avg_chan_lat_per_ac[0] : AC_VO
  13578. * avg_chan_lat_per_ac[1] : AC_VI
  13579. * avg_chan_lat_per_ac[2] : AC_BE
  13580. * avg_chan_lat_per_ac[3] : AC_BK
  13581. */
  13582. A_UINT32 avg_chan_lat_per_ac[WMI_AC_MAX];
  13583. /*
  13584. * Percentage of air time available for each AC, units in percentage.
  13585. * BIT[0-7] : AC_BE
  13586. * BIT[8-15] : AC_BK
  13587. * BIT[16-23] : AC_VI
  13588. * BIT[24-31] : AC_VO
  13589. * Please refer to WMI_ESP_ESTIMATE_GET_* and WMI_ESP_ESTIMATE_SET_* macros
  13590. * to retrieve values for each access category in estimated_air_time_per_ac.
  13591. */
  13592. A_UINT32 estimated_air_time_per_ac;
  13593. } wmi_pdev_telemetry_stats;
  13594. /**
  13595. * VDEV statistics
  13596. * @todo
  13597. * add all VDEV stats here
  13598. */
  13599. typedef struct {
  13600. A_INT32 bcn_snr;
  13601. A_INT32 dat_snr;
  13602. } wmi_snr_info;
  13603. typedef struct {
  13604. /** unique id identifying the VDEV, generated by the caller */
  13605. A_UINT32 vdev_id;
  13606. wmi_snr_info vdev_snr;
  13607. 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) */
  13608. A_UINT32 rx_frm_cnt; /* Total number of packets that were successfully received (after appropriate filter rules including multi-cast, broadcast) */
  13609. A_UINT32 multiple_retry_cnt[WLAN_MAX_AC]; /* The number of MSDU packets and MMPDU frames per AC
  13610. that the 802.11 station successfully transmitted after more than one retransmission attempt */
  13611. A_UINT32 fail_cnt[WLAN_MAX_AC]; /* Total number packets(per AC) failed to transmit */
  13612. A_UINT32 rts_fail_cnt; /* Total number of RTS/CTS sequence failures for transmission of a packet */
  13613. A_UINT32 rts_succ_cnt; /* Total number of RTS/CTS sequence success for transmission of a packet */
  13614. A_UINT32 rx_err_cnt; /* The receive error count. HAL will provide the RxP FCS error global */
  13615. A_UINT32 rx_discard_cnt; /* The sum of the receive error count and dropped-receive-buffer error count. (FCS error) */
  13616. A_UINT32 ack_fail_cnt; /* Total number packets failed transmit because of no ACK from the remote entity */
  13617. A_UINT32 tx_rate_history[MAX_TX_RATE_VALUES];/*History of last ten transmit rate, in units of 500 kbit/sec */
  13618. A_UINT32 bcn_rssi_history[MAX_RSSI_VALUES];/*History of last ten Beacon RSSI of the connected Bss */
  13619. } wmi_vdev_stats;
  13620. /*
  13621. * vdev ext stats with additional bcn stats
  13622. * (Due to backward compatibility requirements, these new stats fields cannot be
  13623. * added inside wmi_vdev_stats.)
  13624. */
  13625. typedef struct {
  13626. A_UINT32 vdev_id;
  13627. A_UINT32 tx_bcn_succ_cnt; /* Total number of beacon frame transmitted successfully */
  13628. A_UINT32 tx_bcn_outage_cnt; /* Total number of failed beacons */
  13629. } wmi_bcn_stats;
  13630. #define WMI_VDEV_STATS_FLAGS_LINK_ACTIVE_FLAG_IS_VALID_BIT 0
  13631. #define WMI_VDEV_STATS_FLAGS_LINK_ACTIVE_FLAG_IS_VALID_MASK \
  13632. (1 << WMI_VDEV_STATS_FLAGS_LINK_ACTIVE_FLAG_IS_VALID_BIT)
  13633. #define WMI_VDEV_STATS_FLAGS_IS_LINK_ACTIVE_BIT 1
  13634. #define WMI_VDEV_STATS_FLAGS_IS_LINK_ACTIVE_MASK \
  13635. (1 << WMI_VDEV_STATS_FLAGS_IS_LINK_ACTIVE_BIT)
  13636. /**
  13637. * vdev extension statistics
  13638. */
  13639. typedef struct {
  13640. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_vdev_extd_stats */
  13641. A_UINT32 tlv_header;
  13642. /* vdev id */
  13643. A_UINT32 vdev_id;
  13644. /* Total number of Fils Discovery frames transmitted successfully */
  13645. A_UINT32 fd_succ_cnt;
  13646. /* Total number of Fils Discovery frames failed */
  13647. A_UINT32 fd_fail_cnt;
  13648. /* Total number of unsolicited probe response frames transmitted successfully */
  13649. A_UINT32 unsolicited_prb_succ_cnt;
  13650. /* Total number of unsolicited probe response frames failed */
  13651. A_UINT32 unsolicited_prb_fail_cnt;
  13652. /* vdev info flags:
  13653. * bit 0: WMI_VDEV_STATS_FLAGS_LINK_ACTIVE_FLAG_IS_VALID,
  13654. * 0: the "is link active" flag is not valid
  13655. * 1: the "is link active" flag is valid
  13656. * bit 1: WMI_VDEV_STATS_FLAGS_IS_LINK_ACTIVE,
  13657. * 1:link_active; 0:link_inactive
  13658. * Refer to WMI_VDEV_STATS_FLAGS_ defs.
  13659. */
  13660. A_UINT32 flags;
  13661. A_INT32 vdev_tx_power; /* dBm units */
  13662. } wmi_vdev_extd_stats;
  13663. /**
  13664. * Vdev debug stats to be used for wmi control path stats.
  13665. * This is an extension to vdev_extd_stats,
  13666. * vdev_extd_stats display is part of apstats.
  13667. */
  13668. typedef struct {
  13669. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_vdev_stats_struct */
  13670. A_UINT32 tlv_header;
  13671. /* vdev id */
  13672. A_UINT32 vdev_id;
  13673. /** opaque_debug_wal_vdev_flags:
  13674. * This will contain the value from wal_vdev wal vdev flags for vdev state
  13675. */
  13676. A_UINT32 opaque_debug_wal_vdev_flags;
  13677. /** control flags for this vdev */
  13678. A_UINT32 opaque_debug_vdev_flags;
  13679. /** vdevid of transmitted AP (mbssid case) */
  13680. A_UINT32 opaque_debug_vdevid_trans;
  13681. /** opaque_debug_profile_idx:
  13682. * the profile index of the connected non-trans ap (mbssid case).
  13683. * 0 means invalid.
  13684. */
  13685. A_UINT32 opaque_debug_profile_idx;
  13686. /** opaque_debug_profile_num:
  13687. * the total profile numbers of non-trans aps (mbssid case).
  13688. * 0 means legacy AP.
  13689. */
  13690. A_UINT32 opaque_debug_profile_num;
  13691. /* Contains the value of multi_vdev_restart status */
  13692. A_UINT32 opaque_debug_multi_vdev_restart;
  13693. /* Contains the value of created mac_id from wal_vdev */
  13694. A_UINT32 opaque_debug_created_mac_id;
  13695. /* Contains the value of consecutive count of the leaky AP */
  13696. A_UINT32 opaque_debug_consec_detect_leaky_ap_cnt;
  13697. /* Contains the value of Vdev manager debug flags */
  13698. A_UINT32 opaque_debug_vdev_mgr_dbg_flags;
  13699. /* Contains the value of max vdev pause delay in microseconds */
  13700. A_UINT32 opaque_debug_max_pause_delay_us;
  13701. /* opaque_debug_sta_offset:
  13702. * Contains the value of the offset of vdev TSF with BI (vdev_tsf%BI)
  13703. * for STA vdev.
  13704. */
  13705. A_UINT32 opaque_debug_sta_offset;
  13706. /* Contains the value of vdev pn sequence receive filter */
  13707. A_UINT32 opaque_debug_vdev_pn_rx_filter;
  13708. /* Contains the value of config params */
  13709. A_UINT32 opaque_debug_traffic_config;
  13710. /* opaque_debug_he_bss_rts_thld_tu:
  13711. * Contains Period of time in units for a non-AP STA to reserve the medium.
  13712. */
  13713. A_UINT32 opaque_debug_he_bss_rts_thld_tu;
  13714. /* opaque_debug_rts_threshold:
  13715. * Contains the value of Request to Send (RTS) Threshold of the packet size.
  13716. */
  13717. A_UINT32 opaque_debug_rts_threshold; /* dot11RTSThreshold */
  13718. /* Contains the value of Tx failure count threshold */
  13719. A_UINT32 opaque_debug_tx_fail_cnt_thres;
  13720. /* Contains the value of ratio = HI_WORD/LO_WORD */
  13721. A_UINT32 opaque_debug_mu_edca_sifs_ratio;
  13722. /* opaque_debug_kickout_th:
  13723. * Contains the value of kickout threshold that denotes units of
  13724. * lost block acks of consecutive tx failure threshold.
  13725. */
  13726. A_UINT32 opaque_debug_kickout_th;
  13727. /* opaque_debug_rate_dd_bmap:
  13728. * Contains the value of per vap config related to VAP aggregation
  13729. * of ratectrl drop-down limits.
  13730. */
  13731. A_UINT32 opaque_debug_rate_dd_bmap;
  13732. /* Contains the value of Maximum Transmission Unit frame size */
  13733. A_UINT32 opaque_debug_mtu_size;
  13734. /* Contains the value of vdev event bitmap from wal_vdev */
  13735. A_UINT32 opaque_debug_event_bitmap;
  13736. /* Contains the value of peer event bitmap from wal_vdev */
  13737. A_UINT32 opaque_debug_peer_event_bitmap;
  13738. /* Contains the value of Sched config of vdev allowed time during ATF */
  13739. A_UINT32 opaque_debug_atf_vdev_allowed_time;
  13740. /* opaque_debug_atf_vdev_used_unallocated_time:
  13741. * Contains the value of Sched config of vdev used unallocated time
  13742. * during ATF.
  13743. */
  13744. A_UINT32 opaque_debug_atf_vdev_used_unallocated_time;
  13745. /* Contains the value of Sched config of vdev unused time during ATF */
  13746. A_UINT32 opaque_debug_atf_vdev_unused_time;
  13747. /* Contains the value of Carrier frequency offset last programmed time */
  13748. A_UINT32 opaque_debug_last_prog_time;
  13749. /* Contains the value of Carrier frequency offset last receive time */
  13750. A_UINT32 opaque_debug_last_recv_time;
  13751. /* Contains the value of Packet count of received frames on the channel */
  13752. A_UINT32 opaque_debug_rx_pkt_on_channel;
  13753. /* Contains the value of Target beacon transmission time offset value */
  13754. A_UINT32 opaque_debug_tbtt_offset;
  13755. /* Contains the value of tid pause bitmap of the peer from wal_vdev */
  13756. A_UINT32 opaque_debug_peer_all_tid_pause_bitmap;
  13757. /* Contains the value of tid block bitmap of the peer from wal_vdev */
  13758. A_UINT32 opaque_debug_peer_all_tid_block_bitmap;
  13759. /* Contains the value of tdls peer kickout threshold */
  13760. A_UINT32 opaque_debug_tdls_peer_kickout_th;
  13761. /* opaque_debug_num_of_remote_peers_connected:
  13762. * Contains the value of num_of_remote_peers_connected;
  13763. * Below field is valid only for AP vap.
  13764. */
  13765. A_UINT32 opaque_debug_num_of_remote_peers_connected;
  13766. /* Contains the value of num of Multi group key support */
  13767. A_UINT32 opaque_debug_num_group_key_enabled;
  13768. /* Contains the value of delete all peer command flags */
  13769. A_UINT32 opaque_debug_delete_all_peer_flags;
  13770. /* Contains the value of Keepalive ARP sender address time */
  13771. A_UINT32 opaque_debug_keepalive_arp_sender_ipv4;
  13772. /* Contains the value of Keepalive ARP Target address time */
  13773. A_UINT32 opaque_debug_keepalive_arp_target_ipv4;
  13774. /* Contains the value of Keepalive interval duration time */
  13775. A_UINT32 opaque_debug_keepalive_interval;
  13776. /* Contains the value of Keepalive start timer timestamp */
  13777. A_UINT32 opaque_debug_keepalive_timer_start_timestamp;
  13778. /* Contains the value of max idle interval and status of STA */
  13779. A_UINT32 opaque_debug_sta_maxidle_interval;
  13780. A_UINT32 opaque_debug_sta_maxidle_method;
  13781. /* Contains the value of Timing synchronization function (TSF) time diff */
  13782. A_UINT32 opaque_debug_tsf_curr_time_diff;
  13783. /* opaque_debug_sleep_duration_us:
  13784. * Contains the value of Time in microsends to detect sleep duration
  13785. * of the client.
  13786. */
  13787. A_UINT32 opaque_debug_sleep_duration_us;
  13788. /* Contains the value of pause start time and to calculate pause delay */
  13789. A_UINT32 opaque_debug_pause_start_time_us;
  13790. A_UINT32 opaque_debug_pause_delay_us;
  13791. /* Contains the value of number of supported group key */
  13792. A_UINT32 opaque_debug_num_supported_group_key;
  13793. /* opaque_debug_avg_data_null_tx_delay:
  13794. * Contains the value of Average time taken to calculate data frame
  13795. * tx delay.
  13796. */
  13797. A_UINT32 opaque_debug_avg_data_null_tx_delay;
  13798. /* opaque_debug_avg_rx_leak_window:
  13799. * Contains the value of Average time taken to calculate data frame
  13800. * in receive window.
  13801. */
  13802. A_UINT32 opaque_debug_avg_rx_leak_window;
  13803. /* Contains the value of count for number of received deauth frames */
  13804. A_UINT32 opaque_debug_num_recv_deauth;
  13805. /* Contains the value of Beacon interval in microseconds */
  13806. A_UINT32 opaque_debug_bcn_intval_us;
  13807. /* opaque_debug_fils_period
  13808. * Contains the value of us, period configured through
  13809. * WMI_ENABLE_FILS_CMDID.
  13810. */
  13811. A_UINT32 opaque_debug_fils_period;
  13812. /* Contains the value of previous Timing synchronization function (TSF) */
  13813. A_UINT32 opaque_debug_prev_tsf;
  13814. /* Contains the value of time taken during client sleep */
  13815. A_UINT32 opaque_debug_sleep_entry_time;
  13816. /* Contains the value of Total sleep duration from wal_vdev */
  13817. A_UINT32 opaque_debug_tot_sleep_dur;
  13818. /* Contains the value of Vdev pause bitmap from wal_vdev */
  13819. A_UINT32 opaque_debug_pause_bitmap;
  13820. /* opaque_debug_last_send_to_host_deauth_tsf:
  13821. * Contains the value of Last TSF time last_send_to_host_deauth_tsf
  13822. * from wlan_vdev.
  13823. */
  13824. A_UINT32 opaque_debug_last_send_to_host_deauth_tsf;
  13825. /* Contains the value of debug_short_ssid from wlan_vdev */
  13826. A_UINT32 opaque_debug_short_ssid;
  13827. /* Bitfield macro's expansion variables */
  13828. /* opaque_debug_vdev_amsdu_bitfield:
  13829. * bit 7:0 - Contains the value of dis_dyn_bw_rts from wlan_vdev,
  13830. * 15:8 - max_amsdu,
  13831. * 23:16 - def_amsdu,
  13832. * 31:24 - he_bss_color
  13833. */
  13834. A_UINT32 opaque_debug_vdev_amsdu_bitfield;
  13835. /* opaque_debug_vdev_ac_failure_configs:
  13836. * bit 7:0 - Contains the value of dhe_def_pe_duratio from wal_vdev,
  13837. * 15:8 - minimum_allowed_mcs,
  13838. * 23:16 - max_11ac_to_leg_rts_fallback_th,
  13839. * 31:24 - max_11ac_rts_consec_failure_th
  13840. */
  13841. A_UINT32 opaque_debug_vdev_ac_failure_configs;
  13842. /* opaque_debug_vdev_pkt_type_info:
  13843. * bit 7:0 - Contains the value of input_pkt_type from wal_vdev,
  13844. * 15:8 - recv_pkt_type,
  13845. * 23:16 - disable_intra_fwd,
  13846. * 31:24 - ps_awake
  13847. */
  13848. A_UINT32 opaque_debug_vdev_pkt_type_info;
  13849. /* opaque_debug_vdev_ba_param_bitfield:
  13850. * bit 7:0 - Contains the value of snr_cal_count from wal_vdev,
  13851. * 15:8 - amsdu_auto_enable,
  13852. * 23:16 - param_ba_timeout,
  13853. * 31:24 - param_ba_buffer_size
  13854. */
  13855. A_UINT32 opaque_debug_vdev_ba_param_bitfield;
  13856. /* opaque_debug_vdev_aggr_bitfield:
  13857. * bit 7:0 - Contains the value of param_amsdu_support from wal_vdev,
  13858. * 15:8 - param_ba_retry_max,
  13859. * 23:16 - tx_aggr_size,
  13860. * 31:24 - rx_aggr_size
  13861. */
  13862. A_UINT32 opaque_debug_vdev_aggr_bitfield;
  13863. /* opaque_debug_vdev_event_delivery:
  13864. * bit 7:0 - Contains the value of tqm_bypass_enabled from wal_vdev,
  13865. * 15:8 - wmmac_timer_vote_cnt,
  13866. * 23:16 - peer_event_delivery_in_progress,
  13867. * 31:24 - vdev_event_delivery_in_progress
  13868. */
  13869. A_UINT32 opaque_debug_vdev_event_delivery;
  13870. /* opaque_debug_vdev_cap_slot_bitfield:
  13871. * bit 7:0 - Contains the value of bcn_max_slot from wal_vdev,
  13872. * 15:8 - bcn_curr_slot,
  13873. * 23:16 - mgmt_tx_power,
  13874. * 31:24 - mbssid_capable_association
  13875. */
  13876. A_UINT32 opaque_debug_vdev_cap_slot_bitfield;
  13877. /* opaque_debug_vdev_bcn_configs:
  13878. * bit 7:0 - Contains the value of mbssid_txbssid_association from
  13879. * wal_vdev,
  13880. * 15:8 - consec_beacon_skip,
  13881. * 23:16 - consec_beacon_skip_cnt,
  13882. * 31:24 - max_consec_beacon_skip
  13883. */
  13884. A_UINT32 opaque_debug_vdev_bcn_configs;
  13885. /* Contains the value of opaque_debug_vdev_cmd_info */
  13886. A_UINT32 opaque_debug_vdev_cmd_info;
  13887. /* opaque_debug_vdev_mac_configs:
  13888. * bit 7:0 - Contains the value of pause_cnt from wlan_vdev,
  13889. * 15:8 - e_mac_id,
  13890. * 23:16 - is_transmit_bssid,
  13891. * 31:24 - rts_rc_flag
  13892. */
  13893. A_UINT32 opaque_debug_vdev_mac_configs;
  13894. /* opaque_debug_vdev_mode_configs:
  13895. * bit 7:0 - Contains the value of ic_opmode from wlan_vdev,
  13896. * 15:8 - ic_subopmode,
  13897. * 23:16 - ic_curmode,
  13898. * 31:24 - vdev_up_cmd_cnt
  13899. */
  13900. A_UINT32 opaque_debug_vdev_mode_configs;
  13901. /* opaque_debug_vdev_keepalive_bitfields:
  13902. * bit 7:0 - keepalive_method
  13903. * 15:8 - keepalive_prohibit_data_mgmt
  13904. * 23:16 - resp_type
  13905. * 31:24 - ap_detect_out_of_sync_sleeping_sta_time_secs
  13906. */
  13907. A_UINT32 opaque_debug_vdev_keepalive_bitfields;
  13908. /* opaque_debug_vdev_bcn_drift_info:
  13909. * bit 7:0 - bcn_drift_cnt
  13910. * 15:8 - bcn_drift_calibration
  13911. * 23:16 - rts_cts_default
  13912. * 31:24 - vdev_down_cmd_cnt
  13913. */
  13914. A_UINT32 opaque_debug_vdev_bcn_drift_info;
  13915. /* opaque_debug_vdev_arp_configs:
  13916. * bit 7:0 - Contains the value of tbtt_link_type from wlan_vdev,
  13917. * 15:8 - is_arp_in_air,
  13918. * 23:16 - is_ns_in_air,
  13919. * 31:24 - num_of_keepalive_attempts
  13920. */
  13921. A_UINT32 opaque_debug_vdev_arp_configs;
  13922. /* opaque_debug_vdev_streams_configs:
  13923. * bit 7:0 - n_beacons_since_last_rssi_report
  13924. * 15:8 - num_ofld_peer_alloced
  13925. * 23:16 - preferred_tx_streams
  13926. * 31:24 - preferred_rx_streams
  13927. */
  13928. A_UINT32 opaque_debug_vdev_streams_configs;
  13929. /* opaque_debug_vdev_chains_configs:
  13930. * bit 7:0 - Contains the value of preferred_tx_streams_160 from
  13931. * wlan_vdev,
  13932. * 15:8 - preferred_rx_streams_160,
  13933. * 23:16 - tx_chains_num_11b,
  13934. * 31:24 - tx_chains_num_11ag
  13935. */
  13936. A_UINT32 opaque_debug_vdev_chains_configs;
  13937. /* opaque_debug_vdev_power_cap_configs:
  13938. * bit 7:0 - Contains the value of supp_op_cls_ie_len from wlan_vdev,
  13939. * 15:8 - rm_en_cap_ie_len,
  13940. * 23:16 - power_cap_ie_len,
  13941. * 31:24 - supp_channel_ie_len
  13942. */
  13943. A_UINT32 opaque_debug_vdev_power_cap_configs;
  13944. /* opaque_debug_vdev_wmm_mbo_configs:
  13945. * bit 7:0 - Contains the value of wmm_tspec_ie_len from wlan_vdev,
  13946. * 15:8 - ccx_version_ie_len,
  13947. * 23:16 - extn_dh_ie_len,
  13948. * 31:24 - mbo_ie_len
  13949. */
  13950. A_UINT32 opaque_debug_vdev_wmm_mbo_configs;
  13951. /* opaque_debug_vdev_remote_configs:
  13952. * bit 7:0 - Contains the value of rsnxe_ie_len from wlan_vdev,
  13953. * 15:8 - remote_peer_cnt
  13954. * 23:16 - p2p_cli_pause_type
  13955. * 31:24 - mu_edca_update_count
  13956. */
  13957. A_UINT32 opaque_debug_vdev_remote_configs;
  13958. /* opaque_debug_vdev_stats_id_configs:
  13959. * bit 7:0 - vdev_stats_id
  13960. * 15:8 - vdev_stats_id_valid
  13961. * 23:16 - preferred_tx_streams_320
  13962. * 31:24 - preferred_rx_streams_320
  13963. */
  13964. A_UINT32 opaque_debug_vdev_stats_id_configs;
  13965. /* opaque_debug_vdev_assoc_peer_configs:
  13966. * bit 7:0 - unused / reserved
  13967. * 15:8 - group_cipher
  13968. * 31:16 - assoc_id
  13969. */
  13970. A_UINT32 opaque_debug_vdev_assoc_peer_configs;
  13971. /* opaque_debug_vdev_mhz_fils_configs:
  13972. * bit 15:0 - Contains the value of bss_channel_mhz from wal_vdev,
  13973. * 31:16 - config_fils_period
  13974. */
  13975. A_UINT32 opaque_debug_vdev_mhz_fils_configs;
  13976. /* opaque_debug_vdev_fils_period:
  13977. * bit 15:0 - Contains the value of calc_fils_period from wal_vdev,
  13978. * 31:16 - ic_txseqs_cmn
  13979. */
  13980. A_UINT32 opaque_debug_vdev_fils_period;
  13981. /* opaque_debug_vdev_inactive_time:
  13982. * bit 15:0 - Contains the value of
  13983. * ap_keepalive_min_idle_inactive_time_secs from wlan_vdev,
  13984. * 31:16 - ap_keepalive_max_idle_inactive_time_secs
  13985. */
  13986. A_UINT32 opaque_debug_vdev_inactive_time;
  13987. /* opaque_debug_vdev_chain_mask_configs:
  13988. * bit 15:0 - Contains the value of
  13989. * ap_keepalive_max_unresponsive_time_secs from wlan_vdev,
  13990. * 31:16 - chain_mask
  13991. */
  13992. A_UINT32 opaque_debug_vdev_chain_mask_configs;
  13993. /* opaque_debug_vdev_ie_len_configs:
  13994. * bit 15:0 - num_mcast_filters
  13995. * 31:16 - ext_cap_ie_len
  13996. */
  13997. A_UINT32 opaque_debug_vdev_ie_len_configs;
  13998. /* opaque_debug_vdev_fils_configs:
  13999. * bit 15:0 - Contains the value of fils_channel_guard_time from wlan_vdev,
  14000. * 31:16 - fd_tmpl_len
  14001. */
  14002. A_UINT32 opaque_debug_vdev_fils_configs;
  14003. /* opaque_debug_vdev_chan_configs:
  14004. * bit 15:0 - Contains the value of common_rsn_caps from wlan_vdev,
  14005. * 31:16 - off_ch_active_dwell_time
  14006. */
  14007. A_UINT32 opaque_debug_vdev_chan_configs;
  14008. /* opaque_debug_vdev_dwell_configs:
  14009. * bit 15:0 - Contains the value of off_ch_passive_dwell_time from
  14010. * wlan_vdev,
  14011. * 31:16 - current_pause_request_id
  14012. */
  14013. A_UINT32 opaque_debug_vdev_dwell_configs;
  14014. /* opaque_debug_vdev_wmi_configs:
  14015. * bit 0 - Contains the value of hide_ssid_enable from wlan_vdev,
  14016. * 1 - b_none_protocol_paused
  14017. * 2 - dpd_cal_state
  14018. * 4 - req_bcn_q_unpause
  14019. * 5 - bt_coex_enable_cts2s
  14020. * 6 - dpd_delay_n_beacon
  14021. * 8 - b_need_check_first_beacon
  14022. * 9 - ap_peer_keepalive_max_idle_time_reached
  14023. * 10 - leakyap_cts2s_enable
  14024. * 11 - stasapscc_in_mcc
  14025. * 12 - stasapscc_in_mcc_cts2s_enable
  14026. * 13 - is_vdev_stopping
  14027. * 14 - is_wmi_vdev_down
  14028. * 15 - is_vdev_down_pending
  14029. * 16 - vdev_delete_in_progress
  14030. * 17 - cac_enabled
  14031. * 18 - is_quaterrate
  14032. * 19 - is_halfrate
  14033. * 20 - stop_resp_event_blocked
  14034. * 21 - use_enhanced_mcast_filter
  14035. * 22 - is_start_pending_on_asm
  14036. * 23 - no_null_to_ap_for_roaming
  14037. * 24 - is_loopback_cal_pending
  14038. * 25 - vdev_delete_acked
  14039. * 26 - bc_proberesp_enable
  14040. * 27 - is_wmm_param
  14041. * 28 - is_connect_in_progress
  14042. * 29 - is_mu_edca_param
  14043. * 30 - send_del_resp_tohost
  14044. * 31 - is_restart_different_ch
  14045. */
  14046. A_UINT32 opaque_debug_vdev_wmi_configs;
  14047. /* opaque_debug_vdev_hu_mu_configs:
  14048. * bit 0 - Contains the value of proto_ps_status from wlan_vdev,
  14049. * 1 - smps_intolerant
  14050. * 2 - is_offload_registered_for_connection
  14051. * 3 - is_bss_beacon_offload_registered
  14052. * 4 - is_prob_resp_offload_registered
  14053. * 5 - is_ibss_beacon_offload_registered
  14054. * 6 - is_keepalive_attempts_exhausted
  14055. * 7 - is_bcn_tx_ie_changed_log
  14056. * 8 - he_su_bfee
  14057. * 9 - he_su_bfer
  14058. * 10 - he_mu_bfee
  14059. * 11 - he_mu_bfer
  14060. * 12 - he_dl_ofdma
  14061. * 13 - he_ul_ofdma
  14062. * 14 - he_ul_mumimo
  14063. * 15 - ul_mu_resp
  14064. * 23:16 - alt_rssi_non_srg
  14065. * 31:24 - alt_rssi_srg
  14066. */
  14067. A_UINT32 opaque_debug_vdev_hu_mu_configs;
  14068. /* opaque_debug_vdev_sm_chan_configs:
  14069. * bit 0 - Contains the value of he_bss_color_en from wlan_vdev,
  14070. * 1 - he_txbf_ofdma
  14071. * 2 - non_srg_enable
  14072. * 3 - srg_enable
  14073. * 4 - srp_enable
  14074. * 5 - sr_initialized
  14075. * 6 - sr_rings_initialized
  14076. * 10:7 - per_ac_obss_pd_enable
  14077. * 11 - ifup
  14078. * 12 - ifactive
  14079. * 13 - ifpaused
  14080. * 14 - ifoutofsync
  14081. * 15 - is_free
  14082. * 16 - is_nawds
  14083. * 17 - hw_flag
  14084. * 18 - ch_req_flag
  14085. * 20 - restart_resp
  14086. * 21 - first_beacon_recv_wait
  14087. * 22 - erpenabled
  14088. * 23 - start_responded
  14089. * 24 - bcn_sync_crit_req_act
  14090. * 25 - recal_notif_registered
  14091. * 26 - bcn_tx_paused
  14092. * 27 - he_bss_color_en_bypass
  14093. * 28 - default_ba_mode
  14094. * 29 - ba_256_bitmap_enable
  14095. * 30 - ba_256_bitmap_tx_disable
  14096. * 31 - is_multi_group_key_enabled
  14097. */
  14098. A_UINT32 opaque_debug_vdev_sm_chan_configs;
  14099. /*
  14100. * The following 4 opaque_debug variables are provided purely for
  14101. * debugging by technicians who have outside knowledge of what kind of
  14102. * values the target has placed into these fields.
  14103. * The host must not interpret the values of these fields, since the
  14104. * meaning of the values provided in these fields may change without
  14105. * regard for backwards compatibility or interoperability.
  14106. */
  14107. A_UINT32 opaque_debug_field_1;
  14108. A_UINT32 opaque_debug_field_2;
  14109. A_UINT32 opaque_debug_field_3;
  14110. A_UINT32 opaque_debug_field_4;
  14111. } wmi_ctrl_path_vdev_stats_struct;
  14112. #define WMI_VDEV_STATS_DIS_DYN_BW_RTS_SET(flag, val) \
  14113. WMI_SET_BITS(flag, 0, 8, val)
  14114. #define WMI_VDEV_STATS_DIS_DYN_BW_RTS_GET(flag) \
  14115. WMI_GET_BITS(flag, 0, 8)
  14116. #define WMI_VDEV_STATS_MAX_AMSDU_SET(flag, val) \
  14117. WMI_SET_BITS(flag, 8, 8, val)
  14118. #define WMI_VDEV_STATS_MAX_AMSDU_GET(flag) \
  14119. WMI_GET_BITS(flag, 8, 8)
  14120. #define WMI_VDEV_STATS_DEF_AMSDU_SET(flag, val) \
  14121. WMI_SET_BITS(flag, 16, 8, val)
  14122. #define WMI_VDEV_STATS_DEF_AMSDU_GET(flag) \
  14123. WMI_GET_BITS(flag, 16, 8)
  14124. #define WMI_VDEV_STATS_HW_BSS_COLOR_SET(flag, val) \
  14125. WMI_SET_BITS(flag, 24, 8, val)
  14126. #define WMI_VDEV_STATS_HW_BSS_COLOR_GET(flag) \
  14127. WMI_GET_BITS(flag, 24, 8)
  14128. #define WMI_VDEV_STATS_HE_DEF_PE_DURATION_SET(flag, val) \
  14129. WMI_SET_BITS(flag, 0, 8, val)
  14130. #define WMI_VDEV_STATS_HE_DEF_PE_DURATION_GET(flag) \
  14131. WMI_GET_BITS(flag, 0, 8)
  14132. #define WMI_VDEV_STATS_MINIMUM_ALLOWED_MCS_SET(flag, val) \
  14133. WMI_SET_BITS(flag, 8, 8, val)
  14134. #define WMI_VDEV_STATS_MINIMUM_ALLOWED_MCS_GET(flag) \
  14135. WMI_GET_BITS(flag, 8, 8)
  14136. #define WMI_VDEV_STATS_MAX_11AC_TO_LEG_RTS_FALLBACK_TH_SET(flag, val) \
  14137. WMI_SET_BITS(flag, 16, 8, val)
  14138. #define WMI_VDEV_STATS_MAX_11AC_TO_LEG_RTS_FALLBACK_TH_GET(flag) \
  14139. WMI_GET_BITS(flag, 16, 8)
  14140. #define WMI_VDEV_STATS_MAX_11AC_RTS_CONSEC_FAILURE_SET(flag, val) \
  14141. WMI_SET_BITS(flag, 24, 8, val)
  14142. #define WMI_VDEV_STATS_MAX_11AC_RTS_CONSEC_FAILURE_GET(flag) \
  14143. WMI_GET_BITS(flag, 24, 8)
  14144. #define WMI_VDEV_STATS_INPUT_PKT_TYPE_SET(flag, val) \
  14145. WMI_SET_BITS(flag, 0, 8, val)
  14146. #define WMI_VDEV_STATS_INPUT_PKT_TYPE_GET(flag) \
  14147. WMI_GET_BITS(flag, 0, 8)
  14148. #define WMI_VDEV_STATS_RECV_PKT_TYPE_SET(flag, val) \
  14149. WMI_SET_BITS(flag, 8, 8, val)
  14150. #define WMI_VDEV_STATS_RECV_PKT_TYPE_GET(flag) \
  14151. WMI_GET_BITS(flag, 8, 8)
  14152. #define WMI_VDEV_STATS_DISABLE_INTRA_FWD_SET(flag, val) \
  14153. WMI_SET_BITS(flag, 16, 8, val)
  14154. #define WMI_VDEV_STATS_DISABLE_INTRA_FWD_GET(flag) \
  14155. WMI_GET_BITS(flag, 16, 8)
  14156. #define WMI_VDEV_STATS_PS_AWAKE_SET(flag, val) \
  14157. WMI_SET_BITS(flag, 24, 8, val)
  14158. #define WMI_VDEV_STATS_PS_AWAKE_GET(flag) \
  14159. WMI_GET_BITS(flag, 24, 8)
  14160. #define WMI_VDEV_STATS_SNR_CAL_COUNT_SET(flag, val) \
  14161. WMI_SET_BITS(flag, 0, 8, val)
  14162. #define WMI_VDEV_STATS_SNR_CAL_COUNT_GET(flag) \
  14163. WMI_GET_BITS(flag, 0, 8)
  14164. #define WMI_VDEV_STATS_AMSDU_AUTO_ENABLE_SET(flag, val) \
  14165. WMI_SET_BITS(flag, 8, 8, val)
  14166. #define WMI_VDEV_STATS_AMSDU_AUTO_ENABLE_GET(flag) \
  14167. WMI_GET_BITS(flag, 8, 8)
  14168. #define WMI_VDEV_STATS_PARAM_BA_TIMEOUT_SET(flag, val) \
  14169. WMI_SET_BITS(flag, 16, 8, val)
  14170. #define WMI_VDEV_STATS_PARAM_BA_TIMEOUT_GET(flag) \
  14171. WMI_GET_BITS(flag, 16, 8)
  14172. #define WMI_VDEV_STATS_PARAM_BA_BUFFER_SIZE_SET(flag, val) \
  14173. WMI_SET_BITS(flag, 24, 8, val)
  14174. #define WMI_VDEV_STATS_PARAM_BA_BUFFER_SIZE_GET(flag) \
  14175. WMI_GET_BITS(flag, 24, 8)
  14176. #define WMI_VDEV_STATS_PARAM_AMSDU_SUPPORT_SET(flag, val) \
  14177. WMI_SET_BITS(flag, 0, 8, val)
  14178. #define WMI_VDEV_STATS_PARAM_AMSDU_SUPPORT_GET(flag) \
  14179. WMI_GET_BITS(flag, 0, 8)
  14180. #define WMI_VDEV_STATS_PARAM_BA_RETRY_MAX_SET(flag, val) \
  14181. WMI_SET_BITS(flag, 8, 8, val)
  14182. #define WMI_VDEV_STATS_PARAM_BA_RETRY_MAX_GET(flag) \
  14183. WMI_GET_BITS(flag, 8, 8)
  14184. #define WMI_VDEV_STATS_TX_AGGR_SIZE_SET(flag, val) \
  14185. WMI_SET_BITS(flag, 16, 8, val)
  14186. #define WMI_VDEV_STATS_TX_AGGR_SIZE_GET(flag) \
  14187. WMI_GET_BITS(flag, 16, 8)
  14188. #define WMI_VDEV_STATS_RX_AGGR_SIZE_SET(flag, val) \
  14189. WMI_SET_BITS(flag, 24, 8, val)
  14190. #define WMI_VDEV_STATS_RX_AGGR_SIZE_GET(flag) \
  14191. WMI_GET_BITS(flag, 24, 8)
  14192. #define WMI_VDEV_STATS_TQM_BYPASS_ENABLED_SET(flag, val) \
  14193. WMI_SET_BITS(flag, 0, 8, val)
  14194. #define WMI_VDEV_STATS_TQM_BYPASS_ENABLED_GET(flag) \
  14195. WMI_GET_BITS(flag, 0, 8)
  14196. #define WMI_VDEV_STATS_WMMAC_TIMER_VOTE_CNT_SET(flag, val) \
  14197. WMI_SET_BITS(flag, 8, 8, val)
  14198. #define WMI_VDEV_STATS_WMMAC_TIMER_VOTE_CNT_GET(flag) \
  14199. WMI_GET_BITS(flag, 8, 8)
  14200. #define WMI_VDEV_STATS_PEER_EVENT_DELIVERY_IN_PROGRESS_SET(flag, val) \
  14201. WMI_SET_BITS(flag, 16, 8, val)
  14202. #define WMI_VDEV_STATS_PEER_EVENT_DELIVERY_IN_PROGRESS_GET(flag) \
  14203. WMI_GET_BITS(flag, 16, 8)
  14204. #define WMI_VDEV_STATS_VDEV_EVENT_DELIVERY_IN_PROGRESS_SET(flag, val) \
  14205. WMI_SET_BITS(flag, 24, 8, val)
  14206. #define WMI_VDEV_STATS_VDEV_EVENT_DELIVERY_IN_PROGRESS_GET(flag) \
  14207. WMI_GET_BITS(flag, 24, 8)
  14208. #define WMI_VDEV_STATS_BCN_MAX_SLOT_SET(flag, val) \
  14209. WMI_SET_BITS(flag, 0, 8, val)
  14210. #define WMI_VDEV_STATS_BCN_MAX_SLOT_GET(flag) \
  14211. WMI_GET_BITS(flag, 0, 8)
  14212. #define WMI_VDEV_STATS_BCN_CURR_SLOT_SET(flag, val) \
  14213. WMI_SET_BITS(flag, 8, 8, val)
  14214. #define WMI_VDEV_STATS_BCN_CURR_SLOT_GET(flag) \
  14215. WMI_GET_BITS(flag, 8, 8)
  14216. #define WMI_VDEV_STATS_MGMT_TX_POWER_SET(flag, val) \
  14217. WMI_SET_BITS(flag, 16, 8, val)
  14218. #define WMI_VDEV_STATS_MGMT_TX_POWER_GET(flag) \
  14219. WMI_GET_BITS(flag, 16, 8)
  14220. #define WMI_VDEV_STATS_MBSSID_CAPABLE_ASSOCIATION_SET(flag, val) \
  14221. WMI_SET_BITS(flag, 24, 8, val)
  14222. #define WMI_VDEV_STATS_MBSSID_CAPABLE_ASSOCIATION_GET(flag) \
  14223. WMI_GET_BITS(flag, 24, 8)
  14224. #define WMI_VDEV_STATS_MBSSID_TXBSSID_ASSOCIATION_SET(flag, val) \
  14225. WMI_SET_BITS(flag, 0, 8, val)
  14226. #define WMI_VDEV_STATS_MBSSID_TXBSSID_ASSOCIATION_GET(flag) \
  14227. WMI_GET_BITS(flag, 0, 8)
  14228. #define WMI_VDEV_STATS_CONSEC_BEACON_SKIP_SET(flag, val) \
  14229. WMI_SET_BITS(flag, 8, 8, val)
  14230. #define WMI_VDEV_STATS_CONSEC_BEACON_SKIP_GET(flag) \
  14231. WMI_GET_BITS(flag, 8, 8)
  14232. #define WMI_VDEV_STATS_CONSEC_BEACON_SKIP_CNT_SET(flag, val) \
  14233. WMI_SET_BITS(flag, 16, 8, val)
  14234. #define WMI_VDEV_STATS_CONSEC_BEACON_SKIP_CNT_GET(flag) \
  14235. WMI_GET_BITS(flag, 16, 8)
  14236. #define WMI_VDEV_STATS_MAX_CONSEC_BEACON_SKIP_SET(flag, val) \
  14237. WMI_SET_BITS(flag, 24, 8, val)
  14238. #define WMI_VDEV_STATS_MAX_CONSEC_BEACON_SKIP_GET(flag) \
  14239. WMI_GET_BITS(flag, 24, 8)
  14240. #define WMI_VDEV_STATS_BCN_DRIFT_CNT_SET(flag, val) \
  14241. WMI_SET_BITS(flag, 0, 8, val)
  14242. #define WMI_VDEV_STATS_BCN_DRIFT_CNT_GET(flag) \
  14243. WMI_GET_BITS(flag, 0, 8)
  14244. #define WMI_VDEV_STATS_BCN_DRIFT_CALIBRATION_SET(flag, val) \
  14245. WMI_SET_BITS(flag, 8, 8, val)
  14246. #define WMI_VDEV_STATS_BCN_DRIFT_CALIBRATION_GET(flag) \
  14247. WMI_GET_BITS(flag, 8, 8)
  14248. #define WMI_VDEV_STATS_VDEV_DOWN_CMD_CNT_SET(flag, val) \
  14249. WMI_SET_BITS(flag, 16, 8, val)
  14250. #define WMI_VDEV_STATS_VDEV_DOWN_CMD_CNT_GET(flag) \
  14251. WMI_GET_BITS(flag, 16, 8)
  14252. #define WMI_VDEV_STATS_RTS_CTS_DEFAULT_SET(flag, val) \
  14253. WMI_SET_BITS(flag, 24, 8, val)
  14254. #define WMI_VDEV_STATS_RTS_CTS_DEFAULT_GET(flag) \
  14255. WMI_GET_BITS(flag, 24, 8)
  14256. #define WMI_VDEV_STATS_PAUSE_CNT_SET(flag, val) \
  14257. WMI_SET_BITS(flag, 0, 8, val)
  14258. #define WMI_VDEV_STATS_PAUSE_CNT_GET(flag) \
  14259. WMI_GET_BITS(flag, 0, 8)
  14260. #define WMI_VDEV_STATS_E_MAC_ID_SET(flag, val) \
  14261. WMI_SET_BITS(flag, 8, 8, val)
  14262. #define WMI_VDEV_STATS_E_MAC_ID_GET(flag) \
  14263. WMI_GET_BITS(flag, 8, 8)
  14264. #define WMI_VDEV_STATS_IS_TRANSMIT_BSSID_SET(flag, val) \
  14265. WMI_SET_BITS(flag, 16, 8, val)
  14266. #define WMI_VDEV_STATS_IS_TRANSMIT_BSSID_GET(flag) \
  14267. WMI_GET_BITS(flag, 16, 8)
  14268. #define WMI_VDEV_STATS_RTS_RC_FLAG_SET(flag, val) \
  14269. WMI_SET_BITS(flag, 24, 8, val)
  14270. #define WMI_VDEV_STATS_RTS_RC_FLAG_GET(flag) \
  14271. WMI_GET_BITS(flag, 24, 8)
  14272. #define WMI_VDEV_STATS_IC_OPMODE_SET(flag, val) \
  14273. WMI_SET_BITS(flag, 0, 8, val)
  14274. #define WMI_VDEV_STATS_IC_OPMODE_GET(flag) \
  14275. WMI_GET_BITS(flag, 0, 8)
  14276. #define WMI_VDEV_STATS_IC_SUBOPMODE_SET(flag, val) \
  14277. WMI_SET_BITS(flag, 8, 8, val)
  14278. #define WMI_VDEV_STATS_IC_SUBOPMODE_GET(flag) \
  14279. WMI_GET_BITS(flag, 8, 8)
  14280. #define WMI_VDEV_STATS_IC_CURMODE_SET(flag, val) \
  14281. WMI_SET_BITS(flag, 16, 8, val)
  14282. #define WMI_VDEV_STATS_IC_CURMODE_GET(flag) \
  14283. WMI_GET_BITS(flag, 16, 8)
  14284. #define WMI_VDEV_STATS_VDEV_UP_CMD_CNT_SET(flag, val) \
  14285. WMI_SET_BITS(flag, 24, 8, val)
  14286. #define WMI_VDEV_STATS_VDEV_UP_CMD_CNT_GET(flag) \
  14287. WMI_GET_BITS(flag, 24, 8)
  14288. #define WMI_VDEV_STATS_KEEPALIVE_METHOD_SET(flag, val) \
  14289. WMI_SET_BITS(flag, 0, 8, val)
  14290. #define WMI_VDEV_STATS_KEEPALIVE_METHOD_GET(flag) \
  14291. WMI_GET_BITS(flag, 0, 8)
  14292. #define WMI_VDEV_STATS_KEEPALIVE_PROHIBIT_DATA_MGMT_SET(flag, val) \
  14293. WMI_SET_BITS(flag, 8, 8, val)
  14294. #define WMI_VDEV_STATS_KEEPALIVE_PROHIBIT_DATA_MGMT_GET(flag) \
  14295. WMI_GET_BITS(flag, 8, 8)
  14296. #define WMI_VDEV_STATS_RESP_TYPE_SET(flag, val) \
  14297. WMI_SET_BITS(flag, 16, 8, val)
  14298. #define WMI_VDEV_STATS_RESP_TYPE_GET(flag) \
  14299. WMI_GET_BITS(flag, 16, 8)
  14300. #define WMI_VDEV_STATS_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS_SET(flag, val) \
  14301. WMI_SET_BITS(flag, 24, 8, val)
  14302. #define WMI_VDEV_STATS_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS_GET(flag) \
  14303. WMI_GET_BITS(flag, 24, 8)
  14304. #define WMI_VDEV_STATS_BCN_DRIFT_CNT_SET(flag, val) \
  14305. WMI_SET_BITS(flag, 0, 8, val)
  14306. #define WMI_VDEV_STATS_BCN_DRIFT_CNT_GET(flag) \
  14307. WMI_GET_BITS(flag, 0, 8)
  14308. #define WMI_VDEV_STATS_BCN_DRIFT_CALIBRATION_SET(flag, val) \
  14309. WMI_SET_BITS(flag, 8, 8, val)
  14310. #define WMI_VDEV_STATS_BCN_DRIFT_CALIBRATION_GET(flag) \
  14311. WMI_GET_BITS(flag, 8, 8)
  14312. #define WMI_VDEV_STATS_VDEV_DOWN_CMD_CNT_SET(flag, val) \
  14313. WMI_SET_BITS(flag, 16, 8, val)
  14314. #define WMI_VDEV_STATS_VDEV_DOWN_CMD_CNT_GET(flag) \
  14315. WMI_GET_BITS(flag, 16, 8)
  14316. #define WMI_VDEV_STATS_RTS_CTS_DEFAULT_SET(flag, val) \
  14317. WMI_SET_BITS(flag, 24, 8, val)
  14318. #define WMI_VDEV_STATS_RTS_CTS_DEFAULT_GET(flag) \
  14319. WMI_GET_BITS(flag, 24, 8)
  14320. #define WMI_VDEV_STATS_TBTT_LINK_TYPE_SET(flag, val) \
  14321. WMI_SET_BITS(flag, 0, 8, val)
  14322. #define WMI_VDEV_STATS_TBTT_LINK_TYPE_GET(flag) \
  14323. WMI_GET_BITS(flag, 0, 8)
  14324. #define WMI_VDEV_STATS_IS_ARP_IN_AIR_SET(flag, val) \
  14325. WMI_SET_BITS(flag, 8, 8, val)
  14326. #define WMI_VDEV_STATS_IS_ARP_IN_AIR_GET(flag) \
  14327. WMI_GET_BITS(flag, 8, 8)
  14328. #define WMI_VDEV_STATS_IS_NS_IN_AIR_SET(flag, val) \
  14329. WMI_SET_BITS(flag, 16, 8, val)
  14330. #define WMI_VDEV_STATS_IS_NS_IN_AIR_GET(flag) \
  14331. WMI_GET_BITS(flag, 16, 8)
  14332. #define WMI_VDEV_STATS_NUM_OF_KEEPALIVE_ATTEMPTS_SET(flag, val) \
  14333. WMI_SET_BITS(flag, 24, 8, val)
  14334. #define WMI_VDEV_STATS_NUM_OF_KEEPALIVE_ATTEMPTS_GET(flag) \
  14335. WMI_GET_BITS(flag, 24, 8)
  14336. #define WMI_VDEV_STATS_N_BEACONS_SINCE_LAST_RSSI_REPORT_SET(flag, val) \
  14337. WMI_SET_BITS(flag, 0, 8, val)
  14338. #define WMI_VDEV_STATS_N_BEACONS_SINCE_LAST_RSSI_REPORT_GET(flag) \
  14339. WMI_GET_BITS(flag, 0, 8)
  14340. #define WMI_VDEV_STATS_NUM_OFLD_PEER_ALLOCED_SET(flag, val) \
  14341. WMI_SET_BITS(flag, 8, 8, val)
  14342. #define WMI_VDEV_STATS_NUM_OFLD_PEER_ALLOCED_GET(flag) \
  14343. WMI_GET_BITS(flag, 8, 8)
  14344. #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_SET(flag, val) \
  14345. WMI_SET_BITS(flag, 16, 8, val)
  14346. #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_GET(flag) \
  14347. WMI_GET_BITS(flag, 16, 8)
  14348. #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_SET(flag, val) \
  14349. WMI_SET_BITS(flag, 24, 8, val)
  14350. #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_GET(flag) \
  14351. WMI_GET_BITS(flag, 24, 8)
  14352. #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_160_SET(flag, val) \
  14353. WMI_SET_BITS(flag, 0, 8, val)
  14354. #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_160_GET(flag) \
  14355. WMI_GET_BITS(flag, 0, 8)
  14356. #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_160_SET(flag, val) \
  14357. WMI_SET_BITS(flag, 8, 8, val)
  14358. #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_160_GET(flag) \
  14359. WMI_GET_BITS(flag, 8, 8)
  14360. #define WMI_VDEV_STATS_TX_CHAINS_NUM_11B_SET(flag, val) \
  14361. WMI_SET_BITS(flag, 16, 8, val)
  14362. #define WMI_VDEV_STATS_TX_CHAINS_NUM_11B_GET(flag) \
  14363. WMI_GET_BITS(flag, 16, 8)
  14364. #define WMI_VDEV_STATS_TX_CHAINS_NUM_11AG_SET(flag, val) \
  14365. WMI_SET_BITS(flag, 24, 8, val)
  14366. #define WMI_VDEV_STATS_TX_CHAINS_NUM_11AG_GET(flag) \
  14367. WMI_GET_BITS(flag, 24, 8)
  14368. #define WMI_VDEV_STATS_SUPP_OP_CLS_IE_LEN_SET(flag, val) \
  14369. WMI_SET_BITS(flag, 0, 8, val)
  14370. #define WMI_VDEV_STATS_SUPP_OP_CLS_IE_LEN_GET(flag) \
  14371. WMI_GET_BITS(flag, 0, 8)
  14372. #define WMI_VDEV_STATS_RM_EN_CAP_IE_LEN_SET(flag, val) \
  14373. WMI_SET_BITS(flag, 8, 8, val)
  14374. #define WMI_VDEV_STATS_RM_EN_CAP_IE_LEN_GET(flag) \
  14375. WMI_GET_BITS(flag, 8, 8)
  14376. #define WMI_VDEV_STATS_POWER_CAP_IE_LEN_SET(flag, val) \
  14377. WMI_SET_BITS(flag, 16, 8, val)
  14378. #define WMI_VDEV_STATS_POWER_CAP_IE_LEN_GET(flag) \
  14379. WMI_GET_BITS(flag, 16, 8)
  14380. #define WMI_VDEV_STATS_SUPP_CHANNEL_IE_LEN_SET(flag, val) \
  14381. WMI_SET_BITS(flag, 24, 8, val)
  14382. #define WMI_VDEV_STATS_SUPP_CHANNEL_IE_LEN_GET(flag) \
  14383. WMI_GET_BITS(flag, 24, 8)
  14384. #define WMI_VDEV_STATS_WMM_TSPEC_IE_LEN_SET(flag, val) \
  14385. WMI_SET_BITS(flag, 0, 8, val)
  14386. #define WMI_VDEV_STATS_WMM_TSPEC_IE_LEN_GET(flag) \
  14387. WMI_GET_BITS(flag, 0, 8)
  14388. #define WMI_VDEV_STATS_CCX_VERSION_IE_LEN_SET(flag, val) \
  14389. WMI_SET_BITS(flag, 8, 8, val)
  14390. #define WMI_VDEV_STATS_CCX_VERSION_IE_LEN_GET(flag) \
  14391. WMI_GET_BITS(flag, 8, 8)
  14392. #define WMI_VDEV_STATS_EXTN_DH_IE_LEN_SET(flag, val) \
  14393. WMI_SET_BITS(flag, 16, 8, val)
  14394. #define WMI_VDEV_STATS_EXTN_DH_IE_LEN_GET(flag) \
  14395. WMI_GET_BITS(flag, 16, 8)
  14396. #define WMI_VDEV_STATS_MBO_IE_LEN_SET(flag, val) \
  14397. WMI_SET_BITS(flag, 24, 8, val)
  14398. #define WMI_VDEV_STATS_MBO_IE_LEN_GET(flag) \
  14399. WMI_GET_BITS(flag, 24, 8)
  14400. #define WMI_VDEV_STATS_RSNXE_IE_LEN_SET(flag, val) \
  14401. WMI_SET_BITS(flag, 0, 8, val)
  14402. #define WMI_VDEV_STATS_RSNXE_IE_LEN_GET(flag) \
  14403. WMI_GET_BITS(flag, 0, 8)
  14404. #define WMI_VDEV_STATS_REMOTE_PEER_CNT_SET(flag, val) \
  14405. WMI_SET_BITS(flag, 8, 8, val)
  14406. #define WMI_VDEV_STATS_REMOTE_PEER_CNT_GET(flag) \
  14407. WMI_GET_BITS(flag, 8, 8)
  14408. #define WMI_VDEV_STATS_P2P_CLI_PAUSE_TYPE_SET(flag, val) \
  14409. WMI_SET_BITS(flag, 16, 8, val)
  14410. #define WMI_VDEV_STATS_P2P_CLI_PAUSE_TYPE_GET(flag) \
  14411. WMI_GET_BITS(flag, 16, 8)
  14412. #define WMI_VDEV_STATS_MU_EDCA_UPDATE_COUNT_SET(flag, val) \
  14413. WMI_SET_BITS(flag, 24, 8, val)
  14414. #define WMI_VDEV_STATS_MU_EDCA_UPDATE_COUNT_GET(flag) \
  14415. WMI_GET_BITS(flag, 24, 8)
  14416. #define WMI_VDEV_STATS_ID_SET(flag, val) \
  14417. WMI_SET_BITS(flag, 0, 8, val)
  14418. #define WMI_VDEV_STATS_ID_GET(flag) \
  14419. WMI_GET_BITS(flag, 0, 8)
  14420. #define WMI_VDEV_STATS_ID_VALID_SET(flag, val) \
  14421. WMI_SET_BITS(flag, 8, 8, val)
  14422. #define WMI_VDEV_STATS_ID_VALID_GET(flag) \
  14423. WMI_GET_BITS(flag, 8, 8)
  14424. #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_320_SET(flag, val) \
  14425. WMI_SET_BITS(flag, 16, 8, val)
  14426. #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_320_GET(flag) \
  14427. WMI_GET_BITS(flag, 16, 8)
  14428. #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_320_SET(flag, val) \
  14429. WMI_SET_BITS(flag, 24, 8, val)
  14430. #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_320_GET(flag) \
  14431. WMI_GET_BITS(flag, 24, 8)
  14432. /* bits 7:0 unused / reserved */
  14433. #define WMI_VDEV_STATS_GROUP_CIPHER_SET(flag, val) \
  14434. WMI_SET_BITS(flag, 8, 8, val)
  14435. #define WMI_VDEV_STATS_GROUP_CIPHER_GET(flag) \
  14436. WMI_GET_BITS(flag, 8, 8)
  14437. #define WMI_VDEV_STATS_ASSOC_ID_SET(flag, val) \
  14438. WMI_SET_BITS(flag, 16, 16, val)
  14439. #define WMI_VDEV_STATS_ASSOC_ID_GET(flag) \
  14440. WMI_GET_BITS(flag, 16, 16)
  14441. #define WMI_VDEV_STATS_BSS_CHANNEL_MHZ_SET(flag, val) \
  14442. WMI_SET_BITS(flag, 0, 16, val)
  14443. #define WMI_VDEV_STATS_BSS_CHANNEL_MHZ_GET(flag) \
  14444. WMI_GET_BITS(flag, 0, 16)
  14445. #define WMI_VDEV_STATS_CONFIG_FILS_PERIOD_SET(flag, val) \
  14446. WMI_SET_BITS(flag, 16, 16, val)
  14447. #define WMI_VDEV_STATS_CONFIG_FILS_PERIOD_GET(flag) \
  14448. WMI_GET_BITS(flag, 16, 16)
  14449. #define WMI_VDEV_STATS_CALC_FILS_PERIOD_SET(flag, val) \
  14450. WMI_SET_BITS(flag, 0, 16, val)
  14451. #define WMI_VDEV_STATS_CALC_FILS_PERIOD_GET(flag) \
  14452. WMI_GET_BITS(flag, 0, 16)
  14453. #define WMI_VDEV_STATS_IC_TXSEQS_CMN_SET(flag, val) \
  14454. WMI_SET_BITS(flag, 16, 16, val)
  14455. #define WMI_VDEV_STATS_IC_TXSEQS_CMN_GET(flag) \
  14456. WMI_GET_BITS(flag, 16, 16)
  14457. #define WMI_VDEV_STATS_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS_SET(flag, val) \
  14458. WMI_SET_BITS(flag, 0, 16, val)
  14459. #define WMI_VDEV_STATS_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS_GET(flag) \
  14460. WMI_GET_BITS(flag, 0, 16)
  14461. #define WMI_VDEV_STATS_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS_SET(flag, val) \
  14462. WMI_SET_BITS(flag, 16, 16, val)
  14463. #define WMI_VDEV_STATS_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS_GET(flag) \
  14464. WMI_GET_BITS(flag, 16, 16)
  14465. #define WMI_VDEV_STATS_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS_SET(flag, val) \
  14466. WMI_SET_BITS(flag, 0, 16, val)
  14467. #define WMI_VDEV_STATS_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS_GET(flag) \
  14468. WMI_GET_BITS(flag, 0, 16)
  14469. #define WMI_VDEV_STATS_CHAIN_MASK_SET(flag, val) \
  14470. WMI_SET_BITS(flag, 16, 16, val)
  14471. #define WMI_VDEV_STATS_CHAIN_MASK_GET(flag) \
  14472. WMI_GET_BITS(flag, 16, 16)
  14473. #define WMI_VDEV_STATS_NUM_MCAST_FILTERS_SET(flag, val) \
  14474. WMI_SET_BITS(flag, 0, 16, val)
  14475. #define WMI_VDEV_STATS_NUM_MCAST_FILTERS_GET(flag) \
  14476. WMI_GET_BITS(flag, 0, 16)
  14477. #define WMI_VDEV_STATS_EXT_CAP_IE_LEN_SET(flag, val) \
  14478. WMI_SET_BITS(flag, 16, 16, val)
  14479. #define WMI_VDEV_STATS_EXT_CAP_IE_LEN_GET(flag) \
  14480. WMI_GET_BITS(flag, 16, 16)
  14481. #define WMI_VDEV_STATS_FILS_CHANNEL_GUARD_TIME_SET(flag, val) \
  14482. WMI_SET_BITS(flag, 0, 16, val)
  14483. #define WMI_VDEV_STATS_FILS_CHANNEL_GUARD_TIME_GET(flag) \
  14484. WMI_GET_BITS(flag, 0, 16)
  14485. #define WMI_VDEV_STATS_FD_TMPL_LEN_SET(flag, val) \
  14486. WMI_SET_BITS(flag, 16, 16, val)
  14487. #define WMI_VDEV_STATS_FD_TMPL_LEN_GET(flag) \
  14488. WMI_GET_BITS(flag, 16, 16)
  14489. #define WMI_VDEV_STATS_COMMON_RSN_CAPS_SET(flag, val) \
  14490. WMI_SET_BITS(flag, 0, 16, val)
  14491. #define WMI_VDEV_STATS_COMMON_RSN_CAPS_GET(flag) \
  14492. WMI_GET_BITS(flag, 0, 16)
  14493. #define WMI_VDEV_STATS_OFF_CH_ACTIVE_DWELL_TIME_SET(flag, val) \
  14494. WMI_SET_BITS(flag, 16, 16, val)
  14495. #define WMI_VDEV_STATS_OFF_CH_ACTIVE_DWELL_TIME_GET(flag) \
  14496. WMI_GET_BITS(flag, 16, 16)
  14497. #define WMI_VDEV_STATS_OFF_CH_PASSIVE_DWELL_TIME_SET(flag, val) \
  14498. WMI_SET_BITS(flag, 0, 16, val)
  14499. #define WMI_VDEV_STATS_OFF_CH_PASSIVE_DWELL_TIME_GET(flag) \
  14500. WMI_GET_BITS(flag, 0, 16)
  14501. #define WMI_VDEV_STATS_CURRENT_PAUSE_REQUEST_ID_SET(flag, val) \
  14502. WMI_SET_BITS(flag, 16, 16, val)
  14503. #define WMI_VDEV_STATS_CURRENT_PAUSE_REQUEST_ID_GET(flag) \
  14504. WMI_GET_BITS(flag, 16, 16)
  14505. #define WMI_VDEV_STATS_HIDE_SSID_ENABLE_SET(flag, val) \
  14506. WMI_SET_BITS(flag, 0, 1, val)
  14507. #define WMI_VDEV_STATS_HIDE_SSID_ENABLE_GET(flag) \
  14508. WMI_GET_BITS(flag, 0, 1)
  14509. #define WMI_VDEV_STATS_B_NONE_PROTOCOL_PAUSED_SET(flag, val) \
  14510. WMI_SET_BITS(flag, 1, 1, val)
  14511. #define WMI_VDEV_STATS_B_NONE_PROTOCOL_PAUSED_GET(flag) \
  14512. WMI_GET_BITS(flag, 1, 1)
  14513. #define WMI_VDEV_STATS_DPD_CAL_STATE_SET(flag, val) \
  14514. WMI_SET_BITS(flag, 2, 2, val)
  14515. #define WMI_VDEV_STATS_DPD_CAL_STATE_GET(flag) \
  14516. WMI_GET_BITS(flag, 2, 2)
  14517. #define WMI_VDEV_STATS_REQ_BCN_Q_UNPAUSE_SET(flag, val) \
  14518. WMI_SET_BITS(flag, 4, 1, val)
  14519. #define WMI_VDEV_STATS_REQ_BCN_Q_UNPAUSE_GET(flag) \
  14520. WMI_GET_BITS(flag, 4, 1)
  14521. #define WMI_VDEV_STATS_BT_COEX_ENABLE_CTS2S_SET(flag, val) \
  14522. WMI_SET_BITS(flag, 5, 1, val)
  14523. #define WMI_VDEV_STATS_BT_COEX_ENABLE_CTS2S_GET(flag) \
  14524. WMI_GET_BITS(flag, 5, 1)
  14525. #define WMI_VDEV_STATS_DPD_DELAY_N_BEACON_SET(flag, val) \
  14526. WMI_SET_BITS(flag, 6, 2, val)
  14527. #define WMI_VDEV_STATS_DPD_DELAY_N_BEACON_GET(flag) \
  14528. WMI_GET_BITS(flag, 6, 2)
  14529. #define WMI_VDEV_STATS_B_NEED_CHECK_FIRST_BEACON_SET(flag, val) \
  14530. WMI_SET_BITS(flag, 8, 1, val)
  14531. #define WMI_VDEV_STATS_B_NEED_CHECK_FIRST_BEACON_GET(flag) \
  14532. WMI_GET_BITS(flag, 8, 1)
  14533. #define WMI_VDEV_STATS_AP_PEER_KEEPALIVE_MAX_IDLE_TIME_REACHED_SET(flag, val) \
  14534. WMI_SET_BITS(flag, 9, 1, val)
  14535. #define WMI_VDEV_STATS_AP_PEER_KEEPALIVE_MAX_IDLE_TIME_REACHED_GET(flag) \
  14536. WMI_GET_BITS(flag, 9, 1)
  14537. #define WMI_VDEV_STATS_LEAKYAP_CTS2S_ENABLE_SET(flag, val) \
  14538. WMI_SET_BITS(flag, 10, 1, val)
  14539. #define WMI_VDEV_STATS_LEAKYAP_CTS2S_ENABLE_GET(flag) \
  14540. WMI_GET_BITS(flag, 10, 1)
  14541. #define WMI_VDEV_STATS_STASAPSCC_IN_MCC_SET(flag, val) \
  14542. WMI_SET_BITS(flag, 11, 1, val)
  14543. #define WMI_VDEV_STATS_STASAPSCC_IN_MCC_GET(flag) \
  14544. WMI_GET_BITS(flag, 11, 1)
  14545. #define WMI_VDEV_STATS_STASAPSCC_IN_MCC_CTS2S_ENABLE_SET(flag, val) \
  14546. WMI_SET_BITS(flag, 12, 1, val)
  14547. #define WMI_VDEV_STATS_STASAPSCC_IN_MCC_CTS2S_ENABLE_GET(flag) \
  14548. WMI_GET_BITS(flag, 12, 1)
  14549. #define WMI_VDEV_STATS_IS_VDEV_STOPPING_SET(flag, val) \
  14550. WMI_SET_BITS(flag, 13, 1, val)
  14551. #define WMI_VDEV_STATS_IS_VDEV_STOPPING_GET(flag) \
  14552. WMI_GET_BITS(flag, 13, 1)
  14553. #define WMI_VDEV_STATS_IS_WMI_VDEV_DOWN_SET(flag, val) \
  14554. WMI_SET_BITS(flag, 14, 1, val)
  14555. #define WMI_VDEV_STATS_IS_WMI_VDEV_DOWN_GET(flag) \
  14556. WMI_GET_BITS(flag, 14, 1)
  14557. #define WMI_VDEV_STATS_IS_VDEV_DOWN_PENDING_SET(flag, val) \
  14558. WMI_SET_BITS(flag, 15, 1, val)
  14559. #define WMI_VDEV_STATS_IS_VDEV_DOWN_PENDING_GET(flag) \
  14560. WMI_GET_BITS(flag, 15, 1)
  14561. #define WMI_VDEV_STATS_VDEV_DELETE_IN_PROGRESS_SET(flag, val) \
  14562. WMI_SET_BITS(flag, 16, 1, val)
  14563. #define WMI_VDEV_STATS_VDEV_DELETE_IN_PROGRESS_GET(flag) \
  14564. WMI_GET_BITS(flag, 16, 1)
  14565. #define WMI_VDEV_STATS_CAC_ENABLED_SET(flag, val) \
  14566. WMI_SET_BITS(flag, 17, 1, val)
  14567. #define WMI_VDEV_STATS_CAC_ENABLED_GET(flag) \
  14568. WMI_GET_BITS(flag, 17, 1)
  14569. #define WMI_VDEV_STATS_IS_QUATERRATE_SET(flag, val) \
  14570. WMI_SET_BITS(flag, 18, 1, val)
  14571. #define WMI_VDEV_STATS_IS_QUATERRATE_GET(flag) \
  14572. WMI_GET_BITS(flag, 18, 1)
  14573. #define WMI_VDEV_STATS_IS_HALFRATE_SET(flag, val) \
  14574. WMI_SET_BITS(flag, 19, 1, val)
  14575. #define WMI_VDEV_STATS_IS_HALFRATE_GET(flag) \
  14576. WMI_GET_BITS(flag, 19, 1)
  14577. #define WMI_VDEV_STATS_STOP_RESP_EVENT_BLOCKED_SET(flag, val) \
  14578. WMI_SET_BITS(flag, 20, 1, val)
  14579. #define WMI_VDEV_STATS_STOP_RESP_EVENT_BLOCKED_GET(flag) \
  14580. WMI_GET_BITS(flag, 20, 1)
  14581. #define WMI_VDEV_STATS_USE_ENHANCED_MCAST_FILTER_SET(flag, val) \
  14582. WMI_SET_BITS(flag, 21, 1, val)
  14583. #define WMI_VDEV_STATS_USE_ENHANCED_MCAST_FILTER_GET(flag) \
  14584. WMI_GET_BITS(flag, 21, 1)
  14585. #define WMI_VDEV_STATS_IS_START_PENDING_ON_ASM_SET(flag, val) \
  14586. WMI_SET_BITS(flag, 22, 1, val)
  14587. #define WMI_VDEV_STATS_IS_START_PENDING_ON_ASM_GET(flag) \
  14588. WMI_GET_BITS(flag, 22, 1)
  14589. #define WMI_VDEV_STATS_NO_NULL_TO_AP_FOR_ROAMING_SET(flag, val) \
  14590. WMI_SET_BITS(flag, 23, 1, val)
  14591. #define WMI_VDEV_STATS_NO_NULL_TO_AP_FOR_ROAMING_GET(flag) \
  14592. WMI_GET_BITS(flag, 23, 1)
  14593. #define WMI_VDEV_STATS_IS_LOOPBACK_CAL_PENDING_SET(flag, val) \
  14594. WMI_SET_BITS(flag, 24, 1, val)
  14595. #define WMI_VDEV_STATS_IS_LOOPBACK_CAL_PENDING_GET(flag) \
  14596. WMI_GET_BITS(flag, 24, 1)
  14597. #define WMI_VDEV_STATS_VDEV_DELETE_ACKED_SET(flag, val) \
  14598. WMI_SET_BITS(flag, 25, 1, val)
  14599. #define WMI_VDEV_STATS_VDEV_DELETE_ACKED_GET(flag) \
  14600. WMI_GET_BITS(flag, 25, 1)
  14601. #define WMI_VDEV_STATS_BC_PROBERESP_ENABLE_SET(flag, val) \
  14602. WMI_SET_BITS(flag, 26, 1, val)
  14603. #define WMI_VDEV_STATS_BC_PROBERESP_ENABLE_GET(flag) \
  14604. WMI_GET_BITS(flag, 26, 1)
  14605. #define WMI_VDEV_STATS_IS_WMM_PARAM_SET_SET(flag, val) \
  14606. WMI_SET_BITS(flag, 27, 1, val)
  14607. #define WMI_VDEV_STATS_IS_WMM_PARAM_SET_GET(flag) \
  14608. WMI_GET_BITS(flag, 27, 1)
  14609. #define WMI_VDEV_STATS_IS_CONNECT_IN_PROGRESS_SET(flag, val) \
  14610. WMI_SET_BITS(flag, 28, 1, val)
  14611. #define WMI_VDEV_STATS_IS_CONNECT_IN_PROGRESS_GET(flag) \
  14612. WMI_GET_BITS(flag, 28, 1)
  14613. #define WMI_VDEV_STATS_IS_MU_EDCA_PARAM_SET_SET(flag, val) \
  14614. WMI_SET_BITS(flag, 29, 1, val)
  14615. #define WMI_VDEV_STATS_IS_MU_EDCA_PARAM_SET_GET(flag) \
  14616. WMI_GET_BITS(flag, 29, 1)
  14617. #define WMI_VDEV_STATS_SEND_DEL_RESP_TOHOST_SET(flag, val) \
  14618. WMI_SET_BITS(flag, 30, 1, val)
  14619. #define WMI_VDEV_STATS_SEND_DEL_RESP_TOHOST_GET(flag) \
  14620. WMI_GET_BITS(flag, 30, 1)
  14621. #define WMI_VDEV_STATS_IS_RESTART_DIFFERENT_CH_SET(flag, val) \
  14622. WMI_SET_BITS(flag, 31, 1, val)
  14623. #define WMI_VDEV_STATS_IS_RESTART_DIFFERENT_CH_GET(flag) \
  14624. WMI_GET_BITS(flag, 31, 1)
  14625. #define WMI_VDEV_STATS_PROTO_PS_STATUS_SET(flag, val) \
  14626. WMI_SET_BITS(flag, 0, 1, val)
  14627. #define WMI_VDEV_STATS_PROTO_PS_STATUS_GET(flag) \
  14628. WMI_GET_BITS(flag, 0, 1)
  14629. #define WMI_VDEV_STATS_SMPS_INTOLERANT_SET(flag, val) \
  14630. WMI_SET_BITS(flag, 1, 1, val)
  14631. #define WMI_VDEV_STATS_SMPS_INTOLERANT_GET(flag) \
  14632. WMI_GET_BITS(flag, 1, 1)
  14633. #define WMI_VDEV_STATS_IS_OFFLOAD_REGISTERED_FOR_CONNECTION_SET(flag, val) \
  14634. WMI_SET_BITS(flag, 2, 1, val)
  14635. #define WMI_VDEV_STATS_IS_OFFLOAD_REGISTERED_FOR_CONNECTION_GET(flag) \
  14636. WMI_GET_BITS(flag, 2, 1)
  14637. #define WMI_VDEV_STATS_IS_BSS_BEACON_OFFLOAD_REGISTERED_SET(flag, val) \
  14638. WMI_SET_BITS(flag, 3, 1, val)
  14639. #define WMI_VDEV_STATS_IS_BSS_BEACON_OFFLOAD_REGISTERED_GET(flag) \
  14640. WMI_GET_BITS(flag, 3, 1)
  14641. #define WMI_VDEV_STATS_IS_PROB_RESP_OFFLOAD_REGISTERED_SET(flag, val) \
  14642. WMI_SET_BITS(flag, 4, 1, val)
  14643. #define WMI_VDEV_STATS_IS_PROB_RESP_OFFLOAD_REGISTERED_GET(flag) \
  14644. WMI_GET_BITS(flag, 4, 1)
  14645. #define WMI_VDEV_STATS_IS_IBSS_BEACON_OFFLOAD_REGISTERED_SET(flag, val) \
  14646. WMI_SET_BITS(flag, 5, 1, val)
  14647. #define WMI_VDEV_STATS_IS_IBSS_BEACON_OFFLOAD_REGISTERED_GET(flag) \
  14648. WMI_GET_BITS(flag, 5, 1)
  14649. #define WMI_VDEV_STATS_IS_KEEPALIVE_ATTEMPTS_EXHAUSTED_SET(flag, val) \
  14650. WMI_SET_BITS(flag, 6, 1, val)
  14651. #define WMI_VDEV_STATS_IS_KEEPALIVE_ATTEMPTS_EXHAUSTED_GET(flag) \
  14652. WMI_GET_BITS(flag, 6, 1)
  14653. #define WMI_VDEV_STATS_IS_BCN_TX_IE_CHANGED_LOG_SET(flag, val) \
  14654. WMI_SET_BITS(flag, 7, 1, val)
  14655. #define WMI_VDEV_STATS_IS_BCN_TX_IE_CHANGED_LOG_GET(flag) \
  14656. WMI_GET_BITS(flag, 7, 1)
  14657. #define WMI_VDEV_STATS_HE_SU_BFEE_SET(flag, val) \
  14658. WMI_SET_BITS(flag, 8, 1, val)
  14659. #define WMI_VDEV_STATS_HE_SU_BFEE_GET(flag) \
  14660. WMI_GET_BITS(flag, 8, 1)
  14661. #define WMI_VDEV_STATS_HE_SU_BFER_SET(flag, val) \
  14662. WMI_SET_BITS(flag, 9, 1, val)
  14663. #define WMI_VDEV_STATS_HE_SU_BFER_GET(flag) \
  14664. WMI_GET_BITS(flag, 9, 1)
  14665. #define WMI_VDEV_STATS_HE_MU_BFEE_SET(flag, val) \
  14666. WMI_SET_BITS(flag, 10, 1, val)
  14667. #define WMI_VDEV_STATS_HE_MU_BFEE_GET(flag) \
  14668. WMI_GET_BITS(flag, 10, 1)
  14669. #define WMI_VDEV_STATS_HE_MU_BFER_SET(flag, val) \
  14670. WMI_SET_BITS(flag, 11, 1, val)
  14671. #define WMI_VDEV_STATS_HE_MU_BFER_GET(flag) \
  14672. WMI_GET_BITS(flag, 11, 1)
  14673. #define WMI_VDEV_STATS_HE_DL_OFDMA_SET(flag, val) \
  14674. WMI_SET_BITS(flag, 12, 1, val)
  14675. #define WMI_VDEV_STATS_HE_DL_OFDMA_GET(flag) \
  14676. WMI_GET_BITS(flag, 12, 1)
  14677. #define WMI_VDEV_STATS_HE_UL_OFDMA_SET(flag, val) \
  14678. WMI_SET_BITS(flag, 13, 1, val)
  14679. #define WMI_VDEV_STATS_HE_UL_OFDMA_GET(flag) \
  14680. WMI_GET_BITS(flag, 13, 1)
  14681. #define WMI_VDEV_STATS_HE_UL_MUMIMO_SET(flag, val) \
  14682. WMI_SET_BITS(flag, 14, 1, val)
  14683. #define WMI_VDEV_STATS_HE_UL_MUMIMO_GET(flag) \
  14684. WMI_GET_BITS(flag, 14, 1)
  14685. #define WMI_VDEV_STATS_UL_MU_RESP_SET(flag, val) \
  14686. WMI_SET_BITS(flag, 15, 1, val)
  14687. #define WMI_VDEV_STATS_UL_MU_RESP_GET(flag) \
  14688. WMI_GET_BITS(flag, 15, 1)
  14689. #define WMI_VDEV_STATS_ALT_RSSI_NON_SRG_SET(flag, val) \
  14690. WMI_SET_BITS(flag, 16, 8, val)
  14691. #define WMI_VDEV_STATS_ALT_RSSI_NON_SRG_GET(flag) \
  14692. WMI_GET_BITS(flag, 16, 8)
  14693. #define WMI_VDEV_STATS_ALT_RSSI_SRG_SET(flag, val) \
  14694. WMI_SET_BITS(flag, 24, 8, val)
  14695. #define WMI_VDEV_STATS_ALT_RSSI_SRG_GET(flag) \
  14696. WMI_GET_BITS(flag, 24, 8)
  14697. #define WMI_VDEV_STATS_HE_BSS_COLOR_EN_SET(flag, val) \
  14698. WMI_SET_BITS(flag, 0, 1, val)
  14699. #define WMI_VDEV_STATS_HE_BSS_COLOR_EN_GET(flag) \
  14700. WMI_GET_BITS(flag, 0, 1)
  14701. #define WMI_VDEV_STATS_HE_TXBF_OFDMA_SET(flag, val) \
  14702. WMI_SET_BITS(flag, 1, 1, val)
  14703. #define WMI_VDEV_STATS_HE_TXBF_OFDMA_GET(flag) \
  14704. WMI_GET_BITS(flag, 1, 1)
  14705. #define WMI_VDEV_STATS_NON_SRG_ENABLE_SET(flag, val) \
  14706. WMI_SET_BITS(flag, 2, 1, val)
  14707. #define WMI_VDEV_STATS_NON_SRG_ENABLE_GET(flag) \
  14708. WMI_GET_BITS(flag, 2, 1)
  14709. #define WMI_VDEV_STATS_SRG_ENABLE_SET(flag, val) \
  14710. WMI_SET_BITS(flag, 3, 1, val)
  14711. #define WMI_VDEV_STATS_SRG_ENABLE_GET(flag) \
  14712. WMI_GET_BITS(flag, 3, 1)
  14713. #define WMI_VDEV_STATS_SRP_ENABLE_SET(flag, val) \
  14714. WMI_SET_BITS(flag, 4, 1, val)
  14715. #define WMI_VDEV_STATS_SRP_ENABLE_GET(flag) \
  14716. WMI_GET_BITS(flag, 4, 1)
  14717. #define WMI_VDEV_STATS_SR_INITIALIZED_SET(flag, val) \
  14718. WMI_SET_BITS(flag, 5, 1, val)
  14719. #define WMI_VDEV_STATS_SR_INITIALIZED_GET(flag) \
  14720. WMI_GET_BITS(flag, 5, 1)
  14721. #define WMI_VDEV_STATS_SR_RINGS_INITIALIZED_SET(flag, val) \
  14722. WMI_SET_BITS(flag, 6, 1, val)
  14723. #define WMI_VDEV_STATS_SR_RINGS_INITIALIZED_GET(flag) \
  14724. WMI_GET_BITS(flag, 6, 1)
  14725. #define WMI_VDEV_STATS_PER_AC_OBSS_PD_ENABLE_SET(flag, val) \
  14726. WMI_SET_BITS(flag, 7, 4, val)
  14727. #define WMI_VDEV_STATS_PER_AC_OBSS_PD_ENABLE_GET(flag) \
  14728. WMI_GET_BITS(flag, 7, 4)
  14729. #define WMI_VDEV_STATS_IFUP_SET(flag, val) \
  14730. WMI_SET_BITS(flag, 11, 1, val)
  14731. #define WMI_VDEV_STATS_IFUP_GET(flag) \
  14732. WMI_GET_BITS(flag, 11, 1)
  14733. #define WMI_VDEV_STATS_IFACTIVE_SET(flag, val) \
  14734. WMI_SET_BITS(flag, 12, 1, val)
  14735. #define WMI_VDEV_STATS_IFACTIVE_GET(flag) \
  14736. WMI_GET_BITS(flag, 12, 1)
  14737. #define WMI_VDEV_STATS_IFPAUSED_SET(flag, val) \
  14738. WMI_SET_BITS(flag, 13, 1, val)
  14739. #define WMI_VDEV_STATS_IFPAUSED_GET(flag) \
  14740. WMI_GET_BITS(flag, 13, 1)
  14741. #define WMI_VDEV_STATS_IFOUTOFSYNC_SET(flag, val) \
  14742. WMI_SET_BITS(flag, 14, 1, val)
  14743. #define WMI_VDEV_STATS_IFOUTOFSYNC_GET(flag) \
  14744. WMI_GET_BITS(flag, 14, 1)
  14745. #define WMI_VDEV_STATS_IS_FREE_SET(flag, val) \
  14746. WMI_SET_BITS(flag, 15, 1, val)
  14747. #define WMI_VDEV_STATS_IS_FREE_GET(flag) \
  14748. WMI_GET_BITS(flag, 15, 1)
  14749. #define WMI_VDEV_STATS_IS_NAWDS_SET(flag, val) \
  14750. WMI_SET_BITS(flag, 16, 1, val)
  14751. #define WMI_VDEV_STATS_IS_NAWDS_GET(flag) \
  14752. WMI_GET_BITS(flag, 16, 1)
  14753. #define WMI_VDEV_STATS_HW_FLAG_SET(flag, val) \
  14754. WMI_SET_BITS(flag, 17, 1, val)
  14755. #define WMI_VDEV_STATS_HW_FLAG_GET(flag) \
  14756. WMI_GET_BITS(flag, 17, 1)
  14757. #define WMI_VDEV_STATS_CH_REQ_FLAG_SET(flag, val) \
  14758. WMI_SET_BITS(flag, 18, 2, val)
  14759. #define WMI_VDEV_STATS_CH_REQ_FLAG_GET(flag) \
  14760. WMI_GET_BITS(flag, 18, 2)
  14761. #define WMI_VDEV_STATS_RESTART_RESP_SET(flag, val) \
  14762. WMI_SET_BITS(flag, 20, 1, val)
  14763. #define WMI_VDEV_STATS_RESTART_RESP_GET(flag) \
  14764. WMI_GET_BITS(flag, 20, 1)
  14765. #define WMI_VDEV_STATS_FIRST_BEACON_RECV_WAIT_SET(flag, val) \
  14766. WMI_SET_BITS(flag, 21, 1, val)
  14767. #define WMI_VDEV_STATS_FIRST_BEACON_RECV_WAIT_GET(flag) \
  14768. WMI_GET_BITS(flag, 21, 1)
  14769. #define WMI_VDEV_STATS_ERPENABLED_SET(flag, val) \
  14770. WMI_SET_BITS(flag, 22, 1, val)
  14771. #define WMI_VDEV_STATS_ERPENABLED_GET(flag) \
  14772. WMI_GET_BITS(flag, 22, 1)
  14773. #define WMI_VDEV_STATS_START_RESPONDED_SET(flag, val) \
  14774. WMI_SET_BITS(flag, 23, 1, val)
  14775. #define WMI_VDEV_STATS_START_RESPONDED_GET(flag) \
  14776. WMI_GET_BITS(flag, 23, 1)
  14777. #define WMI_VDEV_STATS_BCN_SYNC_CRIT_REQ_ACT_SET(flag, val) \
  14778. WMI_SET_BITS(flag, 24, 1, val)
  14779. #define WMI_VDEV_STATS_BCN_SYNC_CRIT_REQ_ACT_GET(flag) \
  14780. WMI_GET_BITS(flag, 24, 1)
  14781. #define WMI_VDEV_STATS_RECAL_NOTIF_REGISTERED_SET(flag, val) \
  14782. WMI_SET_BITS(flag, 25, 1, val)
  14783. #define WMI_VDEV_STATS_RECAL_NOTIF_REGISTERED_GET(flag) \
  14784. WMI_GET_BITS(flag, 25, 1)
  14785. #define WMI_VDEV_STATS_BCN_TX_PAUSED_SET(flag, val) \
  14786. WMI_SET_BITS(flag, 26, 1, val)
  14787. #define WMI_VDEV_STATS_BCN_TX_PAUSED_GET(flag) \
  14788. WMI_GET_BITS(flag, 26, 1)
  14789. #define WMI_VDEV_STATS_HE_BSS_COLOR_EN_BYPASS_SET(flag, val) \
  14790. WMI_SET_BITS(flag, 27, 1, val)
  14791. #define WMI_VDEV_STATS_HE_BSS_COLOR_EN_BYPASS_GET(flag) \
  14792. WMI_GET_BITS(flag, 27, 1)
  14793. #define WMI_VDEV_STATS_DEFAULT_BA_MODE_SET(flag, val) \
  14794. WMI_SET_BITS(flag, 28, 1, val)
  14795. #define WMI_VDEV_STATS_DEFAULT_BA_MODE_GET(flag) \
  14796. WMI_GET_BITS(flag, 28, 1)
  14797. #define WMI_VDEV_STATS_BA_256_BITMAP_ENABLE_SET(flag, val) \
  14798. WMI_SET_BITS(flag, 29, 1, val)
  14799. #define WMI_VDEV_STATS_BA_256_BITMAP_ENABLE_GET(flag) \
  14800. WMI_GET_BITS(flag, 29, 1)
  14801. #define WMI_VDEV_STATS_BA_256_BITMAP_TX_DISABLE_SET(flag, val) \
  14802. WMI_SET_BITS(flag, 30, 1, val)
  14803. #define WMI_VDEV_STATS_BA_256_BITMAP_TX_DISABLE_GET(flag) \
  14804. WMI_GET_BITS(flag, 30, 1)
  14805. #define WMI_VDEV_STATS_IS_MULTI_GROUP_KEY_ENABLED_SET(flag, val) \
  14806. WMI_SET_BITS(flag, 31, 1, val)
  14807. #define WMI_VDEV_STATS_IS_MULTI_GROUP_KEY_ENABLED_GET(flag) \
  14808. WMI_GET_BITS(flag, 31, 1)
  14809. typedef struct {
  14810. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_sta_rrm_stats_struct */
  14811. A_UINT32 tlv_header;
  14812. A_UINT32 dot11GroupTransmittedFrameCount;
  14813. A_UINT32 dot11GroupReceivedFrameCount;
  14814. A_UINT32 dot11TransmittedFrameCount;
  14815. A_UINT32 dot11AckFailureCount;
  14816. A_UINT32 dot11FailedCount;
  14817. A_UINT32 dot11FCSErrorCount;
  14818. A_UINT32 dot11RTSSuccessCount;
  14819. A_UINT32 dot11RTSFailureCount;
  14820. } wmi_ctrl_path_sta_rrm_stats_struct;
  14821. typedef struct {
  14822. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_vdev_bcn_stats_struct */
  14823. A_UINT32 tlv_header;
  14824. A_UINT32 vdev_id;
  14825. A_UINT32 beacon_succ_cnt;
  14826. A_UINT32 beacon_outage_cnt;
  14827. A_UINT32 beacon_cons_miss_cnt;
  14828. A_UINT32 beacon_curr_miss_cnt;
  14829. A_UINT32 beacon_sw_abort_cnt;
  14830. A_UINT32 beacon_tx_filter_cnt;
  14831. A_UINT32 beacon_tx_xretry_cnt;
  14832. A_UINT32 beacon_tx_drop_cnt;
  14833. A_UINT32 beacon_tx_abort_cnt;
  14834. A_UINT32 beacon_tx_tid_del_cnt;
  14835. A_UINT32 beacon_tx_mig_drop_cnt;
  14836. A_UINT32 beacon_fail_others_cnt;
  14837. A_UINT32 beacon_stuck_cnt;
  14838. A_UINT32 beacon_tbtt_skip_cnt;
  14839. A_UINT32 beacon_swba_cnt;
  14840. A_UINT32 beacon_enque_fail;
  14841. A_UINT32 scan_time_exceed_cnt;
  14842. A_UINT32 beacon_miss_systime_gap_us;
  14843. A_UINT32 beacon_last_miss_time_low_us;
  14844. A_UINT32 beacon_last_miss_time_high_us;
  14845. A_UINT32 last_tbtt_time_low_us;
  14846. A_UINT32 last_tbtt_time_high_us;
  14847. A_UINT32 last_tbtt_update_low_us;
  14848. A_UINT32 last_tbtt_update_high_us;
  14849. } wmi_ctrl_path_vdev_bcn_tx_stats_struct;
  14850. typedef struct {
  14851. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_pdev_bcn_stats_struct */
  14852. A_UINT32 tlv_header;
  14853. A_UINT32 pdev_id;
  14854. A_UINT32 beacon_succ_cnt;
  14855. A_UINT32 beacon_outage_cnt;
  14856. A_UINT32 beacon_sw_abort_cnt;
  14857. A_UINT32 beacon_tx_filter_cnt;
  14858. A_UINT32 beacon_tx_xretry_cnt;
  14859. A_UINT32 beacon_tx_drop_cnt;
  14860. A_UINT32 beacon_tx_abort_cnt;
  14861. A_UINT32 beacon_tx_tid_del_cnt;
  14862. A_UINT32 beacon_tx_mig_drop_cnt;
  14863. A_UINT32 beacon_fail_others_cnt;
  14864. A_UINT32 beacon_stuck_cnt;
  14865. A_UINT32 beacon_swba_cnt;
  14866. A_UINT32 beacon_enque_fail;
  14867. } wmi_ctrl_path_pdev_bcn_tx_stats_struct;
  14868. /**
  14869. * peer statistics.
  14870. */
  14871. typedef struct {
  14872. /** peer MAC address */
  14873. wmi_mac_addr peer_macaddr;
  14874. /** RSSI */
  14875. A_UINT32 peer_rssi;
  14876. /** last tx data rate used for peer */
  14877. A_UINT32 peer_tx_rate;
  14878. /** last rx data rate used for peer */
  14879. A_UINT32 peer_rx_rate;
  14880. } wmi_peer_stats;
  14881. /**
  14882. * Peer extension statistics
  14883. */
  14884. typedef struct {
  14885. /** peer MAC address */
  14886. wmi_mac_addr peer_macaddr;
  14887. /* lower 32 bits of rx duration in microseconds */
  14888. A_UINT32 rx_duration;
  14889. /** Total TX bytes (including dot11 header) sent to peer */
  14890. A_UINT32 peer_tx_bytes;
  14891. /** Total RX bytes (including dot11 header) received from peer */
  14892. A_UINT32 peer_rx_bytes;
  14893. /** last TX ratecode */
  14894. A_UINT32 last_tx_rate_code;
  14895. /** TX power used by peer - units are 0.5 dBm */
  14896. A_INT32 last_tx_power;
  14897. /* Total number of received multicast & broadcast data frames corresponding to this peer */
  14898. A_UINT32 rx_mc_bc_cnt; /* 1 in the MSB of rx_mc_bc_cnt represents a valid data */
  14899. /* upper 32 bits of rx duration in microseconds */
  14900. A_UINT32 rx_duration_u32; /* 1 in the most significant bit indicates this field contains valid data */
  14901. A_UINT32 reserved[2]; /** for future use - add new peer stats here */
  14902. } wmi_peer_extd_stats;
  14903. typedef struct {
  14904. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_extd2_stats */
  14905. /** peer MAC address */
  14906. wmi_mac_addr peer_macaddr;
  14907. /*
  14908. * The following rx_bytes field (lower/upper pair) counts only the
  14909. * MSDU bytes (after 802.11 decap, if applicable), and thus doesn't
  14910. * count the 802.11 header, unlike the wmi_peer_extd_stats.peer_rx_bytes
  14911. * and wmi_peer_stats_info.rx_bytes fields.
  14912. */
  14913. /** Lower 32 bits of the rx_bytes (size of MSDUs) excluding dot11 header from this peer */
  14914. A_UINT32 rx_bytes_l32;
  14915. /** Upper 32 bits of the rx_bytes (size of MSDUs) excluding dot11 header from this peer */
  14916. A_UINT32 rx_bytes_u32;
  14917. /** Number of MPDUS received with FCS error from this peer */
  14918. A_UINT32 rx_fcs_err;
  14919. /** Number of MPDUs(both data and non data) received from this peer */
  14920. A_UINT32 rx_mpdus;
  14921. /** nss of last tx data to peer */
  14922. A_UINT32 last_tx_nss;
  14923. /** nss of last rx data from peer */
  14924. A_UINT32 last_rx_nss;
  14925. /** chain mask used for last tx data to peer */
  14926. A_UINT32 last_tx_chain_mask;
  14927. /** chain mask used for last rx data from peer */
  14928. A_UINT32 last_rx_chain_mask;
  14929. } wmi_peer_extd2_stats;
  14930. typedef struct {
  14931. /** Primary channel freq of the channel for which stats are sent */
  14932. A_UINT32 chan_mhz;
  14933. /** Time spent on the channel */
  14934. A_UINT32 sampling_period_us;
  14935. /** Aggregate duration over a sampling period for which channel activity was observed */
  14936. A_UINT32 rx_clear_count;
  14937. /** Accumalation of the TX PPDU duration over a sampling period */
  14938. A_UINT32 tx_duration_us;
  14939. /** Accumalation of the RX PPDU duration over a sampling period */
  14940. A_UINT32 rx_duration_us;
  14941. } wmi_chan_stats;
  14942. /**
  14943. * MIB statistics. See 802.11 spec for the meaning of each field.
  14944. */
  14945. typedef struct {
  14946. A_UINT32 tx_mpdu_grp_frag_cnt; /*dot11TransmittedFragmentCount */
  14947. A_UINT32 tx_msdu_grp_frm_cnt; /*dot11GroupTransmittedFrameCount */
  14948. A_UINT32 tx_msdu_fail_cnt; /*dot11FailedCount*/
  14949. A_UINT32 rx_mpdu_frag_cnt; /*dot11ReceivedFragmentCount*/
  14950. A_UINT32 rx_msdu_grp_frm_cnt; /*dot11GroupReceivedFrameCount*/
  14951. A_UINT32 rx_mpdu_fcs_err; /*dot11FCSErrorCount*/
  14952. A_UINT32 tx_msdu_frm_cnt; /*dot11TransmittedFrameCount*/
  14953. A_UINT32 tx_msdu_retry_cnt; /*dot11RetryCount*/
  14954. A_UINT32 rx_frm_dup_cnt; /*dot11FrameDuplicateCount */
  14955. A_UINT32 tx_rts_success_cnt; /*dot11RTSSuccessCount*/
  14956. A_UINT32 tx_rts_fail_cnt; /*dot11RTSFailureCount*/
  14957. A_UINT32 tx_Qos_mpdu_grp_frag_cnt; /*dot11QosTransmittedFragmentCount */
  14958. A_UINT32 tx_Qos_msdu_fail_UP; /*dot11QosFailedCount */
  14959. A_UINT32 tx_Qos_msdu_retry_UP; /*dot11QosRetryCount */
  14960. A_UINT32 rx_Qos_frm_dup_cnt_UP; /*dot11QosFrameDuplicateCount*/
  14961. A_UINT32 tx_Qos_rts_success_cnt_UP; /*dot11QosRTSSuccessCount*/
  14962. A_UINT32 tx_Qos_rts_fail_cnt_UP; /*dot11QosRTSFailureCount*/
  14963. A_UINT32 rx_Qos_mpdu_frag_cnt_UP; /*dot11QosReceivedFragmentCount*/
  14964. A_UINT32 tx_Qos_msdu_frm_cnt_UP; /*dot11QosTransmittedFrameCount*/
  14965. A_UINT32 rx_Qos_msdu_discard_cnt_UP; /*dot11QosDiscardedFrameCount*/
  14966. A_UINT32 rx_Qos_mpdu_cnt; /*dot11QosMPDUsReceivedCount*/
  14967. A_UINT32 rx_Qos_mpdu_retryBit_cnt; /*dot11QosRetriesReceivedCount*/
  14968. A_UINT32 rsna_Mgmt_discard_CCMP_replay_err_cnt; /*dot11RSNAStatsRobustMgmtCCMPReplays*/
  14969. A_UINT32 rsna_TKIP_icv_err_cnt; /*dot11RSNAStatsTKIPICVErrors*/
  14970. A_UINT32 rsna_TKIP_replay_err_cnt; /*dot11RSNAStatsTKIPReplays*/
  14971. A_UINT32 rsna_CCMP_decrypt_err_cnt; /*dot11RSNAStatsCCMPDecryptErrors*/
  14972. A_UINT32 rsna_CCMP_replay_err_cnt; /*dot11RSNAStatsCCMPReplays*/
  14973. A_UINT32 tx_ampdu_cnt; /*dot11TransmittedAMPDUCount*/
  14974. A_UINT32 tx_mpdu_cnt_in_ampdu; /*dot11TransmittedMPDUsInAMPDUCount*/
  14975. union {
  14976. A_UINT64 counter; /* for use by target only */
  14977. struct {
  14978. A_UINT32 low;
  14979. A_UINT32 high;
  14980. } upload; /* for use by host */
  14981. } tx_octets_in_ampdu; /*dot11TransmittedOctetsInAMPDUCount*/
  14982. A_UINT32 rx_ampdu_cnt; /*dot11AMPDUReceivedCount*/
  14983. A_UINT32 rx_mpdu_cnt_in_ampdu; /*dot11MPDUInReceivedAMPDUCount*/
  14984. union {
  14985. A_UINT64 counter; /* for use by target only */
  14986. struct {
  14987. A_UINT32 rx_octets_in_ampdu_low;
  14988. A_UINT32 rx_octets_in_ampdu_high;
  14989. } upload; /* for use by host */
  14990. } rx_octets_in_ampdu; /*dot11ReceivedOctetsInAMPDUCount*/
  14991. A_UINT32 reserved_1;
  14992. A_UINT32 reserved_2;
  14993. A_UINT32 reserved_3;
  14994. A_UINT32 reserved_4;
  14995. } wmi_mib_stats;
  14996. /**
  14997. * MIB extension statistics.
  14998. */
  14999. typedef struct {
  15000. A_UINT32 tx_msdu_multi_retry_cnt; /*dot11MultipleRetryCount*/
  15001. A_UINT32 tx_ack_fail_cnt; /*dot11ACKFailureCount*/
  15002. A_UINT32 tx_qos_msdu_multi_retry_up; /*dot11QosMultipleRetryCount*/
  15003. A_UINT32 tx_qos_ack_fail_cnt_up; /*dot11QosACKFailureCount*/
  15004. A_UINT32 rsna_cmac_icv_err_cnt; /*dot11RSNAStatsCMACICVErrors*/
  15005. A_UINT32 rsna_cmac_replay_err_cnt; /*dot11RSNAStatsCMACReplays*/
  15006. A_UINT32 rx_ampdu_deli_crc_err_cnt; /*dot11AMPDUDelimiterCRCErrorCount*/
  15007. A_UINT32 reserved[8]; /* Reserve more fields for future extension */
  15008. } wmi_mib_extd_stats;
  15009. /**
  15010. * Beacon protection statistics.
  15011. */
  15012. typedef struct {
  15013. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmf_bcn_protect_stats */
  15014. A_UINT32 igtk_mic_fail_cnt; /* MIC failure count of management packets using IGTK */
  15015. A_UINT32 igtk_replay_cnt; /* Replay detection count of management packets using IGTK */
  15016. A_UINT32 bcn_mic_fail_cnt; /* MIC failure count of beacon packets using BIGTK */
  15017. A_UINT32 bcn_replay_cnt; /* Replay detection count of beacon packets using BIGTK */
  15018. } wmi_pmf_bcn_protect_stats;
  15019. typedef struct {
  15020. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_stats */
  15021. A_UINT32 vdev_id;
  15022. A_INT32 rssi_avg_beacon[WMI_MAX_CHAINS];
  15023. A_INT32 rssi_avg_data[WMI_MAX_CHAINS];
  15024. wmi_mac_addr peer_macaddr;
  15025. } wmi_rssi_stats;
  15026. typedef struct {
  15027. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_congestion_stats */
  15028. A_UINT32 vdev_id;
  15029. /* congestion -
  15030. * This field holds the congestion percentage = (busy_time/total_time)*100
  15031. * for the interval from when the vdev was started to the current time
  15032. * (or the time at which the vdev was stopped).
  15033. */
  15034. A_UINT32 congestion;
  15035. } wmi_congestion_stats;
  15036. typedef struct {
  15037. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_per_chain_rssi_stats */
  15038. A_UINT32 num_per_chain_rssi_stats;
  15039. /* This TLV is followed by another TLV of array of structs:
  15040. * wmi_rssi_stats rssi_stats[num_per_chain_rssi_stats];
  15041. */
  15042. } wmi_per_chain_rssi_stats;
  15043. /* vdev control flags (per bits) */
  15044. #define VDEV_FLAGS_NON_MBSSID_AP 0x00000001 /* legacy AP */
  15045. #define VDEV_FLAGS_TRANSMIT_AP 0x00000002 /* indicate if this vdev is transmitting AP */
  15046. #define VDEV_FLAGS_NON_TRANSMIT_AP 0x00000004 /* explicitly indicate this vdev is non-transmitting AP */
  15047. #define VDEV_FLAGS_EMA_MODE 0x00000008 /* vdev is EMA and supports multiple beacon profiles.
  15048. * Once this flag set, flags VDEV_FLAGS_TRANSMIT_AP and
  15049. * VDEV_FLAGS_NON_TRANSMIT_AP classify it as either Tx vap
  15050. * or non Tx vap.
  15051. */
  15052. #define VDEV_FLAGS_SCAN_MODE_VAP 0x00000010 /* for Scan Radio vdev will be special vap.
  15053. * There will not be WMI_VDEV_UP_CMD, there will be only WMI_VDEV_CREATE_CMD
  15054. * and WMI_VDEV_START_REQUEST_CMD. Based on this parameter need to make decision like
  15055. * vdev Pause/Unpause at WMI_VDEV_START_REQUEST_CMD.
  15056. */
  15057. /* get/set/check macros for VDEV_FLAGS_SCAN_MODE_VAP flag */
  15058. #define WMI_SCAN_MODE_VDEV_FLAG_GET(flag) WMI_GET_BITS(flag, 4, 1)
  15059. #define WMI_SCAN_MODE_VDEV_FLAG_SET(flag, val) WMI_SET_BITS(flag, 4, 1, val)
  15060. #define WMI_SCAN_MODE_VDEV_FLAG_ENABLED(flag) ((flag & VDEV_FLAGS_SCAN_MODE_VAP) ? 1 : 0)
  15061. typedef struct {
  15062. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */
  15063. /** unique id identifying the VDEV, generated by the caller */
  15064. A_UINT32 vdev_id;
  15065. /** VDEV type (AP,STA,IBSS,MONITOR) */
  15066. A_UINT32 vdev_type;
  15067. /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0, BRIDGE) */
  15068. A_UINT32 vdev_subtype;
  15069. /** VDEV MAC address */
  15070. wmi_mac_addr vdev_macaddr;
  15071. /** Number of configured txrx streams */
  15072. A_UINT32 num_cfg_txrx_streams;
  15073. /**
  15074. * pdev_id for identifying the MAC,
  15075. * See macros starting with WMI_PDEV_ID_ for values.
  15076. */
  15077. A_UINT32 pdev_id;
  15078. /** control flags for this vdev (DEPRECATED)
  15079. * Use @mbss_capability_flags in vdev start instead.
  15080. */
  15081. A_UINT32 flags;
  15082. /** vdevid of transmitted AP (mbssid case) (DEPRECATED)
  15083. * Use @vdevid_trans in vdev start instead.
  15084. */
  15085. A_UINT32 vdevid_trans;
  15086. /* vdev_stats_id_valid indicates whether vdev_stats_id is valid */
  15087. A_UINT32 vdev_stats_id_valid;
  15088. /**
  15089. * vdev_stats_id indicates the ID for the REO Rx stats collection
  15090. * For Beryllium: 0-47 is the valid range and >=48 is invalid
  15091. * This vdev_stats_id field should be ignored unless the
  15092. * vdev_stats_id_valid field is non-zero.
  15093. */
  15094. A_UINT32 vdev_stats_id;
  15095. /* This TLV is followed by another TLV of array of structures
  15096. * wmi_vdev_txrx_streams cfg_txrx_streams[];
  15097. * wmi_vdev_create_mlo_params mlo_params[0,1];
  15098. * optional TLV, only present for MLO vdev;
  15099. * if the vdev is not MLO the array length should be 0.
  15100. */
  15101. } wmi_vdev_create_cmd_fixed_param;
  15102. typedef struct {
  15103. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_txrx_streams */
  15104. /* band - Should take values from wmi_channel_band_mask */
  15105. A_UINT32 band;
  15106. /* max supported tx streams per given band for this vdev */
  15107. A_UINT32 supported_tx_streams;
  15108. /* max supported rx streams per given band for this vdev */
  15109. A_UINT32 supported_rx_streams;
  15110. } wmi_vdev_txrx_streams;
  15111. /* wmi_p2p_noa_descriptor structure can't be modified without breaking the compatibility for WMI_HOST_SWBA_EVENTID */
  15112. typedef struct {
  15113. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor */
  15114. A_UINT32 type_count; /** 255: continuous schedule, 0: reserved */
  15115. A_UINT32 duration; /** Absent period duration in micro seconds */
  15116. A_UINT32 interval; /** Absent period interval in micro seconds */
  15117. A_UINT32 start_time; /** 32 bit tsf time when in starts */
  15118. } wmi_p2p_noa_descriptor;
  15119. /*
  15120. * mlo_flags sub-fields:
  15121. * bits 0 - mlo enable flag;
  15122. * bits 1 - assoc link flag;
  15123. * bits 2 - primary_umac flag;
  15124. * bits 3 - is logical link index valid
  15125. * bits 4 - is mlo peer id valid
  15126. */
  15127. #define WMI_MLO_FLAGS_GET_ENABLED(mlo_flags) WMI_GET_BITS(mlo_flags, 0, 1)
  15128. #define WMI_MLO_FLAGS_SET_ENABLED(mlo_flags, value) WMI_SET_BITS(mlo_flags, 0, 1, value)
  15129. #define WMI_MLO_FLAGS_GET_ASSOC_LINK(mlo_flags) WMI_GET_BITS(mlo_flags, 1, 1)
  15130. #define WMI_MLO_FLAGS_SET_ASSOC_LINK(mlo_flags, value) WMI_SET_BITS(mlo_flags, 1, 1, value)
  15131. #define WMI_MLO_FLAGS_GET_PRIMARY_UMAC(mlo_flags) WMI_GET_BITS(mlo_flags, 2, 1)
  15132. #define WMI_MLO_FLAGS_SET_PRIMARY_UMAC(mlo_flags, value) WMI_SET_BITS(mlo_flags, 2, 1, value)
  15133. #define WMI_MLO_FLAGS_GET_LINK_INDEX_VALID(mlo_flags) WMI_GET_BITS(mlo_flags, 3, 1)
  15134. #define WMI_MLO_FLAGS_SET_LINK_INDEX_VALID(mlo_flags, value) WMI_SET_BITS(mlo_flags, 3, 1, value)
  15135. #define WMI_MLO_FLAGS_GET_PEER_ID_VALID(mlo_flags) WMI_GET_BITS(mlo_flags, 4, 1)
  15136. #define WMI_MLO_FLAGS_SET_PEER_ID_VALID(mlo_flags, value) WMI_SET_BITS(mlo_flags, 4, 1, value)
  15137. #define WMI_MLO_FLAGS_GET_MCAST_VDEV(mlo_flags) WMI_GET_BITS(mlo_flags, 5, 1)
  15138. #define WMI_MLO_FLAGS_SET_MCAST_VDEV(mlo_flags, value) WMI_SET_BITS(mlo_flags, 5, 1, value)
  15139. #define WMI_MLO_FLAGS_GET_EMLSR_SUPPORT(mlo_flags) WMI_GET_BITS(mlo_flags, 6, 1)
  15140. #define WMI_MLO_FLAGS_SET_EMLSR_SUPPORT(mlo_flags, value) WMI_SET_BITS(mlo_flags, 6, 1, value)
  15141. #define WMI_MLO_FLAGS_GET_FORCE_LINK_INACTIVE(mlo_flags) WMI_GET_BITS(mlo_flags, 7, 1)
  15142. #define WMI_MLO_FLAGS_SET_FORCE_LINK_INACTIVE(mlo_flags, value) WMI_SET_BITS(mlo_flags, 7, 1, value)
  15143. #define WMI_MLO_FLAGS_GET_LINK_ADD(mlo_flags) WMI_GET_BITS(mlo_flags, 8, 1)
  15144. #define WMI_MLO_FLAGS_SET_LINK_ADD(mlo_flags, value) WMI_SET_BITS(mlo_flags, 8, 1, value)
  15145. #define WMI_MLO_FLAGS_GET_LINK_DEL(mlo_flags) WMI_GET_BITS(mlo_flags, 9, 1)
  15146. #define WMI_MLO_FLAGS_SET_LINK_DEL(mlo_flags, value) WMI_SET_BITS(mlo_flags, 9, 1, value)
  15147. #define WMI_MLO_FLAGS_GET_BRIDGE_PEER(mlo_flags) WMI_GET_BITS(mlo_flags, 10, 1)
  15148. #define WMI_MLO_FLAGS_SET_BRIDGE_PEER(mlo_flags, value) WMI_SET_BITS(mlo_flags, 10, 1, value)
  15149. #define WMI_MLO_FLAGS_GET_NSTR_BITMAP_PRESENT(mlo_flags) WMI_GET_BITS(mlo_flags, 11, 1)
  15150. #define WMI_MLO_FLAGS_SET_NSTR_BITMAP_PRESENT(mlo_flags, value) WMI_SET_BITS(mlo_flags, 11, 1, value)
  15151. #define WMI_MLO_FLAGS_GET_NSTR_BITMAP_SIZE(mlo_flags) WMI_GET_BITS(mlo_flags, 12, 1)
  15152. #define WMI_MLO_FLAGS_SET_NSTR_BITMAP_SIZE(mlo_flags, value) WMI_SET_BITS(mlo_flags, 12, 1, value)
  15153. #define WMI_MLO_FLAGS_GET_MLO_LINK_SWITCH(mlo_flags) WMI_GET_BITS(mlo_flags, 13, 1)
  15154. #define WMI_MLO_FLAGS_SET_MLO_LINK_SWITCH(mlo_flags, value) WMI_SET_BITS(mlo_flags, 13, 1, value)
  15155. #define WMI_MLO_FLAGS_GET_MLO_BRIDGE_LINK(mlo_flags) WMI_GET_BITS(mlo_flags, 14, 1)
  15156. #define WMI_MLO_FLAGS_SET_MLO_BRIDGE_LINK(mlo_flags, value) WMI_SET_BITS(mlo_flags, 14, 1, value)
  15157. /* this structure used for pass mlo flags*/
  15158. typedef struct {
  15159. union {
  15160. struct {
  15161. A_UINT32 mlo_enabled:1, /* indicate is MLO enabled */
  15162. mlo_assoc_link:1, /* indicate is the link used to initialize the association of mlo connection */
  15163. mlo_primary_umac:1, /* indicate is the link on primary UMAC, WIN only flag */
  15164. mlo_logical_link_index_valid:1, /* indicate if the logial link index in wmi_peer_assoc_mlo_params is valid */
  15165. mlo_peer_id_valid:1, /* indicate if the mlo peer id in wmi_peer_assoc_mlo_params is valid */
  15166. mlo_mcast_vdev:1, /* indicate this is the MLO mcast primary vdev */
  15167. emlsr_support:1, /* indicate that eMLSR is supported */
  15168. mlo_force_link_inactive:1, /* indicate this link is forced inactive */
  15169. mlo_link_add:1, /* Indicate dynamic link addition in an MLD VAP */
  15170. mlo_link_del:1, /* Indicate dynamic link deletion in an MLD VAP */
  15171. mlo_bridge_peer:1, /* Indicate if this link has bridge_peer */
  15172. nstr_bitmap_present:1, /* Indicate if at least one NSTR link pair is present in the MLD */
  15173. /* nstr_bitmap_size:
  15174. * Set to 1 if the length of the corresponding NSTR
  15175. * Indication Bitmap subfield is equal to 2 octets.
  15176. * Set to 0 if the length of the corresponding NSTR
  15177. * Indication Bitmap subfield is equal to 1 octet.
  15178. */
  15179. nstr_bitmap_size:1,
  15180. mlo_link_switch: 1, /* indicate the command is a part of link switch procedure */
  15181. mlo_bridge_link:1, /* indicate link is bridge link */
  15182. unused: 17;
  15183. };
  15184. A_UINT32 mlo_flags;
  15185. };
  15186. /* NOTE:
  15187. * Since this struct is embedded inside WMI TLV structs, it cannot
  15188. * have any fields added, as expanding this struct would break
  15189. * backwards-compatibility by changing the offsets of the subsequent
  15190. * fields in the structs that contain this struct.
  15191. */
  15192. } wmi_mlo_flags;
  15193. typedef struct {
  15194. A_UINT32 tlv_header;/** TLV tag (WMITLV_TAG_STRUC_wmi_partner_link_params) and len;*/
  15195. A_UINT32 vdev_id; /** partner vdev_id */
  15196. A_UINT32 hw_link_id; /** hw_link_id: Unique link id across SOCs, got as part of QMI handshake */
  15197. wmi_mac_addr vdev_macaddr; /** VDEV MAC address */
  15198. wmi_mlo_flags mlo_flags;
  15199. } wmi_partner_link_params;
  15200. /* this TLV structure used for pass mlo parameters on vdev create*/
  15201. typedef struct {
  15202. A_UINT32 tlv_header; /** TLV tag and len; */
  15203. /** MLD MAC address */
  15204. wmi_mac_addr mld_macaddr;
  15205. } wmi_vdev_create_mlo_params;
  15206. /* this TLV structure used for pass mlo parameters on vdev start*/
  15207. typedef struct {
  15208. A_UINT32 tlv_header; /** TLV tag and len; */
  15209. wmi_mlo_flags mlo_flags; /*only mlo enable and assoc link flag need by vdev start*/
  15210. } wmi_vdev_start_mlo_params;
  15211. /* this TLV structure used for passing mlo parameters on vdev stop */
  15212. typedef struct {
  15213. A_UINT32 tlv_header; /** TLV tag and len; */
  15214. wmi_mlo_flags mlo_flags; /* only mlo_link_switch flag needed by vdev stop */
  15215. } wmi_vdev_stop_mlo_params;
  15216. typedef struct {
  15217. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_update_mac_addr_cmd_fixed_param */
  15218. /** Unique id identifying the VDEV to update mac addr */
  15219. A_UINT32 vdev_id;
  15220. /** New VDEV MAC address to configure */
  15221. wmi_mac_addr vdev_macaddr;
  15222. /** New MLD MAC address to configure */
  15223. wmi_mac_addr mld_macaddr;
  15224. } wmi_vdev_update_mac_addr_cmd_fixed_param;
  15225. typedef struct {
  15226. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_update_mac_addr_conf_event_fixed_param */
  15227. /** Unique id identifying the VDEV */
  15228. A_UINT32 vdev_id;
  15229. /*
  15230. * Status of mac address update request.
  15231. * Refer to wmi_vdev_update_mac_addr_conf_status.
  15232. */
  15233. A_UINT32 status;
  15234. } wmi_vdev_update_mac_addr_conf_event_fixed_param;
  15235. /** VDEV update mac address event response status codes */
  15236. typedef enum {
  15237. /** VDEV mac address updated successfully */
  15238. WMI_VDEV_UPDATE_MAC_ADDR_CONF_STATUS_SUCCESS = 0,
  15239. /** Requested VDEV not found */
  15240. WMI_VDEV_UPDATE_MAC_ADDR_CONF_STATUS_INVALID_VDEVID = 1,
  15241. /** Unsupported VDEV combination.eg: received cmd in VDEV connected state */
  15242. WMI_VDEV_UPDATE_MAC_ADDR_CONF_STATUS_NOT_SUPPORTED = 2,
  15243. /** FW internal failure to update mac address */
  15244. WMI_VDEV_UPDATE_MAC_ADDR_CONF_STATUS_INTERNAL_FAIL = 3,
  15245. } wmi_vdev_update_mac_addr_conf_status;
  15246. /** values for vdev_type */
  15247. #define WMI_VDEV_TYPE_AP 0x1
  15248. #define WMI_VDEV_TYPE_STA 0x2
  15249. #define WMI_VDEV_TYPE_IBSS 0x3
  15250. #define WMI_VDEV_TYPE_MONITOR 0x4
  15251. /** VDEV type is for social wifi interface.This VDEV is Currently mainly needed
  15252. * by FW to execute the NAN specific WMI commands and also implement NAN specific
  15253. * operations like Network discovery, service provisioning and service
  15254. * subscription ..etc. If FW needs NAN VDEV then Host should issue VDEV create
  15255. * WMI command to create this VDEV once during initialization and host is not
  15256. * expected to use any VDEV specific WMI commands on this VDEV.
  15257. **/
  15258. #define WMI_VDEV_TYPE_NAN 0x5
  15259. #define WMI_VDEV_TYPE_OCB 0x6
  15260. /* NAN Data Interface */
  15261. #define WMI_VDEV_TYPE_NDI 0x7
  15262. #define WMI_VDEV_TYPE_MESH_POINT 0x8
  15263. /*
  15264. * Param values to be sent for WMI_VDEV_PARAM_SGI command
  15265. * which are used in 11ax, 11be systems
  15266. */
  15267. #define WMI_SGI_LEGACY 0x1 /* for HT and VHT */
  15268. #define WMI_SGI_HE_400_NS 0x2 /* for HE 400 nsec */
  15269. #define WMI_SGI_HE_800_NS 0x4 /* for HE 800 nsec */
  15270. #define WMI_SGI_HE_1600_NS 0x8 /* for HE 1600 nsec */
  15271. #define WMI_SGI_HE_3200_NS 0x10 /* for HE 3200 nsec */
  15272. #define WMI_SGI_EHT_800_NS 0x20 /* for EHT 800 nsec */
  15273. #define WMI_SGI_EHT_1600_NS 0x40 /* for EHT 1600 nsec */
  15274. #define WMI_SGI_EHT_3200_NS 0x80 /* for EHT 3200 nsec */
  15275. /*
  15276. * Param values to be sent for WMI_VDEV_PARAM_HE_LTF command
  15277. * which are used in 11ax systems
  15278. */
  15279. #define WMI_HE_LTF_DEFAULT 0x0
  15280. #define WMI_HE_LTF_1X 0x1
  15281. #define WMI_HE_LTF_2X 0x2
  15282. #define WMI_HE_LTF_4X 0x3
  15283. /*
  15284. * Param values to be sent for WMI_VDEV_EHT_PARAM_LTF command
  15285. * which are used in 11be systems
  15286. */
  15287. #define WMI_EHT_LTF_DEFAULT 0x4
  15288. #define WMI_EHT_LTF_1X 0x5
  15289. #define WMI_EHT_LTF_2X 0x6
  15290. #define WMI_EHT_LTF_4X 0x7
  15291. /** values for vdev_subtype */
  15292. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1
  15293. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2
  15294. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO 0x3
  15295. #define WMI_UNIFIED_VDEV_SUBTYPE_PROXY_STA 0x4
  15296. #define WMI_UNIFIED_VDEV_SUBTYPE_MESH 0x5
  15297. /* new subtype for 11S mesh is required as 11S functionality differs
  15298. * in many ways from proprietary mesh
  15299. * 11S uses 6-addr frame format and supports peering between mesh
  15300. * stations and dynamic best path selection between mesh stations.
  15301. * While in proprietary mesh, neighboring mesh station MAC is manually
  15302. * added to AST table for traffic flow between mesh stations
  15303. */
  15304. #define WMI_UNIFIED_VDEV_SUBTYPE_MESH_11S 0x6
  15305. /* Subtype to indicate that the AP VAP is in smart monitor mode
  15306. * This is needed to differentiate in firmware between normal AP mode
  15307. * with smart monitor AP mode
  15308. */
  15309. #define WMI_UNIFIED_VDEV_SUBTYPE_SMART_MON 0x7
  15310. /* Subtype to indicate that the VDEV is in Bridge mode.
  15311. * Bridge VDEV is dummy VDEV required for 4 chip MLO scenario.
  15312. * Bridge Peer will be connected to Bridge VDEV.
  15313. * Bridge VDEV/PEER will be required to seamlessly transmit
  15314. * to diagonal links in 4 chip MLO.
  15315. */
  15316. #define WMI_UNIFIED_VDEV_SUBTYPE_BRIDGE 0x8
  15317. /** values for vdev_start_request flags */
  15318. /** Indicates that AP VDEV uses hidden ssid. only valid for
  15319. * AP/GO */
  15320. #define WMI_UNIFIED_VDEV_START_HIDDEN_SSID (1<<0)
  15321. /** Indicates if robust management frame/management frame
  15322. * protection is enabled. For GO/AP vdevs, it indicates that
  15323. * it may support station/client associations with RMF enabled.
  15324. * For STA/client vdevs, it indicates that sta will
  15325. * associate with AP with RMF enabled. */
  15326. #define WMI_UNIFIED_VDEV_START_PMF_ENABLED (1<<1)
  15327. /*
  15328. * Host is sending bcn_tx_rate to override the beacon tx rates.
  15329. */
  15330. #define WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT (1<<2)
  15331. /** Indicates if LDPC RX will be advertized inside HT/VHT Capabilities IE
  15332. * of assoc request/response
  15333. */
  15334. #define WMI_UNIFIED_VDEV_START_LDPC_RX_ENABLED (1<<3)
  15335. /** Indicates HW encryption is disabled, and SW encryption is enabled.
  15336. * If This flag is set, indicates that HW encryption will be disabled
  15337. * and SW encryption will be enabled.
  15338. * If SW encryption is enabled, key plumbing will not happen in FW.
  15339. */
  15340. #define WMI_UNIFIED_VDEV_START_HW_ENCRYPTION_DISABLED (1<<4)
  15341. /** Indicates VAP is used for MLO repurpose.
  15342. * This Indicates that vap can be brought up as 11ax or 11be and can be
  15343. * repurposed based on the above stack on the fly to change from MLO to
  15344. * non MLO, currently we support only 11ax and 11be transition.
  15345. */
  15346. #define WMI_UNIFIED_VDEV_START_MLO_REPURPOSE_VAP (1<<5)
  15347. /* BSS color 0-6 */
  15348. #define WMI_HEOPS_COLOR_GET_D2(he_ops) WMI_GET_BITS(he_ops, 0, 6)
  15349. #define WMI_HEOPS_COLOR_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 0, 6, value)
  15350. /* Default PE Duration subfield indicates the PE duration in units of 4 us */
  15351. #define WMI_HEOPS_DEFPE_GET_D2(he_ops) WMI_GET_BITS(he_ops, 6, 3)
  15352. #define WMI_HEOPS_DEFPE_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 6, 3, value)
  15353. /* TWT required */
  15354. #define WMI_HEOPS_TWT_REQUIRED_GET_D2(he_ops) WMI_GET_BITS(he_ops, 9, 1)
  15355. #define WMI_HEOPS_TWT_REQUIRED_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 9, 1, value)
  15356. /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_GET instead */
  15357. #define WMI_HEOPS_TWT_GET_D2(he_ops) \
  15358. WMI_HEOPS_TWT_REQUIRED_GET_D2(he_ops)
  15359. /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_SET instead */
  15360. #define WMI_HEOPS_TWT_SET_D2(he_ops, value) \
  15361. WMI_HEOPS_TWT_REQUIRED_SET_D2(he_ops, value)
  15362. /* RTS threshold in units of 32 us,0 - always use RTS 1023 - this is disabled */
  15363. #define WMI_HEOPS_RTSTHLD_GET_D2(he_ops) WMI_GET_BITS(he_ops, 10, 10)
  15364. #define WMI_HEOPS_RTSTHLD_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 10, 10, value)
  15365. /* Partial BSS Color field indicates whether BSS applies an AID assignment rule using partial BSS color bits */
  15366. #define WMI_HEOPS_PARTBSSCOLOR_GET_D2(he_ops) WMI_GET_BITS(he_ops, 20, 1)
  15367. #define WMI_HEOPS_PARTBSSCOLOR_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 20, 1, value)
  15368. /* MAX BSS supported by MultiBSS element */
  15369. #define WMI_HEOPS_MAXBSSID_GET_D2(he_ops) WMI_GET_BITS(he_ops, 21, 8)
  15370. #define WMI_HEOPS_MAXBSSID_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 21, 8, value)
  15371. /* Tx BSSID Indicator indicates whether HE AP corresponds to transmitted BSSID */
  15372. #define WMI_HEOPS_TXBSSID_GET_D2(he_ops) WMI_GET_BITS(he_ops, 29, 1)
  15373. #define WMI_HEOPS_TXBSSID_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 29, 1, value)
  15374. /* when set to 1 disables use of BSS color */
  15375. #define WMI_HEOPS_BSSCOLORDISABLE_GET_D2(he_ops) WMI_GET_BITS(he_ops, 30, 1)
  15376. #define WMI_HEOPS_BSSCOLORDISABLE_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 30, 1, value)
  15377. /**--- HEOPS_DUALBEACON: DO NOT USE - DEPRECATED ---*/
  15378. /* When set to 1 HE AP transmits beacons using two PHY formats,
  15379. * one in non-HE format and other in an HE_EXT_SU PHY format
  15380. */
  15381. #define WMI_HEOPS_DUALBEACON_GET_D2(he_ops) (0)
  15382. #define WMI_HEOPS_DUALBEACON_SET_D2(he_ops, value) {;}
  15383. #define WMI_MAX_HECAP_PHY_SIZE (3)
  15384. /* Dual Band both 2.4 GHz and 5 GHz Supported */
  15385. #define WMI_HECAP_PHY_DB_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 0, 1)
  15386. #define WMI_HECAP_PHY_DB_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 0, 1, value)
  15387. /*
  15388. * B0: Indicates STA support 40 MHz channel width in 2.4 GHz
  15389. * B1: Indicates STA support 40 MHz and 80 MHz channel width in 5 GHz
  15390. * B2: Indicates STA supports 160 MHz channel width in 5 GHz
  15391. * B3: Indicates STA supports 160/80+80 MHz channel width in 5 GHz
  15392. * B4: If B1 is set to 0, then B5 indicates support of 242/106/52/26-tone
  15393. * RU mapping in 40 MHz channel width in 2.4 GHz. Otherwise Reserved.
  15394. * B5: If B2, B3, and B4 are set to 0, then B6 indicates support of
  15395. * 242-tone RU mapping in 40 MHz and 80
  15396. * MHz channel width in 5 GHz. Otherwise Reserved.
  15397. * B6: Reserved
  15398. */
  15399. #define WMI_HECAP_PHY_CBW_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 1, 7)
  15400. #define WMI_HECAP_PHY_CBW_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 1, 7, value)
  15401. /*
  15402. * B0: Indicates STA supports reception of preamble puncturing in 80 MHz,
  15403. * where in the preamble only the secondary 20 MHz is punctured
  15404. * B1: Indicates STA supports reception of preamble puncturing in 80 MHz,
  15405. * where in the preamble only one of the two 20 MHz sub-channels in the
  15406. * secondary 40 MHz is punctured
  15407. * B2: Indicates STA supports reception of preamble puncturing in 160 MHz
  15408. * or 80+80 MHz, where in the primary 80 MHz of the preamble only the
  15409. * secondary 20 MHz is punctured
  15410. * B3: Indicates STA supports reception of preamble puncturing in 160 MHz
  15411. * or 80+80 MHz, where in the primary 80 MHz of the preamble, the
  15412. * primary 40 MHz is present
  15413. */
  15414. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 8, 4)
  15415. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 8, 4, value)
  15416. /* Indicates transmitting STA is a Class A (1) or a Class B (0) device */
  15417. #define WMI_HECAP_PHY_COD_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 12, 1)
  15418. #define WMI_HECAP_PHY_COD_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 12, 1, value)
  15419. /* Indicates support of transmission and reception of LDPC encoded packets */
  15420. #define WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 13, 1)
  15421. #define WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 13, 1, value)
  15422. /* Below 2 macros are for maintaining backward compatibility - Deprecated use WMI_HECAP_PHY_LDPC instead */
  15423. #define WMI_HECAP_PHY_TXLDPC_GET_D2(he_cap_phy) WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy)
  15424. #define WMI_HECAP_PHY_TXLDPC_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value)
  15425. /* Below 2 macros are for maintaining backward compatibility - Deprecated use WMI_HECAP_PHY_LDPC instead */
  15426. #define WMI_HECAP_PHY_RXLDPC_GET_D2(he_cap_phy) WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy)
  15427. #define WMI_HECAP_PHY_RXLDPC_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value)
  15428. /*
  15429. * B0: Indicates support of reception of 1x LTF and 0.8us guard interval duration for HE SU PPDUs.
  15430. */
  15431. #define WMI_HECAP_PHY_LTFGIFORHE_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 14, 1)
  15432. #define WMI_HECAP_PHY_LTFGIFORHE_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 14, 1, value)
  15433. /*
  15434. * When the Doppler Rx subfield is 1, indicates the maximum number of space-
  15435. * time streams supported for reception when midamble is used in the Data field.
  15436. */
  15437. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 15, 2)
  15438. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 15, 2, value)
  15439. /*
  15440. * B0: For a transmitting STA acting as beamformee, it indicates support of
  15441. * NDP reception using 4x LTF and 3.2 us guard interval duration
  15442. */
  15443. #define WMI_HECAP_PHY_LTFGIFORNDP_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 17, 1)
  15444. #define WMI_HECAP_PHY_LTFGIFORNDP_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 17, 1, value)
  15445. /* indicates support for the transmission of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx*/
  15446. #define WMI_HECAP_PHY_TXSTBC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 18, 1)
  15447. #define WMI_HECAP_PHY_TXSTBC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 18, 1, value)
  15448. /* indicates support for the reception of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx*/
  15449. #define WMI_HECAP_PHY_RXSTBC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 19, 1)
  15450. #define WMI_HECAP_PHY_RXSTBC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 19, 1, value)
  15451. /* indicates transmitting STA supports transmitting HE PPDUs with Doppler procedure */
  15452. #define WMI_HECAP_PHY_TXDOPPLER_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 20, 1)
  15453. #define WMI_HECAP_PHY_TXDOPPLER_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 20, 1, value)
  15454. /* indicates transmitting STA supports receiving HE PPDUs with Doppler procedure */
  15455. #define WMI_HECAP_PHY_RXDOPPLER_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 21, 1)
  15456. #define WMI_HECAP_PHY_RXDOPPLER_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 21, 1, value)
  15457. /*
  15458. * If the transmitting STA is an AP:
  15459. * indicates STA supports of reception of full bandwidth UL MU-MIMO
  15460. * transmission.
  15461. * If the transmitting STA is a non-AP STA:
  15462. * indicates STA supports of transmission of full bandwidth UL MU-MIMO
  15463. * transmission.
  15464. */
  15465. #define WMI_HECAP_PHY_UL_MU_MIMO_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 22, 1)
  15466. #define WMI_HECAP_PHY_UL_MU_MIMO_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 22, 1, value)
  15467. /*
  15468. * If the transmitting STA is an AP:
  15469. * indicates STA supports of reception of UL MUMIMO transmission on an
  15470. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  15471. * If the transmitting STA is a non-AP STA:
  15472. * indicates STA supports of transmission of UL MU-MIMO transmission on an
  15473. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  15474. */
  15475. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 23, 1)
  15476. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 23, 1, value)
  15477. /* Tx DCM
  15478. * B0:B1
  15479. * 00: Does not support DCM
  15480. * 01: BPSK
  15481. * 10: QPSK
  15482. * 11: 16-QAM
  15483. * B2 signals maximum number of spatial streams with DCM
  15484. * 0: 1 spatial stream
  15485. * 1: 2 spatial streams
  15486. */
  15487. #define WMI_HECAP_PHY_DCMTX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 24, 3)
  15488. #define WMI_HECAP_PHY_DCMTX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 24, 3, value)
  15489. /* Rx DCM
  15490. * B0:B1
  15491. * 00: Does not support DCM
  15492. * 01: BPSK
  15493. * 10: QPSK
  15494. * 11: 16-QAM
  15495. * B2 signals maximum number of spatial streams with DCM
  15496. * 0: 1 spatial stream
  15497. * 1: 2 spatial streams
  15498. */
  15499. #define WMI_HECAP_PHY_DCMRX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 27, 3)
  15500. #define WMI_HECAP_PHY_DCMRX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 27, 3, value)
  15501. /*
  15502. * Indicates that the STA supports the reception of an HE MU PPDU payload
  15503. * over full bandwidth and partial bandwidth (106-tone RU within 20 MHz).
  15504. */
  15505. #define WMI_HECAP_PHY_ULHEMU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 30, 1)
  15506. #define WMI_HECAP_PHY_ULHEMU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 30, 1, value)
  15507. /* Indicates support for operation as an SU beamformer */
  15508. #define WMI_HECAP_PHY_SUBFMR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 31, 1)
  15509. #define WMI_HECAP_PHY_SUBFMR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 31, 1, value)
  15510. /* Indicates support for operation as an SU beamformee */
  15511. #define WMI_HECAP_PHY_SUBFME_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 0, 1)
  15512. #define WMI_HECAP_PHY_SUBFME_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 0, 1, value)
  15513. /* Indicates support for operation as an MU Beamformer */
  15514. #define WMI_HECAP_PHY_MUBFMR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 1, 1)
  15515. #define WMI_HECAP_PHY_MUBFMR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 1, 1, value)
  15516. /*
  15517. * Num STS -1 for <= 80MHz (min val 3)
  15518. * The maximum number of space-time streams minus 1 that the STA can
  15519. * receive in an HE NDP
  15520. */
  15521. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 2, 3)
  15522. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 2, 3, value)
  15523. /*
  15524. * Num STS -1 for > 80MHz (min val 3)
  15525. * The maximum number of space-time streams minus 1 that the STA can
  15526. * receive in an HE NDP
  15527. */
  15528. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  15529. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  15530. /*
  15531. * Number Of Sounding Dimensions For <= 80 MHz
  15532. * If SU beamformer capable, set to the maximum supported value of the
  15533. * TXVECTOR parameter NUM_STS minus 1.
  15534. * Otherwise, reserved.
  15535. */
  15536. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  15537. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  15538. /*
  15539. * Number Of Sounding Dimensions For > 80 MHz
  15540. * If SU beamformer capable, set to the maximum supported value of the
  15541. * TXVECTOR parameter NUM_STS minus 1.
  15542. * Otherwise, reserved.
  15543. */
  15544. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 11, 3)
  15545. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 11, 3, value)
  15546. /*
  15547. * Indicates if the HE beamformee is capable of feedback with tone
  15548. * grouping of 16 in the HE Compressed Beamforming Report field for
  15549. * a SU-type feedback.
  15550. */
  15551. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 14, 1)
  15552. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 14, 1, value)
  15553. /*
  15554. * Indicates if the HE beamformee is capable of feedback with tone
  15555. * grouping of 16 in the HE Compressed Beamforming Report field for
  15556. * a MU-type feedback.
  15557. */
  15558. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 15, 1)
  15559. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 15, 1, value)
  15560. /*
  15561. * Indicates if HE beamformee is capable of feedback with codebook
  15562. * size {4, 2} in the HECompressed Beamforming Report field for
  15563. * a SU-type feedback.
  15564. */
  15565. #define WMI_HECAP_PHY_CODBK42SU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 16, 1)
  15566. #define WMI_HECAP_PHY_CODBK42SU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 16, 1, value)
  15567. /*
  15568. * Indicates if HE beamformee is capable of feedback with codebook
  15569. * size {7, 5} in the HE Compressed Beamforming Report field for
  15570. * a MU-type feedback.
  15571. */
  15572. #define WMI_HECAP_PHY_CODBK75MU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 17, 1)
  15573. #define WMI_HECAP_PHY_CODBK75MU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 17, 1, value)
  15574. /*
  15575. * Beamforming Feedback With Trigger Frame
  15576. * If the transmitting STA is an AP STA:
  15577. * B0: indicates support of reception of SU-Type partial(1) and full bandwidth feedback(0)
  15578. * B1: indicates support of reception of MU-Type partial(1) bandwidth feedback
  15579. * B2: indicates support of reception of CQI-Only partial and full bandwidth feedback
  15580. * If the transmitting STA is a non-AP STA:
  15581. * B0: indicates support of transmission of SU-Type partial(1) and full bandwidth(0) feedback
  15582. * B1: indicates support of transmission of MU-Type partial(1) bandwidth feedback
  15583. * B2: indicates support of transmission of CQI-Onlypartial (1)and full bandwidth feedback
  15584. */
  15585. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 18, 3)
  15586. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 18, 3, value)
  15587. /* Indicates the support of transmission and reception of an HE extended range SU PPDU payload transmitted
  15588. * over the right 106-tone RU or partial BW ER
  15589. */
  15590. #define WMI_HECAP_PHY_HEERSU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 21, 1)
  15591. #define WMI_HECAP_PHY_HEERSU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 21, 1, value)
  15592. /* Indicates that the non-AP STA supports reception of a DL MU-MIMO transmission on an RU in an HE MU PPDU
  15593. * where the RU does not span the entire PPDU bandwidth.
  15594. */
  15595. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 22, 1)
  15596. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 22, 1, value)
  15597. /* Indicates whether or not the PPE Threshold field is present */
  15598. #define WMI_HECAP_PHY_PETHRESPRESENT_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 23, 1)
  15599. #define WMI_HECAP_PHY_PETHRESPRESENT_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 23, 1, value)
  15600. /* Indicates that the STA supports SRP-based SR operation */
  15601. #define WMI_HECAP_PHY_SRPSPRESENT_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 24, 1)
  15602. #define WMI_HECAP_PHY_SRPPRESENT_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 24, 1, value)
  15603. /* Indicates that the STA supports a power boost factor ar for the r-th RU in the range [0.5, 2] */
  15604. #define WMI_HECAP_PHY_PWRBOOSTAR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 25, 1)
  15605. #define WMI_HECAP_PHY_PWRBOOSTAR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 25, 1, value)
  15606. /* Indicates support for the reception of 4x LTF and 0.8us guard interval duration for HE SU PPDUs. */
  15607. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 26, 1)
  15608. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 26, 1, value)
  15609. /* For a transmitting STA acting as a beamformee, it indicates the maximum Nc for beamforming sounding
  15610. * feedback supported If SU beamformee capable, then set to the maximum Nc for beamforming sounding feedback
  15611. * minus 1. Otherwise, reserved.
  15612. */
  15613. #define WMI_HECAP_PHY_MAXNC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 27, 3)
  15614. #define WMI_HECAP_PHY_MAXNC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 27, 3, value)
  15615. /* Indicates support for the transmission of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  15616. * STBC with one spatial stream
  15617. */
  15618. #define WMI_HECAP_PHY_STBCTXGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 30, 1)
  15619. #define WMI_HECAP_PHY_STBCTXGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 30, 1, value)
  15620. /* Indicates support for the reception of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  15621. * STBC with one spatial stream
  15622. */
  15623. #define WMI_HECAP_PHY_STBCRXGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 31, 1)
  15624. #define WMI_HECAP_PHY_STBCRXGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 31, 1, value)
  15625. /* Indicates support for the reception of an HE ER SU PPDU with 4x LTF and 0.8 us guard interval duration */
  15626. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 0, 1)
  15627. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 0, 1, value)
  15628. /*
  15629. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  15630. * 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.
  15631. */
  15632. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 1, 1)
  15633. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 1, 1, value)
  15634. /*
  15635. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  15636. * 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.
  15637. */
  15638. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 2, 1)
  15639. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 2, 1, value)
  15640. /*
  15641. * Indicates supports of 160 MHz OFDMA for a non-AP HE STA that sets bit B1 of Channel Width Set to 1, and
  15642. * sets B2 and B3 of Channel Width Set each to 0, when operating with 80 MHz channel width. The capability
  15643. * bit is applicable while receiving a 80+80 MHz or a 160 MHz HE MU PPDU, or transmitting a 80+80 MHz or a
  15644. * 160 MHz HE TB PPDU.
  15645. */
  15646. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 3, 1)
  15647. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 3, 1, value)
  15648. /* Indicates support for the reception of an HE ER SU PPDU with 1x LTF and 0.8 us guard interval duration */
  15649. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 4, 1)
  15650. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 4, 1, value)
  15651. /*
  15652. * When the Doppler Rx subfield is 1, indicates support for receiving midambles with 2x HE-LTF, 1x HE-LTF
  15653. * 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
  15654. * HE ER SU PPDU if the HE ER SU PPDU With 1x HELTF And 0.8 s GI subfield is set to 1.
  15655. */
  15656. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 5, 1)
  15657. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 5, 1, value)
  15658. /*HTC + HE Support Set to 1 if STA supports reception of HE Variant HT control Field*/
  15659. #define WMI_HECAP_MAC_HECTRL_GET_D2(he_cap) WMI_GET_BITS(he_cap, 0, 1)
  15660. #define WMI_HECAP_MAC_HECTRL_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 0, 1, value)
  15661. /* set to 1 to for TWT Requestor support*/
  15662. #define WMI_HECAP_MAC_TWTREQ_GET_D2(he_cap) WMI_GET_BITS(he_cap, 1, 1)
  15663. #define WMI_HECAP_MAC_TWTREQ_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 1, 1, value)
  15664. /* set to 1 to for TWT Responder support*/
  15665. #define WMI_HECAP_MAC_TWTRSP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 2, 1)
  15666. #define WMI_HECAP_MAC_TWTRSP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 2, 1, value)
  15667. /* Level of frag support
  15668. Set to 0 for no support for dynamic fragmentation.
  15669. Set to 1 for support for dynamic fragments that are contained within a S-MPDU
  15670. Set to 2 for support for dynamic fragments that are contained within a Single MPDU and support for up to
  15671. one dynamic fragment for each MSDU and each MMPDU within an A-MPDU or multi-TID A-MPDU.
  15672. Set to 3 for support for dynamic fragments that are contained within a Single MPDU and support for multiple
  15673. dynamic fragments for each MSDU within an AMPDU or multi-TID AMPDU and up to one dynamic fragment
  15674. for each MMPDU in a multi-TID A-MPDU that is not a Single MPDU
  15675. */
  15676. #define WMI_HECAP_MAC_HEFRAG_GET_D2(he_cap) WMI_GET_BITS(he_cap, 3, 2)
  15677. #define WMI_HECAP_MAC_HEFRAG_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 3, 2, value)
  15678. /* The maximum number of fragmented MSDUs, Nmax,defined by this field is Nmax = 2 Maximum Number Of FMPDUs*/
  15679. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 5, 3)
  15680. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 5, 3, value)
  15681. /* 0 = no restriction on the minimum payload , 1 = 128 octets min, 2 = 256 octets min, 3 = 512 octets min */
  15682. #define WMI_HECAP_MAC_MINFRAGSZ_GET_D2(he_cap) WMI_GET_BITS(he_cap, 8, 2)
  15683. #define WMI_HECAP_MAC_MINFRAGSZ_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 8, 2, value)
  15684. /*0 = no additional processing time, 1 = 8us,2 = 16us */
  15685. #define WMI_HECAP_MAC_TRIGPADDUR_GET_D2(he_cap) WMI_GET_BITS(he_cap, 10, 2)
  15686. #define WMI_HECAP_MAC_TRIGPADDUR_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 10, 2, value)
  15687. /*number of TIDs minus 1 of QoS Data frames that HE STA can aggregate in multi-TID AMPDU*/
  15688. #define WMI_HECAP_MAC_MTID_GET_D2(he_cap) WMI_GET_BITS(he_cap, 12, 3)
  15689. #define WMI_HECAP_MAC_MTID_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 12, 3, value)
  15690. /*
  15691. * Indicates support by a STA to receive an ack-enabled A-MPDU in which an A-MSDU is carried in
  15692. * a QoS Data frame for which no block ack agreement exists.
  15693. */
  15694. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 15, 1)
  15695. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 15, 1, value)
  15696. /*--- HECAP_MAC_HELKAD: DO NOT USE - DEPRECATED ---*/
  15697. /*0=No Feedback,2=Unsolicited,3=Both*/
  15698. #define WMI_HECAP_MAC_HELKAD_GET_D2(he_cap) (0)
  15699. #define WMI_HECAP_MAC_HELKAD_SET_D2(he_cap, value) {;}
  15700. /* bit 16 reserved. */
  15701. /*Set to 1 for reception of AllAck support*/
  15702. #define WMI_HECAP_MAC_AACK_GET_D2(he_cap) WMI_GET_BITS(he_cap, 17, 1)
  15703. #define WMI_HECAP_MAC_AACK_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 17, 1, value)
  15704. /*Set to 1 if the STA supports reception of the UL MU Response Scheduling A-Control field*/
  15705. #define WMI_HECAP_MAC_ULMURSP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 18, 1)
  15706. #define WMI_HECAP_MAC_ULMURSP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 18, 1, value)
  15707. /*Set to 1 if the STA supports the BSR A-Control field functionality.*/
  15708. #define WMI_HECAP_MAC_BSR_GET_D2(he_cap) WMI_GET_BITS(he_cap, 19, 1)
  15709. #define WMI_HECAP_MAC_BSR_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 19, 1, value)
  15710. /*Set to 1 when the STA supports broadcast TWT functionality.*/
  15711. #define WMI_HECAP_MAC_BCSTTWT_GET_D2(he_cap) WMI_GET_BITS(he_cap, 20, 1)
  15712. #define WMI_HECAP_MAC_BCSTTWT_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 20, 1, value)
  15713. /*Set to 1 if STA supports rx of Multi-STA BA that has 32-bit Block Ack Bitmap*/
  15714. #define WMI_HECAP_MAC_32BITBA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 21, 1)
  15715. #define WMI_HECAP_MAC_32BITBA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 21, 1, value)
  15716. /*Set to 1 if the STA supports MU cascading operation*/
  15717. #define WMI_HECAP_MAC_MUCASCADE_GET_D2(he_cap) WMI_GET_BITS(he_cap, 22, 1)
  15718. #define WMI_HECAP_MAC_MUCASCADE_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 22, 1, value)
  15719. /*Set to 1 when the STA supports reception of this multi-TID A-MPDU format*/
  15720. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 23, 1)
  15721. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 23, 1, value)
  15722. /*Set to 1 when the STA supports its reception*/
  15723. #define WMI_HECAP_MAC_GROUPMSTABA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 24, 1)
  15724. #define WMI_HECAP_MAC_GROUPMSTABA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 24, 1, value)
  15725. /*Set to 1 if the STA supports reception of the OMI A-Control field*/
  15726. #define WMI_HECAP_MAC_OMI_GET_D2(he_cap) WMI_GET_BITS(he_cap, 25, 1)
  15727. #define WMI_HECAP_MAC_OMI_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 25, 1, value)
  15728. /*1 if OFDMA Random Access Supported*/
  15729. #define WMI_HECAP_MAC_OFDMARA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 26, 1)
  15730. #define WMI_HECAP_MAC_OFDMARA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 26, 1, value)
  15731. /* Maximum AMPDU Length Exponent.
  15732. * If the HE STA includes a VHT Capabilities element, the Maximum A-MPDU Length Exponent subfield in
  15733. * HE Capabilities element combined with the Maximum A-MPDU Length Exponent subfield in VHT
  15734. * Capabilities element indicate the maximum length of A-MPDU that the STA can Receive where EOF
  15735. * padding is not included in this limit.
  15736. */
  15737. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 27, 2)
  15738. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 27, 2, value)
  15739. /*A-MSDU Fragmentation Support*/
  15740. #define WMI_HECAP_MAC_AMSDUFRAG_GET_D2(he_cap) WMI_GET_BITS(he_cap, 29, 1)
  15741. #define WMI_HECAP_MAC_AMSDUFRAG_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 29, 1, value)
  15742. /*Flexible TWT Schedule Support*/
  15743. #define WMI_HECAP_MAC_FLEXTWT_GET_D2(he_cap) WMI_GET_BITS(he_cap, 30, 1)
  15744. #define WMI_HECAP_MAC_FLEXTWT_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 30, 1, value)
  15745. /*Rx Control Frame to MultiBSS*/
  15746. #define WMI_HECAP_MAC_MBSS_GET_D2(he_cap) WMI_GET_BITS(he_cap, 31, 1)
  15747. #define WMI_HECAP_MAC_MBSS_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 31, 1, value)
  15748. /* BSRP A-MPDU Aggregation
  15749. * maintaining compatibility since we don't support this now so not wasting memory
  15750. */
  15751. #define WMI_HECAP_MAC_BSRPAMPDU_GET_D2(he_cap) (0)
  15752. #define WMI_HECAP_MAC_BSRPAMPDU_SET_D2(he_cap, value) {;}
  15753. /* Quiet Time Period (QTP) operation
  15754. * maintaining compatibility since we don't support this now so not wasting memory
  15755. */
  15756. #define WMI_HECAP_MAC_QTP_GET_D2(he_cap) (0)
  15757. #define WMI_HECAP_MAC_QTP_SET_D2(he_cap, value) {;}
  15758. /* support by an AP for receiving an (A-)MPDU that contains a BQR in the
  15759. * A-Control subfield and support by a non-AP STA for generating an (A-)MPDU
  15760. * that contains a BQR in the A-Control subfield
  15761. * maintaining compatibility since we don't support this now so not wasting memory
  15762. */
  15763. #define WMI_HECAP_MAC_ABQR_GET_D2(he_cap) (0)
  15764. #define WMI_HECAP_MAC_ABQR_SET_D2(he_cap, value) {;}
  15765. /*Indicates support by the STA for the role of SR Responder.*/
  15766. #define WMI_HECAP_MAC_SRRESP_GET_D2(he_cap) (0)
  15767. #define WMI_HECAP_MAC_SRRESP_SET_D2(he_cap, value) {;}
  15768. /* Indicates support for an AP to encode OPS information to TIM element of the FILS Discovery
  15769. * frames or TIM frames as described in AP operation for opportunistic power save.
  15770. * Indicates support for a non-AP STA to receive the opportunistic power save encoded TIM elements
  15771. */
  15772. #define WMI_HECAP_MAC_OPS_GET_D2(he_cap) (0)
  15773. #define WMI_HECAP_MAC_OPS_SET_D2(he_cap, value) {;}
  15774. /* Indicates support for a non-AP STA to follow the NDP feedback report procedure and respond to
  15775. * the NDP Feedback Report Poll Trigger frame.
  15776. */
  15777. #define WMI_HECAP_MAC_NDPFDBKRPT_GET_D2(he_cap) (0)
  15778. #define WMI_HECAP_MAC_NDPFDBKRPT_SET_D2(he_cap, value) {;}
  15779. /* BELOW MACROS ARE DEPRECATED Also we are not defining bits for capabilities
  15780. * beyond bit 31 we donot support as it adds additional dword to our struct which may be later
  15781. * removed by standard
  15782. */
  15783. #define WMI_HECAP_MAC_MBAHECTRL_GET_D2(he_cap) (0) /* DO NOT USE - DEPRECATED*/
  15784. #define WMI_HECAP_MAC_MBAHECTRL_SET_D2(he_cap, value) {;} /* DO NOT USE - DEPRECATED*/
  15785. #define WMI_HECAP_MAC_MURTS_GET_D2(he_cap) (0) /* DO NOT USE - DEPRECATED*/
  15786. #define WMI_HECAP_MAC_MURTS_SET_D2(he_cap, value) {;} /* DO NOT USE - DEPRECATED*/
  15787. /*Deprecate use WMI_HECAP_PHY_PREAMBLEPUNCRX instead*/
  15788. #define WMI_HECAP_PHY_CBMODE_GET_D2(he_cap_phy) WMI_HECAP_PHY_CBMODE_GET_D2(he_cap_phy)
  15789. #define WMI_HECAP_PHY_CBMODE_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_CBMODE_SET_D2(he_cap_phy, value)
  15790. /* Below 2 macros are for maintaining backward compatibility - Deprecated use WMI_HECAP_PHY_LTFGIFORHE_GET instead */
  15791. #define WMI_HECAP_PHY_OLTF_GET_D2(he_cap_phy) WMI_HECAP_PHY_LTFGIFORHE_GET_D2(he_cap_phy)
  15792. #define WMI_HECAP_PHY_OLTF_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LTFGIFORHE_SET_D2(he_cap_phy, value)
  15793. /*DEPRECATED - USE WMI_HECAP_PHY_BFMENLTSGT80MHZ*/
  15794. #define WMI_HECAP_PHY_SUBFMESTS_GET_D2(he_cap_phy) WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2(he_cap_phy)
  15795. #define WMI_HECAP_PHY_SUBFMESTS_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2(he_cap_phy, value)
  15796. /*DEPRECATED - use WMI_HECAP_PHY_PETHRESPRESENT**/
  15797. #define WMI_HECAP_PHY_PADDING_GET_D2(he_cap_phy) WMI_HECAP_PHY_PETHRESPRESENT_GET_D2(he_cap_phy)
  15798. #define WMI_HECAP_PHY_PADDING_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_PETHRESPRESENT_SET_D2(he_cap_phy, value)
  15799. /**DO NOT USE - DEPRECATED*/
  15800. #define WMI_HECAP_PHY_DLOFMAMUMIMO_GET_D2(he_cap_phy) (0)
  15801. #define WMI_HECAP_PHY_DLOFDMAMUMIO_SET_D2(he_cap_phy, value) {;}
  15802. /*DO NOT USE - DEPRECATED**/
  15803. #define WMI_HECAP_PHY_32GI_GET_D2(he_cap_phy) (0)
  15804. #define WMI_HECAP_PHY_32GI_SET_D2(he_cap_phy, value) {;}
  15805. /*DO NOT USE - DEPRECATED**/
  15806. #define WMI_HECAP_PHY_NOSUNDIMENS_GET_D2(he_cap_phy) (0)
  15807. #define WMI_HECAP_PHY_NOSUNDIMENS_SET_D2(he_cap_phy, value) {;}
  15808. /*DO NOT USE - DEPRECATED**/
  15809. #define WMI_HECAP_PHY_40MHZNSS_GET_D2(he_cap_phy)(0)
  15810. #define WMI_HECAP_PHY_40MHZNSS_SET_D2(he_cap_phy, value) {;}
  15811. /* START TEMPORARY WORKAROUND -
  15812. * Leave legacy names as aliases for new names, until all references to the
  15813. * legacy names have been removed.
  15814. */
  15815. #define WMI_HECAP_PHY_ULOFDMA_GET_D2 WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2
  15816. #define WMI_HECAP_PHY_ULOFDMA_SET_D2 WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2
  15817. /* END TEMPORARY WORKAROUND */
  15818. /* DEPRECATED - use WMI_HECAP_PHY_DCMRX or WMI_HECAP_PHY_DCMTX */
  15819. #define WMI_HECAP_PHY_DCM_GET_D2(he_cap_phy) WMI_HECAP_PHY_DCMRX_GET_D2(he_cap_phy)
  15820. #define WMI_HECAP_PHY_DCM_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_DCMRX_SET_D2(he_cap_phy, value)
  15821. /*
  15822. * The maximum value for NSTS-1<=80MHz,(min val 3)total that can be sent
  15823. * to the STA in a DL MU-MIMO transmission on full or partial bandwidth
  15824. */
  15825. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  15826. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  15827. /*
  15828. * The maximum value for NSTS-1 > 80MHz (min val 3) total that can be sent
  15829. * to the STA in a DL MU-MIMO transmission on full or partial bandwidth
  15830. */
  15831. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  15832. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  15833. /*
  15834. * Indicates the spatial multiplexing power save mode after receiving a
  15835. * Trigger frame that is in operation immediately after (re)association.
  15836. */
  15837. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D2(he_cap2) (0)
  15838. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D2(he_cap2, value) {;}
  15839. /* Indicates support for Punctured Sounding */
  15840. #define WMI_HECAP_MAC_PUNCSOUNDING_GET_D2(he_cap2) (0)
  15841. #define WMI_HECAP_MAC_PUNCSOUNDING_SET_D2(he_cap2, value) {;}
  15842. /*
  15843. * Indicates support for receiving a Trigger frame in an HT PPDU and
  15844. * receiving a Trigger frame in a VHT PPDU
  15845. */
  15846. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET_D2(he_cap2) (0)
  15847. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET_D2(he_cap2, value) {;}
  15848. #define WMI_GET_HW_RATECODE_PREAM_V1(_rcode) (((_rcode) >> 8) & 0x7)
  15849. #define WMI_GET_HW_RATECODE_NSS_V1(_rcode) (((_rcode) >> 5) & 0x7)
  15850. #define WMI_GET_HW_RATECODE_RATE_V1(_rcode) (((_rcode) >> 0) & 0x1F)
  15851. #define WMI_ASSEMBLE_RATECODE_V1(_rate, _nss, _pream) \
  15852. (((1) << 28) | ((_pream) << 8) | ((_nss) << 5) | (_rate))
  15853. typedef struct {
  15854. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_request_cmd_fixed_param */
  15855. /** unique id identifying the VDEV, generated by the caller */
  15856. A_UINT32 vdev_id;
  15857. /** requestor id identifying the caller module */
  15858. A_UINT32 requestor_id;
  15859. /** beacon interval from received beacon */
  15860. A_UINT32 beacon_interval;
  15861. /** DTIM Period from the received beacon */
  15862. A_UINT32 dtim_period;
  15863. /** Flags */
  15864. A_UINT32 flags;
  15865. /** ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
  15866. wmi_ssid ssid;
  15867. /** beacon/probe response xmit rate. Applicable for SoftAP. */
  15868. /** This field will be invalid and ignored unless the */
  15869. /** flags field has the WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT bit. */
  15870. /** When valid, this field contains the fixed tx rate for the beacon */
  15871. /** and probe response frames send by the GO or SoftAP */
  15872. A_UINT32 bcn_tx_rate;
  15873. /** beacon/probe response xmit power. Applicable for SoftAP. */
  15874. A_UINT32 bcn_txPower;
  15875. /** number of p2p NOA descriptor(s) from scan entry */
  15876. A_UINT32 num_noa_descriptors;
  15877. /** Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
  15878. During CAC, Our HW shouldn't ack ditected frames */
  15879. A_UINT32 disable_hw_ack;
  15880. /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
  15881. /** The DBS policy manager indicates the preferred number of transmit streams. */
  15882. A_UINT32 preferred_tx_streams;
  15883. /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
  15884. /** the DBS policy manager indicates the preferred number of receive streams. */
  15885. A_UINT32 preferred_rx_streams;
  15886. A_UINT32 he_ops; /* refer to WMI_HEOPS_xxx macros */
  15887. A_UINT32 cac_duration_ms; /* in milliseconds */
  15888. A_UINT32 regdomain;
  15889. /* min data rate to be used in BSS in Mbps */
  15890. A_UINT32 min_data_rate;
  15891. /** @mbss_capability_flags: Bitmap of vdev's MBSS/EMA capability.
  15892. * Capabilities are combination of below flags:
  15893. * VDEV_FLAGS_NON_MBSSID_AP
  15894. * VDEV_FLAGS_TRANSMIT_AP
  15895. * VDEV_FLAGS_NON_TRANSMIT_AP
  15896. * VDEV_FLAGS_EMA_MODE
  15897. * VDEV_FLAGS_SCAN_MODE_VAP - if the vdev is used for scan radio
  15898. */
  15899. A_UINT32 mbss_capability_flags;
  15900. /** vdevid of transmitting VAP (mbssid case). Ignored for non mbssid case */
  15901. A_UINT32 vdevid_trans;
  15902. A_UINT32 eht_ops;
  15903. A_UINT32 puncture_20mhz_bitmap; /* each bit indicates one 20 MHz BW punctured */
  15904. A_UINT32 mbssid_multi_group_flag; /* Flag to identify whether multi group mbssid is supported */
  15905. A_UINT32 mbssid_multi_group_id; /* Group id of current vdev only valid when multi group mbssid is supported */
  15906. /* Target TSF value by which VDEV restart procedure should be completed in FW */
  15907. A_UINT32 target_tsf_us_lo; /* bits 31:0 */
  15908. A_UINT32 target_tsf_us_hi; /* bits 63:32 */
  15909. /* The TLVs follows this structure:
  15910. * wmi_channel chan; <-- WMI channel
  15911. * wmi_p2p_noa_descriptor noa_descriptors[]; <-- actual p2p NOA descriptor from scan entry
  15912. * wmi_vdev_start_mlo_params mlo_params[0,1]; <-- vdev start MLO parameters
  15913. * optional TLV, only present for MLO vdevs,
  15914. * If the vdev is non-MLO the array length should be 0.
  15915. * wmi_partner_link_info link_info[]; <-- partner link info
  15916. * optional TLV, only present for MLO vdevs,
  15917. * If the vdev is non-MLO the array length should be 0.
  15918. * wmi_channel dbw_chan; <-- WMI channel
  15919. * optional TLV for dbw_chan
  15920. * wmi_dbw_chan_info dbw_chan_info
  15921. * optional TLV used for dbw_chan_info
  15922. */
  15923. } wmi_vdev_start_request_cmd_fixed_param;
  15924. typedef struct {
  15925. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_cmd_fixed_param */
  15926. /** unique id identifying the VDEV, generated by the caller */
  15927. A_UINT32 vdev_id;
  15928. } wmi_vdev_delete_cmd_fixed_param;
  15929. typedef struct {
  15930. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_dfs_ap_config_fixed_param */
  15931. /** unique id identifying the VDEV, generated by the caller */
  15932. A_UINT32 vdev_id;
  15933. /** "set" field:
  15934. * HOST to specify a non-zero value if DFS master AP config is to be added,
  15935. * or a zero value if it is to be removed.
  15936. */
  15937. A_UINT32 set;
  15938. /* The TLVs follows this structure:
  15939. * wmi_mac_addr bssid; <-- bssid for P2P GO's STA's connected AP,
  15940. * STA's connected AP is DFS master
  15941. * optional TLV used for bssid
  15942. * wmi_mac_addr non_tx_bssid; <-- bssid for P2P GO's STA's connected AP,
  15943. * if connected to non TX VAP
  15944. * optional TLV used for bssid
  15945. */
  15946. } wmi_p2p_go_dfs_ap_config_fixed_param;
  15947. enum WMI_VDEV_UP_FLAGS {
  15948. /** EMA_MBSSID_AP
  15949. * Valid only for STA VDEV.
  15950. * This flag will be set when STA connected MBSSID AP is EMA capable.
  15951. * EMA - Enhanced Multiple BSS Advertisemet.
  15952. */
  15953. WMI_VDEV_UP_FLAG_EMA_MBSSID_AP = 0x00000001,
  15954. };
  15955. typedef struct {
  15956. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_up_cmdid_fixed_param */
  15957. /** unique id identifying the VDEV, generated by the caller */
  15958. A_UINT32 vdev_id;
  15959. /** aid (assoc id) received in association response for STA VDEV */
  15960. A_UINT32 vdev_assoc_id;
  15961. /** bssid of the BSS the VDEV is joining */
  15962. wmi_mac_addr vdev_bssid;
  15963. /** bssid of transmitted AP (mbssid case) */
  15964. wmi_mac_addr trans_bssid;
  15965. /** the profile index of the connected non-trans ap (mbssid case). 0 means invalid */
  15966. A_UINT32 profile_idx;
  15967. /** the total profile numbers of non-trans aps (mbssid case). 0 means legacy AP */
  15968. A_UINT32 profile_num;
  15969. /** flags - this is a bitwise-or combination of WMI_VDEV_UP_FLAGS values */
  15970. A_UINT32 flags;
  15971. } wmi_vdev_up_cmd_fixed_param;
  15972. typedef struct {
  15973. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stop_cmd_fixed_param */
  15974. /** unique id identifying the VDEV, generated by the caller */
  15975. A_UINT32 vdev_id;
  15976. /* The TLVs follows this structure:
  15977. * - wmi_vdev_stop_mlo_params mlo_params[0/1];
  15978. * optional TLV, host may provide this TLV to indicate the vdev stop
  15979. * is done for link switch.
  15980. */
  15981. } wmi_vdev_stop_cmd_fixed_param;
  15982. typedef struct {
  15983. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_down_cmd_fixed_param */
  15984. /** unique id identifying the VDEV, generated by the caller */
  15985. A_UINT32 vdev_id;
  15986. } wmi_vdev_down_cmd_fixed_param;
  15987. typedef struct {
  15988. /** unique id identifying the VDEV, generated by the caller */
  15989. A_UINT32 vdev_id;
  15990. } wmi_vdev_standby_response_cmd;
  15991. typedef struct {
  15992. /** unique id identifying the VDEV, generated by the caller */
  15993. A_UINT32 vdev_id;
  15994. } wmi_vdev_resume_response_cmd;
  15995. typedef struct {
  15996. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
  15997. /** unique id identifying the VDEV, generated by the caller */
  15998. A_UINT32 vdev_id;
  15999. /** parameter id */
  16000. A_UINT32 param_id;
  16001. /** parameter value */
  16002. A_UINT32 param_value;
  16003. } wmi_vdev_set_param_cmd_fixed_param;
  16004. typedef struct {
  16005. A_UINT32 key_seq_counter_l;
  16006. A_UINT32 key_seq_counter_h;
  16007. } wmi_key_seq_counter;
  16008. #define WMI_CIPHER_NONE 0x0 /* clear key */
  16009. #define WMI_CIPHER_WEP 0x1
  16010. #define WMI_CIPHER_TKIP 0x2
  16011. #define WMI_CIPHER_AES_OCB 0x3
  16012. #define WMI_CIPHER_AES_CCM 0x4
  16013. #define WMI_CIPHER_WAPI 0x5
  16014. #define WMI_CIPHER_CKIP 0x6
  16015. #define WMI_CIPHER_AES_CMAC 0x7
  16016. #define WMI_CIPHER_ANY 0x8
  16017. #define WMI_CIPHER_AES_GCM 0x9
  16018. #define WMI_CIPHER_AES_GMAC 0xa
  16019. #define WMI_CIPHER_WAPI_GCM_SM4 0xb
  16020. #define WMI_CIPHER_BIP_CMAC_128 0xc
  16021. #define WMI_CIPHER_BIP_CMAC_256 0xd
  16022. #define WMI_CIPHER_BIP_GMAC_128 0xe
  16023. #define WMI_CIPHER_BIP_GMAC_256 0xf
  16024. typedef struct {
  16025. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */
  16026. /** unique id identifying the VDEV, generated by the caller */
  16027. A_UINT32 vdev_id;
  16028. /** MAC address used for installing */
  16029. wmi_mac_addr peer_macaddr;
  16030. /** key index */
  16031. A_UINT32 key_ix;
  16032. /** key flags */
  16033. A_UINT32 key_flags;
  16034. /** key cipher, defined above */
  16035. A_UINT32 key_cipher;
  16036. /** key rsc counter */
  16037. wmi_key_seq_counter key_rsc_counter;
  16038. /** global key rsc counter */
  16039. wmi_key_seq_counter key_global_rsc_counter;
  16040. /** global key tsc counter */
  16041. wmi_key_seq_counter key_tsc_counter;
  16042. /** WAPI key rsc counter */
  16043. A_UINT8 wpi_key_rsc_counter[16];
  16044. /** WAPI key tsc counter */
  16045. A_UINT8 wpi_key_tsc_counter[16];
  16046. /** key length */
  16047. A_UINT32 key_len;
  16048. /** key tx mic length */
  16049. A_UINT32 key_txmic_len;
  16050. /** key rx mic length */
  16051. A_UINT32 key_rxmic_len;
  16052. /** specifies if the group_key_ix is valid, filled by the sender */
  16053. A_UINT32 is_group_key_ix_valid;
  16054. /** Multi group key ID */
  16055. A_UINT32 group_key_ix;
  16056. /*
  16057. * Following this struct are this TLV.
  16058. * A_UINT8 key_data[]; <-- actual key data; contains key followed by tx mic followed by rx mic
  16059. */
  16060. } wmi_vdev_install_key_cmd_fixed_param;
  16061. typedef struct {
  16062. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_ltf_key_seed_cmd_fixed_param */
  16063. /** unique id identifying the VDEV, generated by the caller */
  16064. A_UINT32 vdev_id;
  16065. /** MAC address used for deriving */
  16066. wmi_mac_addr peer_macaddr;
  16067. /** authentication mode */
  16068. A_UINT32 rsn_authmode;
  16069. /** LTF key seed length */
  16070. A_UINT32 key_seed_len;
  16071. /*
  16072. * Following this struct are this TLV.
  16073. * A_UINT8 key_seed[key_seed_len]; <-- actual LTF key seed;
  16074. */
  16075. } wmi_vdev_set_ltf_key_seed_cmd_fixed_param;
  16076. /** Preamble types to be used with VDEV fixed rate configuration */
  16077. typedef enum {
  16078. WMI_RATE_PREAMBLE_OFDM,
  16079. WMI_RATE_PREAMBLE_CCK,
  16080. WMI_RATE_PREAMBLE_HT,
  16081. WMI_RATE_PREAMBLE_VHT,
  16082. WMI_RATE_PREAMBLE_HE,
  16083. WMI_RATE_PREAMBLE_EHT,
  16084. } WMI_RATE_PREAMBLE;
  16085. /** Value to disable fixed rate setting */
  16086. #define WMI_FIXED_RATE_NONE (0xff)
  16087. #define WMI_GI_400_NS 1
  16088. #define WMI_GI_800_NS 0
  16089. #define WMI_GI_1600_NS 2
  16090. #define WMI_GI_3200_NS 3
  16091. /** OCE(Optimized Connectivity_Experience) Feature flags */
  16092. #define WMI_VDEV_OCE_PROBE_REQUEST_RATE_FEATURE_BITMAP 0x1
  16093. #define WMI_VDEV_OCE_PROBE_RESPONSE_RATE_FEATURE_BITMAP 0x2
  16094. #define WMI_VDEV_OCE_BEACON_RATE_FEATURE_BITMAP 0x4
  16095. #define WMI_VDEV_OCE_PROBE_REQUEST_DEFERRAL_FEATURE_BITMAP 0x8
  16096. #define WMI_VDEV_OCE_FILS_DISCOVERY_FRAME_FEATURE_BITMAP 0x10
  16097. #define WMI_VDEV_OCE_ESP_FEATURE_BITMAP 0x20
  16098. #define WMI_VDEV_OCE_REASSOC_REJECT_FEATURE_BITMAP 0x40
  16099. /** 6 GHZ params **/
  16100. /* Control to enable/disable beacon tx in non-HT duplicate */
  16101. #define WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_BEACON 0x1
  16102. /* Control to enable/disable broadcast probe response tx in non-HT duplicate */
  16103. #define WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_BCAST_PROBE_RSP 0x2
  16104. /* Control to enable/disable FILS discovery frame tx in non-HT duplicate */
  16105. #define WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_FD_FRAME 0x4
  16106. /* Control to enable/disable periodic FILS discovery frame transmission */
  16107. #define WMI_VDEV_6GHZ_BITMAP_FD_FRAME 0x8 /* deprecated */
  16108. /* Control to enable/disable periodic broadcast probe response transmission */
  16109. #define WMI_VDEV_6GHZ_BITMAP_BCAST_PROBE_RSP 0x10 /* deprecated */
  16110. /** ROAM_11KV control params */
  16111. /* WMI_VDEV_ROAM_11KV_CTRL_DISABLE_FW_TRIGGER_ROAMING:
  16112. * Disable all FW-triggered roaming (e.g. low RSSI/final bmiss/BTM/PER)
  16113. * while still allowing host-invoked roaming.
  16114. */
  16115. #define WMI_VDEV_ROAM_11KV_CTRL_DISABLE_FW_TRIGGER_ROAMING 0x1
  16116. /* WMI_VDEV_ROAM_11KV_CTRL_KEEP_CONN_RECV_BTM_REQ:
  16117. * DUT do not scan or roaming when receiving BTM req frame
  16118. */
  16119. #define WMI_VDEV_ROAM_11KV_CTRL_KEEP_CONN_RECV_BTM_REQ 0x2
  16120. /* WMI_VDEV_ROAM_11KV_CTRL_DONOT_SEND_DISASSOC_ON_BTM_DI_SET:
  16121. * DUT do not send disasoc frame to AP when receiving BTM req with
  16122. * Disassoc Imminent bit set to 1.
  16123. */
  16124. #define WMI_VDEV_ROAM_11KV_CTRL_DONOT_SEND_DISASSOC_ON_BTM_DI_SET 0x4
  16125. /** NAN vdev config Feature flags */
  16126. #define WMI_VDEV_NAN_ALLOW_DW_CONFIG_CHANGE_IN_SYNC_ROLE 0x1
  16127. #define WMI_VDEV_NAN_FORCE_CONGIG_WOW_DB_INTERVAL 0x2
  16128. /** the definition of different VDEV parameters */
  16129. typedef enum {
  16130. /** RTS Threshold */
  16131. WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
  16132. /** Fragmentation threshold */
  16133. WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD, /* 0x2 */
  16134. /** beacon interval in TUs */
  16135. WMI_VDEV_PARAM_BEACON_INTERVAL, /* 0x3 */
  16136. /** Listen interval in TUs */
  16137. WMI_VDEV_PARAM_LISTEN_INTERVAL, /* 0x4 */
  16138. /** multicast rate in Mbps */
  16139. WMI_VDEV_PARAM_MULTICAST_RATE, /* 0x5 */
  16140. /** management frame rate in Mbps */
  16141. WMI_VDEV_PARAM_MGMT_TX_RATE, /* 0x6 */
  16142. /** slot time (long vs short) */
  16143. WMI_VDEV_PARAM_SLOT_TIME, /* 0x7 */
  16144. /** preamble (long vs short) */
  16145. WMI_VDEV_PARAM_PREAMBLE, /* 0x8 */
  16146. /** SWBA time (time before tbtt in msec) */
  16147. WMI_VDEV_PARAM_SWBA_TIME, /* 0x9 */
  16148. /** time period for updating VDEV stats */
  16149. WMI_VDEV_STATS_UPDATE_PERIOD, /* 0xa */
  16150. /** age out time in msec for frames queued for station in power save*/
  16151. WMI_VDEV_PWRSAVE_AGEOUT_TIME, /* 0xb */
  16152. /** Host SWBA interval (time in msec before tbtt for SWBA event generation) */
  16153. WMI_VDEV_HOST_SWBA_INTERVAL, /* 0xc */
  16154. /** DTIM period (specified in units of num beacon intervals) */
  16155. WMI_VDEV_PARAM_DTIM_PERIOD, /* 0xd */
  16156. /** scheduler air time limit for this VDEV. used by off chan scheduler */
  16157. WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT, /* 0xe */
  16158. /** enable/disable WDS for this VDEV */
  16159. WMI_VDEV_PARAM_WDS, /* 0xf */
  16160. /** ATIM Window */
  16161. WMI_VDEV_PARAM_ATIM_WINDOW, /* 0x10 */
  16162. /** BMISS max */
  16163. WMI_VDEV_PARAM_BMISS_COUNT_MAX, /* 0x11 */
  16164. /** BMISS first time */
  16165. WMI_VDEV_PARAM_BMISS_FIRST_BCNT, /* 0x12 */
  16166. /** BMISS final time */
  16167. WMI_VDEV_PARAM_BMISS_FINAL_BCNT, /* 0x13 */
  16168. /** WMM enables/disabled */
  16169. WMI_VDEV_PARAM_FEATURE_WMM, /* 0x14 */
  16170. /** Channel width */
  16171. WMI_VDEV_PARAM_CHWIDTH, /* 0x15 */
  16172. /** Channel Offset */
  16173. WMI_VDEV_PARAM_CHEXTOFFSET, /* 0x16 */
  16174. /** Disable HT Protection */
  16175. WMI_VDEV_PARAM_DISABLE_HTPROTECTION, /* 0x17 */
  16176. /** Quick STA Kickout */
  16177. WMI_VDEV_PARAM_STA_QUICKKICKOUT, /* 0x18 */
  16178. /** Rate to be used with Management frames */
  16179. WMI_VDEV_PARAM_MGMT_RATE, /* 0x19 */
  16180. /** Protection Mode */
  16181. WMI_VDEV_PARAM_PROTECTION_MODE, /* 0x1a */
  16182. /** Fixed rate setting
  16183. * The top nibble is used to select which format to use for encoding
  16184. * the rate specification: 0xVXXXXXXX
  16185. * If V == 0b0000: format is same as before: 0x000000RR
  16186. * If V == 0b0001: format is: 0x1000RRRR.
  16187. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  16188. * The host shall use the new V1 format (and set V = 0x1) if the target
  16189. * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
  16190. * system is configured with Nss > 4 (either at compile time within the
  16191. * host driver, or through WMI_SERVICE_READY PHY capabilities provided
  16192. * by the target).
  16193. */
  16194. WMI_VDEV_PARAM_FIXED_RATE, /* 0x1b */
  16195. /**
  16196. * 11AX: GI =
  16197. * WMI_GI_400_NS, WMI_GI_800_NS, WMI_GI_1600_NS, or WMI_GI_3200_NS
  16198. * 11N: SGI=WMI_GI_400_NS
  16199. */
  16200. WMI_VDEV_PARAM_SGI, /* 0x1c */
  16201. /** Enable LDPC */
  16202. WMI_VDEV_PARAM_LDPC, /* 0x1d */
  16203. /** Enable Tx STBC */
  16204. WMI_VDEV_PARAM_TX_STBC, /* 0x1e */
  16205. /** Enable Rx STBC */
  16206. WMI_VDEV_PARAM_RX_STBC, /* 0x1f */
  16207. /** Intra BSS forwarding */
  16208. WMI_VDEV_PARAM_INTRA_BSS_FWD, /* 0x20 */
  16209. /** Setting Default xmit key for Vdev */
  16210. WMI_VDEV_PARAM_DEF_KEYID, /* 0x21 */
  16211. /** NSS width */
  16212. WMI_VDEV_PARAM_NSS, /* 0x22 */
  16213. /** Set the custom rate for the broadcast data frames */
  16214. WMI_VDEV_PARAM_BCAST_DATA_RATE, /* 0x23 */
  16215. /** Set the custom rate (rate-code) for multicast data frames */
  16216. WMI_VDEV_PARAM_MCAST_DATA_RATE, /* 0x24 */
  16217. /** Tx multicast packet indicate Enable/Disable */
  16218. WMI_VDEV_PARAM_MCAST_INDICATE, /* 0x25 */
  16219. /** Tx DHCP packet indicate Enable/Disable */
  16220. WMI_VDEV_PARAM_DHCP_INDICATE, /* 0x26 */
  16221. /** Enable host inspection of Tx unicast packet to unknown destination */
  16222. WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE, /* 0x27 */
  16223. /* The minimum amount of time AP begins to consider STA inactive */
  16224. WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS, /* 0x28 */
  16225. /* An associated STA is considered inactive when there is no recent TX/RX
  16226. * activity and no downlink frames are buffered for it. Once a STA exceeds
  16227. * the maximum idle inactive time, the AP will send an 802.11 data-null as
  16228. * a keep alive to verify the STA is still associated. If the STA does ACK
  16229. * the data-null, or if the data-null is buffered and the STA does not
  16230. * retrieve it, the STA will be considered unresponsive (see
  16231. * WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). */
  16232. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS, /* 0x29 */
  16233. /* An associated STA is considered unresponsive if there is no recent
  16234. * TX/RX activity and downlink frames are buffered for it. Once a STA
  16235. * exceeds the maximum unresponsive time, the AP will send a
  16236. * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
  16237. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS, /* 0x2a */
  16238. /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
  16239. WMI_VDEV_PARAM_AP_ENABLE_NAWDS, /* 0x2b */
  16240. /** Enable/Disable RTS-CTS */
  16241. WMI_VDEV_PARAM_ENABLE_RTSCTS, /* 0x2c */
  16242. /* Enable TXBFee/er */
  16243. WMI_VDEV_PARAM_TXBF, /* 0x2d */
  16244. /**Set packet power save */
  16245. WMI_VDEV_PARAM_PACKET_POWERSAVE, /* 0x2e */
  16246. /**Drops un-encrypted packets if any received in an encryted connection
  16247. * otherwise forwards to host
  16248. */
  16249. WMI_VDEV_PARAM_DROP_UNENCRY, /* 0x2f */
  16250. /*
  16251. * Set TX encap type.
  16252. *
  16253. * enum wmi_pkt_type is to be used as the parameter
  16254. * specifying the encap type.
  16255. */
  16256. WMI_VDEV_PARAM_TX_ENCAP_TYPE, /* 0x30 */
  16257. /*
  16258. * Try to detect stations that woke-up and exited power save but did not
  16259. * successfully transmit data-null with PM=0 to AP. When this happens,
  16260. * STA and AP power save state are out-of-sync. Use buffered but
  16261. * undelivered MSDU to the STA as a hint that the STA is really awake
  16262. * and expecting normal ASAP delivery, rather than retrieving BU with
  16263. * PS-Poll, U-APSD trigger, etc.
  16264. *
  16265. * 0 disables out-of-sync detection. Maximum time is 255 seconds.
  16266. */
  16267. WMI_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS, /* 0x31 */
  16268. /* Enable/Disable early rx dynamic adjust feature.
  16269. * Early-rx dynamic adjust is a advance power save feature.
  16270. * Early-rx is a wakeup duration before exact TBTT,which is deemed necessary to provide a cushion for various
  16271. * timing discrepancies in the system.
  16272. * In current code branch, the duration is set to a very conservative fix value to make sure the drift impact is minimum.
  16273. * The fix early-tx will result in the unnessary power consume, so a dynamic early-rx adjust algorithm can be designed
  16274. * properly to minimum the power consume.*/
  16275. WMI_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE, /* 0x32 */
  16276. /* set target bmiss number per sample cycle if bmiss adjust was chosen.
  16277. * In this adjust policy,early-rx is adjusted by comparing the current bmiss rate to target bmiss rate
  16278. * which can be set by user through WMI command.
  16279. */
  16280. WMI_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM, /* 0x33 */
  16281. /* set sample cycle(in the unit of beacon interval) if bmiss adjust was chosen */
  16282. WMI_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE, /* 0x34 */
  16283. /* set slop_step */
  16284. WMI_VDEV_PARAM_EARLY_RX_SLOP_STEP, /* 0x35 */
  16285. /* set init slop */
  16286. WMI_VDEV_PARAM_EARLY_RX_INIT_SLOP, /* 0x36 */
  16287. /* pause adjust enable/disable */
  16288. WMI_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE, /* 0x37 */
  16289. /* Set channel pwr limit value of the vdev the minimal value of all
  16290. * vdevs operating on this channel will be set as channel tx power
  16291. * limit, which is used to configure ratearray
  16292. */
  16293. WMI_VDEV_PARAM_TX_PWRLIMIT, /* 0x38 */
  16294. /* set the count of snr value for calculation in snr monitor */
  16295. WMI_VDEV_PARAM_SNR_NUM_FOR_CAL, /* 0x39 */
  16296. /** Roaming offload */
  16297. WMI_VDEV_PARAM_ROAM_FW_OFFLOAD, /* 0x3a */
  16298. /** Enable Leader request RX functionality for RMC */
  16299. WMI_VDEV_PARAM_ENABLE_RMC, /* 0x3b */
  16300. /* IBSS does not have deauth/disassoc, vdev has to detect peer gone event
  16301. * by himself. If the beacon lost time exceed this threshold, the peer is
  16302. * thought to be gone. */
  16303. WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS, /* 0x3c */
  16304. /** max rate in kpbs, transmit rate can't go beyond it */
  16305. WMI_VDEV_PARAM_MAX_RATE, /* 0x3d */
  16306. /* enable/disable drift sample. 0: disable; 1: clk_drift; 2: ap_drift; 3 both clk and ap drift*/
  16307. WMI_VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE, /* 0x3e */
  16308. /* set Tx failure count threshold for the vdev */
  16309. WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR, /* 0x3f */
  16310. /* set ebt resync timeout value, in the unit of TU */
  16311. WMI_VDEV_PARAM_EBT_RESYNC_TIMEOUT, /* 0x40 */
  16312. /* Enable Aggregation State Trigger Event */
  16313. WMI_VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE, /* 0x41 */
  16314. /* This parameter indicates whether IBSS station can enter into power save
  16315. * mode by sending Null frame (with PM=1). When not allowed, IBSS station has to stay
  16316. * awake all the time and should never set PM=1 in its transmitted frames.
  16317. * This parameter is meaningful/valid only when WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH
  16318. * is non-zero. */
  16319. WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED, /* 0x42 */
  16320. /* This parameter indicates if this station can enter into power collapse
  16321. * for the remaining beacon interval after the ATIM window.
  16322. * This parameter is meaningful/valid only when WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED
  16323. * is set to TRUE. */
  16324. WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED, /* 0x43 */
  16325. /* This parameter indicates whether IBSS station exit power save mode and
  16326. * enter power active state (by sending Null frame with PM=0 in the immediate ATIM Window)
  16327. * whenever there is a TX/RX activity. */
  16328. WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED, /* 0x44 */
  16329. /* If Awake on TX/RX activity is enabled, this parameter indicates
  16330. * the data inactivity time in number of beacon intervals after which
  16331. * IBSS station reenters power save by sending Null frame with PM=1. */
  16332. WMI_VDEV_PARAM_INACTIVITY_CNT, /* 0x45 */
  16333. /* Inactivity time in msec after which TX Service Period (SP) is
  16334. * terminated by sending a Qos Null frame with EOSP.
  16335. * If value is 0, TX SP is terminated with the last buffered packet itself
  16336. * instead of waiting for the inactivity timeout. */
  16337. WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS, /* 0x46 */
  16338. /** DTIM policy */
  16339. WMI_VDEV_PARAM_DTIM_POLICY, /* 0x47 */
  16340. /* When IBSS network is initialized, PS-supporting device
  16341. * does not enter protocol sleep state during first
  16342. * WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */
  16343. WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS, /* 0x48 */
  16344. /* Enable/Disable 1 RX chain usage during the ATIM window */
  16345. WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE, /* 0x49 */
  16346. /* RX Leak window is the time driver waits before shutting down
  16347. * the radio or switching the channel and after receiving an ACK
  16348. * for a data frame with PM bit set) */
  16349. WMI_VDEV_PARAM_RX_LEAK_WINDOW, /* 0x4a */
  16350. /** Averaging factor(16 bit value) is used in the calculations to
  16351. * perform averaging of different link level statistics like average
  16352. * beacon spread or average number of frames leaked */
  16353. WMI_VDEV_PARAM_STATS_AVG_FACTOR, /* 0x4b */
  16354. /** disconnect threshold, once the consecutive error for specific peer
  16355. * exceed this threshold, FW will send kickout event to host */
  16356. WMI_VDEV_PARAM_DISCONNECT_TH, /* 0x4c */
  16357. /** The rate_code of RTS_CTS changed by host. Now FW can support
  16358. * more non-HT rates rather than 1Mbps or 6Mbps */
  16359. WMI_VDEV_PARAM_RTSCTS_RATE, /* 0x4d */
  16360. /** This parameter indicates whether using a long duration RTS-CTS
  16361. * protection when a SAP goes off channel in MCC mode */
  16362. WMI_VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE, /* 0x4e */
  16363. /** This parameter indicates whether using a broadcast probe response
  16364. * to increase the detectability of SAP in MCC mode */
  16365. WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE, /* 0x4f */
  16366. /** This parameter indicates the power backoff in percentage
  16367. * currently supports 100%, 50%, 25%, 12.5%, and minimum
  16368. * Host passes 0, 1, 2, 3, 4 to Firmware
  16369. * 0 --> 100% --> no changes, 1 --> 50% --> -3dB,
  16370. * 2 --> 25% --> -6dB, 3 --> 12.5% --> -9dB, 4 --> minimum --> -32dB
  16371. */
  16372. WMI_VDEV_PARAM_TXPOWER_SCALE, /* 0x50 */
  16373. /** TX power backoff in dB: tx power -= param value
  16374. * Host passes values(DB) to Halphy, Halphy reduces the power table
  16375. * by the values. Safety check will happen in Halphy.
  16376. */
  16377. WMI_VDEV_PARAM_TXPOWER_SCALE_DECR_DB, /* 0x51 */
  16378. /** Multicast to Unicast conversion setting */
  16379. WMI_VDEV_PARAM_MCAST2UCAST_SET, /* 0x52 */
  16380. /** Total number of HW retries */
  16381. WMI_VDEV_PARAM_RC_NUM_RETRIES, /* 0x53 */
  16382. /** Max tx percentage for cabq */
  16383. WMI_VDEV_PARAM_CABQ_MAXDUR, /* 0x54 */
  16384. /** MFPTEST settings */
  16385. WMI_VDEV_PARAM_MFPTEST_SET, /* 0x55 */
  16386. /** RTS Fixed rate setting */
  16387. WMI_VDEV_PARAM_RTS_FIXED_RATE, /* 0x56 */
  16388. /** VHT SGI MASK */
  16389. WMI_VDEV_PARAM_VHT_SGIMASK, /* 0x57 */
  16390. /** VHT80 Auto Rate MASK */
  16391. WMI_VDEV_PARAM_VHT80_RATEMASK, /* 0x58 */
  16392. /** set Proxy STA features for this vap */
  16393. WMI_VDEV_PARAM_PROXY_STA, /* 0x59 */
  16394. /** set virtual cell mode - enable/disable */
  16395. WMI_VDEV_PARAM_VIRTUAL_CELL_MODE, /* 0x5a */
  16396. /** Set receive packet type */
  16397. WMI_VDEV_PARAM_RX_DECAP_TYPE, /* 0x5b */
  16398. /** Set ratemask with specific Bandwidth and NSS */
  16399. WMI_VDEV_PARAM_BW_NSS_RATEMASK, /* 0x5c */
  16400. /** Set SENSOR Support */
  16401. WMI_VDEV_PARAM_SENSOR_AP, /* 0x5d */
  16402. /** Set beacon rate */
  16403. WMI_VDEV_PARAM_BEACON_RATE, /* 0x5e */
  16404. /** Enable CTS to self for DTIM beacon */
  16405. WMI_VDEV_PARAM_DTIM_ENABLE_CTS, /* 0x5f */
  16406. /** Disable station kickout at Vap level */
  16407. WMI_VDEV_PARAM_STA_KICKOUT, /* 0x60 */
  16408. /* VDEV capabilities */
  16409. WMI_VDEV_PARAM_CAPABILITIES, /* see capabilities defs below */ /* 0x61 */
  16410. /**
  16411. * Increment TSF in micro seconds to avoid beacon collision on mesh VAP.
  16412. * The host must ensure that either no other vdevs share the TSF with
  16413. * this vdev, or else that it is acceptable to apply this TSF adjustment
  16414. * to all vdevs sharing the TSF.
  16415. */
  16416. WMI_VDEV_PARAM_TSF_INCREMENT, /* 0x62 */
  16417. /** Disable/Enable AMPDU of vdev per AC:
  16418. * bit | AC
  16419. * --------
  16420. * 0 | VO
  16421. * 1 | VI
  16422. * 2 | BE
  16423. * 3 | BK
  16424. * A value of 0 in a given bit disables A-MPDU aggregation for
  16425. * that AC; a value of 1 enables A-MPDU aggregation
  16426. */
  16427. WMI_VDEV_PARAM_AMPDU_PER_AC, /* 0x63 */
  16428. /**
  16429. * Vdev level rx filter of from-ds / to-ds / no-ds / ta / ra frames.
  16430. * Used mainly for mesh-vap.
  16431. * The parameter value delivered with the RX_FILTER vdev param contains
  16432. * a bit-or mask of wmi_vdev_param_filter enum values.
  16433. */
  16434. WMI_VDEV_PARAM_RX_FILTER, /* 0x64 */
  16435. /** vdev-specific mgmt tx power in dBm units (signed integer value) */
  16436. WMI_VDEV_PARAM_MGMT_TX_POWER, /* 0x65 */
  16437. /** Vdev level non aggregration/11g sw retry threshold. 0-disable, min:0, max:31, default:15 */
  16438. WMI_VDEV_PARAM_NON_AGG_SW_RETRY_TH, /* 0x66 */
  16439. /** Vdev level aggregration sw retry threshold. 0-disable, min:0, max:31, default:15 */
  16440. WMI_VDEV_PARAM_AGG_SW_RETRY_TH, /* 0x67 */
  16441. /** disable dynamic bw RTS **/
  16442. WMI_VDEV_PARAM_DISABLE_DYN_BW_RTS, /* 0x68 */
  16443. /** per ssid (vdev) based ATF strict/fair scheduling policy
  16444. * param values are WMI_ATF_SSID_FAIR_SCHED, WMI_ATF_SSID_STRICT_SCHED,
  16445. * or WMI_ATF_SSID_FAIR_SCHED_WITH_UB
  16446. */
  16447. WMI_VDEV_PARAM_ATF_SSID_SCHED_POLICY, /* 0x69 */
  16448. /** Enable or disable Dual carrier modulation
  16449. * valid values: 0-Disable DCM, 1-Enable DCM.
  16450. */
  16451. WMI_VDEV_PARAM_HE_DCM, /* 0x6a */
  16452. /** Enable or disable Extended range
  16453. * valid values: 0-Disable ER, 1-Enable ER.
  16454. */
  16455. WMI_VDEV_PARAM_HE_RANGE_EXT, /* 0x6b */
  16456. /* enable or disable BCAST probe response feature */
  16457. WMI_VDEV_PARAM_ENABLE_BCAST_PROBE_RESPONSE, /* 0x6c */
  16458. /* param to specify probe request Tx delay during Fast Initial Link Setup */
  16459. WMI_VDEV_PARAM_FILS_MAX_CHANNEL_GUARD_TIME, /* units = milliseconds */ /* 0x6d */
  16460. /* enable or disable NOA for P2P GO */
  16461. WMI_VDEV_PARAM_DISABLE_NOA_P2P_GO, /* 0x6e */
  16462. /** Per band user management frame fix rate setting
  16463. * BIT 31: enable (1) or disable (0) mgmt fix rate for 5G
  16464. * BIT 30: enable (1) or disable (0) mgmt fix rate for 2G
  16465. *
  16466. * BIT 23: 11ax (1) or legacy (0) rate code
  16467. * BITS [22..12]: rate code for 5G
  16468. *
  16469. * BIT 11: 11ax (1) or legacy (0) rate code
  16470. * BITS [10..0]: rate code for 2G
  16471. */
  16472. WMI_VDEV_PARAM_PER_BAND_MGMT_TX_RATE, /* 0x6f */
  16473. /* This should be called before WMI_VDEV_PARAM_TXBF */
  16474. WMI_VDEV_PARAM_11AX_TXBF, /* 0x70 */
  16475. /** This parameter indicates whether VDEV is SMPS intolerant.
  16476. * I.e. - SMPS action frame cannot be transmitted by the VDEV to
  16477. * dynamically change the RX NSS.
  16478. *
  16479. * valid values: 1 - VDEV is SMPS intolerant, 0 - VDEV is SMPS tolerant
  16480. */
  16481. WMI_VDEV_PARAM_SMPS_INTOLERANT, /* 0x71 */
  16482. /** specify probe request Tx delay for scans triggered on this VDEV */
  16483. WMI_VDEV_PARAM_PROBE_DELAY, /* units = milliseconds */ /* 0x72 */
  16484. /** specify the time gap between each set of probe request transmissions.
  16485. * The number of probe requests in each set depends on the ssid_list and
  16486. * bssid_list in the scan request.
  16487. * This parameter will be applied only for scans triggered on this VDEV.
  16488. */
  16489. WMI_VDEV_PARAM_REPEAT_PROBE_TIME, /* units = milliseconds */ /* 0x73 */
  16490. /** specify the HE LTF setting that should be used for fixed rate
  16491. * transmissions.
  16492. *
  16493. * Expects values of WMI_HE_LTF_DEFAULT, WMI_HE_LTF_1X, WMI_HE_LTF_2X,
  16494. * or WMI_HE_LTF_4X.
  16495. */
  16496. WMI_VDEV_PARAM_HE_LTF, /* 0x74 */
  16497. /** VDEV parameter to configure the number of TX chains to use for
  16498. * a/b/g rates.
  16499. * bit 0~15 : 11b mode TX chain number.
  16500. * bit 16~31 : 11ag mode TX chain number.
  16501. *
  16502. * valid values:
  16503. * Should not exceed the maximum number of supported TX Chains
  16504. * 0 - Used to reset the vote. Acts as Don't Care
  16505. */
  16506. WMI_VDEV_PARAM_ABG_MODE_TX_CHAIN_NUM, /* 0x75 */
  16507. /**
  16508. * Enable or disable the multi group key feature on this VDEV.
  16509. * used for NAN APP and VLAN Tagging
  16510. */
  16511. WMI_VDEV_PARAM_ENABLE_MULTI_GROUP_KEY, /* 0x76 */
  16512. /*
  16513. * Specify the total number of multi group key on this VDEV.
  16514. */
  16515. WMI_VDEV_PARAM_NUM_GROUP_KEYS, /* 0x77 */
  16516. /** VDEV parameter to enable or disable various OCE features */
  16517. WMI_VDEV_PARAM_ENABLE_DISABLE_OCE_FEATURES, /* 0x78 */
  16518. /*
  16519. * Set/Clear 3 least-significant bits to
  16520. * Disable or Enable rate drop down for MGMT, SU data and MU data pkts
  16521. *
  16522. * bit 0 -> If set MGMT Pkt rate drop down is enabled else disabled
  16523. * bit 1 -> If set SU data Pkt rate drop down is enabled else disabled
  16524. * bit 2 -> If set MU data Pkt rate drop down is enabled else disabled
  16525. * bits 31:3 -> Reserved bits. should be set to zero.
  16526. */
  16527. WMI_VDEV_PARAM_RATE_DROPDOWN_BMAP, /* 0x79 */
  16528. /** VDEV parameter to config modulated DTIM count */
  16529. WMI_VDEV_PARAM_MODDTIM_CNT, /* 0x7a */
  16530. /**
  16531. * VDEV parameter to config max listen interval,
  16532. * when modulated DTIM is enabled.
  16533. * Units are 100TU.
  16534. */
  16535. WMI_VDEV_PARAM_MAX_LI_OF_MODDTIM, /* 0x7b */
  16536. /** VDEV parameter to config dynamic DTIM count */
  16537. WMI_VDEV_PARAM_DYNDTIM_CNT, /* 0x7c */
  16538. /** VDEV parameter to enable or disable RTT responder role
  16539. * A value of 0 in a given bit disables corresponding mode.
  16540. * bit | Responder mode support
  16541. * -----------------------------------------
  16542. * 0 | responder mode for 11MC ranging
  16543. * 1 | responder mode for 11AZ NTB ranging
  16544. * 2 | responder mode for 11AZ TB ranging
  16545. */
  16546. WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_RESPONDER_ROLE, /* 0x7d */
  16547. /** Parameter to configure BA mode.
  16548. * Valid values: 0- Auto mode,
  16549. * 1- Manual mode(addba req not sent).
  16550. * 2- buffer size 64
  16551. * 3- buffer size 256
  16552. * 4- buffer size 128 // placeholder, not valid
  16553. * 5- buffer size 512
  16554. * 6- buffer size 1024
  16555. */
  16556. WMI_VDEV_PARAM_BA_MODE, /* 0x7e */
  16557. /**
  16558. * VDEV parameter to force to set modulate DTIM count as listen interval,
  16559. * no matter whether WoW is enabled
  16560. * Default: Disabled.
  16561. * Valid values: 0- Disabled,
  16562. * 1- Enabled.
  16563. */
  16564. WMI_VDEV_PARAM_FORCED_MODDTIM_ENABLE, /* 0x7f */
  16565. /** specify the setting that are valid for auto rate transmissions.
  16566. * bits 7:0 (LTF): When bitmask is set, then corresponding LTF value is
  16567. * used for auto rate.
  16568. * BIT0 = 1 (WMI_HE_LTF_1X or WMI_EHT_LTF_1X depending on
  16569. * current rate’s preamble type HE or EHT)
  16570. * BIT1 = 1 (WMI_HE_LTF_2X or WMI_EHT_LTF_2X)
  16571. * BIT2 = 1 (WMI_HE_LTF_4X or WMI_EHT_LTF_4X)
  16572. * BIT3-7 = Reserved bits.
  16573. * bits 15:8 (SGI): When bitmask is set, then corresponding SGI value is
  16574. * used for auto rate.
  16575. * BIT8 = 1 (400 NS)
  16576. * BIT9 = 1 (800 NS)
  16577. * BIT10 = 1 (1600 NS)
  16578. * BIT11 = 1 (3200 NS)
  16579. * BIT12-15 = Reserved bits.
  16580. * bits 31:16: Reserved bits. should be set to zero.
  16581. */
  16582. WMI_VDEV_PARAM_AUTORATE_MISC_CFG, /* 0x80 */
  16583. /** VDEV parameter to enable or disable RTT initiator mac address
  16584. * randomization.
  16585. * Default: Disabled.
  16586. * valid values: 0-Disable random mac 1-Enable random mac
  16587. */
  16588. WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_INITIATOR_RANDOM_MAC, /* 0x81 */
  16589. /**
  16590. * For each AC, configure how many tx retries to send without RTS
  16591. * before enabling RTS
  16592. * bits 0:7 :BE
  16593. * bits 8:15 :BK
  16594. * bits 16:23 :VI
  16595. * bits 24:31 :VO
  16596. * A value of 0 in specific AC means default configuration for that AC.
  16597. */
  16598. WMI_VDEV_PARAM_TX_RETRIES_BEFORE_RTS_PER_AC, /* 0x82 */
  16599. /**
  16600. * Parameter to enable/disable AMSDU aggregation size auto-selection logic.
  16601. * We have logic where AMSDU aggregation size is dynamically decided
  16602. * based on MCS. That logic is enabled by default.
  16603. * For certain tests, we need a method to disable this optimization,
  16604. * and base AMSDU size only on the peer's capability rather than our logic.
  16605. * A value of 0 means disable internal optimization,
  16606. * 1 means enable internal optimzation.
  16607. */
  16608. WMI_VDEV_PARAM_AMSDU_AGGREGATION_SIZE_OPTIMIZATION, /* 0x83 */
  16609. /**
  16610. * In RAW mode, FW will not know whether the encryption is enabled
  16611. * on this vdev or not.
  16612. * Because of this, FW will not program the right info into the
  16613. * RawNwifi TLV resulting in the connection failure in RAW mode.
  16614. * So to program the right info, FW should know whether the security
  16615. * is enabled on this VDEV.
  16616. * Host will send this VDEV param command (With Value = 1) in case of
  16617. * RAW secure mode.
  16618. */
  16619. WMI_VDEV_PARAM_RAW_IS_ENCRYPTED, /* 0x84 */
  16620. /**
  16621. * Dynamically enable/disable green tx (GTX) on supported rates.
  16622. * Host will set this param to 1 for enabling GTX & 0 for disabling it.
  16623. * Note: If GTX was already running (since the global GTX control
  16624. * resides with default BDF setting) & host wants to disable GTX,
  16625. * the VDEV does not exercise any more TPC changes on the GTX supported
  16626. * rates & goes to a default GTX SM where all PPDU's sent on default TPC.
  16627. * Whenever, host wants to re-enable GTX, the enable command resumes the
  16628. * GTX functionality & TPC convergence to lower power levels can be
  16629. * attained as long as PER on GTX supported rates is within the pre-defined
  16630. * PER margin configured through the BDF.
  16631. */
  16632. WMI_VDEV_PARAM_GTX_ENABLE, /* 0x85 */
  16633. /*
  16634. * Enable/Disable multicast buffer.
  16635. * A FLAG to enable & disable buffering of multicast frames at AP
  16636. * when stations are in Power Save mode.
  16637. * Once AP disables buffering of multicast frame,
  16638. * clients which goes into Power save mode will not receive these frames.
  16639. * by default MCAST buffering will be enabled.
  16640. * (CABQ = Content After Beacon Queue = multicast queue)
  16641. * Host will send this VDEV param command,
  16642. * With Value = 1 means fw will disable the MCAST buffering
  16643. * With Value = 0 means fw will enable the MCAST buffering.
  16644. */
  16645. WMI_VDEV_PARAM_DISABLE_CABQ, /* 0x86 */
  16646. /**
  16647. * For SU and MU sounding
  16648. * switch between su ac/ax sounding and mu ac/ax sounding
  16649. * switch between triggered/ non-triggered on ax sounding enabled.
  16650. * each bit toggles the corresponding modes by enabling/disabling
  16651. *
  16652. * Bit 1 doesn't carry any operation for now and may change later,
  16653. * so reserved.
  16654. *
  16655. *-----------------------
  16656. * bit(0) | mode
  16657. *-----------------------
  16658. * 0 | AC
  16659. * 1 | AX
  16660. *-----------------------
  16661. *
  16662. * bit(1) | Reserved
  16663. *
  16664. *-----------------------
  16665. * bit(2) | mode
  16666. *-----------------------
  16667. * 0 | SU
  16668. * 1 | MU
  16669. *-----------------------
  16670. * bit(3) | mode
  16671. *-----------------------
  16672. * 0 | non -triggered
  16673. * 1 | triggered
  16674. */
  16675. WMI_VDEV_PARAM_SET_HE_SOUNDING_MODE, /* 0x87 */
  16676. /** Fixed rate setting used in UL Trigger
  16677. * The top nibble is used to select which format to use for encoding
  16678. * the rate specification: 0xVXXXXXXX, V must be 1 for the UL
  16679. * format.
  16680. * If V == 0b0001: format is: 0x1000RRRR.
  16681. * ("RRRR" ratecode already has those preamble bits,
  16682. * which can specify HE or EHT)
  16683. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  16684. *
  16685. * This parameter controls the UL OFDMA and UL MU-MIMO vdev fixed rate.
  16686. */
  16687. WMI_VDEV_PARAM_UL_FIXED_RATE, /* 0x88 */
  16688. /**
  16689. * Uplink MU-MIMO & OFDMA GI configuration used in UL Trigger
  16690. * 11AX: GI =
  16691. * WMI_GI_400_NS, WMI_GI_800_NS, WMI_GI_1600_NS, or WMI_GI_3200_NS
  16692. * 11N: SGI=WMI_GI_400_NS
  16693. */
  16694. /** Top nibble can be used to distinguish between HE and EHT: 0xVXXXXXXX
  16695. * If V == 0b0000: format is HE.
  16696. * If V == 0b0001: format is EHT.
  16697. */
  16698. WMI_VDEV_PARAM_UL_GI, /* 0x89 */
  16699. /** Enable/Disable LDPC in UL Trigger */
  16700. /** Top nibble can be used to distinguish between HE and EHT: 0xVXXXXXXX
  16701. * If V == 0b0000: format is HE.
  16702. * If V == 0b0001: format is EHT.
  16703. */
  16704. WMI_VDEV_PARAM_UL_LDPC, /* 0x8A */
  16705. /** Max NSS allowed in UL Trigger */
  16706. /** Top nibble can be used to distinguish between HE and EHT: 0xVXXXXXXX
  16707. * If V == 0b0000: format is HE.
  16708. * If V == 0b0001: format is EHT.
  16709. */
  16710. WMI_VDEV_PARAM_UL_NSS, /* 0x8B */
  16711. /** Enable/Disable STBC in UL Trigger */
  16712. /** Top nibble can be used to distinguish between HE and EHT: 0xVXXXXXXX
  16713. * If V == 0b0000: format is HE.
  16714. * If V == 0b0001: format is EHT.
  16715. */
  16716. WMI_VDEV_PARAM_UL_STBC, /* 0x8C */
  16717. /** specify the HE LTF setting that should be used for fixed rate
  16718. * uplink transmissions.
  16719. *
  16720. * Expects values of WMI_HE_LTF_DEFAULT, WMI_HE_LTF_1X, WMI_HE_LTF_2X,
  16721. * or WMI_HE_LTF_4X.
  16722. */
  16723. WMI_VDEV_PARAM_UL_HE_LTF, /* 0x8D */
  16724. /** Uplink OFDMA PPDU bandwidth */
  16725. /** Top nibble can be used to distinguish between HE and EHT: 0xVXXXXXXX
  16726. * If V == 0b0000: format is HE.
  16727. * (0: 20MHz, 1: 40MHz, 2: 80Mhz, 3: 160MHz)
  16728. * If V == 0b0001: format is EHT.
  16729. * (0: 20MHz, 1: 40MHz, 2: 80Mhz, 3: 160MHz, 4: 320MHz)
  16730. */
  16731. WMI_VDEV_PARAM_UL_PPDU_BW, /* 0x8E */
  16732. /** Enable/Disable FW handling MU EDCA change from AP (1: En, 0:Dis) */
  16733. WMI_VDEV_PARAM_MU_EDCA_FW_UPDATE_EN, /* 0x8F */
  16734. /** Update dot11ObssNbruToleranceTime in fw. Param value: seconds */
  16735. WMI_VDEV_PARAM_UPDATE_OBSS_RU_TOLERANCE_TIME, /* 0x90 */
  16736. /** Parameter used when MTU size is sent by the host
  16737. * In particular, this configuration message is used for cases where the
  16738. * encapsulation header results in a larger max frame size than the
  16739. * typical 802.3 + SNAP/LLC frame.
  16740. */
  16741. WMI_VDEV_PARAM_MAX_MTU_SIZE, /* 0x91 */
  16742. /** Send every nth beacon to host
  16743. * if value of n is 0, it means this Nth beacon upload is disabled
  16744. */
  16745. WMI_VDEV_PARAM_NTH_BEACON_TO_HOST, /* 0x92 */
  16746. /**
  16747. * To capture the MGMT OR DATA OR BOTH packets.
  16748. * Refer to enum WMI_PKT_CAPTURE_MODE_CONFIG for specifications of
  16749. * which parameter value enables which kind of packet captures.
  16750. */
  16751. WMI_VDEV_PARAM_PACKET_CAPTURE_MODE, /* 0x93 */
  16752. /**
  16753. * To configure duration of how many seconds without tx unicast traffic is
  16754. * considered stale for mcast rate adaptation
  16755. */
  16756. WMI_VDEV_PARAM_MCAST_RC_STALE_PERIOD, /* 0x94 */
  16757. /*
  16758. * Bits 3:0 - AST0_FLOW_MASK(4)
  16759. * Bits 7:4 - AST1_FLOW_MASK(4)
  16760. * Bits 11:8 - AST2_FLOW_MASK(4)
  16761. * Bits 15:12 - AST3_FLOW_MASK(4)
  16762. * Bits 23:16 - TID_VALID_HI_PRI(8)
  16763. * Bits 31:24 - TID_VALID_LOW_PRI(8)
  16764. *
  16765. * The below macros can be used to set/get the relevant fields.
  16766. * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET(msdu_flow_config1, ast_x)
  16767. * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET(msdu_flow_config1, ast_x, mask)
  16768. * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET(msdu_flow_config1)
  16769. * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET(msdu_flow_config1, mask)
  16770. * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET(msdu_flow_config1)
  16771. * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET(msdu_flow_config1, mask)
  16772. */
  16773. WMI_VDEV_PARAM_MSDU_FLOW_OVERRIDE_CONFIG, /* 0x95 */
  16774. /* Enable/Disable using NULL frame for leaky AP */
  16775. WMI_VDEV_PARAM_ENABLE_NULL_FOR_LEAKY_AP, /* 0x96 */
  16776. /**
  16777. * To configure duration of how many seconds without TX/RX data traffic,
  16778. * NDI vdev can kickout the connected peer (i.e. NDP Termination).
  16779. */
  16780. WMI_VDEV_PARAM_NDP_INACTIVITY_TIMEOUT, /* 0x97 */
  16781. /* To enable/disable multicast rate adaptation feature at vdev level */
  16782. WMI_VDEV_PARAM_ENABLE_MCAST_RC, /* 0x98 */
  16783. /*
  16784. * Params related to 6 GHz operation
  16785. * The parameter value is formed from WMI_VDEV_6GHZ_BITMAP flags.
  16786. */
  16787. WMI_VDEV_PARAM_6GHZ_PARAMS, /* 0x99 */
  16788. /**
  16789. * VDEV parameter to enable or disable RTT initiator role
  16790. * Default : Enabled
  16791. * valid values: 0-Disable initiator role, 1-Enable initiator role.
  16792. */
  16793. WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_INITIATOR_ROLE, /* 0x9A */
  16794. /**
  16795. * To configure duration of how many seconds to wait to kickout peer
  16796. * if peer is not reachable
  16797. */
  16798. WMI_VDEV_PARAM_NDP_KEEPALIVE_TIMEOUT, /* 0x9B*/
  16799. /**
  16800. * To support discovery of NAN cluster with Master Preference (MP) as 0
  16801. * when a new device is enabling NAN
  16802. */
  16803. WMI_VDEV_PARAM_ALLOW_NAN_INITIAL_DISCOVERY_OF_MP0_CLUSTER, /* 0x9C */
  16804. /**
  16805. * VDEV parameter to enable or disable roaming reason VSIE in
  16806. * re-association request
  16807. *
  16808. * Default : Disabled
  16809. * valid values: 0 - Disable 1 - Enable
  16810. */
  16811. WMI_VDEV_PARAM_ENABLE_DISABLE_ROAM_REASON_VSIE, /* 0x9D */
  16812. /* Parameter used to configure OBSS Packet Detect threshold
  16813. * for Non-SRG / SRG based Spatial Reuse feature.
  16814. * (SRG = Spatial Reuse Group)
  16815. * The accepted values are in between 0x00 and 0xFF, inclusive.
  16816. * The parameter value is programmed into the appropriate spatial reuse
  16817. * register, to specify how low the background signal strength from
  16818. * neighboring BSS cells must be, for this AP to employ spatial reuse.
  16819. *
  16820. * The value of the parameter is compared against the OBSS RSSI in dB.
  16821. * It is a 8-bit value whose
  16822. * range is -128 to 127 (after two's complement operation).
  16823. * For example, if the parameter value is 0xF5, the target will
  16824. * allow spatial reuse if the RSSI detected from other BSS
  16825. * is below -10 dB.
  16826. * Similarly, if the parameter value is 0x0A, the target will
  16827. * allow spatial reuse only if the RSSI detected from neighboring
  16828. * BSS cells is no more than 10 dB.
  16829. *
  16830. * If Bit 29 is set, then input value will be in dBm. This is used
  16831. * for chipsets that use dBm for comparison across MAC/Phy blocks.
  16832. * Older chipsets support input in dB units. For newer chipsets, dBm
  16833. * units will be used.
  16834. * The host will use the WMI_SERVICE_SRG_SRP_SPATIAL_REUSE_SUPPORT
  16835. * service ready bit to differentiate between providing input as dB or dBm.
  16836. *
  16837. * bit | purpose
  16838. * -----------------
  16839. * 0 - 7 | Param Value for non-SRG based Spatial Reuse
  16840. * 8 - 15| Param value for SRG based Spatial Reuse
  16841. * 16 - 28| Reserved
  16842. * 29 | Param value is in dBm units rather than dB units
  16843. * 30 | Enable/Disable SRG based spatial reuse.
  16844. * | If set to 0, ignore bits 8-15.
  16845. * 31 | Enable/Disable Non-SRG based spatial reuse.
  16846. * | If set to 0, ignore bits 0-7.
  16847. *
  16848. * The WMI_VDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD setting will only
  16849. * take effect if the WMI_PDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD
  16850. * setting is also set for the pdev that the vdev belongs to.
  16851. */
  16852. WMI_VDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD, /* 0x9E */
  16853. /* Parameter used to configure OBSS Packet Detection per Access Category
  16854. * for SRP based and OBSS_PD based spatial reuse feature.
  16855. * (SRP = Spatial Reuse Parameter)
  16856. * Based on the bits set, the corresponding Access Category Queues will have
  16857. * spatial reuse enabled / disabled.
  16858. * bit | AC
  16859. * ------------
  16860. * 0 | BK for SRG/Non-SRG
  16861. * 1 | BE for SRG/Non-SRG
  16862. * 2 | VI for SRG/Non-SRG
  16863. * 3 | VO for SRG/Non-SRG
  16864. * 4 - 15 | Reserved
  16865. * 16 | BK for SRP
  16866. * 17 | BE for SRP
  16867. * 18 | VI for SRP
  16868. * 19 | VO for SRP
  16869. * 20 - 31 | Reserved
  16870. *
  16871. * The WMI_VDEV_PARAM_SET_CMD_OBSS_PD_PER_AC setting will only take effect
  16872. * if the WMI_PDEV_PARAM_SET_CMD_OBSS_PD_PER_AC setting is also set for
  16873. * the pdev that the vdev belongs to.
  16874. */
  16875. WMI_VDEV_PARAM_SET_CMD_OBSS_PD_PER_AC, /* 0x9F */
  16876. /**
  16877. * VDEV parameter to indicate RSN (Robust Security Network) capability.
  16878. * This value will be intersection of the local vdev's (STA's)
  16879. * RSN capability and the peer's (AP's) RSN capability.
  16880. */
  16881. WMI_VDEV_PARAM_RSN_CAPABILITY, /* 0xA0 */
  16882. /* Parameter used to enable/disable SRP feature */
  16883. WMI_VDEV_PARAM_ENABLE_SRP, /* 0xA1 */
  16884. /*
  16885. * Parameter used to control roaming/11kv (BTM) / etc. behavior
  16886. * bit | purpose
  16887. * -----------------
  16888. * 0 | Disable any FW side roaming except host invoke roaming
  16889. * 1 | Do not trans away on receiving BTM req
  16890. * 2 | Do not send disassoc to AP when receiving BTM req with
  16891. * | Disassoc Imminent bit set to 1
  16892. * 3 - 31 | Reserved
  16893. */
  16894. WMI_VDEV_PARAM_ROAM_11KV_CTRL, /* 0xA2 */
  16895. /* vdev param to enable or disable various NAN config features
  16896. * param value bitmap set to 1 for enable and 0 for disable respectively
  16897. */
  16898. WMI_VDEV_PARAM_ENABLE_DISABLE_NAN_CONFIG_FEATURES, /* 0xA3 */
  16899. /* vdev param to enable the SAP HW offload
  16900. * Bit : 0 - enable/disable SHO
  16901. * Bit : 1 - enable for Sta connected state as well.
  16902. * Bit : 2-31 - reserved
  16903. */
  16904. WMI_VDEV_PARAM_SHO_CONFIG, /* 0xA4 */
  16905. /** Enable or disable Non-data HE Extended range
  16906. * valid values: 0-Disable ER, 1-Enable ER.
  16907. */
  16908. WMI_VDEV_PARAM_NON_DATA_HE_RANGE_EXT, /* 0xA5 */
  16909. /** Prohibit data & mgmt except keepalive pkt */
  16910. WMI_VDEV_PARAM_PROHIBIT_DATA_MGMT, /* 0xA6 */
  16911. /** Enable or disable Txop requirement feature
  16912. * 0 - Disable feature
  16913. * 1 - Enable feature
  16914. */
  16915. WMI_VDEV_PARAM_WMM_TXOP_ENABLE, /* 0xA7 */
  16916. /** Value of DTIM to be applied in Suspend mode
  16917. */
  16918. WMI_VDEV_PARAM_FORCE_DTIM_CNT, /* 0xA8 */
  16919. /* vdev param to configure the Smart Monitor features
  16920. * Bit : 0 - enable/disable Trigger frames
  16921. * Bit : 1 - enable/disable QOS frames
  16922. * Bit : 2-4 - if 1, fwd beacon frames from connected AP
  16923. * - if 2, fwd beacon frames from unconnected AP
  16924. * during roam scan/host scan
  16925. * - if 3, fwd beacons from unconnected AP during
  16926. * roam scan/host scan and from connected AP
  16927. * - if 4, don't fwd any beacon frame
  16928. * Bit : 5-31 - reserved
  16929. */
  16930. WMI_VDEV_PARAM_SMART_MONITOR_CONFIG, /* 0xA9 */
  16931. /** Value of MAX modulated DTIM in ms to be applied
  16932. * in Suspend mode. This parameter will override
  16933. * the value of WMI_VDEV_PARAM_MAX_LI_OF_MODDTIM
  16934. */
  16935. WMI_VDEV_PARAM_MAX_LI_OF_MODDTIM_MS, /* 0xAA */
  16936. /*
  16937. * Security config advertised in beacons
  16938. * bit 0: URNM_MFPR in RSNXE
  16939. * bit 1: MFPC in RSN CAP
  16940. * bit 2: MFPR in RSN CAP
  16941. * bit 3: URNM_MFPR_X20 in RSNXE
  16942. * bit 4: RSTA_EXTCAP_I2R_LMR_FB
  16943. * bit 31:5 Reserved
  16944. */
  16945. WMI_VDEV_PARAM_11AZ_SECURITY_CONFIG, /* 0xAB */
  16946. /*
  16947. * Latency Level Flags
  16948. */
  16949. WMI_VDEV_PARAM_NORMAL_LATENCY_FLAGS_CONFIGURATION, /* 0xAC */
  16950. WMI_VDEV_PARAM_XR_LATENCY_FLAGS_CONFIGURATION, /* 0xAD */
  16951. WMI_VDEV_PARAM_LOW_LATENCY_FLAGS_CONFIGURATION, /* 0xAE */
  16952. WMI_VDEV_PARAM_ULTRA_LOW_LATENCY_FLAGS_CONFIGURATION, /* 0xAF */
  16953. /*
  16954. * Latency level UL/DL
  16955. * 0-15 bits: UL
  16956. * 16-31 bits: DL
  16957. */
  16958. WMI_VDEV_PARAM_NORMAL_LATENCY_UL_DL_CONFIGURATION, /* 0xB0 */
  16959. WMI_VDEV_PARAM_XR_LATENCY_UL_DL_CONFIGURATION, /* 0xB1 */
  16960. WMI_VDEV_PARAM_LOW_LATENCY_UL_DL_CONFIGURATION, /* 0xB2 */
  16961. WMI_VDEV_PARAM_ULTRA_LOW_LATENCY_UL_DL_CONFIGURATION, /* 0xB3 */
  16962. /*
  16963. * Ini to
  16964. * Configure default latency level for all clients
  16965. */
  16966. WMI_VDEV_PARAM_DEFAULT_LATENCY_LEVEL_CONFIGURATION, /* 0xB4 */
  16967. /*
  16968. * Ini to
  16969. * Configure multi client Low latency Feature
  16970. */
  16971. WMI_VDEV_PARAM_MULTI_CLIENT_LL_FEATURE_CONFIGURATION, /* 0xB5 */
  16972. /*
  16973. * traffic config for per vdev
  16974. * bit 0: low latency vdev
  16975. * bit 1: high tput vdev
  16976. * bit 31:2 Reserved
  16977. */
  16978. WMI_VDEV_PARAM_VDEV_TRAFFIC_CONFIG, /* 0xB6 */
  16979. /* Final bmiss time for Non WOW mode in sec */
  16980. WMI_VDEV_PARAM_FINAL_BMISS_TIME_SEC, /* 0xB7 */
  16981. /* Final bmiss time for WOW mode in sec */
  16982. WMI_VDEV_PARAM_FINAL_BMISS_TIME_WOW_SEC, /* 0xB8 */
  16983. /*
  16984. * Param to disable LPI antenna optimizations at Vdev level.
  16985. * In 6G LPI mode, additional antenna optimizations are done to
  16986. * improve range. Param is provided to disable the added
  16987. * optimizations.
  16988. */
  16989. WMI_VDEV_PARAM_DISABLE_LPI_ANT_OPTIMIZATION, /* 0xB9 */
  16990. /*
  16991. * Param to update connected VDEV channel bandwidth.
  16992. * Target firmware should take care of notifying associated peers
  16993. * (except TDLS) about change in bandwidth, through OMN/OMI notification
  16994. * before performing bandwidth update internally.
  16995. * Please note incase of STA VDEV only BSS peer gets updated,
  16996. * associated TDLS peer bandwidth won't be impacted.
  16997. *
  16998. * The updated bandwidth is specified with a wmi_channel_width value.
  16999. */
  17000. WMI_VDEV_PARAM_CHWIDTH_WITH_NOTIFY, /* 0xBA */
  17001. /*
  17002. * Min time between measurment for 11AZ NTB ranging
  17003. * in units of 100 microseconds
  17004. */
  17005. WMI_VDEV_PARAM_RTT_11AZ_NTB_MIN_TIME_BW_MEAS, /* 0xBB */
  17006. /*
  17007. * Max time between measurment for 11AZ NTB ranging
  17008. * in units of 10 milliseconds
  17009. */
  17010. WMI_VDEV_PARAM_RTT_11AZ_NTB_MAX_TIME_BW_MEAS, /* 0xBC */
  17011. /*
  17012. * Max session expiry for 11AZ TB ranging.
  17013. * Session expiry value is computed as 2^(Max Session Exp + 8) ms.
  17014. */
  17015. WMI_VDEV_PARAM_RTT_11AZ_TB_MAX_SESSION_EXPIRY, /* 0xBD */
  17016. /*
  17017. * WiFi Standard version to be supported.
  17018. * Value is from enum WMI_WIFI_STANDARD
  17019. */
  17020. WMI_VDEV_PARAM_WIFI_STANDARD_VERSION, /* 0xBE */
  17021. /*
  17022. * Allow to disable TWT on 2G channel
  17023. * if corresponding INI is set
  17024. */
  17025. WMI_VDEV_PARAM_DISABLE_2G_TWT, /* 0xBF */
  17026. /*
  17027. * Disable FW initiated Information frame for TWT
  17028. */
  17029. WMI_VDEV_PARAM_DISABLE_TWT_INFO_FRAME, /* 0xC0 */
  17030. /*
  17031. * Set the Recommended Max allowed active links
  17032. */
  17033. WMI_VDEV_PARAM_MLO_MAX_RECOM_ACTIVE_LINKS, /* 0xC1 */
  17034. /* DCS stats enable configuration at VDEV level */
  17035. WMI_VDEV_PARAM_DCS, /* 0xC2 */
  17036. /* VDEV parameter to configure Telescopic DTIM count */
  17037. WMI_VDEV_PARAM_TELESDTIM_CNT, /* 0xC3 */
  17038. /* Configure minimum DTIM level used by Telescopic DTIM */
  17039. WMI_VDEV_PARAM_MIN_TELES_DTIM_LVL, /* 0xC4 */
  17040. /* Set HW CTS2SELF before DL OFDMA Sequence */
  17041. WMI_VDEV_PARAM_HWCTS2SELF_OFDMA, /* 0xC5 */
  17042. /* Update TWT_UNAVAIL_MODE */
  17043. WMI_VDEV_PARAM_TWT_UNAVAIL_MODE, /* 0xC6 */
  17044. /*=== ADD NEW VDEV PARAM TYPES ABOVE THIS LINE ===
  17045. * The below vdev param types are used for prototyping, and are
  17046. * prone to change.
  17047. */
  17048. WMI_VDEV_PARAM_PROTOTYPE = 0x8000,
  17049. /* 11AX SPECIFIC defines */
  17050. /* USE this for BSS color change */
  17051. WMI_VDEV_PARAM_BSS_COLOR, /* 0x8001 */
  17052. /*
  17053. * Enable / disable trigger access for a AP vdev's peers.
  17054. * For a STA mode vdev this will enable/disable triggered access
  17055. * and enable/disable Multi User mode of operation.
  17056. * A value of 0 in a given bit disables corresponding mode.
  17057. * bit | hemu mode
  17058. * ---------------
  17059. * 0 | HE SUBFEE
  17060. * 1 | HE SUBFER
  17061. * 2 | HE MUBFEE
  17062. * 3 | HE MUBFER
  17063. * 4 | DL OFDMA, for AP its DL Tx OFDMA for Sta its Rx OFDMA
  17064. * 5 | UL OFDMA, for AP its Tx OFDMA trigger for Sta its Rx OFDMA
  17065. * | trigger receive & UL response
  17066. * 6 | UL MUMIMO
  17067. * 7 | TXBF+OFDMA
  17068. */
  17069. WMI_VDEV_PARAM_SET_HEMU_MODE, /* 0x8002 */
  17070. WMI_VDEV_PARAM_HEOPS_0_31, /* 0x8003 */
  17071. WMI_VDEV_PARAM_OBSSPD, /* 0x8004 */
  17072. /*
  17073. * Enable / disable trigger access for a AP vdev's peers.
  17074. * For a STA mode vdev this will enable/disable triggered access
  17075. * and enable/disable Multi User mode of operation.
  17076. * A value of 0 in a given bit disables corresponding mode.
  17077. * bit | EHT mu mode
  17078. * ---------------
  17079. * 0 | EHT SUBFEE
  17080. * 1 | EHT SUBFER
  17081. * 2 | EHT MUBFEE
  17082. * 3 | EHT MUBFER
  17083. * 4 | EHT DL OFDMA, for AP its DL Tx OFDMA for Sta its Rx OFDMA
  17084. * 5 | EHT UL OFDMA, for AP its Tx OFDMA trigger for Sta its Rx OFDMA
  17085. * | trigger receive & UL response
  17086. * 6 | EHT MUMIMO
  17087. * 7 | EHT DL OFDMA + TXBF
  17088. * 8 | EHT DL OFDMA + MU-MIMO
  17089. * 9 | EHT UL OFDMA + MU-MIMO
  17090. */
  17091. WMI_VDEV_PARAM_SET_EHT_MU_MODE, /* 0x8005 */
  17092. /**
  17093. * Specify the EHT LTF setting that should be used for fixed rate
  17094. * transmissions.
  17095. *
  17096. * Expects values of WMI_EHT_LTF_DEFAULT, WMI_EHT_LTF_1X,
  17097. * WMI_EHT_LTF_2X, or WMI_EHT_LTF_4X.
  17098. */
  17099. WMI_VDEV_PARAM_EHT_LTF, /* 0x8006 */
  17100. /**
  17101. * Expects values of WMI_EHT_LTF_DEFAULT, WMI_EHT_LTF_1X,
  17102. * WMI_EHT_LTF_2X, or WMI_EHT_LTF_4X.
  17103. */
  17104. WMI_VDEV_PARAM_UL_EHT_LTF, /* 0x8007 */
  17105. /**
  17106. * Enable or disable Dual Carrier Modulation
  17107. * valid values: 0-Disable EHT DCM, 1-Enable EHT DCM.
  17108. */
  17109. WMI_VDEV_PARAM_EHT_DCM, /* 0x8008 */
  17110. /**
  17111. * Enable or disable Extended range
  17112. * valid values: 0-Disable ER, 1-Enable ER.
  17113. */
  17114. WMI_VDEV_PARAM_EHT_RANGE_EXT, /* 0x8009 */
  17115. /**
  17116. * Enable or disable Non-data EHT Extended range
  17117. * valid values: 0-Disable ER, 1-Enable ER.
  17118. */
  17119. WMI_VDEV_PARAM_NON_DATA_EHT_RANGE_EXT, /* 0x800A */
  17120. /*
  17121. * 0 - fixed pattern disable,
  17122. * 1 - Fixed pattern enable and value pointed by
  17123. * WMI_VDEV_PARAM_FIXED_PUNCTURE_PATTERN
  17124. * punctured mode for 11be systems
  17125. */
  17126. WMI_VDEV_PARAM_FIXED_PUNCTURE_PATTERN, /* 0x800B */
  17127. WMI_VDEV_PARAM_EHTOPS_0_31, /* 0x800C */
  17128. /*
  17129. * 0 - eht 11be puncturing disable,
  17130. * 1 - eht 11be puncturing enable
  17131. */
  17132. WMI_VDEV_PARAM_SET_EHT_PUNCTURING_MODE, /* 0x800D */
  17133. /*
  17134. * 0 - Disable MCAST Beamforming
  17135. * 1 - Enable MCAST Beamforming
  17136. */
  17137. WMI_VDEV_PARAM_MCAST_STEERING, /* 0x800E */
  17138. /*
  17139. * bit 0: 0 - XR SAP profile disabled
  17140. * 1 - XR SAP profile enabled
  17141. * bit 1: 0 - XPAN profile disabled
  17142. * 1 - XPAN profile enabled
  17143. * bits 31:2 - reserved
  17144. */
  17145. WMI_VDEV_PARAM_SET_PROFILE, /* 0x800F */
  17146. /*
  17147. * for valid vdev id
  17148. * for vdev offload stats
  17149. */
  17150. WMI_VDEV_PARAM_VDEV_STATS_ID_UPDATE, /* 0x8010 */
  17151. /*
  17152. * Enable or disable Extra LTF capability in Auto rate and
  17153. * Fixed rate EHT data packet transmissions.
  17154. * Even when this vdev param is enabled, Extra LTF may not be
  17155. * enabled for all rates in auto rate mode based on other conditions.
  17156. * valid values: 0 - Disable Extra LTF, 1- Enable Extra LTF.
  17157. */
  17158. WMI_VDEV_PARAM_EXTRA_EHT_LTF, /* 0x8011 */
  17159. /*
  17160. * Disable the indicated DL and UL scheduler for the VDEV.
  17161. *
  17162. * This command is not supported in STA mode.
  17163. *
  17164. * A value of 1 in a given bit position disables the corresponding
  17165. * mode, and a value of 0 enables the mode. The WMI_SCHED_MODE_FLAGS
  17166. * enum defines the bit positions for each mode.
  17167. *
  17168. * A single 32 bit value is used to store the following configuration
  17169. * bitmap.
  17170. *
  17171. * This command differs from WMI_VDEV_PARAM_SET_HEMU_MODE and
  17172. * WMI_VDEV_PARAM_SET_EHT_MU_MODE in that it is intended for use during
  17173. * normal AP operation, and will never cause a VAP restart or other
  17174. * capability bit modification. It simply controls the scheduler
  17175. * behavior.
  17176. *
  17177. * bit | sched mode
  17178. * ---------------
  17179. * 0 | DL MU-MIMO
  17180. * 1 | UL MU-MIMO
  17181. * 2 | DL OFDMA
  17182. * 3 | UL OFDMA
  17183. * 4..31 | RESERVED
  17184. */
  17185. WMI_VDEV_PARAM_SET_DISABLED_SCHED_MODES, /* 0x8012 */
  17186. /*
  17187. * SAP Power save with TWT vdev param command
  17188. * 0 - Disable SAP Power save TWT
  17189. * 1 - Enable SAP Power save TWT
  17190. */
  17191. WMI_VDEV_PARAM_SET_SAP_PS_WITH_TWT, /* 0x8013 */
  17192. /*=== END VDEV_PARAM_PROTOTYPE SECTION ===*/
  17193. } WMI_VDEV_PARAM;
  17194. /* EHT Modes */
  17195. #define WMI_VDEV_EHT_SUBFEE_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 0, 1)
  17196. #define WMI_VDEV_EHT_SUBFEE_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 0, 1, 1)
  17197. #define WMI_VDEV_EHT_SUBFEE_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 0, 1, 0)
  17198. #define WMI_VDEV_EHT_SUBFER_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 1, 1)
  17199. #define WMI_VDEV_EHT_SUBFER_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 1, 1, 1)
  17200. #define WMI_VDEV_EHT_SUBFER_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 1, 1, 0)
  17201. #define WMI_VDEV_EHT_MUBFEE_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 2, 1)
  17202. #define WMI_VDEV_EHT_MUBFEE_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 2, 1, 1)
  17203. #define WMI_VDEV_EHT_MUBFEE_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 2, 1, 0)
  17204. #define WMI_VDEV_EHT_MUBFER_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 3, 1)
  17205. #define WMI_VDEV_EHT_MUBFER_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 3, 1, 1)
  17206. #define WMI_VDEV_EHT_MUBFER_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 3, 1, 0)
  17207. #define WMI_VDEV_EHT_DLOFDMA_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 4, 1)
  17208. #define WMI_VDEV_EHT_DLOFDMA_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 4, 1, 1)
  17209. #define WMI_VDEV_EHT_DLOFDMA_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 4, 1, 0)
  17210. #define WMI_VDEV_EHT_ULOFDMA_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 5, 1)
  17211. #define WMI_VDEV_EHT_ULOFDMA_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 5, 1, 1)
  17212. #define WMI_VDEV_EHT_ULOFDMA_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 5, 1, 0)
  17213. #define WMI_VDEV_EHT_ULMUMIMO_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 6, 1)
  17214. #define WMI_VDEV_EHT_ULMUMIMO_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 6, 1, 1)
  17215. #define WMI_VDEV_EHT_ULMUMIMO_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 6, 1, 0)
  17216. #define WMI_VDEV_EHT_TXBF_OFDMA_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 7, 1)
  17217. #define WMI_VDEV_EHT_TXBF_OFDMA_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 7, 1, 1)
  17218. #define WMI_VDEV_EHT_TXBF_OFDMA_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 7, 1, 0)
  17219. #define WMI_VDEV_EHT_DLOFDMA_W_MUMIMO_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 8, 1)
  17220. #define WMI_VDEV_EHT_DLOFDMA_W_MUMIMO_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 8, 1, 1)
  17221. #define WMI_VDEV_EHT_DLOFDMA_W_MUMIMO_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 8, 1, 0)
  17222. #define WMI_VDEV_EHT_ULOFDMA_W_MUMIMO_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 9, 1)
  17223. #define WMI_VDEV_EHT_ULOFDMA_W_MUMIMO_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 9, 1, 1)
  17224. #define WMI_VDEV_EHT_ULOFDMA_W_MUMIMO_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 9, 1, 0)
  17225. /* HE Modes */
  17226. #define WMI_VDEV_HE_SUBFEE_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 0, 1)
  17227. #define WMI_VDEV_HE_SUBFEE_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 0, 1, 1)
  17228. #define WMI_VDEV_HE_SUBFEE_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 0, 1, 0)
  17229. #define WMI_VDEV_HE_SUBFER_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 1, 1)
  17230. #define WMI_VDEV_HE_SUBFER_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 1, 1, 1)
  17231. #define WMI_VDEV_HE_SUBFER_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 1, 1, 0)
  17232. #define WMI_VDEV_HE_MUBFEE_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 2, 1)
  17233. #define WMI_VDEV_HE_MUBFEE_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 2, 1, 1)
  17234. #define WMI_VDEV_HE_MUBFEE_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 2, 1, 0)
  17235. #define WMI_VDEV_HE_MUBFER_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 3, 1)
  17236. #define WMI_VDEV_HE_MUBFER_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 3, 1, 1)
  17237. #define WMI_VDEV_HE_MUBFER_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 3, 1, 0)
  17238. #define WMI_VDEV_HE_DLOFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 4, 1)
  17239. #define WMI_VDEV_HE_DLOFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 4, 1, 1)
  17240. #define WMI_VDEV_HE_DLOFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 4, 1, 0)
  17241. #define WMI_VDEV_HE_ULOFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 5, 1)
  17242. #define WMI_VDEV_HE_ULOFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 5, 1, 1)
  17243. #define WMI_VDEV_HE_ULOFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 5, 1, 0)
  17244. #define WMI_VDEV_HE_ULMUMIMO_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 6, 1)
  17245. #define WMI_VDEV_HE_ULMUMIMO_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 6, 1, 1)
  17246. #define WMI_VDEV_HE_ULMUMIMO_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 6, 1, 0)
  17247. #define WMI_VDEV_HE_TXBF_OFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 7, 1)
  17248. #define WMI_VDEV_HE_TXBF_OFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 7, 1, 1)
  17249. #define WMI_VDEV_HE_TXBF_OFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 7, 1, 0)
  17250. #define WMI_VDEV_HE_AX_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 0, 1)
  17251. #define WMI_VDEV_HE_MU_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 2, 1)
  17252. #define WMI_VDEV_HE_AX_TRIG_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 3, 1)
  17253. /* Indicates RTT Responder mode support for 11MC, 11AZ NTB, 11AZ TB ranging */
  17254. #define WMI_VDEV_11MC_RESP_ENABLED(param) WMI_GET_BITS(param, 0, 1)
  17255. #define WMI_VDEV_11AZ_NTB_RESP_ENABLED(param) WMI_GET_BITS(param, 1, 1)
  17256. #define WMI_VDEV_11AZ_TB_RESP_ENABLED(param) WMI_GET_BITS(param, 2, 1)
  17257. /* vdev capabilities bit mask */
  17258. #define WMI_VDEV_BEACON_SUPPORT 0x1
  17259. #define WMI_VDEV_WDS_LRN_ENABLED 0x2
  17260. #define WMI_VDEV_VOW_ENABLED 0x4
  17261. #define WMI_VDEV_IS_BEACON_SUPPORTED(param) ((param) & WMI_VDEV_BEACON_SUPPORT)
  17262. #define WMI_VDEV_IS_WDS_LRN_ENABLED(param) ((param) & WMI_VDEV_WDS_LRN_ENABLED)
  17263. #define WMI_VDEV_IS_VOW_ENABLED(param) ((param) & WMI_VDEV_VOW_ENABLED)
  17264. /* Per VAP rate dropdown masks */
  17265. #define WMI_VDEV_MGMT_RATE_DROPDOWN_M 0x01
  17266. #define WMI_VDEV_MGMT_RATE_DROPDOWN_S 0
  17267. #define WMI_VDEV_MGMT_RATE_DROPDOWN (WMI_VDEV_MGMT_RATE_DROPDOWN_M << WMI_VDEV_MGMT_RATE_DROPDOWN_S)
  17268. #define WMI_VDEV_MGMT_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_MGMT_RATE_DROPDOWN)
  17269. #define WMI_VDEV_MGMT_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_MGMT_RATE_DROPDOWN)
  17270. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_M 0x01
  17271. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_S 1
  17272. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN (WMI_VDEV_SU_DATA_RATE_DROPDOWN_M << WMI_VDEV_SU_DATA_RATE_DROPDOWN_S)
  17273. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_SU_DATA_RATE_DROPDOWN)
  17274. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_SU_DATA_RATE_DROPDOWN)
  17275. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_M 0x01
  17276. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_S 2
  17277. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN (WMI_VDEV_MU_DATA_RATE_DROPDOWN_M << WMI_VDEV_MU_DATA_RATE_DROPDOWN_S)
  17278. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_MU_DATA_RATE_DROPDOWN)
  17279. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_MU_DATA_RATE_DROPDOWN)
  17280. /* TXBF capabilities masks */
  17281. #define WMI_TXBF_CONF_SU_TX_BFEE_S 0
  17282. #define WMI_TXBF_CONF_SU_TX_BFEE_M 0x1
  17283. #define WMI_TXBF_CONF_SU_TX_BFEE (WMI_TXBF_CONF_SU_TX_BFEE_M << WMI_TXBF_CONF_SU_TX_BFEE_S)
  17284. #define WMI_TXBF_CONF_SU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFEE)
  17285. #define WMI_TXBF_CONF_SU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFEE)
  17286. #define WMI_TXBF_CONF_MU_TX_BFEE_S 1
  17287. #define WMI_TXBF_CONF_MU_TX_BFEE_M 0x1
  17288. #define WMI_TXBF_CONF_MU_TX_BFEE (WMI_TXBF_CONF_MU_TX_BFEE_M << WMI_TXBF_CONF_MU_TX_BFEE_S)
  17289. #define WMI_TXBF_CONF_MU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFEE)
  17290. #define WMI_TXBF_CONF_MU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFEE)
  17291. #define WMI_TXBF_CONF_SU_TX_BFER_S 2
  17292. #define WMI_TXBF_CONF_SU_TX_BFER_M 0x1
  17293. #define WMI_TXBF_CONF_SU_TX_BFER (WMI_TXBF_CONF_SU_TX_BFER_M << WMI_TXBF_CONF_SU_TX_BFER_S)
  17294. #define WMI_TXBF_CONF_SU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFER)
  17295. #define WMI_TXBF_CONF_SU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFER)
  17296. #define WMI_TXBF_CONF_MU_TX_BFER_S 3
  17297. #define WMI_TXBF_CONF_MU_TX_BFER_M 0x1
  17298. #define WMI_TXBF_CONF_MU_TX_BFER (WMI_TXBF_CONF_MU_TX_BFER_M << WMI_TXBF_CONF_MU_TX_BFER_S)
  17299. #define WMI_TXBF_CONF_MU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFER)
  17300. #define WMI_TXBF_CONF_MU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFER)
  17301. #define WMI_TXBF_CONF_STS_CAP_S 4
  17302. #define WMI_TXBF_CONF_STS_CAP_M 0x7
  17303. #define WMI_TXBF_CONF_STS_CAP (WMI_TXBF_CONF_STS_CAP_M << WMI_TXBF_CONF_STS_CAP_S)
  17304. #define WMI_TXBF_CONF_STS_CAP_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_STS_CAP);
  17305. #define WMI_TXBF_CONF_STS_CAP_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_STS_CAP)
  17306. #define WMI_TXBF_CONF_IMPLICIT_BF_S 7
  17307. #define WMI_TXBF_CONF_IMPLICIT_BF_M 0x1
  17308. #define WMI_TXBF_CONF_IMPLICIT_BF (WMI_TXBF_CONF_IMPLICIT_BF_M << WMI_TXBF_CONF_IMPLICIT_BF_S)
  17309. #define WMI_TXBF_CONF_IMPLICIT_BF_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_IMPLICIT_BF)
  17310. #define WMI_TXBF_CONF_IMPLICIT_BF_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_IMPLICIT_BF)
  17311. #define WMI_TXBF_CONF_BF_SND_DIM_S 8
  17312. #define WMI_TXBF_CONF_BF_SND_DIM_M 0x7
  17313. #define WMI_TXBF_CONF_BF_SND_DIM (WMI_TXBF_CONF_BF_SND_DIM_M << WMI_TXBF_CONF_BF_SND_DIM_S)
  17314. #define WMI_TXBF_CONF_BF_SND_DIM_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_BF_SND_DIM)
  17315. #define WMI_TXBF_CONF_BF_SND_DIM_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_BF_SND_DIM)
  17316. /* commands for 11ax TXBF capabilities */
  17317. #define WMI_TXBF_CONF_11AX_SU_TX_BFER_GET(x) WMI_GET_BITS((x,0,1)
  17318. #define WMI_TXBF_CONF_11AX_SU_TX_BFER_SET(x,z) WMI_SET_BITS(x,0,1,z)
  17319. #define WMI_TXBF_CONF_11AX_SU_TX_BFEE_GET(x) WMI_GET_BITS((x,1,1)
  17320. #define WMI_TXBF_CONF_11AX_SU_TX_BFEE_SET(x,z) WMI_SET_BITS(x,1,1,z)
  17321. #define WMI_TXBF_CONF_11AX_MU_TX_BFER_GET(x) WMI_GET_BITS((x,2,1)
  17322. #define WMI_TXBF_CONF_11AX_MU_TX_BFER_SET(x,z) WMI_SET_BITS(x,2,1,z)
  17323. #define WMI_TXBF_CONF_11AX_BFEE_NDP_STS_LT_EQ_80_GET(x) WMI_GET_BITS((x,3,3)
  17324. #define WMI_TXBF_CONF_11AX_BFEE_NDP_STS_LT_EQ_80_SET(x,z) WMI_SET_BITS(x,3,3,z)
  17325. #define WMI_TXBF_CONF_11AX_NSTS_LT_EQ_80_GET(x) WMI_GET_BITS((x,6,3)
  17326. #define WMI_TXBF_CONF_11AX_NSTS_LT_EQ_80_SET(x,z) WMI_SET_BITS(x,6,3,z)
  17327. #define WMI_TXBF_CONF_11AX_TX_BFEE_NDP_STS_GT_80_GET(x) WMI_GET_BITS((x,9,3)
  17328. #define WMI_TXBF_CONF_11AX_TX_BFEE_NDP_STS_GT_80_SET(x,z) WMI_SET_BITS(x,9,3,z)
  17329. #define WMI_TXBF_CONF_11AX_NSTS_GT_80_GET(x) WMI_GET_BITS((x,12,3)
  17330. #define WMI_TXBF_CONF_11AX_NSTS_GT_80_SET(x,z) WMI_SET_BITS(x,12,3,z)
  17331. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_LT_EQ_80_SND_DIM_GET(x) WMI_GET_BITS((x,15,3)
  17332. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_LT_EQ_80_SND_DIM_SET(x,z) WMI_SET_BITS(x,15,3,z)
  17333. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_GT_80_SND_DIM_GET(x) WMI_GET_BITS((x,18,3)
  17334. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_GT_80_SND_DIM_SET(x,z) WMI_SET_BITS(x,18,3,z)
  17335. #define WMI_TXBF_CONF_AX_SU_BFEE_NG16_FDBK_GET(x) WMI_GET_BITS((x,21,1)
  17336. #define WMI_TXBF_CONF_AX_SU_BFEE_NG16_FDBK_SET(x,z) WMI_SET_BITS(x,21,1,z)
  17337. #define WMI_TXBF_CONF_AX_MU_BFEE_NG16_FDBK_GET(x) WMI_GET_BITS((x,22,1)
  17338. #define WMI_TXBF_CONF_AX_MU_BFEE_NG16_FDBK_SET(x,z) WMI_SET_BITS(x,22,1,z)
  17339. #define WMI_TXBF_CONF_AX_SU_BFEE_CDBK_4_2_GET(x) WMI_GET_BITS((x,23,1)
  17340. #define WMI_TXBF_CONF_AX_SU_BFEE_CDBK_4_2_SET(x,z) WMI_SET_BITS(x,23,1,z)
  17341. #define WMI_TXBF_CONF_AX_MU_BFEE_CDBK_7_5_GET(x) WMI_GET_BITS((x,24,1)
  17342. #define WMI_TXBF_CONF_AX_MU_BFEE_CDBK_7_5_SET(x,z) WMI_SET_BITS(x,24,1,z)
  17343. #define WMI_TXBF_CONF_AX_FDBK_TRIG_GET(x) WMI_GET_BITS((x,25,1)
  17344. #define WMI_TXBF_CONF_AX_FDBK_TRIG_SET(x,z) WMI_SET_BITS(x,25,1,z)
  17345. /* TXBF capabilities */
  17346. typedef struct {
  17347. A_UINT32 txbf_cap;
  17348. } wmi_vdev_txbf_cap;
  17349. /* vdev rx filters (for mesh) */
  17350. typedef enum {
  17351. WMI_VDEV_RX_ALLOW_ALL_FRAMES = 0x0, /* Don't drop any frames - Default */
  17352. WMI_VDEV_RX_FILTER_OUT_FROMDS = 0x1, /* Drop FromDS frames */
  17353. WMI_VDEV_RX_FILTER_OUT_TODS = 0x2, /* Drop ToDS frames */
  17354. WMI_VDEV_RX_FILTER_OUT_NODS = 0x4, /* Drop NODS frames */
  17355. WMI_VDEV_RX_FILTER_OUT_RA = 0x8, /* Drop RA frames */
  17356. WMI_VDEV_RX_FILTER_OUT_TA = 0x10, /* Drop TA frames */
  17357. } wmi_vdev_param_filter;
  17358. /* Length of ATIM Window in TU */
  17359. #define WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH WMI_VDEV_PARAM_ATIM_WINDOW
  17360. enum wmi_pkt_type {
  17361. WMI_PKT_TYPE_RAW = 0,
  17362. WMI_PKT_TYPE_NATIVE_WIFI = 1,
  17363. WMI_PKT_TYPE_ETHERNET = 2,
  17364. };
  17365. /*******************************************************************
  17366. * wmi_vdev_txbf_en is DEPRECATED in favor of wmi_vdev_txbf_cap
  17367. * Do not use it!
  17368. *******************************************************************/
  17369. typedef struct {
  17370. A_UINT8 sutxbfee : 1,
  17371. mutxbfee : 1,
  17372. sutxbfer : 1,
  17373. mutxbfer : 1,
  17374. txb_sts_cap : 3,
  17375. implicit_bf : 1;
  17376. } wmi_vdev_txbf_en;
  17377. /** Upto 8 bits are available for Roaming module to be sent along with
  17378. WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/
  17379. /* Bit 0: Enable Roaming FW offload LFR1.5/LFR2.0 implementation */
  17380. #define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG 0x1
  17381. /* Bit 1: Enable Roaming module in FW to do scan based on Final BMISS */
  17382. #define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG 0x2
  17383. /* Bit 2:
  17384. * To enable/disable EAPOL_4WAY_HANDSHAKE process while roaming.
  17385. * param value = 0 --> Enable EAPOL 4way handshake
  17386. * param value = 1 --> Skip EAPOL 4way handshake
  17387. */
  17388. #define WMI_VDEV_PARAM_SKIP_ROAM_EAPOL_4WAY_HANDSHAKE 0x4
  17389. /* Bit 3:
  17390. * Scan type when WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG is set:
  17391. * value = 0 --> Chanmap scan followed by one full scan if no candidate found.
  17392. * value = 1 --> Chanmap scan only
  17393. */
  17394. #define WMI_ROAM_BMISS_FINAL_SCAN_TYPE_FLAG 0x8
  17395. /* Bit 4:
  17396. * To enable/disable feature: EAPOL offload to FW while SAE roaming.
  17397. * param value = 0 --> Enable EAPOL offload to FW for SAE roaming
  17398. * param value = 1 --> Disable EAPOL offload to FW for SAE roaming
  17399. */
  17400. #define WMI_VDEV_PARAM_SKIP_SAE_ROAM_4WAY_HANDSHAKE 0x10
  17401. /** slot time long */
  17402. #define WMI_VDEV_SLOT_TIME_LONG 0x1
  17403. /** slot time short */
  17404. #define WMI_VDEV_SLOT_TIME_SHORT 0x2
  17405. /** preablbe long */
  17406. #define WMI_VDEV_PREAMBLE_LONG 0x1
  17407. /** preablbe short */
  17408. #define WMI_VDEV_PREAMBLE_SHORT 0x2
  17409. /** the definition of different START/RESTART Event response */
  17410. typedef enum {
  17411. /* Event response of START CMD */
  17412. WMI_VDEV_START_RESP_EVENT = 0,
  17413. /* Event response of RESTART CMD */
  17414. WMI_VDEV_RESTART_RESP_EVENT,
  17415. } WMI_START_EVENT_PARAM;
  17416. typedef struct {
  17417. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_response_event_fixed_param */
  17418. /** unique id identifying the VDEV, generated by the caller */
  17419. A_UINT32 vdev_id;
  17420. /** requestor id that requested the VDEV start request */
  17421. A_UINT32 requestor_id;
  17422. /* Respose of Event type START/RESTART */
  17423. WMI_START_EVENT_PARAM resp_type;
  17424. /** status of the response */
  17425. A_UINT32 status;
  17426. /** Vdev chain mask */
  17427. A_UINT32 chain_mask;
  17428. /** Vdev mimo power save mode */
  17429. A_UINT32 smps_mode;
  17430. union {
  17431. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  17432. /** pdev_id for identifying the MAC
  17433. * See macros starting with WMI_PDEV_ID_ for values.
  17434. */
  17435. A_UINT32 pdev_id;
  17436. };
  17437. /** Configured Transmit Streams **/
  17438. A_UINT32 cfgd_tx_streams;
  17439. /** Configured Receive Streams **/
  17440. A_UINT32 cfgd_rx_streams;
  17441. /**
  17442. * maximum allowed Tx power (in dBm) for this connection.
  17443. * max_allowed_tx_power = 0 dBm means value is not specified.
  17444. */
  17445. A_INT32 max_allowed_tx_power;
  17446. /** unique id to identify mac's TSF register */
  17447. A_UINT32 mac_tsf_id;
  17448. /** ignore mac_tsf_id unless mac_tsf_id_valid is set */
  17449. A_UINT32 mac_tsf_id_valid;
  17450. /** min_device_tx_pwr_valid = 0 means value is not specified. */
  17451. A_UINT32 min_device_tx_pwr_valid;
  17452. /** minimum allowed device Tx power (in dBm) for this connection. */
  17453. A_INT32 min_device_tx_pwr;
  17454. } wmi_vdev_start_response_event_fixed_param;
  17455. typedef struct {
  17456. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stopped_event_fixed_param */
  17457. /** unique id identifying the VDEV, generated by the caller */
  17458. A_UINT32 vdev_id;
  17459. } wmi_vdev_stopped_event_fixed_param;
  17460. typedef struct {
  17461. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_resp_event_fixed_param */
  17462. /** unique id identifying the VDEV, generated by the caller */
  17463. A_UINT32 vdev_id;
  17464. } wmi_vdev_delete_resp_event_fixed_param;
  17465. /** common structure used for simple events (stopped, resume_req, standby response) */
  17466. typedef struct {
  17467. A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to actual event */
  17468. /** unique id identifying the VDEV, generated by the caller */
  17469. A_UINT32 vdev_id;
  17470. } wmi_vdev_simple_event_fixed_param;
  17471. /* Commands for getting and setting protected bit : bss max idle time */
  17472. #define WMI_BSS_MAX_IDLE_TIME_PROTECTED_GET(idle_options) \
  17473. WMI_GET_BITS(idle_options, 0, 1)
  17474. #define WMI_BSS_MAX_IDLE_TIME_PROTECTED_SET(idle_options, val) \
  17475. WMI_SET_BITS(idle_options, 0, 1, val)
  17476. typedef struct {
  17477. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_VDEV_BSS_MAX_IDLE_TIME_fixed_param */
  17478. A_UINT32 vdev_id; /** unique id identifying the VDEV, generated by the caller */
  17479. A_UINT32 max_idle_period; /* time interval in seconds */
  17480. /* idle_options:
  17481. * bit 0 - Protected bit
  17482. * Refer to WMI_BSS_MAX_IDLE_TIME_PROTECTED_GET,SET macros.
  17483. * bit 31:1 - Reserved bits
  17484. */
  17485. A_UINT32 idle_options;
  17486. } wmi_vdev_bss_max_idle_time_cmd_fixed_param;
  17487. /** VDEV start response status codes */
  17488. #define WMI_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0 /** VDEV successfully started */
  17489. #define WMI_VDEV_START_RESPONSE_INVALID_VDEVID 0x1 /** requested VDEV not found */
  17490. #define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2 /** unsupported VDEV combination */
  17491. #define WMI_VDEV_START_RESPONSE_DFS_VIOLATION 0x3 /** DFS_VIOLATION since channel in the NOL is selected */
  17492. #define WMI_VDEV_START_RESPONSE_INVALID_REGDOMAIN 0x4 /** Invalid regulatory domain in VDEV start */
  17493. #define WMI_VDEV_START_RESPONSE_INVALID_BAND 0x5 /** Band unsupported by current hw mode in VDEV start */
  17494. #define WMI_VDEV_START_RESPONSE_INVALID_PREFERRED_TX_RX_STREAMS 0x6 /** Invalid preferred tx/rx streams */
  17495. #define WMI_VDEV_START_RESPONSE_INVALID_TX_VAP_CONFIG 0x7 /** Invalid tx_vap config in VDEV start */
  17496. /** Beacon processing related command and event structures */
  17497. typedef struct {
  17498. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tx_hdr */
  17499. /** unique id identifying the VDEV, generated by the caller */
  17500. A_UINT32 vdev_id;
  17501. /** xmit rate */
  17502. A_UINT32 tx_rate;
  17503. /** xmit power */
  17504. A_UINT32 txPower;
  17505. /** beacon buffer length in bytes */
  17506. A_UINT32 buf_len;
  17507. /* This TLV is followed by array of bytes:
  17508. * A_UINT8 bufp[]; <-- beacon frame buffer
  17509. */
  17510. } wmi_bcn_tx_hdr;
  17511. /* Beacon filter */
  17512. #define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
  17513. #define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
  17514. #define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
  17515. #define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
  17516. #define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
  17517. typedef struct {
  17518. /** Filter ID */
  17519. A_UINT32 bcn_filter_id;
  17520. /** Filter type - wmi_bcn_filter */
  17521. A_UINT32 bcn_filter;
  17522. /** Buffer len */
  17523. A_UINT32 bcn_filter_len;
  17524. /** Filter info (threshold, BSSID, RSSI) */
  17525. A_UINT8 *bcn_filter_buf;
  17526. } wmi_bcn_filter_rx_cmd;
  17527. /** Capabilities and IEs to be passed to firmware */
  17528. typedef struct {
  17529. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_prb_info */
  17530. /** Capabilities */
  17531. A_UINT32 caps;
  17532. /** ERP info */
  17533. A_UINT32 erp;
  17534. /** Advanced capabilities */
  17535. /** HT capabilities */
  17536. /** HT Info */
  17537. /** ibss_dfs */
  17538. /** wpa Info */
  17539. /** rsn Info */
  17540. /** rrm info */
  17541. /** ath_ext */
  17542. /** app IE */
  17543. } wmi_bcn_prb_info;
  17544. enum wmi_frame_inject_type {
  17545. /* Transmit QoS null frame each period */
  17546. WMI_FRAME_INJECT_TYPE_QOS_NULL,
  17547. /* Transmit CTS to self each period */
  17548. WMI_FRAME_INJECT_TYPE_CTS_TO_SELF,
  17549. /* Transmit HOST provided buffer instead of forming frame in FW */
  17550. WMI_FRAME_INJECT_TYPE_HOST_BUFFER,
  17551. /* Max valid frame inject type for sanity checks*/
  17552. WMI_FRAME_INJECT_TYPE_MAX,
  17553. };
  17554. typedef struct {
  17555. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_frame_inject_cmd_fixed_param */
  17556. A_UINT32 tlv_header;
  17557. /** unique id identifying the VDEV, generated by the caller.
  17558. * At any time only one vdev per mac can have this feature enabled.
  17559. * Two consecutive enable commands on same mac will result in previous
  17560. * command being disabled and new one being enabled.
  17561. */
  17562. A_UINT32 vdev_id;
  17563. /** enable or disable injection */
  17564. A_UINT32 enable;
  17565. /** frame type to be used for frame injection. possible values are
  17566. * defined in enum wmi_frame_inject_type.
  17567. */
  17568. A_UINT32 frame_type;
  17569. /** periodicity of frame injection in milliseconds */
  17570. A_UINT32 frame_inject_period;
  17571. /** Destination address of frame */
  17572. wmi_mac_addr frame_addr1;
  17573. /** Frame control duration field to be set in CTS_TO_SELF.
  17574. * Applicable to frame_type WMI_FRAME_INJECT_TYPE_CTS_TO_SELF only.
  17575. */
  17576. A_UINT32 fc_duration;
  17577. /** variable buffer length. Can be used for frame template.
  17578. * data is in TLV data[]
  17579. */
  17580. A_UINT32 buf_len;
  17581. /** bw:
  17582. * Bandwidth to use for the injected frame, of type wmi_channel_width.
  17583. * This bw spec shall be ignored unless the bw_valid flag is set.
  17584. */
  17585. A_UINT32 bw;
  17586. /*
  17587. * The TLVs follows:
  17588. * A_UINT8 data[]; <-- Variable length data
  17589. */
  17590. } wmi_frame_inject_cmd_fixed_param;
  17591. #define WMI_BEACON_TMPLT_PROFILE_PERIOD_BITPOS (0)
  17592. #define WMI_BEACON_TMPLT_PROFILE_PERIOD_MASK (0xff << WMI_BEACON_TMPLT_PROFILE_PERIOD_BITPOS)
  17593. #define WMI_BEACON_TMPLT_SET_PROFILE_PERIOD(_ema_param, _val) \
  17594. WMI_SET_BITS(_ema_param, WMI_BEACON_TMPLT_PROFILE_PERIOD_BITPOS, 8, _val)
  17595. #define WMI_BEACON_TMPLT_GET_PROFILE_PERIOD(_ema_param) \
  17596. WMI_GET_BITS(_ema_param, WMI_BEACON_TMPLT_PROFILE_PERIOD_BITPOS, 8)
  17597. #define WMI_BEACON_TMPLT_TEMPLATE_INDEX_BITPOS (8)
  17598. #define WMI_BEACON_TMPLT_TEMPLATE_INDEX_MASK (0xff << WMI_BEACON_TMPLT_TEMPLATE_INDEX_BITPOS)
  17599. #define WMI_BEACON_TMPLT_SET_TEMPLATE_INDEX(_ema_param, _val) \
  17600. WMI_SET_BITS(_ema_param, WMI_BEACON_TMPLT_TEMPLATE_INDEX_BITPOS, 8, _val)
  17601. #define WMI_BEACON_TMPLT_GET_TEMPLATE_INDEX(_ema_param) \
  17602. WMI_GET_BITS(_ema_param, WMI_BEACON_TMPLT_TEMPLATE_INDEX_BITPOS, 8)
  17603. #define WMI_BEACON_TMPLT_FIRST_TEMPLATE_BITPOS (16)
  17604. #define WMI_BEACON_TMPLT_FIRST_TEMPLATE_MASK (0xff << WMI_BEACON_TMPLT_FIRST_TEMPLATE_BITPOS)
  17605. #define WMI_BEACON_TMPLT_SET_FIRST_TEMPLATE(_ema_param, _val) \
  17606. WMI_SET_BITS(_ema_param, WMI_BEACON_TMPLT_FIRST_TEMPLATE_BITPOS, 8, _val)
  17607. #define WMI_BEACON_TMPLT_GET_FIRST_TEMPLATE(_ema_param) \
  17608. WMI_GET_BITS(_ema_param, WMI_BEACON_TMPLT_FIRST_TEMPLATE_BITPOS, 8)
  17609. #define WMI_BEACON_TMPLT_LAST_TEMPLATE_BITPOS (24)
  17610. #define WMI_BEACON_TMPLT_LAST_TEMPLATE_MASK (0xff << WMI_BEACON_TMPLT_LAST_TEMPLATE_BITPOS)
  17611. #define WMI_BEACON_TMPLT_SET_LAST_TEMPLATE(_ema_param, _val) \
  17612. WMI_SET_BITS(_ema_param, WMI_BEACON_TMPLT_LAST_TEMPLATE_BITPOS, 8, _val)
  17613. #define WMI_BEACON_TMPLT_GET_LAST_TEMPLATE(_ema_param) \
  17614. WMI_GET_BITS(_ema_param, WMI_BEACON_TMPLT_LAST_TEMPLATE_BITPOS, 8)
  17615. typedef struct {
  17616. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_ml_info */
  17617. /** hw_link_id:
  17618. * Unique link id across SOCs, got as part of QMI handshake
  17619. */
  17620. A_UINT32 hw_link_id;
  17621. /**
  17622. * CU vdev map for the Critical update category-1
  17623. * (Inclusion of CU IES)
  17624. */
  17625. A_UINT32 cu_vdev_map_cat1_lo; /* bits 31:0 */
  17626. A_UINT32 cu_vdev_map_cat1_hi; /* bits 63:32 */
  17627. /**
  17628. * CU vdev map for the Critical update category-2
  17629. * (modification of CU IES)
  17630. */
  17631. A_UINT32 cu_vdev_map_cat2_lo; /* bits 31:0 */
  17632. A_UINT32 cu_vdev_map_cat2_hi; /* bits 63:32 */
  17633. } wmi_bcn_tmpl_ml_info;
  17634. typedef struct {
  17635. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_ml_params */
  17636. A_UINT32 vdev_id; /* partner vdev_id */
  17637. A_UINT32 hw_link_id; /* hw_link_id: Unique link id across SOCs, got as part of QMI handshake */
  17638. A_UINT32 beacon_interval; /* beacon interval in TU from received beacon of the partner link */
  17639. /** CSA IE switch count offset from the beginning of data[]
  17640. * Value 0 indicates CSA IE is not present in beacon template.
  17641. */
  17642. A_UINT32 csa_switch_count_offset; /* units = bytes */
  17643. /** Extended CSA IE switch count offset from the beginning of data[]
  17644. * Value 0 indicates ECSA IE is not present in beacon template.
  17645. */
  17646. A_UINT32 ext_csa_switch_count_offset; /* units = bytes */
  17647. /** Per-STA profile Subelement offset from the beginning of the template. */
  17648. A_UINT32 per_sta_profile_offset;
  17649. /** Quiet IE offset from the beginning of the template. */
  17650. A_UINT32 quiet_ie_offset;
  17651. /** Flag to check if other IEs are present in per-sta profile */
  17652. A_UINT32 is_other_ie_present;
  17653. } wmi_bcn_tmpl_ml_params;
  17654. typedef struct {
  17655. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_cmd_fixed_param */
  17656. /** unique id identifying the VDEV, generated by the caller */
  17657. A_UINT32 vdev_id;
  17658. /** TIM IE offset from the beginning of the template. */
  17659. A_UINT32 tim_ie_offset;
  17660. /** beacon buffer length. data is in TLV data[] */
  17661. A_UINT32 buf_len;
  17662. /** CSA IE switch count offset from the beginning of data[]
  17663. * Value 0 indicates CSA IE is not present in beacon template.
  17664. */
  17665. A_UINT32 csa_switch_count_offset; /* units = bytes */
  17666. /** Extended CSA IE switch count offset from the beginning of data[]
  17667. * Value 0 indicates CSA IE is not present in beacon template.
  17668. */
  17669. A_UINT32 ext_csa_switch_count_offset; /* units = bytes */
  17670. /** Specify when to send the CSA switch count status from FW to host.
  17671. * See WMI_CSA_EVENT_BMAP* below for more information.
  17672. * E.g. if CSA switch count event is needed to be sent when the switch count
  17673. * is 0, 1, 4 and 5, set the bitmap to (0X80000033)
  17674. */
  17675. A_UINT32 csa_event_bitmap;
  17676. /** offset (in octets/bytes) of MBSSID IE in beacon frame */
  17677. A_UINT32 mbssid_ie_offset;
  17678. /** offset (in octets/bytes) of ESP IE in beacon frame */
  17679. A_UINT32 esp_ie_offset;
  17680. /** CSC IE color switch count offset from the beginning of data[]
  17681. * Value 0 indicates CSC IE is not present in beacon template.
  17682. */
  17683. A_UINT32 csc_switch_count_offset; /* units = bytes */
  17684. /** Specify when to send the CSC switch count status from FW to host.
  17685. * See WMI_CSC_EVENT_BMAP* below for more information.
  17686. * E.g. if CSA switch count event is needed to be sent when the switch count
  17687. * is 0, 1, 4 and 5, set the bitmap to (0X80000033)
  17688. */
  17689. A_UINT32 csc_event_bitmap;
  17690. /** Specify offset for FW to overwrite MU EDCA parameters in the beacon.
  17691. * This is done during FW tuning of EDCA parameters.
  17692. * Based on number of HE and Legacy stations.
  17693. * If mu_edca_ie_offset == 0, it is ignored.
  17694. * Only non-zero values are considered.
  17695. */
  17696. A_UINT32 mu_edca_ie_offset;
  17697. /** Specify features that need to be enabled/disabled for the beacon.
  17698. *
  17699. * Bit 0:
  17700. * Beacon Protection feature enable/disable indication.
  17701. * Refer to WMI_BEACON_PROTECTION_EN_SET/GET macros.
  17702. *
  17703. * More features can be added to this bitmap.
  17704. */
  17705. A_UINT32 feature_enable_bitmap;
  17706. /**
  17707. * @ema_params: Applicable only for EMA tx VAPs (VAPs having both flags
  17708. * VDEV_FLAGS_EMA_MODE and VDEV_FLAGS_TRANSMIT_AP set) and should
  17709. * remain 0 otherwise. For EMA vaps it carries below information
  17710. * encoded in each byte:
  17711. * Byte 0: (@ema_beacon_profile_periodicity) - beacon profile periodicity
  17712. * (number of beacons) after which nontransmitted MBSS info repeats.
  17713. * Assumes values [1, N] inclusive.
  17714. * Refer to WMI_BEACON_TMPLT_[SET,GET]_PROFILE_PERIOD macros.
  17715. * Byte 1: (@ema_beacon_tmpl_idx) - Specifies the position of beacon
  17716. * templates within profile periodicity.
  17717. * Assumes values [0, ema_beacon_profile_periodicity-1] inclusive.
  17718. * Multiple templates having same @ema_beacon_max_tmpl_idx will
  17719. * overwrite previous template.
  17720. * Refer to WMI_BEACON_TMPLT_[SET,GET]_TEMPLATE_INDEX macros.
  17721. * Byte 2: (@ema_first_tmpl) - Specifies whether it's a last template in
  17722. * sequence of @ema_beacon_profile_periodicity templates
  17723. * (end of new template update exchange).
  17724. * If this template is the only template being updated,
  17725. * @ema_first_tmpl and @ema_last_tmpl both shall be set to 1.
  17726. * Refer to WMI_BEACON_TMPLT_[SET,GET]_FIRST_TEMPLATE macros.
  17727. * Byte 3: (@ema_last_tmpl) - pecifies whether it's a last template in
  17728. * sequence of @ema_beacon_profile_periodicity templates
  17729. * (end of new template update exchange).
  17730. * If this template is the only template being updated,
  17731. * @ema_first_tmpl and @ema_last_tmpl both shall be set to 1.
  17732. * Refer to WMI_BEACON_TMPLT_[SET,GET]_LAST_TEMPLATE macros.
  17733. */
  17734. A_UINT32 ema_params;
  17735. /*
  17736. * The TLVs follows:
  17737. * wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
  17738. * A_UINT8 data[]; <-- Variable length data
  17739. * wmi_bcn_tmpl_ml_params ml_bcn_param[]; <-- per-MLO-link beacon data
  17740. * wmi_bcn_tmpl_ml_params will have multiple instances equal to
  17741. * the number of links in an AP MLD
  17742. */
  17743. } wmi_bcn_tmpl_cmd_fixed_param;
  17744. #define WMI_CSA_EVENT_BMAP_VALID_MASK 0X80000000 /* Follow bitmap for sending the CSA switch count event */
  17745. #define WMI_CSA_EVENT_BMAP_SWITCH_COUNT_ZERO 0 /* Send only when the switch count becomes zero, added for backward compatibility
  17746. Same can also be achieved by setting bitmap to 0X80000001 */
  17747. #define WMI_CSA_EVENT_BMAP_ALL 0XFFFFFFFF /* Send CSA switch count event for every update to switch count */
  17748. #define WMI_CSC_EVENT_BMAP_VALID_MASK 0X80000000 /* Follow bitmap for sending the CSC switch count event */
  17749. #define WMI_CSC_EVENT_BMAP_SWITCH_COUNT_ZERO 0 /* Send only when the switch count becomes zero, added for backward compatibility
  17750. Same can also be achieved by setting bitmap to 0X80000001 */
  17751. #define WMI_CSC_EVENT_BMAP_ALL 0XFFFFFFFF /* Send CSC switch count event for every update to switch count */
  17752. #define WMI_BEACON_PROTECTION_BIT_POS 0 /* Beacon Protection enable/disable indication */
  17753. #define WMI_BEACON_PROTECTION_EN_SET(param, value) \
  17754. WMI_SET_BITS(param, WMI_BEACON_PROTECTION_BIT_POS, 1, value)
  17755. #define WMI_BEACON_PROTECTION_EN_GET(param) \
  17756. WMI_GET_BITS(param, WMI_BEACON_PROTECTION_BIT_POS, 1)
  17757. typedef struct {
  17758. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_resp_tmpl_ml_info */
  17759. /** hw_link_id:
  17760. * Unique link id across SOCs, got as part of QMI handshake
  17761. */
  17762. A_UINT32 hw_link_id;
  17763. /**
  17764. * CU vdev map for the Critical update category-1
  17765. * (Inclusion of CU IES)
  17766. */
  17767. A_UINT32 cu_vdev_map_cat1_lo; /* bits 31:0 */
  17768. A_UINT32 cu_vdev_map_cat1_hi; /* bits 63:32 */
  17769. /**
  17770. * CU vdev map for the Critical update category-2
  17771. * (modification of CU IES)
  17772. */
  17773. A_UINT32 cu_vdev_map_cat2_lo; /* bits 31:0 */
  17774. A_UINT32 cu_vdev_map_cat2_hi; /* bits 63:32 */
  17775. } wmi_prb_resp_tmpl_ml_info;
  17776. /** indicates P2P GO only case not replay probe req */
  17777. #define WMI_PRB_TMPL_IGNORE_NONP2P_PRB_REQ 0x1
  17778. typedef struct {
  17779. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param */
  17780. /** unique id identifying the VDEV, generated by the caller */
  17781. A_UINT32 vdev_id;
  17782. /** beacon buffer length. data is in TLV data[] */
  17783. A_UINT32 buf_len;
  17784. /** flags to control probe tmpl:
  17785. * Bit 0: If set, FW should ignore non-P2P probe req
  17786. * Bits 31-1: Reserved
  17787. */
  17788. A_UINT32 flags;
  17789. /*
  17790. * The TLVs follows:
  17791. * wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
  17792. * A_UINT8 data[]; <-- Variable length data
  17793. */
  17794. } wmi_prb_tmpl_cmd_fixed_param;
  17795. typedef struct {
  17796. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fd_tmpl_cmd_fixed_param */
  17797. /** unique id identifying the VDEV, generated by the caller */
  17798. A_UINT32 vdev_id;
  17799. /** fd frame buffer length. data is in TLV data[] */
  17800. A_UINT32 buf_len;
  17801. /*
  17802. * The TLVs follows:
  17803. * A_UINT8 data[]; <-- Variable length data
  17804. */
  17805. } wmi_fd_tmpl_cmd_fixed_param;
  17806. typedef struct {
  17807. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */
  17808. A_UINT32 tlv_header;
  17809. /** unique id identifying the VDEV */
  17810. A_UINT32 vdev_id;
  17811. /** bcn tx status, values defined in enum WMI_FRAME_TX_STATUS */
  17812. A_UINT32 tx_status;
  17813. } wmi_offload_bcn_tx_status_event_fixed_param;
  17814. enum wmi_sta_ps_mode {
  17815. /** enable power save for the given STA VDEV */
  17816. WMI_STA_PS_MODE_DISABLED = 0,
  17817. /** disable power save for a given STA VDEV */
  17818. WMI_STA_PS_MODE_ENABLED = 1,
  17819. };
  17820. typedef struct {
  17821. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_mode_cmd_fixed_param */
  17822. /** unique id identifying the VDEV, generated by the caller */
  17823. A_UINT32 vdev_id;
  17824. /** Power save mode
  17825. *
  17826. * (see enum wmi_sta_ps_mode)
  17827. */
  17828. A_UINT32 sta_ps_mode;
  17829. } wmi_sta_powersave_mode_cmd_fixed_param;
  17830. typedef struct {
  17831. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_tdcc_config_cmd_fixed_param */
  17832. /** Set a max tx period: percentage of one beacon interval. range: 0 - 100 */
  17833. A_UINT32 tx_cycle_percentage;
  17834. /** Enable/disable TX Duty Cycle Control powersave */
  17835. A_UINT32 enabled;
  17836. } wmi_sta_tdcc_config_cmd_fixed_param;
  17837. enum wmi_csa_offload_en {
  17838. WMI_CSA_OFFLOAD_DISABLE = 0,
  17839. WMI_CSA_OFFLOAD_ENABLE = 1,
  17840. };
  17841. typedef struct {
  17842. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_enable_cmd_fixed_param */
  17843. A_UINT32 vdev_id;
  17844. A_UINT32 csa_offload_enable;
  17845. } wmi_csa_offload_enable_cmd_fixed_param;
  17846. typedef struct {
  17847. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_chanswitch_cmd_fixed_param */
  17848. A_UINT32 vdev_id;
  17849. /*
  17850. * The TLVs follows:
  17851. * wmi_channel chan;
  17852. */
  17853. } wmi_csa_offload_chanswitch_cmd_fixed_param;
  17854. /**
  17855. * This parameter controls the policy for retrieving frames from AP while the
  17856. * STA is in sleep state.
  17857. *
  17858. * Only takes affect if the sta_ps_mode is enabled
  17859. */
  17860. enum wmi_sta_ps_param_rx_wake_policy {
  17861. /* Wake up when ever there is an RX activity on the VDEV. In this mode
  17862. * the Power save SM(state machine) will come out of sleep by either
  17863. * sending null frame (or) a data frame (with PS==0) in response to TIM
  17864. * bit set in the received beacon frame from AP.
  17865. */
  17866. WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
  17867. /* Here the power save state machine will not wakeup in response to TIM
  17868. * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
  17869. * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
  17870. * access categories are delivery-enabled, the station will send a UAPSD
  17871. * trigger frame, otherwise it will send a PS-Poll.
  17872. */
  17873. WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
  17874. };
  17875. /** Number of tx frames/beacon that cause the power save SM to wake up.
  17876. *
  17877. * Value 1 causes the SM to wake up for every TX. Value 0 has a special
  17878. * meaning, It will cause the SM to never wake up. This is useful if you want
  17879. * to keep the system to sleep all the time for some kind of test mode . host
  17880. * can change this parameter any time. It will affect at the next tx frame.
  17881. */
  17882. enum wmi_sta_ps_param_tx_wake_threshold {
  17883. WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
  17884. WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
  17885. /* Values greater than one indicate that many TX attempts per beacon
  17886. * interval before the STA will wake up
  17887. */
  17888. };
  17889. /**
  17890. * The maximum number of PS-Poll frames the FW will send in response to
  17891. * traffic advertised in TIM before waking up (by sending a null frame with PS
  17892. * = 0). Value 0 has a special meaning: there is no maximum count and the FW
  17893. * will send as many PS-Poll as are necessary to retrieve buffered BU. This
  17894. * parameter is used when the RX wake policy is
  17895. * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
  17896. * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
  17897. */
  17898. enum wmi_sta_ps_param_pspoll_count {
  17899. WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
  17900. /* Values greater than 0 indicate the maximum number of PS-Poll frames FW
  17901. * will send before waking up.
  17902. */
  17903. };
  17904. /*
  17905. * This will include the delivery and trigger enabled state for every AC.
  17906. * This is the negotiated state with AP. The host MLME needs to set this based
  17907. * on AP capability and the state Set in the association request by the
  17908. * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
  17909. */
  17910. #define WMI_UAPSD_AC_TYPE_DELI 0
  17911. #define WMI_UAPSD_AC_TYPE_TRIG 1
  17912. #define WMI_UAPSD_AC_BIT_MASK(ac,type) \
  17913. ((type == WMI_UAPSD_AC_TYPE_DELI) ? \
  17914. (1 << (ac<<1)) : \
  17915. (1 << ((ac<<1)+1)))
  17916. enum wmi_sta_ps_param_uapsd {
  17917. WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  17918. WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  17919. WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  17920. WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  17921. WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  17922. WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  17923. WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  17924. WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  17925. };
  17926. enum wmi_sta_ps_scheme_cfg {
  17927. WMI_STA_PS_OPM_CONSERVATIVE = 0,
  17928. WMI_STA_PS_OPM_AGGRESSIVE = 1,
  17929. WMI_STA_PS_USER_DEF = 2,
  17930. };
  17931. enum wmi_sta_powersave_param {
  17932. /**
  17933. * Controls how frames are retrievd from AP while STA is sleeping
  17934. *
  17935. * (see enum wmi_sta_ps_param_rx_wake_policy)
  17936. */
  17937. WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
  17938. /**
  17939. * The STA will go active after this many TX
  17940. *
  17941. * (see enum wmi_sta_ps_param_tx_wake_threshold)
  17942. */
  17943. WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
  17944. /**
  17945. * Number of PS-Poll to send before STA wakes up
  17946. *
  17947. * (see enum wmi_sta_ps_param_pspoll_count)
  17948. *
  17949. */
  17950. WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
  17951. /**
  17952. * TX/RX inactivity time in msec before going to sleep.
  17953. *
  17954. * The power save SM will monitor tx/rx activity on the VDEV, if no
  17955. * activity for the specified msec of the parameter the Power save SM will
  17956. * go to sleep.
  17957. */
  17958. WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
  17959. /**
  17960. * Set uapsd configuration.
  17961. *
  17962. * (see enum wmi_sta_ps_param_uapsd)
  17963. */
  17964. WMI_STA_PS_PARAM_UAPSD = 4,
  17965. /**
  17966. * Number of PS-Poll to send before STA wakes up in QPower Mode
  17967. */
  17968. WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5,
  17969. /**
  17970. * Enable OPM
  17971. */
  17972. WMI_STA_PS_ENABLE_QPOWER = 6,
  17973. WMI_STA_PS_ENABLE_OPM = WMI_STA_PS_ENABLE_QPOWER, /* alias */
  17974. /**
  17975. * Number of TX frames before the entering the Active state
  17976. */
  17977. WMI_STA_PS_PARAM_QPOWER_MAX_TX_BEFORE_WAKE = 7,
  17978. /**
  17979. * QPower SPEC PSPOLL interval
  17980. */
  17981. WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL = 8,
  17982. /**
  17983. * Max SPEC PSPOLL to be sent when the PSPOLL response has
  17984. * no-data bit set
  17985. */
  17986. WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL = 9,
  17987. /**
  17988. * Max value of ITO reset when there is no tx-rx
  17989. * after AP has set the TIM bit
  17990. */
  17991. WMI_STA_PS_PARAM_MAX_RESET_ITO_COUNT_ON_TIM_NO_TXRX = 10,
  17992. /**
  17993. * Flag to enable/disable Powersave Optimization
  17994. * in WOW
  17995. */
  17996. WMI_STA_PS_PARAM_ENABLE_PS_OPT_IN_WOW = 11,
  17997. /**
  17998. * Speculative interval in ms
  17999. */
  18000. WMI_STA_PS_PARAM_SPEC_WAKE_INTERVAL = 12,
  18001. };
  18002. typedef struct {
  18003. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_param_cmd_fixed_param */
  18004. /** unique id identifying the VDEV, generated by the caller */
  18005. A_UINT32 vdev_id;
  18006. /** station power save parameter (see enum wmi_sta_powersave_param) */
  18007. A_UINT32 param;
  18008. A_UINT32 value;
  18009. } wmi_sta_powersave_param_cmd_fixed_param;
  18010. /** No MIMO power save */
  18011. #define WMI_STA_MIMO_PS_MODE_DISABLE
  18012. /** mimo powersave mode static*/
  18013. #define WMI_STA_MIMO_PS_MODE_STATIC
  18014. /** mimo powersave mode dynamic */
  18015. #define WMI_STA_MIMO_PS_MODE_DYNAMI
  18016. typedef struct {
  18017. /** unique id identifying the VDEV, generated by the caller */
  18018. A_UINT32 vdev_id;
  18019. /** mimo powersave mode as defined above */
  18020. A_UINT32 mimo_pwrsave_mode;
  18021. } wmi_sta_mimo_ps_mode_cmd;
  18022. /** U-APSD configuration of peer station from (re)assoc request and TSPECs */
  18023. enum wmi_ap_ps_param_uapsd {
  18024. WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  18025. WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  18026. WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  18027. WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  18028. WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  18029. WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  18030. WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  18031. WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  18032. };
  18033. /** U-APSD maximum service period of peer station */
  18034. enum wmi_ap_ps_peer_param_max_sp {
  18035. WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
  18036. WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
  18037. WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
  18038. WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
  18039. /* keep last! */
  18040. MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
  18041. };
  18042. /** param values for WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE */
  18043. enum wmi_ap_ps_param_sifs_resp_frmtype {
  18044. WMI_SIFS_RESP_PSPOLL = (1 << 0),
  18045. WMI_SIFS_RESP_UAPSD = (1 << 1),
  18046. WMI_SIFS_RESP_QBST_EXP = (1 << 2),
  18047. WMI_SIFS_RESP_QBST_DATA = (1 << 3),
  18048. WMI_SIFS_RESP_QBST_BAR = (1 << 4),
  18049. };
  18050. /**
  18051. * AP power save parameter
  18052. * Set a power save specific parameter for a peer station
  18053. */
  18054. enum wmi_ap_ps_peer_param {
  18055. /** Set uapsd configuration for a given peer.
  18056. *
  18057. * This will include the delivery and trigger enabled state for every AC.
  18058. * The host MLME needs to set this based on AP capability and stations
  18059. * request Set in the association request received from the station.
  18060. *
  18061. * Lower 8 bits of the value specify the UAPSD configuration.
  18062. *
  18063. * (see enum wmi_ap_ps_param_uapsd)
  18064. * The default value is 0.
  18065. */
  18066. WMI_AP_PS_PEER_PARAM_UAPSD = 0,
  18067. /**
  18068. * Set the service period for a UAPSD capable station
  18069. *
  18070. * The service period from wme ie in the (re)assoc request frame.
  18071. *
  18072. * (see enum wmi_ap_ps_peer_param_max_sp)
  18073. */
  18074. WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
  18075. /** Time in seconds for aging out buffered frames for STA in power save */
  18076. WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
  18077. /**
  18078. * Specify frame types that are considered SIFS RESP trigger frame
  18079. * (see enum wmi_ap_ps_param_sifs_resp_frmtype)
  18080. */
  18081. WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
  18082. /** Specifies the trigger state of TID. Valid only for UAPSD frame type */
  18083. WMI_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
  18084. /** Specifies the WNM sleep state of a STA */
  18085. WMI_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
  18086. };
  18087. typedef struct {
  18088. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_ps_peer_cmd_fixed_param */
  18089. /** unique id identifying the VDEV, generated by the caller */
  18090. A_UINT32 vdev_id;
  18091. /** peer MAC address */
  18092. wmi_mac_addr peer_macaddr;
  18093. /** AP powersave param (see enum wmi_ap_ps_peer_param) */
  18094. A_UINT32 param;
  18095. /** AP powersave param value (see defines) */
  18096. A_UINT32 value;
  18097. } wmi_ap_ps_peer_cmd_fixed_param;
  18098. /** Configure peer station 11v U-APSD coexistence
  18099. *
  18100. * Two parameters from uaspd coexistence ie info (as specified in 11v) are
  18101. * sent down to FW along with this command.
  18102. *
  18103. * The semantics of these fields are described in the following text extracted
  18104. * from 802.11v.
  18105. *
  18106. * --- If the non-AP STA specified a non-zero TSF 0 Offset value in the
  18107. * U-APSD Coexistence element, the AP should not transmit frames to the
  18108. * non-AP STA outside of the U-APSD Coexistence Service Period, which
  18109. * begins when the AP receives the U-APSD trigger frame and ends after
  18110. * the transmission period specified by the result of the following
  18111. * calculation:
  18112. *
  18113. * End of transmission period = T + (Interval . ((T . TSF 0 Offset) mod Interval))
  18114. *
  18115. * Where T is the time the U-APSD trigger frame was received at the AP
  18116. * Interval is the UAPSD Coexistence element Duration/Interval field
  18117. * value (see 7.3.2.91) or upon the successful transmission of a frame
  18118. * with EOSP bit set to 1, whichever is earlier.
  18119. *
  18120. *
  18121. * --- If the non-AP STA specified a zero TSF 0 Offset value in the U-APSD
  18122. * Coexistence element, the AP should not transmit frames to the non-AP
  18123. * STA outside of the U-APSD Coexistence Service Period, which begins
  18124. * when the AP receives a U-APSD trigger frame and ends after the
  18125. * transmission period specified by the result of the following
  18126. * calculation: End of transmission period = T + Duration
  18127. */
  18128. typedef struct {
  18129. /** unique id identifying the VDEV, generated by the caller */
  18130. A_UINT32 vdev_id;
  18131. /** peer MAC address */
  18132. wmi_mac_addr peer_macaddr;
  18133. /** Enable U-APSD coexistence support for this peer
  18134. *
  18135. * 0 -> disabled (default)
  18136. * 1 -> enabled
  18137. */
  18138. A_UINT32 enabled;
  18139. /** Duration/Interval as defined by 11v U-ASPD coexistence */
  18140. A_UINT32 duration_interval;
  18141. /** Upper 32 bits of 64-bit TSF offset */
  18142. A_UINT32 tsf_offset_high;
  18143. /** Lower 32 bits of 64-bit TSF offset */
  18144. A_UINT32 tsf_offset_low;
  18145. } wmi_ap_powersave_peer_uapsd_coex_cmd;
  18146. typedef enum {
  18147. WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION = 0x0001,
  18148. WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE = 0x0002,
  18149. WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY = 0x0004,
  18150. WMI_AP_PS_EGAP_FLAG_MAX = 0x8000
  18151. } wmi_ap_ps_egap_flag_type;
  18152. #define WMI_EGAP_GET_REDUCED_2G_TX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 0, 8)
  18153. #define WMI_EGAP_GET_REDUCED_2G_RX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 8, 8)
  18154. #define WMI_EGAP_GET_REDUCED_5G_TX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 16, 8)
  18155. #define WMI_EGAP_GET_REDUCED_5G_RX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 24, 8)
  18156. #define WMI_EGAP_SET_REDUCED_2G_TX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 0, 8, val)
  18157. #define WMI_EGAP_SET_REDUCED_2G_RX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 8, 8, val)
  18158. #define WMI_EGAP_SET_REDUCED_5G_TX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 16, 8, val)
  18159. #define WMI_EGAP_SET_REDUCED_5G_RX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 24, 8, val)
  18160. /**
  18161. * configure enhanced green ap parameters
  18162. */
  18163. typedef struct {
  18164. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param */
  18165. /** Enable enhanced green ap
  18166. * 0 -> disabled
  18167. * 1 -> enabled
  18168. */
  18169. A_UINT32 enable;
  18170. /** The param indicates a duration that all STAs connected
  18171. * to S-AP have no traffic.
  18172. */
  18173. A_UINT32 inactivity_time; /* in unit of milliseconds */
  18174. /** The param indicates a duration that all STAs connected
  18175. * to S-AP have no traffic, after all STAs have entered powersave.
  18176. */
  18177. A_UINT32 wait_time; /* in unit of milliseconds */
  18178. /** The param is used to turn on/off some functions within E-GAP.
  18179. */
  18180. A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */
  18181. /** Reduced_txrx_chainmask
  18182. * [7:0] - 2G band tx chain mask
  18183. * [15:8] - 2G band rx chain mask
  18184. * [23:16] - 5G band tx chain mask
  18185. * [31:24] - 5G band rx chain mask
  18186. */
  18187. A_UINT32 reduced_txrx_chainmask;
  18188. } wmi_ap_ps_egap_param_cmd_fixed_param;
  18189. typedef enum {
  18190. WMI_AP_PS_EGAP_STATUS_IDLE = 1,
  18191. WMI_AP_PS_EGAP_STATUS_PWRSAVE_OFF = 2,
  18192. WMI_AP_PS_EGAP_STATUS_PWRSAVE_ON = 3,
  18193. WMI_AP_PS_EGAP_STATUS_MAX = 15
  18194. } wmi_ap_ps_egap_status_type;
  18195. /**
  18196. * send enhanced green ap status to host
  18197. */
  18198. typedef struct
  18199. {
  18200. /** TLV tag and len; tag equals
  18201. * WMITLV_TAG_STRUC_wmi_ap_ps_egap_info_chainmask_list */
  18202. A_UINT32 tlv_header;
  18203. union {
  18204. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  18205. /** pdev_id for identifying the MAC
  18206. * See macros starting with WMI_PDEV_ID_ for values.
  18207. */
  18208. A_UINT32 pdev_id;
  18209. };
  18210. /** The param indicates the current tx chainmask with the mac id. */
  18211. A_UINT32 tx_chainmask;
  18212. /** The param indicates the current rx chainmask with the mac id. */
  18213. A_UINT32 rx_chainmask;
  18214. } wmi_ap_ps_egap_info_chainmask_list;
  18215. typedef struct {
  18216. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param */
  18217. /** Enhanced green ap status (WMI_AP_PS_EGAP_STATUS). */
  18218. A_UINT32 status;
  18219. /* This TLV is followed by
  18220. * wmi_ap_ps_egap_info_chainmask_list chainmask_list[];
  18221. */
  18222. } wmi_ap_ps_egap_info_event_fixed_param;
  18223. /* 128 clients = 4 words */
  18224. /* WMI_TIM_BITMAP_ARRAY_SIZE can't be modified without breaking the compatibility */
  18225. #define WMI_TIM_BITMAP_ARRAY_SIZE 4
  18226. typedef struct {
  18227. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
  18228. /** TIM bitmap len (in bytes) */
  18229. A_UINT32 tim_len;
  18230. /** TIM Partial Virtual Bitmap */
  18231. A_UINT32 tim_mcast;
  18232. A_UINT32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
  18233. A_UINT32 tim_changed;
  18234. A_UINT32 tim_num_ps_pending;
  18235. /** Use the vdev_id only if vdev_id_valid is set */
  18236. A_UINT32 vdev_id_valid;
  18237. /** unique id identifying the VDEV */
  18238. A_UINT32 vdev_id;
  18239. } wmi_tim_info;
  18240. typedef struct {
  18241. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
  18242. /** TIM Partial Virtual Bitmap */
  18243. A_UINT32 tim_mcast;
  18244. A_UINT32 tim_changed;
  18245. A_UINT32 tim_num_ps_pending;
  18246. /** Use the vdev_id only if vdev_id_valid is set */
  18247. A_UINT32 vdev_id_valid;
  18248. /** unique id identifying the VDEV */
  18249. A_UINT32 vdev_id;
  18250. /** TIM bitmap len (in bytes) */
  18251. A_UINT32 tim_len;
  18252. /* followed by WMITLV_TAG_ARRAY_BYTE holding the TIM bitmap */
  18253. } wmi_tim_info_v2;
  18254. typedef struct {
  18255. /** Flag to enable quiet period IE support */
  18256. A_UINT32 is_enabled;
  18257. /** Quiet start */
  18258. A_UINT32 tbttcount;
  18259. /** Beacon intervals between quiets*/
  18260. A_UINT32 period;
  18261. /** TUs of each quiet*/
  18262. A_UINT32 duration;
  18263. /** TUs of from TBTT of quiet start*/
  18264. A_UINT32 offset;
  18265. } wmi_quiet_info;
  18266. /* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */
  18267. #define WMI_P2P_MAX_NOA_DESCRIPTORS 4 /* Maximum number of NOA Descriptors supported */
  18268. typedef struct {
  18269. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info */
  18270. /** Bit 0: Flag to indicate an update in NOA schedule
  18271. * Bits 7-1: Reserved
  18272. * Bits 15-8: Index (identifies the instance of NOA sub element)
  18273. * Bit 16: Opp PS state of the AP
  18274. * Bits 23-17: Ctwindow in TUs
  18275. * Bits 31-24: Number of NOA descriptors
  18276. */
  18277. A_UINT32 noa_attributes;
  18278. wmi_p2p_noa_descriptor noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
  18279. /** Use the vdev_id only if vdev_id_valid is set */
  18280. A_UINT32 vdev_id_valid;
  18281. /** unique id identifying the VDEV */
  18282. A_UINT32 vdev_id;
  18283. } wmi_p2p_noa_info;
  18284. typedef struct {
  18285. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_quiet_offload_info */
  18286. A_UINT32 vdev_id; /* unique id identifying the VDEV */
  18287. A_UINT8 tbttcount; /* quiet start */
  18288. A_UINT8 period; /* beacon intervals between quiets */
  18289. A_UINT16 duration; /* TUs of each quiet */
  18290. A_UINT16 offset; /* TUs of from TBTT of quiet start */
  18291. } wmi_quiet_offload_info;
  18292. #define WMI_UNIFIED_NOA_ATTR_MODIFIED 0x1
  18293. #define WMI_UNIFIED_NOA_ATTR_MODIFIED_S 0
  18294. #define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr) \
  18295. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED)
  18296. #define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr) \
  18297. WMI_F_RMW((hdr)->noa_attributes, 0x1, \
  18298. WMI_UNIFIED_NOA_ATTR_MODIFIED);
  18299. #define WMI_UNIFIED_NOA_ATTR_INDEX 0xff00
  18300. #define WMI_UNIFIED_NOA_ATTR_INDEX_S 8
  18301. #define WMI_UNIFIED_NOA_ATTR_INDEX_GET(hdr) \
  18302. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_INDEX)
  18303. #define WMI_UNIFIED_NOA_ATTR_INDEX_SET(hdr, v) \
  18304. WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
  18305. WMI_UNIFIED_NOA_ATTR_INDEX);
  18306. #define WMI_UNIFIED_NOA_ATTR_OPP_PS 0x10000
  18307. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_S 16
  18308. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(hdr) \
  18309. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_OPP_PS)
  18310. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_SET(hdr) \
  18311. WMI_F_RMW((hdr)->noa_attributes, 0x1, \
  18312. WMI_UNIFIED_NOA_ATTR_OPP_PS);
  18313. #define WMI_UNIFIED_NOA_ATTR_CTWIN 0xfe0000
  18314. #define WMI_UNIFIED_NOA_ATTR_CTWIN_S 17
  18315. #define WMI_UNIFIED_NOA_ATTR_CTWIN_GET(hdr) \
  18316. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_CTWIN)
  18317. #define WMI_UNIFIED_NOA_ATTR_CTWIN_SET(hdr, v) \
  18318. WMI_F_RMW((hdr)->noa_attributes, (v) & 0x7f, \
  18319. WMI_UNIFIED_NOA_ATTR_CTWIN);
  18320. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC 0xff000000
  18321. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_S 24
  18322. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(hdr) \
  18323. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_NUM_DESC)
  18324. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v) \
  18325. WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
  18326. WMI_UNIFIED_NOA_ATTR_NUM_DESC);
  18327. typedef struct {
  18328. /** TIM info */
  18329. wmi_tim_info tim_info;
  18330. /** P2P NOA info */
  18331. wmi_p2p_noa_info p2p_noa_info;
  18332. /* TBD: More info elements to be added later */
  18333. } wmi_bcn_info;
  18334. typedef struct {
  18335. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param */
  18336. /** bitmap identifying the VDEVs, generated by the caller */
  18337. A_UINT32 vdev_map;
  18338. /** how many vdev's info is included in this message
  18339. * If this field is zero, then the number of vdevs is specified by
  18340. * the number of bits set in the vdev_map bitmap.
  18341. */
  18342. A_UINT32 num_vdevs;
  18343. /* This TLV is followed by tim_info and p2p_noa_info for each vdev:
  18344. * wmi_tim_info tim_info[];
  18345. * wmi_p2p_noa_info p2p_noa_info[];
  18346. * wmi_quiet_offload_info quiet_offload_info[0/1];
  18347. *
  18348. */
  18349. } wmi_host_swba_event_fixed_param;
  18350. #define WMI_MAX_AP_VDEV 16
  18351. typedef struct {
  18352. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swfda_event_fixed_param */
  18353. /** vdev_id identifying the VDEV for which FILS should be generated */
  18354. A_UINT32 vdev_id;
  18355. /** time (in TU) at which current FILS Discovery frame is scheduled for Tx */
  18356. A_UINT32 fils_tt;
  18357. /** next TBTT time (in TU) for this vdev */
  18358. A_UINT32 tbtt;
  18359. } wmi_host_swfda_event_fixed_param;
  18360. typedef struct {
  18361. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param */
  18362. /** bimtap of VDEVs that has tbtt offset updated */
  18363. A_UINT32 vdev_map;
  18364. /* The TLVs for tbttoffset_list, tbtt_qtime_low_us_list, and
  18365. * tbtt_qtime_high_us_list will follow this TLV.
  18366. * - tbtt offset list in the order of the LSb to MSb in the vdev_map bitmap
  18367. * A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV];
  18368. * - tbtt qtime_low_us list(Lower 32 bit of qtime us) in the order of the
  18369. * LSb to MSb in the vdev_map bitmap
  18370. * A_UINT32 tbtt_qtime_low_us_list[WMI_MAX_AP_VDEV];
  18371. * - tbtt qtime_high_us list(Higher 32 bit of qtime us) in the order of the
  18372. * LSb to MSb in the vdev_map bitmap
  18373. * A_UINT32 tbtt_qtime_high_us_list[WMI_MAX_AP_VDEV];
  18374. */
  18375. } wmi_tbtt_offset_event_fixed_param;
  18376. #define WMI_TBTT_OFFSET_INVALID 0xffffffff /* tbttoffset is not updated by FW */
  18377. typedef struct {
  18378. A_UINT32 tlv_header;/* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_info */
  18379. /** unique id identifying the VDEV */
  18380. A_UINT32 vdev_id;
  18381. /** tbttoffset in TUs */
  18382. A_UINT32 tbttoffset;
  18383. /** absolute tbtt time in qtime us */
  18384. A_UINT32 tbtt_qtime_low_us; /* bits 31:0 of qtime */
  18385. A_UINT32 tbtt_qtime_high_us; /* bits 63:32 of qtime */
  18386. } wmi_tbtt_offset_info;
  18387. /** Use this event if number of vdevs > 32 */
  18388. typedef struct {
  18389. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_ext_event_fixed_param */
  18390. A_UINT32 num_vdevs;
  18391. /*
  18392. * The TLVs for tbttoffset will follow this TLV.
  18393. * Of size num_vdevs * wmi_tbtt_offset_info
  18394. */
  18395. } wmi_tbtt_offset_ext_event_fixed_param;
  18396. /* Peer Specific commands and events */
  18397. typedef struct {
  18398. A_UINT32 percentage; /* in unit of 12.5% */
  18399. A_UINT32 min_delta; /* in unit of Mbps */
  18400. } rate_delta_t;
  18401. #define PEER_RATE_REPORT_COND_FLAG_DELTA 0x01
  18402. #define PEER_RATE_REPORT_COND_FLAG_THRESHOLD 0x02
  18403. #define MAX_NUM_OF_RATE_THRESH 4
  18404. typedef struct {
  18405. A_UINT32 val_cond_flags; /* PEER_RATE_REPORT_COND_FLAG_DELTA, PEER_RATE_REPORT_COND_FLAG_THRESHOLD
  18406. Any of these two conditions or both of them can be set. */
  18407. rate_delta_t rate_delta;
  18408. A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH]; /* In unit of Mbps. There are at most 4 thresholds.
  18409. If the threshold count is less than 4, set zero to
  18410. the one following the last threshold */
  18411. } report_cond_per_phy_t;
  18412. enum peer_rate_report_cond_phy_type {
  18413. PEER_RATE_REPORT_COND_11B = 0,
  18414. PEER_RATE_REPORT_COND_11A_G,
  18415. PEER_RATE_REPORT_COND_11N,
  18416. PEER_RATE_REPORT_COND_11AC,
  18417. PEER_RATE_REPORT_COND_MAX_NUM
  18418. };
  18419. typedef struct {
  18420. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_rate_report_condition_fixed_param */
  18421. A_UINT32 enable_rate_report; /* 1= enable, 0=disable */
  18422. A_UINT32 report_backoff_time; /* in unit of msecond */
  18423. A_UINT32 report_timer_period; /* in unit of msecond */
  18424. /* In the following field, the array index means the phy type,
  18425. * please see enum peer_rate_report_cond_phy_type for detail */
  18426. report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM];
  18427. } wmi_peer_set_rate_report_condition_fixed_param;
  18428. /* Peer Type:
  18429. * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based
  18430. * on address and vdev opmode. This is largely here to allow host to indicate that
  18431. * peer is explicitly a TDLS peer
  18432. */
  18433. enum wmi_peer_type {
  18434. WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */
  18435. WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */
  18436. WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */
  18437. WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */
  18438. WMI_PEER_TYPE_NAN_DATA = 4, /* Peer is NAN DATA */
  18439. WMI_PEER_TYPE_TRANS_BSS = 5, /* For creating BSS peer when connecting with non-transmit AP */
  18440. WMI_PEER_TYPE_PASN = 6, /* Peer is used for Pre-Association Security Negotiation */
  18441. WMI_PEER_TYPE_BRIDGE = 7, /* For creating Dummy Peer in case of 4 Link MLO */
  18442. WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type is assigned up to 127 */
  18443. /* Reserved from 128 - 255 for target internal use.*/
  18444. WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */
  18445. };
  18446. /* this TLV structure used for providing mlo parameters on peer create */
  18447. typedef struct {
  18448. A_UINT32 tlv_header; /** TLV tag and len */
  18449. wmi_mlo_flags mlo_flags; /* only mlo enable flag need by STA mode peer create */
  18450. } wmi_peer_create_mlo_params;
  18451. typedef struct {
  18452. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */
  18453. /** unique id identifying the VDEV, generated by the caller */
  18454. A_UINT32 vdev_id;
  18455. /** peer MAC address */
  18456. wmi_mac_addr peer_macaddr;
  18457. /** peer type: see enum values above */
  18458. A_UINT32 peer_type;
  18459. /* The TLVs follows this structure:
  18460. * wmi_peer_create_mlo_params mlo_params[]; <-- MLO flags on peer_create
  18461. * Optional TLV, only present for MLO peers.
  18462. * If the peer is non-MLO, the array length should be 0.
  18463. * Only mlo_enable flag required by MCC to decide MAC address to be used.
  18464. */
  18465. } wmi_peer_create_cmd_fixed_param;
  18466. /* this TLV structure is used for providing MLO parameters on peer delete */
  18467. typedef struct {
  18468. A_UINT32 tlv_header; /** TLV tag and len */
  18469. A_UINT32 mlo_hw_link_id_bitmap; /* Hardware link id of the link which has crashed or was not created in the first place */
  18470. wmi_mlo_flags mlo_flags; /* to indicate whether peer delete is due to link switch */
  18471. } wmi_peer_delete_mlo_params;
  18472. typedef struct {
  18473. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */
  18474. /** unique id identifying the VDEV, generated by the caller */
  18475. A_UINT32 vdev_id;
  18476. /** peer MAC address */
  18477. wmi_mac_addr peer_macaddr;
  18478. /* The TLVs follows this structure:
  18479. * wmi_peer_delete_mlo_params mlo_params[]; <-- MLO flags on peer_delete
  18480. * Optional TLV, only present for MLO peers.
  18481. * If the peer is non-MLO, the array length should be 0.
  18482. * Used for Link peer deleted.
  18483. */
  18484. } wmi_peer_delete_cmd_fixed_param;
  18485. #define WMI_VDEV_ALL_PEER_MAX_BITMAP_WORD32 ((WMI_PEER_TYPE_HOST_MAX+31) / 32)
  18486. #define WMI_VDEV_DELETE_ALL_PEER_BITMAP_SET(param, peer_type) \
  18487. WMI_SET_BITS(param[peer_type / 32], (peer_type % 32), 1, 1)
  18488. #define WMI_VDEV_DELETE_ALL_PEER_BITMAP_GET(param, peer_type) \
  18489. WMI_GET_BITS(param[peer_type / 32], (peer_type % 32), 1)
  18490. typedef struct {
  18491. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delete_all_peer_cmd_fixed_param */
  18492. /** unique id identifying the VDEV, generated by the caller */
  18493. A_UINT32 vdev_id;
  18494. /**
  18495. * Host can request for deletion of peers specific to wmi_peer_type
  18496. * through below bitmap.
  18497. * Macro's WMI_VDEV_DELETE_ALL_PEER_BITMAP_SET &
  18498. * WMI_VDEV_DELETE_ALL_PEER_BITMAP_GET are used for accessing purpose.
  18499. * And if bitmap array is filled with zeros, firmware needs to delete
  18500. * all peers.
  18501. */
  18502. A_UINT32 peer_type_bitmap[WMI_VDEV_ALL_PEER_MAX_BITMAP_WORD32];
  18503. } wmi_vdev_delete_all_peer_cmd_fixed_param;
  18504. typedef struct {
  18505. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_unmap_response_cmd_fixed_param */
  18506. A_UINT32 tlv_header;
  18507. /*
  18508. * Following this struct is the TLV:
  18509. * A_UINT32 peer_ids[]; <-- variable-length array of peer_ids
  18510. * that have been unmapped by the host
  18511. */
  18512. } wmi_peer_unmap_response_cmd_fixed_param;
  18513. typedef struct {
  18514. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_rx_blocksize_cmd_fixed_param */
  18515. /** unique id identifying the VDEV, generated by the caller */
  18516. A_UINT32 vdev_id;
  18517. /** peer MAC address */
  18518. wmi_mac_addr peer_macaddr;
  18519. /**
  18520. * maximum block ack window size to use during a rx block ack negotiation,
  18521. * i.e. the maximum number of MPDUs per A-MPDU that will be received
  18522. */
  18523. A_UINT32 rx_block_ack_win_limit;
  18524. } wmi_peer_set_rx_blocksize_cmd_fixed_param;
  18525. typedef struct {
  18526. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param */
  18527. /** unique id identifying the VDEV, generated by the caller */
  18528. A_UINT32 vdev_id;
  18529. /** peer MAC address */
  18530. wmi_mac_addr peer_macaddr;
  18531. /** tid bitmap identifying the tids to flush */
  18532. A_UINT32 peer_tid_bitmap;
  18533. } wmi_peer_flush_tids_cmd_fixed_param;
  18534. typedef struct {
  18535. /** rate mode . 0: disable fixed rate (auto rate)
  18536. * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
  18537. * 2: ht20 11n rate specified as mcs index
  18538. * 3: ht40 11n rate specified as mcs index
  18539. */
  18540. A_UINT32 rate_mode;
  18541. /** 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
  18542. * and series 3 is stored at byte 3 (MSB) */
  18543. A_UINT32 rate_series;
  18544. /** 4 retry counts for 4 rate series. retry count for rate 0 is stored in byte 0 (LSB)
  18545. * and retry count for rate 3 is stored at byte 3 (MSB) */
  18546. A_UINT32 rate_retries;
  18547. } wmi_fixed_rate;
  18548. typedef struct {
  18549. /** unique id identifying the VDEV, generated by the caller */
  18550. A_UINT32 vdev_id;
  18551. /** peer MAC address */
  18552. wmi_mac_addr peer_macaddr;
  18553. /** fixed rate */
  18554. wmi_fixed_rate peer_fixed_rate;
  18555. } wmi_peer_fixed_rate_cmd;
  18556. #define WMI_MGMT_TID 17
  18557. typedef struct {
  18558. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_clear_resp_cmd_fixed_param */
  18559. /** unique id identifying the VDEV, generated by the caller */
  18560. A_UINT32 vdev_id;
  18561. /** peer MAC address */
  18562. wmi_mac_addr peer_macaddr;
  18563. } wmi_addba_clear_resp_cmd_fixed_param;
  18564. typedef struct {
  18565. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param */
  18566. /** unique id identifying the VDEV, generated by the caller */
  18567. A_UINT32 vdev_id;
  18568. /** peer MAC address */
  18569. wmi_mac_addr peer_macaddr;
  18570. /** Tid number */
  18571. A_UINT32 tid;
  18572. /** Buffer/Window size*/
  18573. A_UINT32 buffersize;
  18574. } wmi_addba_send_cmd_fixed_param;
  18575. typedef struct {
  18576. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param */
  18577. /** unique id identifying the VDEV, generated by the caller */
  18578. A_UINT32 vdev_id;
  18579. /** peer MAC address */
  18580. wmi_mac_addr peer_macaddr;
  18581. /** Tid number */
  18582. A_UINT32 tid;
  18583. /** Is Initiator */
  18584. A_UINT32 initiator;
  18585. /** Reason code */
  18586. A_UINT32 reasoncode;
  18587. } wmi_delba_send_cmd_fixed_param;
  18588. typedef struct {
  18589. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_setresponse_cmd_fixed_param */
  18590. /** unique id identifying the vdev, generated by the caller */
  18591. A_UINT32 vdev_id;
  18592. /** peer mac address */
  18593. wmi_mac_addr peer_macaddr;
  18594. /** Tid number */
  18595. A_UINT32 tid;
  18596. /** status code */
  18597. A_UINT32 statuscode;
  18598. } wmi_addba_setresponse_cmd_fixed_param;
  18599. typedef struct {
  18600. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_send_singleamsdu_cmd_fixed_param */
  18601. /** unique id identifying the vdev, generated by the caller */
  18602. A_UINT32 vdev_id;
  18603. /** peer mac address */
  18604. wmi_mac_addr peer_macaddr;
  18605. /** Tid number */
  18606. A_UINT32 tid;
  18607. } wmi_send_singleamsdu_cmd_fixed_param;
  18608. /* Type of Station DTIM Power Save method */
  18609. enum {
  18610. /* For NORMAL DTIM, the parameter is the number of beacon intervals and
  18611. * also the same value as the listen interval. For this method, the
  18612. * station will wake up based on the listen interval. If this
  18613. * listen interval is not equal to DTIM, then the station may
  18614. * miss certain DTIM beacons. If this value is 1, then the
  18615. * station will wake up for every beacon.
  18616. */
  18617. WMI_STA_DTIM_PS_NORMAL_DTIM = 0x01,
  18618. /* For MODULATED_DTIM, parameter is a multiple of DTIM beacons to skip.
  18619. * When this value is 1, then the station will wake at every DTIM beacon.
  18620. * If this value is >1, then the station will skip certain DTIM beacons.
  18621. * This value is the multiple of DTIM intervals that the station will
  18622. * wake up to receive the DTIM beacons.
  18623. */
  18624. WMI_STA_DTIM_PS_MODULATED_DTIM = 0x02,
  18625. };
  18626. /* Parameter structure for the WMI_STA_DTIM_PS_METHOD_CMDID */
  18627. typedef struct {
  18628. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_dtim_ps_method_cmd_fixed_param */
  18629. /** unique id identifying the VDEV, generated by the caller */
  18630. A_UINT32 vdev_id;
  18631. /** Station DTIM Power Save method as defined above */
  18632. A_UINT32 dtim_pwrsave_method;
  18633. /** DTIM PS value. Contents depends on the method */
  18634. A_UINT32 value;
  18635. /** Modulated DTIM value */
  18636. A_UINT32 MaxLIModulatedDTIM;
  18637. } wmi_sta_dtim_ps_method_cmd_fixed_param;
  18638. /*
  18639. * For Station UAPSD Auto Trigger feature, the Firmware monitors the
  18640. * uAPSD uplink and downlink traffic for each uAPSD enabled WMM ACs.
  18641. * If there is no uplink/download for the specified service interval (field service_interval),
  18642. * firmware will auto generate a QOS-NULL trigger for that WMM-AP with the TID value
  18643. * specified in the UP (field user_priority).
  18644. * Firmware also monitors the responses for these QOS-NULL triggers.
  18645. * If the peer does not have any delivery frames, it will respond with
  18646. * QOS-NULL (EOSP=1). This feature of only using service interval is assumed to be mandatory for all
  18647. * firmware implementation. For this basic implementation, the suspend_interval and delay_interval
  18648. * are unused and should be set to 0.
  18649. * When service_interval is 0, then the firmware will not send any trigger frames. This is for
  18650. * certain host-based implementations that don't want this firmware offload.
  18651. * Note that the per-AC intervals are required for some usage scenarios. This is why the intervals
  18652. * are given in the array of ac_param[]. For example, Voice service interval may defaults to 20 ms
  18653. * and rest of the AC default to 300 ms.
  18654. *
  18655. * The service bit, WMI_STA_UAPSD_VAR_AUTO_TRIG, will indicate that the more advanced feature
  18656. * of variable auto trigger is supported. The suspend_interval and delay_interval is used in
  18657. * the more advanced monitoring method.
  18658. * If the PEER does not have any delivery enabled data frames (non QOS-NULL) for the
  18659. * suspend interval (field suspend_interval), firmware will change its auto trigger interval
  18660. * to delay interval (field delay_interval). This way, when there is no traffic, the station
  18661. * will save more power by waking up less and sending less trigger frames.
  18662. * The (service_interval < suspend_interval) and (service_interval < delay_interval).
  18663. * If this variable auto trigger is not required, then the suspend_interval and delay_interval
  18664. * should be 0.
  18665. */
  18666. typedef struct {
  18667. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_param */
  18668. /** WMM Access category from 0 to 3 */
  18669. A_UINT32 wmm_ac;
  18670. /** User priority to use in trigger frames. It is the TID
  18671. * value. This field needs to be specified and may not be
  18672. * equivalent to AC since some implementation may use the TSPEC
  18673. * to enable UAPSD and negotiate a particular user priority. */
  18674. A_UINT32 user_priority;
  18675. /** service interval in ms */
  18676. A_UINT32 service_interval;
  18677. /** Suspend interval in ms */
  18678. A_UINT32 suspend_interval;
  18679. /** delay interval in ms */
  18680. A_UINT32 delay_interval;
  18681. } wmi_sta_uapsd_auto_trig_param;
  18682. typedef struct {
  18683. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_cmd_fixed_param */
  18684. /** unique id identifying the VDEV, generated by the caller */
  18685. A_UINT32 vdev_id;
  18686. /** peer mac address */
  18687. wmi_mac_addr peer_macaddr;
  18688. /** Number of AC to specify */
  18689. A_UINT32 num_ac;
  18690. /*
  18691. * Following this struct is the TLV:
  18692. * wmi_sta_uapsd_auto_trig_param ac_param[]; <-- Variable number of AC parameters (defined by field num_ac)
  18693. */
  18694. } wmi_sta_uapsd_auto_trig_cmd_fixed_param;
  18695. /** mimo powersave state */
  18696. #define WMI_PEER_MIMO_PS_STATE 0x1
  18697. /** enable/disable AMPDU . initial value (enabled) */
  18698. #define WMI_PEER_AMPDU 0x2
  18699. /** authorize/unauthorize peer. initial value is unauthorized (0) */
  18700. #define WMI_PEER_AUTHORIZE 0x3
  18701. /** peer channel bandwidth */
  18702. #define WMI_PEER_CHWIDTH 0x4
  18703. /** peer NSS */
  18704. #define WMI_PEER_NSS 0x5
  18705. /** USE 4 ADDR */
  18706. #define WMI_PEER_USE_4ADDR 0x6
  18707. /* set group membership status */
  18708. #define WMI_PEER_MEMBERSHIP 0x7
  18709. #define WMI_PEER_USERPOS 0x8
  18710. /*
  18711. * A critical high-level protocol is being used with this peer. Target
  18712. * should take appropriate measures (if possible) to ensure more
  18713. * reliable link with minimal latency. This *may* include modifying the
  18714. * station power save policy, enabling more RX chains, increased
  18715. * priority of channel scheduling, etc.
  18716. *
  18717. * NOTE: This parameter should only be considered a hint as specific
  18718. * behavior will depend on many factors including current network load
  18719. * and vdev/peer configuration.
  18720. *
  18721. * For STA VDEV this peer corresponds to the AP's BSS peer.
  18722. * For AP VDEV this peer corresponds to the remote peer STA.
  18723. */
  18724. #define WMI_PEER_CRIT_PROTO_HINT_ENABLED 0x9
  18725. /* set Tx failure count threshold for the peer - Currently unused */
  18726. #define WMI_PEER_TX_FAIL_CNT_THR 0xA
  18727. /* Enable H/W retry and Enable H/W Send CTS2S before Data */
  18728. #define WMI_PEER_SET_HW_RETRY_CTS2S 0xB
  18729. /* Set peer advertised IBSS atim window length */
  18730. #define WMI_PEER_IBSS_ATIM_WINDOW_LENGTH 0xC
  18731. /** peer phy mode */
  18732. #define WMI_PEER_PHYMODE 0xD
  18733. /** Use FIXED Pwr */
  18734. #define WMI_PEER_USE_FIXED_PWR 0xE
  18735. /** Set peer fixed rate
  18736. * The top nibble is used to select which format to use for encoding
  18737. * the rate specification: 0xVXXXXXXX
  18738. * If V == 0b0000: format is same as before: 0x000000RR
  18739. * If V == 0b0001: format is: 0x1000RRRR.
  18740. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  18741. * The host shall use the new V1 format (and set V = 0x1) if the target
  18742. * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
  18743. * system is configured with Nss > 4 (either at compile time within the
  18744. * host driver, or through WMI_SERVICE_READY PHY capabilities provided
  18745. * by the target).
  18746. */
  18747. #define WMI_PEER_PARAM_FIXED_RATE 0xF
  18748. /** Allowlist peer TIDs */
  18749. #define WMI_PEER_SET_MU_ALLOWLIST 0x10
  18750. /* retain definition of deprecated prior name, for backwards compatibility */
  18751. #define WMI_PEER_SET_MU_WHITELIST WMI_PEER_SET_MU_ALLOWLIST
  18752. /** Set peer max tx rate (MCS) in adaptive rate ctrl */
  18753. #define WMI_PEER_SET_MAX_TX_RATE 0x11
  18754. /** Set peer minimal tx rate (MCS) in adaptive rate ctrl */
  18755. #define WMI_PEER_SET_MIN_TX_RATE 0x12
  18756. /**
  18757. * default ring routing for peer data packets,
  18758. * param_value = bit 0 for hash based routing enabled or not
  18759. * (value 1 is enabled, value 0 is disabled)
  18760. * bits 1:5 are for ring 32 (i.e. ring id value
  18761. * selected from 0 to 31 values)
  18762. * bits 6:7 are for LMAC/peer based routing.
  18763. * bit 8 for peer based ring selection enabled or not
  18764. * (value 1 is enabled, value 0 is disabled
  18765. * bits 9-15 are valid when bit 8 is set to 1)
  18766. * bit 9 is for ring selection enabled for filter-pass
  18767. * unicast or not (value 1 is enabled, value 0 is disabled)
  18768. * bit 10 is for ring selection enabled for filter-pass
  18769. * mcast or not (value 1 is enabled, value 0 is disabled)
  18770. * bit 11 is for ring selection enabled for filter-pass
  18771. * BAR or not (value 1 is enabled, value 0 is disabled)
  18772. * bit 12-14 is for source ring selection value
  18773. * (value 0 for wbm2rxdma buf ring,
  18774. * value 1 for fw2rxdma buf ring,
  18775. * value 2 for sw2rxdma buf ring,
  18776. * value 3 for no buf ring,
  18777. * value 4 for sw2rxdma_exception buf ring,
  18778. * value 5 for fw2rxdma buf ring)
  18779. * bit 15-17 is for destination ring selection value
  18780. * (value 0 for wbm release ring,
  18781. * value 1 for rxdma2fw ring,
  18782. * value 2 for rxdma2sw ring,
  18783. * value 3 for rxdma2reo ring,
  18784. * value 4 for rxdma2fw_pmac1_ring,
  18785. * value 5 for rxdma2reo_remote0_ring,
  18786. * value 6 for rxdma2reo_remote1_ring)
  18787. */
  18788. #define WMI_PEER_HASH_BASED_ROUTING_GET(value32) WMI_GET_BITS(value32, 0x0, 1)
  18789. #define WMI_PEER_ROUTING_RING_ID_GET(value32) WMI_GET_BITS(value32, 0x1, 5)
  18790. #define WMI_PEER_LMAC_BASED_ROUTING_GET(value32) WMI_GET_BITS(value32, 0x6, 2)
  18791. #define WMI_PEER_BASED_RING_SELECTION_GET(value32) WMI_GET_BITS(value32, 0x8, 1)
  18792. #define WMI_PEER_FILTER_PASS_UNICAST_GET(value32) WMI_GET_BITS(value32, 0x9, 1)
  18793. #define WMI_PEER_FILTER_PASS_MCAST_GET(value32) WMI_GET_BITS(value32, 0xA, 1)
  18794. #define WMI_PEER_FILTER_PASS_BAR_GET(value32) WMI_GET_BITS(value32, 0xB, 1)
  18795. #define WMI_PEER_FILTER_PASS_SRC_RING_VAL_GET(value32) WMI_GET_BITS(value32, 0xC, 3)
  18796. #define WMI_PEER_FILTER_PASS_DEST_RING_VAL_GET(value32) WMI_GET_BITS(value32, 0xF, 3)
  18797. #define WMI_PEER_SET_DEFAULT_ROUTING 0x13
  18798. /* peer NSS for VHT160 - Extended NSS support */
  18799. #define WMI_PEER_NSS_VHT160 0x14
  18800. /* peer NSS for VHT160 - Extended NSS support */
  18801. #define WMI_PEER_NSS_VHT80_80 0x15
  18802. /* Peer SU TXBF sounding interval */
  18803. #define WMI_PEER_PARAM_SU_TXBF_SOUNDING_INTERVAL 0x16
  18804. /* Peer MU TXBF sounding interval */
  18805. #define WMI_PEER_PARAM_MU_TXBF_SOUNDING_INTERVAL 0x17
  18806. /* Peer TXBF sounding enable or disable */
  18807. #define WMI_PEER_PARAM_TXBF_SOUNDING_ENABLE 0x18
  18808. /* Per peer 11ax OFDMA enable or disable */
  18809. #define WMI_PEER_PARAM_OFDMA_ENABLE 0x19
  18810. /* Per peer 11ax/11ac MU enable or disable */
  18811. #define WMI_PEER_PARAM_MU_ENABLE 0x1a
  18812. /** Set peer fixed rate used in UL Trigger
  18813. * The top nibble is used to select which format to use for encoding
  18814. * the rate specification: 0xVXXXXXXX, V must be 1 for this parameter.
  18815. * If V == 0b0001: format is: 0x1000RRRR.
  18816. * ("RRRR" rate code already has those preamble bits,
  18817. * which can specify EHT or HE)
  18818. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  18819. *
  18820. * This parameter controls the UL OFDMA and UL MU-MIMO peer fixed rate.
  18821. */
  18822. #define WMI_PEER_PARAM_UL_FIXED_RATE 0x1b
  18823. /** send specific OMI to peer via QoS-null frame
  18824. * param_value = follow 11ax spec definition
  18825. * bit0:VHT(1), bit1:HE(1), bit2-31:A-Control
  18826. */
  18827. #define WMI_PEER_PARAM_XMIT_OMI 0x1c
  18828. #define WMI_PEER_RARAM_XMIT_OMI WMI_PEER_PARAM_XMIT_OMI /* alias due to prior typo */
  18829. /* Disable burst and assist */
  18830. #define WMI_PEER_PARAM_DISABLE_AGGRESSIVE_TX 0x1d
  18831. /* Enable 11r FT Roaming */
  18832. #define WMI_PEER_PARAM_ENABLE_FT 0x1e
  18833. /* update peer flag for ptk 4 way handshake */
  18834. #define WMI_PEER_PARAM_NEED_PTK_4_WAY 0x1f
  18835. /* update peer flag for gtk 2 way handshake */
  18836. #define WMI_PEER_PARAM_NEED_GTK_2_WAY 0x20
  18837. /* update peer flag for M4 sent */
  18838. #define WMI_PEER_PARAM_M4_SENT 0x21
  18839. /* Per peer MISC stats enable or disable */
  18840. #define WMI_PEER_PARAM_MISC_STATS_ENABLE 0x22
  18841. /* Per peer FW congestion enable or disable:
  18842. * A parameter value of 1 will disable FW tx congestion control for the peer,
  18843. * a parameter value 0f 0 will enable FW tx congestion control for the peer.
  18844. */
  18845. #define WMI_PEER_PARAM_FW_CONGESTION_DISABLE 0x23
  18846. /* Per peer dynamically change max Nss limit in supported tx modes.
  18847. * Whereas WMI_PEER_NSS cmd needs to reset PER tables and start peer rate
  18848. * control again.
  18849. * Currently supported only for 2x2 case, and also only supports setting
  18850. * all NSS up to current NSS.
  18851. * Mask is used so we can extend in future if needed.
  18852. *
  18853. * Expected values in bits:
  18854. * 00: Use autorate
  18855. * 01: Enable only 1SS
  18856. * 10: Enable only 2SS
  18857. * 11: Disable NSS clamp feature or Fallback to autorate
  18858. */
  18859. #define WMI_PEER_PARAM_DYN_NSS_EN_MASK 0x24
  18860. /* Per peer enable/disable RTS/CTS for unicast management frames.
  18861. * Enabling RTS/CTS only applicable after association process of the peer.
  18862. * Currently supported for spruce(2x2) chipset.
  18863. * Expected values:
  18864. * 0 : Disable RTS/CTS for unicast management frames.
  18865. * 1 : Enable RTS/CTS for unicast management frames.
  18866. */
  18867. #define WMI_PEER_PARAM_EN_RTSCTS_FOR_UNICAST_MGMT 0x25
  18868. /** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */
  18869. #define WMI_PEER_MIMO_PS_NONE 0x0
  18870. #define WMI_PEER_MIMO_PS_STATIC 0x1
  18871. #define WMI_PEER_MIMO_PS_DYNAMIC 0x2
  18872. /*
  18873. * Each bit indicates one 20 MHz subchannel is punctured or not.
  18874. * A bit in the bitmap is set to 1 to indicate that the corresponding 20 MHz
  18875. * subchannel is not punctured and is set to 0 to indicate that it is punctured.
  18876. */
  18877. #define WMI_PEER_PUNCTURE_20MHZ_BITMAP 0x26
  18878. #define WMI_PEER_CHWIDTH_PUNCTURE_BITMAP_GET_CHWIDTH(value32) WMI_GET_BITS(value32, 0x0, 8)
  18879. #define WMI_PEER_CHWIDTH_PUNCTURE_BITMAP_GET_PUNCTURE_BMAP(value32) WMI_GET_BITS(value32, 0x8, 16)
  18880. /*
  18881. * peer channel bandwidth and puncture_bitmap
  18882. * BIT 0-7 - Peer channel width
  18883. * This bitfield holds a wmi_channel_width enum value.
  18884. * BIT 8-23 - Peer Puncture bitmap where each bit indicates whether
  18885. * a 20 MHz BW is punctured.
  18886. * The variable should be read from left, LSb (bit 8) will
  18887. * represent the lowest-frequency 20 MHz portion.
  18888. * Bit value: 0 - 20 MHz channel is punctured, 1 - not punctured
  18889. */
  18890. #define WMI_PEER_CHWIDTH_PUNCTURE_20MHZ_BITMAP 0x27
  18891. #define WMI_PEER_SET_TX_POWER 0x28
  18892. #define WMI_PEER_FT_ROAMING_PEER_UPDATE 0x29
  18893. #define WMI_PEER_PARAM_DMS_SUPPORT 0x2A
  18894. #define WMI_PEER_PARAM_UL_OFDMA_RTD 0x2B
  18895. typedef struct {
  18896. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_cmd_fixed_param */
  18897. /** unique id identifying the VDEV, generated by the caller */
  18898. A_UINT32 vdev_id;
  18899. /** peer MAC address */
  18900. wmi_mac_addr peer_macaddr;
  18901. /** parameter id */
  18902. A_UINT32 param_id;
  18903. /** parameter value */
  18904. A_UINT32 param_value;
  18905. } wmi_peer_set_param_cmd_fixed_param;
  18906. typedef union {
  18907. /*
  18908. * The A_UINT16 "mode" and "tx_rate" fields can only be directly used
  18909. * by the target or a little-endian host.
  18910. * A big-endian host needs to use the WMI_PEER_MAX_MIN_TX_xxx_GET/SET
  18911. * macros on the A_UINT32 "value" field.
  18912. */
  18913. struct {
  18914. A_UINT16 mode; /* 0:CCK, 1:OFDM, 2:HT, 3:VHT (see WMI_RATE_PREAMBLE) */
  18915. A_UINT16 tx_rate; /* see per-mode specs below */
  18916. };
  18917. A_UINT32 value; /* for use by big-endian host */
  18918. } wmi_peer_max_min_tx_rate;
  18919. /*
  18920. * Any access to the mode/tx_rate in an big endian system should use
  18921. * the below Macros on the wmi_peer_max_min_tx_rate.value field.
  18922. */
  18923. #define WMI_PEER_MAX_MIN_TX_MODE_GET(value32) WMI_GET_BITS(value32, 0, 16)
  18924. #define WMI_PEER_MAX_MIN_TX_MODE_SET(value32, tx_mode) WMI_SET_BITS(value32, 0, 16, tx_mode)
  18925. #define WMI_PEER_MAX_MIN_TX_RATE_GET(value32) WMI_GET_BITS(value32, 16, 16)
  18926. #define WMI_PEER_MAX_MIN_TX_RATE_SET(value32, tx_mode) WMI_SET_BITS(value32, 16, 16, tx_mode)
  18927. /* CCK max/min tx Rate description
  18928. * tx_rate = 0: 1 Mbps
  18929. * tx_rate = 1: 2 Mbps
  18930. * tx_rate = 2: 5.5 Mbps
  18931. * tx_rate = 3: 11 Mbps
  18932. * tx_rate = else: invalid
  18933. */
  18934. enum {
  18935. WMI_MAX_CCK_TX_RATE_1M, /* up to 1M CCK Rate available */
  18936. WMI_MAX_CCK_TX_RATE_2M, /* up to 2M CCK Rate available */
  18937. WMI_MAX_CCK_TX_RATE_5_5M, /* up to 5.5M CCK Rate available */
  18938. WMI_MAX_CCK_TX_RATE_11M, /* up to 11M CCK Rate available */
  18939. WMI_MAX_CCK_TX_RATE = WMI_MAX_CCK_TX_RATE_11M,
  18940. };
  18941. /* OFDM max/min tx Rate description
  18942. * tx_rate = 0: 6 Mbps
  18943. * tx_rate = 1: 9 Mbps
  18944. * tx_rate = 2: 12 Mbps
  18945. * tx_rate = 3: 18 Mbps
  18946. * tx_rate = 4: 24 Mbps
  18947. * tx_rate = 5: 32 Mbps
  18948. * tx_rate = 6: 48 Mbps
  18949. * tx_rate = 7: 54 Mbps
  18950. * tx_rate = else: invalid
  18951. */
  18952. enum {
  18953. WMI_MAX_OFDM_TX_RATE_6M, /* up to 6M OFDM Rate available */
  18954. WMI_MAX_OFDM_TX_RATE_9M, /* up to 9M OFDM Rate available */
  18955. WMI_MAX_OFDM_TX_RATE_12M, /* up to 12M OFDM Rate available */
  18956. WMI_MAX_OFDM_TX_RATE_18M, /* up to 18M OFDM Rate available */
  18957. WMI_MAX_OFDM_TX_RATE_24M, /* up to 24M OFDM Rate available */
  18958. WMI_MAX_OFDM_TX_RATE_36M, /* up to 36M OFDM Rate available */
  18959. WMI_MAX_OFDM_TX_RATE_48M, /* up to 48M OFDM Rate available */
  18960. WMI_MAX_OFDM_TX_RATE_54M, /* up to 54M OFDM Rate available */
  18961. WMI_MAX_OFDM_TX_RATE = WMI_MAX_OFDM_TX_RATE_54M,
  18962. };
  18963. /* HT max/min tx rate description
  18964. * tx_rate = 0~7 : MCS Rate 0~7
  18965. * tx_rate=else : invalid.
  18966. */
  18967. #define WMI_MAX_HT_TX_MCS 0x07
  18968. /* VHT max/min tx rate description
  18969. * tx_rate = 0~9 : MCS Rate 0~9
  18970. * tx_rate=else : invalid.
  18971. */
  18972. #define WMI_MAX_VHT_TX_MCS 0x09
  18973. #define MAX_SUPPORTED_RATES 128
  18974. typedef struct {
  18975. /** total number of rates */
  18976. A_UINT32 num_rates;
  18977. /**
  18978. * rates (each 8bit value) packed into a 32 bit word.
  18979. * the rates are filled from least significant byte to most
  18980. * significant byte.
  18981. */
  18982. A_UINT32 rates[(MAX_SUPPORTED_RATES / 4) + 1];
  18983. } wmi_rate_set;
  18984. /* NOTE: It would bea good idea to represent the Tx MCS
  18985. * info in one word and Rx in another word. This is split
  18986. * into multiple words for convenience
  18987. */
  18988. typedef struct {
  18989. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */
  18990. A_UINT32 rx_max_rate; /* Max Rx data rate */
  18991. A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */
  18992. A_UINT32 tx_max_rate; /* Max Tx data rate */
  18993. /*
  18994. * bit [15:0] indicates MCS 0 to 9
  18995. * bit [23:16] indicates MCS 10 & 11
  18996. * bit [24] indicates whether MCS 10 & 11 is notified in bit [23:16]
  18997. */
  18998. A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */
  18999. A_UINT32 tx_max_mcs_nss; /* b0-b3: max mcs idx; b4-b7: max nss */
  19000. } wmi_vht_rate_set;
  19001. /* NOTE: It would bea good idea to represent the Tx MCS
  19002. * info in one word and Rx in another word. This is split
  19003. * into multiple words for convenience
  19004. * 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
  19005. */
  19006. typedef struct {
  19007. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_he_rate_set */
  19008. /* HE Supported MCS Set field Rx
  19009. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  19010. * value 0 - MCS 0-7 enabled for this NSS
  19011. * value 1 - MCS 0-9 enabled for this NSS
  19012. * value 2 - MCS 0-11 enabled for this NSS
  19013. * value 3 - NSS disabled
  19014. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  19015. */
  19016. A_UINT32 rx_mcs_set; /* Negotiated RX HE rates (i.e. rate this node can RX from peer)*/
  19017. /* HE Supported MCS Set field Tx
  19018. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  19019. * value 0 - MCS 0-7 enabled for this NSS
  19020. * value 1 - MCS 0-9 enabled for this NSS
  19021. * value 2 - MCS 0-11 enabled for this NSS
  19022. * value 3 - NSS disabled
  19023. * WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  19024. *
  19025. * - 8 bits x 2 are used for each Nss value for 2 categories of bandwidths,
  19026. * to indicate whether MCS 12 and 13 are enabled.
  19027. * Bits [16:23] used for checking if MCS 12/13 is enabled for a
  19028. * particular NSS (BW <= 80MHz)
  19029. * Bits [24:31] used for checking if MCS 12/13 is enabled for a
  19030. * particular NSS (BW > 80MHz)
  19031. * The WMI_HE_EXTRA_MCS_SS_[GET,SET] macros can be used for accessing
  19032. * these bit-fields.
  19033. */
  19034. A_UINT32 tx_mcs_set; /* Negotiated TX HE rates(i.e. rate this node can TX to peer) */
  19035. } wmi_he_rate_set;
  19036. typedef struct {
  19037. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_eht_rate_set */
  19038. /*
  19039. * B0-B3 indicates max NSS that supports mcs 0-7
  19040. * B4-B7 indicates max NSS that supports mcs 8-9
  19041. * B8-B11 indicates max NSS that supports mcs 10-11
  19042. * B12-B15 indicates max NSS that supports mcs 12-13
  19043. * B16-B31 reserved
  19044. */
  19045. A_UINT32 rx_mcs_set; /* Rx max NSS set */
  19046. A_UINT32 tx_mcs_set; /* Tx max NSS set */
  19047. } wmi_eht_rate_set;
  19048. /*
  19049. * IMPORTANT: Make sure the bit definitions here are consistent
  19050. * with the ni_flags definitions in wlan_peer.h
  19051. */
  19052. #define WMI_PEER_AUTH 0x00000001 /* Authorized for data */
  19053. #define WMI_PEER_QOS 0x00000002 /* QoS enabled */
  19054. #define WMI_PEER_NEED_PTK_4_WAY 0x00000004 /* Needs PTK 4 way handshake for authorization */
  19055. #define WMI_PEER_GK_INST 0x00000008 /* group Key Installed */
  19056. #define WMI_PEER_NEED_GTK_2_WAY 0x00000010 /* Needs GTK 2 way handshake after 4-way handshake */
  19057. #define WMI_PEER_PRIV 0x00000020 /* Encryption Enabled */
  19058. #define WMI_PEER_PK_INST 0x00000040 /* Pairwise Key Installed */
  19059. #define WMI_PEER_TKIP_CM_ENABLED 0x00000080 /* TKIP CounterMeasures */
  19060. #define WMI_PEER_SW_DEMIC_FRAG 0x00000100 /* S/W Demic of Frag Train */
  19061. #define WMI_PEER_CCX_ENABLED 0x00000200 /* CCX enabled */
  19062. #define WMI_PEER_HE 0x00000400 /* HE Enabled */
  19063. #define WMI_PEER_APSD 0x00000800 /* U-APSD power save enabled */
  19064. #define WMI_PEER_HT 0x00001000 /* HT enabled */
  19065. #define WMI_PEER_40MHZ 0x00002000 /* 40MHz enabld */
  19066. #define WMI_PEER_INTER_BSS_PEER 0x00004000 /* Inter BSS peer */
  19067. #define WMI_PEER_STBC 0x00008000 /* STBC Enabled */
  19068. #define WMI_PEER_LDPC 0x00010000 /* LDPC ENabled */
  19069. #define WMI_PEER_DYN_MIMOPS 0x00020000 /* Dynamic MIMO PS Enabled */
  19070. #define WMI_PEER_STATIC_MIMOPS 0x00040000 /* Static MIMO PS enabled */
  19071. #define WMI_PEER_DIS_MIMOPS 0x00080000 /* MIMO PS DISABLED */
  19072. #define WMI_PEER_SPATIAL_EXP 0x00100000 /* Enable spatial expansion for
  19073. * single stream rates to avoid
  19074. * unintentional beamforming */
  19075. #define WMI_PEER_SPATIAL_MUX 0x00200000 /* SM Enabled */
  19076. #define WMI_PEER_TWT_REQ 0x00400000 /* TWT Requester Support bit in Extended Capabilities element */
  19077. #define WMI_PEER_TWT_RESP 0x00800000 /* TWT Responder Support bit in Extended Capabilities element */
  19078. #define WMI_PEER_MULTI_BSSID 0x01000000 /* Multiple BSSID Support bit in Extended Capabilities element */
  19079. #define WMI_PEER_VHT 0x02000000 /* VHT Enabled */
  19080. #define WMI_PEER_80MHZ 0x04000000 /* 80MHz enabld */
  19081. #define WMI_PEER_PMF 0x08000000 /* Robust Management Frame Protection enabled */
  19082. #define WMI_PEER_F_PS_PRESEND_REQUIRED 0x10000000 /* Use this flag to avoid calling powersave API when STA is awake */
  19083. #define WMI_PEER_IS_P2P_CAPABLE 0x20000000 /* P2P capable peer */
  19084. #define WMI_PEER_160MHZ 0x40000000 /* 160 MHz enabled */
  19085. #define WMI_PEER_SAFEMODE_EN 0x80000000 /* Fips Mode Enabled */
  19086. /** define for peer_flags_ext */
  19087. #define WMI_PEER_EXT_EHT 0x00000001 /* EHT enabled */
  19088. #define WMI_PEER_EXT_320MHZ 0x00000002 /* 320Mhz enabled */
  19089. #define WMI_PEER_EXT_DMS_CAPABLE 0x00000004
  19090. #define WMI_PEER_EXT_HE_CAPS_6GHZ_VALID 0x00000008 /* param he_caps_6ghz is valid or not */
  19091. #define WMI_PEER_EXT_IS_QUALCOMM_NODE 0x00000010 /* Indicates if the peer connecting is a qualcomm node */
  19092. #define WMI_PEER_EXT_IS_MESH_NODE 0x00000020 /* Indicates if the peer connecting is a mesh node */
  19093. #define WMI_PEER_EXT_F_CRIT_PROTO_HINT_ENABLED 0x40000000
  19094. /**
  19095. * Peer rate capabilities.
  19096. *
  19097. * This is of interest to the ratecontrol
  19098. * module which resides in the firmware. The bit definitions are
  19099. * consistent with that defined in if_athrate.c.
  19100. *
  19101. * @todo
  19102. * Move this to a common header file later so there is no need to
  19103. * duplicate the definitions or maintain consistency.
  19104. */
  19105. #define WMI_RC_DS_FLAG 0x01 /* Dual stream flag */
  19106. #define WMI_RC_CW40_FLAG 0x02 /* CW 40 */
  19107. #define WMI_RC_SGI_FLAG 0x04 /* Short Guard Interval */
  19108. #define WMI_RC_HT_FLAG 0x08 /* HT */
  19109. #define WMI_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
  19110. #define WMI_RC_TX_STBC_FLAG 0x20 /* TX STBC */
  19111. #define WMI_RC_TX_STBC_FLAG_S 5 /* TX STBC */
  19112. #define WMI_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
  19113. #define WMI_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
  19114. #define WMI_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
  19115. #define WMI_RC_TS_FLAG 0x200 /* Three stream flag */
  19116. #define WMI_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
  19117. enum WMI_PEER_STA_TYPE {
  19118. WMI_PEER_STA_TYPE_INVALID = 0, /* Invalid type*/
  19119. WMI_PEER_STA_TYPE_ONLY_STAVDEV = 1, /* AP has only STAVDEV and APVDEV is not present on any radio */
  19120. WMI_PEER_STA_TYPE_APVDEV_ON_OTHER_RADIO = 2, /* AP has STAVDEV on one radio and APVDEV on other radios */
  19121. WMI_PEER_STA_TYPE_FH_APVDEV_ON_SAME_RADIO = 3, /* AP has STAVDEV and APVDEV on same radio. During STAVDEV connection,
  19122. * no repeater client is connected with this repeater APVDEV
  19123. */
  19124. WMI_PEER_STA_TYPE_BH_APVDEV_ON_SAME_RADIO = 4, /* AP has STAVDEV and APVDEV on same radio. During STAVDEV connection,
  19125. * at least one repeater client is connected with this repeater APVDEV
  19126. * (daisy chain config)
  19127. */
  19128. };
  19129. #define WMI_PEER_STA_TYPE_GET(dword) WMI_GET_BITS(dword, 0, 8)
  19130. #define WMI_PEER_STA_TYPE_SET(dword, value) WMI_SET_BITS(dword, 0, 8, value)
  19131. #define WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_BITPOS (0)
  19132. #define WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_MASK (0x1 << WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_BITPOS)
  19133. #define WMI_PEER_ASSOC_SET_BSS_MAX_IDLE_OPTION(_dword, _val) \
  19134. WMI_SET_BITS(_dword, WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_BITPOS, 1, _val)
  19135. #define WMI_PEER_ASSOC_GET_BSS_MAX_IDLE_OPTION(_dword) \
  19136. WMI_GET_BITS(_dword, WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_BITPOS, 1)
  19137. #define WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_BITPOS (16)
  19138. #define WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_MASK (0xFFFF << WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_BITPOS)
  19139. #define WMI_PEER_ASSOC_SET_BSS_MAX_IDLE_PERIOD(_dword, _val) \
  19140. WMI_SET_BITS(_dword, WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_BITPOS, 16, _val)
  19141. #define WMI_PEER_ASSOC_GET_BSS_MAX_IDLE_PERIOD(_dword) \
  19142. WMI_GET_BITS(_dword, WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_BITPOS, 16)
  19143. typedef struct {
  19144. A_UINT32 tlv_header; /** TLV tag (MITLV_TAG_STRUC_wmi_peer_assoc_mlo_partner_link_params) and len */
  19145. A_UINT32 vdev_id; /** unique id identifying the VDEV, generated by the caller. Set to 0xFFFFFFFF if no vdev is allocated. */
  19146. A_UINT32 hw_mld_link_id; /** Unique link id across SOCs, got as part of QMI handshake. */
  19147. wmi_mlo_flags mlo_flags; /** MLO flags */
  19148. A_UINT32 logical_link_index; /** Unique index for links of the mlo. Starts with Zero */
  19149. A_UINT32 ieee_link_id; /*link id in the 802.11 frames*/
  19150. wmi_mac_addr bss_id;
  19151. wmi_channel wmi_chan;
  19152. wmi_mac_addr self_mac;
  19153. } wmi_peer_assoc_mlo_partner_link_params;
  19154. /* This TLV structure used to pass mlo Parameters on peer assoc, only apply for mlo-peers */
  19155. typedef struct {
  19156. A_UINT32 tlv_header; /** TLV tag and len; */
  19157. /** MLO flags */
  19158. wmi_mlo_flags mlo_flags;
  19159. /** MLD MAC address */
  19160. wmi_mac_addr mld_macaddr;
  19161. /** Unique index for links of the mlo. Starts with Zero */
  19162. A_UINT32 logical_link_index;
  19163. /** ML Peer ID
  19164. * In WIN systems, mld_peer_id is generated by Host.
  19165. * In MCL systems, mld_peer_id will be set to invalid peer id.
  19166. */
  19167. A_UINT32 mld_peer_id;
  19168. /** Link-ID of the AP to which STA is associated */
  19169. A_UINT32 ieee_link_id;
  19170. /** eMLSR transition timeout in microseconds */
  19171. A_UINT32 emlsr_trans_timeout_us;
  19172. /** eMLSR transition delay in microseconds */
  19173. A_UINT32 emlsr_trans_delay_us;
  19174. /** eMLSR padding delay in microseconds */
  19175. A_UINT32 emlsr_padding_delay_us;
  19176. union {
  19177. /** Medium Synchronization Duration field in units of 32 microseconds */
  19178. A_UINT32 msd_dur_subfield;
  19179. /** DEPRECATED - DO NOT USE.
  19180. * Medium Synchronization Duration in microseconds */
  19181. A_UINT32 msd_dur_us;
  19182. };
  19183. /** Medium Synchronization OFDM ED Threshold */
  19184. A_UINT32 msd_ofdm_ed_thr;
  19185. /** Medium Synchronization Max Num of TXOPs */
  19186. A_UINT32 msd_max_num_txops;
  19187. /** max_num_simultaneous_links:
  19188. * The maximum number of affiliated STAs in the non-AP MLD that
  19189. * support simultaneous transmission or reception of frames.
  19190. */
  19191. A_UINT32 max_num_simultaneous_links;
  19192. /** NSTR indication bitmap received in assoc req */
  19193. A_UINT32 nstr_indication_bitmap;
  19194. /** max num of active links recommended by AP or applications */
  19195. A_UINT32 recommended_max_num_simultaneous_links;
  19196. } wmi_peer_assoc_mlo_params;
  19197. typedef struct {
  19198. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_tid_to_link_map */
  19199. A_UINT32 tlv_header;
  19200. /**
  19201. * A_UINT32
  19202. * WMI_TID_TO_LINK_MAP_TID_NUM_GET / WMI_TID_TO_LINK_MAP_TID_NUM_SET
  19203. * tid_num:5,
  19204. *
  19205. * WMI_TID_TO_LINK_MAP_DIR_GET / WMI_TID_TO_LINK_MAP_DIR_SET
  19206. * dir:2, // 0 - DL, 1 - UL, 2 - BiDi
  19207. *
  19208. * WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_GET /
  19209. * WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_SET
  19210. * default_link_mapping:1, // If this is set to 1, ignore
  19211. * // link_mapping_mask for the specific tid
  19212. *
  19213. * WMI_TID_TO_LINK_MAP_LINK_MASK_GET / WMI_TID_TO_LINK_MAP_LINK_MASK_SET
  19214. * link_mapping_mask:16,
  19215. *
  19216. * rsvd:8;
  19217. */
  19218. A_UINT32 tid_to_link_map_info;
  19219. } wmi_peer_assoc_tid_to_link_map;
  19220. #define WMI_PDEV_MESH_RX_FILTER_GET(enable) WMI_GET_BITS(enable,0,1)
  19221. #define WMI_PDEV_MESH_RX_FILTER_SET(enable,value) WMI_SET_BITS(enable,0,1,value)
  19222. typedef struct {
  19223. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_mesh_rx_filter_enable_fixed_param **/
  19224. A_UINT32 tlv_header;
  19225. A_UINT32 pdev_id;
  19226. union {
  19227. struct {
  19228. A_UINT32 enable: 1, /** denotes enable/disable mesh rx filter, refer to WMI_PDEV_MESH_RX_FILTER_GET/SET macros */
  19229. reserved: 31;
  19230. };
  19231. A_UINT32 enable_word32;
  19232. };
  19233. /** Mac_Add for the RX filter **/
  19234. wmi_mac_addr link_macaddr;
  19235. } wmi_pdev_mesh_rx_filter_enable_fixed_param;
  19236. /*
  19237. * PEER assoc_flags for assoc complete:
  19238. * Bit 0: Set for peer data flush
  19239. */
  19240. #define WMI_ASSOC_FLAG_FLUSH_PEER_DATA 0x00000001
  19241. #define WMI_ASSOC_FLAG_FLUSH_PEER_DATA_GET(assoc_flags) WMI_GET_BITS(assoc_flags, 0, 1)
  19242. #define WMI_ASSOC_FLAG_FLUSH_PEER_DATA_SET(assoc_flags, value) WMI_GET_BITS(assoc_flags, 0, 1, value)
  19243. typedef struct {
  19244. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_complete_cmd_fixed_param */
  19245. /** peer MAC address */
  19246. wmi_mac_addr peer_macaddr;
  19247. /** VDEV id */
  19248. A_UINT32 vdev_id;
  19249. /** assoc = 1 reassoc = 0 */
  19250. A_UINT32 peer_new_assoc;
  19251. /** peer associd (16 bits) */
  19252. A_UINT32 peer_associd;
  19253. /** peer station flags: see definition above */
  19254. A_UINT32 peer_flags;
  19255. /** negotiated capabilities (lower 16 bits)*/
  19256. A_UINT32 peer_caps;
  19257. /** Listen interval */
  19258. A_UINT32 peer_listen_intval;
  19259. /** HT capabilities of the peer */
  19260. A_UINT32 peer_ht_caps;
  19261. /** maximum rx A-MPDU length */
  19262. A_UINT32 peer_max_mpdu;
  19263. /** mpdu density of the peer in usec(0 to 16) */
  19264. A_UINT32 peer_mpdu_density;
  19265. /** peer rate capabilities see flags above */
  19266. A_UINT32 peer_rate_caps;
  19267. /** num spatial streams */
  19268. A_UINT32 peer_nss;
  19269. /** VHT capabilities of the peer */
  19270. A_UINT32 peer_vht_caps;
  19271. /** phy mode */
  19272. A_UINT32 peer_phymode;
  19273. /** HT Operation Element of the peer. Five bytes packed in 2
  19274. * INT32 array and filled from lsb to msb.
  19275. * Note that the size of array peer_ht_info[] cannotbe changed
  19276. * without breaking WMI Compatibility. */
  19277. A_UINT32 peer_ht_info[2];
  19278. /** total number of negotiated legacy rate set. Also the sizeof
  19279. * peer_legacy_rates[] */
  19280. A_UINT32 num_peer_legacy_rates;
  19281. /** total number of negotiated ht rate set. Also the sizeof
  19282. * peer_ht_rates[] */
  19283. A_UINT32 num_peer_ht_rates;
  19284. /**
  19285. * Bitmap providing the mapping of bandwidths to max Rx NSS for this peer
  19286. * in VHT160 / VHT80+80 Mode.
  19287. * As per the New IEEE 802.11 Update, the AP & Peer could advertise and
  19288. * handshake with the Max Rx NSS differing for different bandwidths
  19289. * instead of a single max Rx NSS Value.
  19290. * Some QCA chipsets have to advertise a different max Rx NSS value for
  19291. * 160 MHz and 80MHz.
  19292. *
  19293. * bit[2:0] : Represents value of Rx NSS for VHT 160 MHz
  19294. * bit[5:3] : Represents value of Rx NSS for VHT 80_80 MHz -
  19295. * Extended NSS support
  19296. * bit[30:6]: Reserved
  19297. * bit[31] : MSB(0/1): 1 in case of valid data sent from Host
  19298. */
  19299. A_UINT32 peer_bw_rxnss_override;
  19300. /* 802.11ax capabilities */
  19301. wmi_ppe_threshold peer_ppet;
  19302. A_UINT32 peer_he_cap_info; /* protocol-defined HE / 11ax capability flags */
  19303. A_UINT32 peer_he_ops; /* HE operation contains BSS color */
  19304. A_UINT32 peer_he_cap_phy[WMI_MAX_HECAP_PHY_SIZE];
  19305. A_UINT32 peer_he_mcs; /* Indicates number of HE MCS TLV present */
  19306. /* 2nd DWORD of 11ax MAC Capabilities */
  19307. A_UINT32 peer_he_cap_info_ext;
  19308. /*
  19309. * bit 0 : Indicated support for RX 1xLTF + 0.4us
  19310. * bit 1 : Indicates support for RX 2xLTF + 0.4us
  19311. * bit 2 : Indicates support for 2xLTF in 160/80+80 MHz HE PPDU
  19312. * bit[4:3] : Indicates support for DL OFDMA
  19313. * Refer to enum WMI_HE_RX_DL_OFDMA_SUPPORT_x
  19314. * bit[6:5] : Indicates support for DL MU-MIMO
  19315. * Refer to enum WMI_HE_RX_DL_MUMIMO_SUPPORT_x
  19316. * bit[31:7] : Reserved
  19317. * Refer to WMI_HE_CAP_xx_LTF_xxx_SUPPORT_GET/SET macros
  19318. */
  19319. A_UINT32 peer_he_cap_info_internal;
  19320. /* min data rate to be used in Mbps */
  19321. A_UINT32 min_data_rate;
  19322. /** HE 6 GHz Band Capabilities of the peer.
  19323. * (Defined in 9.4.2.261 HE 6 GHz Band Capabilities element in
  19324. * 802.11ax_D5.0.)
  19325. * valid when WMI_PEER_HE is set and WMI_PEER_VHT/HT are not set.
  19326. */
  19327. A_UINT32 peer_he_caps_6ghz;
  19328. /* bit[0-7] : sta_type
  19329. * bit[8-31]: reserved
  19330. * Refer to enum WMI_PEER_STA_TYPE for sta_type values.
  19331. * Refer to WMI_PEER_STA_TYPE_GET/SET macros.
  19332. */
  19333. A_UINT32 sta_type;
  19334. /*
  19335. * @bss_max_idle_option - Parameters exchanged for BSS Max Idle capability.
  19336. * bit 0 : If set, only a protected frame indicates activity.
  19337. * If cleared, either an unprotected or a protected frame
  19338. * indicates activity.
  19339. * Refer to the WMI_PEER_ASSOC_[SET,GET]_BSS_MAX_IDLE_OPTION
  19340. * macros.
  19341. * bit [1:15] : Reserved
  19342. * bit [16:31] : Max idle period in units of 1000 TUs
  19343. * Refer to the WMI_PEER_ASSOC_[SET,GET]_BSS_MAX_IDLE_PERIOD
  19344. * macros.
  19345. */
  19346. A_UINT32 bss_max_idle_option;
  19347. /*
  19348. * Connected AP auth mode values are from WMI_AUTH_ enum.
  19349. * The target shall ignore an auth_mode value of 0 / WMI_AUTH_NONE,
  19350. * due to ambiguity whether a zero value was provided explicitly or
  19351. * simply as a default.
  19352. */
  19353. A_UINT32 auth_mode;
  19354. /* Refer to WMI_PEER_EXT_xxx defs */
  19355. A_UINT32 peer_flags_ext;
  19356. /* 802.11be capabilities and other params */
  19357. A_UINT32 puncture_20mhz_bitmap; /* each bit indicates one 20Mhz bw puntured */
  19358. /* EHT mac capabilities from BSS beacon EHT cap IE, total WMI_MAX_EHTCAP_MAC_SIZE*A_UINT32 bits */
  19359. A_UINT32 peer_eht_cap_mac[WMI_MAX_EHTCAP_MAC_SIZE];
  19360. /* EHT phy capabilities from BSS beacon EHT cap IE, total WMI_MAX_EHTCAP_PHY_SIZE*A_UINT32 bits */
  19361. A_UINT32 peer_eht_cap_phy[WMI_MAX_EHTCAP_PHY_SIZE];
  19362. A_UINT32 peer_eht_ops;
  19363. wmi_ppe_threshold peer_eht_ppet;
  19364. A_UINT32 assoc_flags;
  19365. /* Following this struct are the TLV's:
  19366. * A_UINT8 peer_legacy_rates[];
  19367. * A_UINT8 peer_ht_rates[];
  19368. * wmi_vht_rate_set peer_vht_rates; <-- VHT capabilities of the peer
  19369. * WMI_he_rate_set_peer_he_rates; <-- HE capabilities of the peer
  19370. * wmi_peer_assoc_mlo_params mlo_params[0,1]; <-- MLO parameters opt. TLV
  19371. * Only present for MLO peers.
  19372. * For non-MLO peers the array length should be 0.
  19373. * wmi_eht_rate_set peer_eht_rates; <-- EHT capabilities of the peer
  19374. * wmi_peer_assoc_mlo_partner_link_params link_info[] <-- partner link info
  19375. * wmi_peer_assoc_tid_to_link_map[] <-- tid to link_map info
  19376. */
  19377. } wmi_peer_assoc_complete_cmd_fixed_param;
  19378. typedef struct {
  19379. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_ap_oper_bw_cmd_fixed_param */
  19380. A_UINT32 vdev_id;
  19381. A_UINT32 ap_phymode; /* contains a WLAN_PHY_MODE value */
  19382. } wmi_vdev_report_ap_oper_bw_cmd_fixed_param;
  19383. /* WDS Entry Flags */
  19384. #define WMI_WDS_FLAG_STATIC 0x1 /* Disable aging & learning */
  19385. typedef struct {
  19386. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_add_wds_entry_cmd_fixed_param */
  19387. /** peer MAC address */
  19388. wmi_mac_addr peer_macaddr;
  19389. /** wds MAC addr */
  19390. wmi_mac_addr wds_macaddr;
  19391. /* Flags associated with WDS entry - see WMI_WDS_FLAG defs */
  19392. A_UINT32 flags;
  19393. A_UINT32 vdev_id;
  19394. } wmi_peer_add_wds_entry_cmd_fixed_param;
  19395. #define WMI_CHAN_INFO_START_RESP 0
  19396. #define WMI_CHAN_INFO_END_RESP 1
  19397. /* deprecated but maintained as aliases: old names containing typo */
  19398. #define WMI_CHAN_InFO_START_RESP WMI_CHAN_INFO_START_RESP
  19399. #define WMI_CHAN_InFO_END_RESP WMI_CHAN_INFO_END_RESP
  19400. /* end deprecated */
  19401. #define WMI_CHAN_INFO_ENTRY_RESP 2
  19402. typedef struct {
  19403. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_remove_wds_entry_cmd_fixed_param */
  19404. /** wds MAC addr */
  19405. wmi_mac_addr wds_macaddr;
  19406. A_UINT32 vdev_id;
  19407. } wmi_peer_remove_wds_entry_cmd_fixed_param;
  19408. typedef struct {
  19409. /** peer MAC address */
  19410. wmi_mac_addr peer_macaddr;
  19411. } wmi_peer_q_empty_callback_event;
  19412. /*
  19413. * Command to update an already existing WDS entry. Different address setting
  19414. * combinations are possible.
  19415. *
  19416. * Valid wds and peer -> Associated WDS entry peer ptr & flags will be updated.
  19417. * Valid wds and null peer -> Associated WDS entry flags will be updated.
  19418. * Null wds and Valid peer -> Flags will be updated for all WDS entries behind the peer.
  19419. * Null wds and peer -> Flags will be updated for all WDS entries.
  19420. */
  19421. typedef struct {
  19422. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_update_wds_entry_cmd_fixed_param */
  19423. /** peer MAC address */
  19424. wmi_mac_addr peer_macaddr;
  19425. /** wds MAC addr */
  19426. wmi_mac_addr wds_macaddr;
  19427. /* Flags associated with WDS entry */
  19428. A_UINT32 flags;
  19429. A_UINT32 vdev_id;
  19430. } wmi_peer_update_wds_entry_cmd_fixed_param;
  19431. /**
  19432. * Channel info WMI event
  19433. */
  19434. typedef struct {
  19435. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param */
  19436. /** Error code */
  19437. A_UINT32 err_code;
  19438. /** Channel freq */
  19439. A_UINT32 freq;
  19440. /** Read flags */
  19441. A_UINT32 cmd_flags;
  19442. /** Noise Floor value */
  19443. A_UINT32 noise_floor;
  19444. /** rx clear count */
  19445. A_UINT32 rx_clear_count;
  19446. /** cycle count */
  19447. A_UINT32 cycle_count;
  19448. /** channel tx power per range in 0.5dBm steps */
  19449. A_UINT32 chan_tx_pwr_range;
  19450. /** channel tx power per throughput */
  19451. A_UINT32 chan_tx_pwr_tp;
  19452. /** rx frame count (cumulative) */
  19453. A_UINT32 rx_frame_count;
  19454. /** BSS rx cycle count */
  19455. A_UINT32 my_bss_rx_cycle_count;
  19456. /** b-mode data rx time (units are microseconds) */
  19457. A_UINT32 rx_11b_mode_data_duration;
  19458. /** tx frame count */
  19459. A_UINT32 tx_frame_cnt;
  19460. /** mac clock */
  19461. A_UINT32 mac_clk_mhz;
  19462. /** unique id identifying the VDEV */
  19463. A_UINT32 vdev_id;
  19464. /**
  19465. * Noise Floor value for all chain in dBm.
  19466. * If per_chain_noise_floor value is 0 then it should be ignored.
  19467. */
  19468. A_UINT32 per_chain_noise_floor[WMI_MAX_CHAINS];
  19469. /**
  19470. * Following this structure is the optional TLV:
  19471. * struct wmi_scan_blanking_params_info[0/1];
  19472. * struct wmi_cca_busy_subband_info[];
  19473. * Reporting subband CCA busy info in host requested manner.
  19474. */
  19475. } wmi_chan_info_event_fixed_param;
  19476. typedef struct {
  19477. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_cca_busy_subband_info */
  19478. A_UINT32 tlv_header;
  19479. /** rx clear count */
  19480. A_UINT32 rx_clear_count;
  19481. } wmi_cca_busy_subband_info;
  19482. /**
  19483. * The below structure contains parameters related to the scan radio
  19484. * blanking feature
  19485. */
  19486. typedef struct {
  19487. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_blanking_params_info */
  19488. A_UINT32 tlv_header;
  19489. /* scan_radio_blanking_duration:
  19490. * Cumulative scan disabled duration which indicates the total time in
  19491. * micro seconds where rx blanking was enabled on the scan radio due to
  19492. * simultaneous transmissions on the same band in the serving radio.
  19493. */
  19494. A_UINT32 scan_radio_blanking_duration;
  19495. /* scan_radio_blanking_count:
  19496. * Count of the number of times rx blanking was enabled on the scan radio
  19497. * due to simultaneous transmissions on the same band in the serving radio.
  19498. */
  19499. A_UINT32 scan_radio_blanking_count;
  19500. } wmi_scan_blanking_params_info;
  19501. typedef enum {
  19502. /* Blanking feature will be disabled */
  19503. WMI_SCAN_BLANKING_DISABLED = 0,
  19504. /* Blanking enabled only on current operating band */
  19505. WMI_SCAN_BLANKING_ENABLED,
  19506. /*
  19507. * Blanking enabled on both 5GHz and 6GHz bands when scan radio
  19508. * home channel is on either 5GHz or 6GHz bands
  19509. */
  19510. WMI_SCAN_BLANKING_ENABLED_NO_ISOLATION,
  19511. WMI_SCAN_BLANKING_MAX,
  19512. } WMI_SCAN_BLANKING_MODE;
  19513. /**
  19514. * The below three structures are the params used for converting RSSI
  19515. * from dB to dBm units.
  19516. */
  19517. typedef struct {
  19518. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_dbm_conversion_params_info */
  19519. /* Current operating bandwidth as per wmi_channel_width */
  19520. A_UINT32 curr_bw;
  19521. /* Current rx chainmask */
  19522. A_UINT32 curr_rx_chainmask;
  19523. /* 3 Bytes of xbar_config are used for RF to BB mapping*/
  19524. /* Samples of xbar_config,
  19525. * If xbar_config is 0xFAC688(hex):
  19526. * RF chains 0-7 are connected to BB chains 0-7
  19527. * here,
  19528. * bits 0 to 2 = 0, maps BB chain 0 for RF chain 0
  19529. * bits 3 to 5 = 1, maps BB chain 1 for RF chain 1
  19530. * bits 6 to 8 = 2, maps BB chain 2 for RF chain 2
  19531. * bits 9 to 11 = 3, maps BB chain 3 for RF chain 3
  19532. * bits 12 to 14 = 4, maps BB chain 4 for RF chain 4
  19533. * bits 15 to 17 = 5, maps BB chain 5 for RF chain 5
  19534. * bits 18 to 20 = 6, maps BB chain 6 for RF chain 6
  19535. * bits 21 to 23 = 7, maps BB chain 7 for RF chain 7
  19536. *
  19537. * If xbar_config is 0x688FAC(hex):
  19538. * RF chains 0-3 are connected to BB chains 4-7
  19539. * RF chains 4-7 are connected to BB chains 0-3
  19540. * here,
  19541. * bits 0 to 2 = 4, maps BB chain 4 for RF chain 0
  19542. * bits 3 to 5 = 5, maps BB chain 5 for RF chain 1
  19543. * bits 6 to 8 = 6, maps BB chain 6 for RF chain 2
  19544. * bits 9 to 11 = 7, maps BB chain 7 for RF chain 3
  19545. * bits 12 to 14 = 0, maps BB chain 0 for RF chain 4
  19546. * bits 15 to 17 = 1, maps BB chain 1 for RF chain 5
  19547. * bits 18 to 20 = 2, maps BB chain 2 for RF chain 6
  19548. * bits 21 to 23 = 3, maps BB chain 3 for RF chain 7
  19549. */
  19550. A_UINT32 xbar_config;
  19551. /* The below xlna_bypass params needed in old target architecture
  19552. * generation, not applicable for current target architecture generation.
  19553. * Values will be zero for current target architectures. */
  19554. /* Low noise amplifier bypass offset; signed integer; units are in dB */
  19555. A_INT32 xlna_bypass_offset;
  19556. /* Low noise amplifier bypass threshold; signed integer; units are in dB */
  19557. A_INT32 xlna_bypass_threshold;
  19558. /* nf_hw_dbm:
  19559. * 2D byte array of HW noise floor in dBm per chain, per 20MHz subband
  19560. * This array is filled in little endian format.
  19561. * for big-endian hosts, manual endian conversion is needed to obtain
  19562. * correct sequence of values.
  19563. */
  19564. A_INT8 nf_hw_dbm[MAX_ANTENNA_EIGHT][MAX_20MHZ_SEGMENTS];
  19565. } wmi_rssi_dbm_conversion_params_info;
  19566. typedef struct {
  19567. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_dbm_conversion_temp_offset_info */
  19568. /**
  19569. * RSSI offset based on the current temperature, signed integer,
  19570. * units are in dB
  19571. */
  19572. A_INT32 rssi_temp_offset;
  19573. } wmi_rssi_dbm_conversion_temp_offset_info;
  19574. /**
  19575. * RSSI dB to dBm conversion params event to host
  19576. */
  19577. typedef struct {
  19578. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_dbm_conversion_fixed_param */
  19579. /* PDEV id */
  19580. A_UINT32 pdev_id;
  19581. /**
  19582. * Followed by these TLVs below.
  19583. * wmi_rssi_dbm_conversion_params_info rssi_dbm_conversion_param[0 or 1]
  19584. * wmi_rssi_dbm_conversion_params_info will be sent in case of
  19585. * channel, BW, rx_chainmask change.
  19586. * wmi_rssi_dbm_conversion_temp_offset_info rssi_temp_offset[0 or 1]
  19587. * wmi_rssi_dbm_conversion_temp_offset_info will be sent when the
  19588. * RSSI temp offset changes.
  19589. */
  19590. } wmi_rssi_dbm_conversion_params_info_event_fixed_param;
  19591. /**
  19592. * Non wlan interference event
  19593. */
  19594. typedef struct {
  19595. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_cw_int */
  19596. A_UINT32 channel; /* either number or freq in mhz*/
  19597. } wlan_dcs_cw_int;
  19598. #define ath_dcs_cw_int /* DEPRECATED */ wlan_dcs_cw_int /* alias */
  19599. /**
  19600. * wlan_dcs_im_tgt_stats
  19601. *
  19602. */
  19603. typedef struct _wlan_dcs_im_tgt_stats {
  19604. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_im_tgt_stats_t */
  19605. /** current running TSF from the TSF-1 */
  19606. A_UINT32 reg_tsf32;
  19607. /** Known last frame RSSI, in case of multiple stations, if
  19608. * and at different ranges, this would not guarantee that
  19609. * this is the least RSSI.
  19610. */
  19611. A_UINT32 last_ack_rssi;
  19612. /** Sum of all the failed durations in the last one second interval.
  19613. */
  19614. A_UINT32 tx_waste_time;
  19615. /** count how many times the hal_rxerr_phy is marked, in this
  19616. * time period
  19617. */
  19618. A_UINT32 rx_time;
  19619. A_UINT32 phyerr_cnt;
  19620. /**
  19621. * WLAN IM stats from target to host
  19622. *
  19623. * Below statistics are sent from target to host periodically.
  19624. * These are collected at target as long as target is running
  19625. * and target chip is not in sleep.
  19626. *
  19627. */
  19628. /** listen time from ANI */
  19629. A_INT32 listen_time;
  19630. /** tx frame count, MAC_PCU_TX_FRAME_CNT_ADDRESS */
  19631. A_UINT32 reg_tx_frame_cnt;
  19632. /** rx frame count, MAC_PCU_RX_FRAME_CNT_ADDRESS */
  19633. A_UINT32 reg_rx_frame_cnt;
  19634. /** rx clear count, MAC_PCU_RX_CLEAR_CNT_ADDRESS */
  19635. A_UINT32 reg_rxclr_cnt;
  19636. /** total cycle counts MAC_PCU_CYCLE_CNT_ADDRESS */
  19637. A_UINT32 reg_cycle_cnt; /* delta cycle count */
  19638. /** extension channel rx clear count */
  19639. A_UINT32 reg_rxclr_ext_cnt;
  19640. /** OFDM phy error counts, MAC_PCU_PHY_ERR_CNT_1_ADDRESS */
  19641. A_UINT32 reg_ofdm_phyerr_cnt;
  19642. /** CCK phy error count, MAC_PCU_PHY_ERR_CNT_2_ADDRESS */
  19643. A_UINT32 reg_cck_phyerr_cnt; /* CCK err count since last reset, read from register */
  19644. /** Channel noise floor (units are dBm) */
  19645. A_INT32 chan_nf;
  19646. /** BSS rx cycle count */
  19647. A_UINT32 my_bss_rx_cycle_count;
  19648. } wlan_dcs_im_tgt_stats_t;
  19649. typedef struct wlan_dcs_awgn_info {
  19650. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_awgn_int_t */
  19651. A_UINT32 tlv_header;
  19652. /** Channel width (20, 40, 80, 80+80, 160, 320 ) enum wmi_channel_width */
  19653. A_UINT32 channel_width;
  19654. /** Primary channel frequency (MHz) */
  19655. A_UINT32 chan_freq;
  19656. /** center frequency (MHz) first segment */
  19657. A_UINT32 center_freq0;
  19658. /** center frequency (MHz) second segment */
  19659. A_UINT32 center_freq1;
  19660. /*
  19661. * Indicates which 20MHz segments contain interference
  19662. * 320 MHz: bits 0-15
  19663. * 160 MHz: bits 0-7
  19664. * 80 MHz: bits 0-3
  19665. * Bitmap - Each bit position will indicate 20MHz in which
  19666. * interference is seen. (Valid 16 bits out of 32 bit integer)
  19667. * Note: for 11be, the interference present 20MHz can be punctured
  19668. * for better channel utilization.
  19669. */
  19670. A_UINT32 chan_bw_interference_bitmap;
  19671. } wmi_dcs_awgn_int_t;
  19672. typedef struct wlan_dcs_obss_info {
  19673. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_obss_int_t */
  19674. A_UINT32 tlv_header;
  19675. /** Channel width (20, 40, 80, 80+80, 160, 320) enum wmi_channel_width */
  19676. A_UINT32 channel_width;
  19677. /** Primary channel frequency (MHz) */
  19678. A_UINT32 chan_freq;
  19679. /** center frequency (MHz) first segment */
  19680. A_UINT32 center_freq0;
  19681. /** center frequency (MHz) second segment */
  19682. A_UINT32 center_freq1;
  19683. /* chan_bw_interference_bitmap:
  19684. * Indicates which 20MHz segments contain interference
  19685. * 320 MHz: bits 0-15
  19686. * 160 MHz: bits 0-7
  19687. * 80 MHz: bits 0-3
  19688. * Within the bitmap, Bit-0 represents lowest 20Mhz, Bit-1 represents
  19689. * second lowest 20Mhz and so on.
  19690. * Each bit position will indicate 20MHz in which interference is seen.
  19691. * (Valid 16 bits out of 32 bit integer)
  19692. * Note: for 11be, the interference present 20MHz can be punctured
  19693. * for better channel utilization.
  19694. */
  19695. A_UINT32 chan_bw_interference_bitmap;
  19696. } wmi_dcs_obss_int_t;
  19697. /**
  19698. * wmi_dcs_interference_event_t
  19699. *
  19700. * Right now this is event and stats together. Partly this is
  19701. * because cw interference is handled in target now. This
  19702. * can be done at host itself, if we can carry the NF alone
  19703. * as a stats event. In future this would be done and this
  19704. * event would carry only stats.
  19705. */
  19706. typedef struct {
  19707. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_interference_event_fixed_param */
  19708. /**
  19709. * Type of the event present, either the cw interference event, or the wlan_im stats, or AWGN int
  19710. * ATH_CAP_DCS_CWIM 0x01
  19711. * ATH_CAP_DCS_WLANIM 0x02
  19712. * ATH_CAP_DCS_AGWNIM 0x04
  19713. * reserved (AFC) 0x08
  19714. * ATH_CAP_DCS_OBSSIM 0x10
  19715. */
  19716. A_UINT32 interference_type; /* type of interference, wlan, cw, or AWGN */
  19717. /** pdev_id for identifying the MAC
  19718. * See macros starting with WMI_PDEV_ID_ for values.
  19719. */
  19720. A_UINT32 pdev_id;
  19721. /** VDEV ID for identifying DCS stats reported at VDEV level.
  19722. * Should be interpreted only when WMI_SERVICE_VDEV_DCS_STATS_SUPPORT
  19723. * service cap is advertized by target.
  19724. * And value would be 0xFF if DCS stats is still configured at PDEV level.
  19725. */
  19726. A_UINT32 vdev_id;
  19727. /*
  19728. * Following this struct are these TLVs. Note that they are both array of structures
  19729. * but can have at most one element. Which TLV is empty or has one element depends
  19730. * on the field interference_type. This is to emulate an union with cw_int and wlan_stat
  19731. * elements (not arrays). union { wlan_dcs_cw_int cw_int; wlan_dcs_im_tgt_stats_t wlan_stat; } int_event;
  19732. *
  19733. * wlan_dcs_cw_int cw_int[]; <-- cw_interference event
  19734. * wlan_dcs_im_tgt_stats_t wlan_stat[]; <-- wlan im interference stats
  19735. * wmi_dcs_awgn_int_t awgn_int[]; <-- Additive white Gaussian noise (AWGN) interference
  19736. * wmi_dcs_obss_int_t obss_int[]; <-- Overlapping Basic Service Set (OBSS) interference
  19737. */
  19738. } wmi_dcs_interference_event_fixed_param;
  19739. enum wmi_peer_mcast_group_action {
  19740. wmi_peer_mcast_group_action_add = 0,
  19741. wmi_peer_mcast_group_action_del = 1
  19742. };
  19743. #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_M 0x1
  19744. #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_S 0
  19745. #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_M 0x2
  19746. #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_S 1
  19747. #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_M 0x4 /* flag to exclude an ip while filtering. set to exclude */
  19748. #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_S 2
  19749. #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_M 0x8 /* flag to say ipv4/ipv6. Will be set for ipv6 */
  19750. #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_S 3
  19751. #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_M 0x10 /* delete all mcast table entries. */
  19752. #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_S 4
  19753. /* multicast group membership commands */
  19754. /* TODO: Converting this will be tricky since it uses an union.
  19755. Also, the mac_addr is not aligned. We will convert to the wmi_mac_addr */
  19756. typedef struct {
  19757. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcast_group_cmd_fixed_param */
  19758. A_UINT32 flags;
  19759. wmi_mac_addr ucast_mac_addr;
  19760. /* in network byte order */
  19761. /* for ipv4, bytes (12-15) should contain ip address and other lower bytes 0. ipv6 should have all bytes valid */
  19762. A_UINT8 mcast_ip_addr[16];
  19763. /* for ipv6, all 16 bytes has to be valid; for ipv4 last 4 bytes(12-15) has to be valid, rest all 0s */
  19764. A_UINT8 mcast_ip_mask[16];/* zero out lower bytes if ipv4*/
  19765. /* number of address filters - irrespective of ipv4/ipv6 addresses */
  19766. A_UINT32 num_filter_addr;
  19767. /* this array should contain the src IPs that are to be filtered during find
  19768. The array should be packed.
  19769. If there are 2 ipv4 addresses, there should be 8 bytes and rest all 0s */
  19770. A_UINT8 filter_addr[64]; /* 16 ipv4 addresses or 4 ipv6 addresses */
  19771. A_UINT8 vdev_id; /* vdev of this mcast group */
  19772. } wmi_peer_mcast_group_cmd_fixed_param;
  19773. /** Offload Scan and Roaming related commands */
  19774. /** The FW performs 2 different kinds of offload scans independent
  19775. * of host. One is Roam scan which is primarily performed on a
  19776. * station VDEV after association to look for a better AP that
  19777. * the station VDEV can roam to. The second scan is connect scan
  19778. * which is mainly performed when the station is not associated
  19779. * and to look for a matching AP profile from a list of
  19780. * configured profiles. */
  19781. /* flags for roam_scan_mode_cmd
  19782. * indicate the status (success/fail) of wmi_roam_scan_mode cmd through WMI_ROAM_EVENTID */
  19783. #define WMI_ROAM_SCAN_MODE_FLAG_REPORT_STATUS 0x1
  19784. /**
  19785. * WMI_ROAM_SCAN_MODE: Set Roam Scan mode
  19786. * the roam scan mode is one of the periodic, RSSI change, both, none.
  19787. * None : Disable Roam scan. No Roam scan at all.
  19788. * Periodic : Scan periodically with a configurable period.
  19789. * Rssi change : Scan when ever RSSI to current AP changes by the threshold value
  19790. * set by WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD command.
  19791. * Both : Both of the above (scan when either period expires or rss to current AP changes by X amount)
  19792. *
  19793. */
  19794. typedef struct {
  19795. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */
  19796. A_UINT32 roam_scan_mode;
  19797. A_UINT32 vdev_id;
  19798. A_UINT32 flags; /* see WMI_ROAM_SCAN_MODE_FLAG defs */
  19799. /*
  19800. * Minimum duration allowed between two consecutive roam scans.
  19801. * Roam scan is not allowed, if duration between two consecutive
  19802. * roam scans is less than this time.
  19803. */
  19804. A_UINT32 min_delay_btw_scans; /* In msec */
  19805. /*
  19806. * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
  19807. * positions) showing for which roam_trigger_reasons the
  19808. * min_delay_btw_scans constraint should be applied.
  19809. * 0x0 means there is no time restrictions between successive roam scans.
  19810. */
  19811. A_UINT32 min_delay_roam_trigger_reason_bitmask;
  19812. } wmi_roam_scan_mode_fixed_param;
  19813. #define WMI_ROAM_SCAN_MODE_NONE 0x0
  19814. #define WMI_ROAM_SCAN_MODE_PERIODIC 0x1
  19815. #define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2
  19816. #define WMI_ROAM_SCAN_MODE_BOTH 0x3
  19817. /* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */
  19818. #define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4
  19819. typedef struct {
  19820. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */
  19821. A_UINT32 vdev_id;
  19822. A_UINT32 command_arg;
  19823. } wmi_roam_scan_cmd_fixed_param;
  19824. #define WMI_ROAM_SCAN_STOP_CMD 0x1
  19825. /** flags for WMI_ROAM_SCAN_RSSI_THRESHOLD command:
  19826. * BIT 0 -> Indicate High RSSI Trigger support is enabled for roaming
  19827. * from 5 GHz to 6 GHz Band
  19828. * BIT 1-31 -> Reserved
  19829. */
  19830. #define WMI_ROAM_SCAN_RSSI_THRESHOLD_FLAG_ROAM_HI_RSSI_EN_ON_5G 0x1
  19831. /**
  19832. * WMI_ROAM_SCAN_RSSI_THRESHOLD : set scan RSSI threshold
  19833. * scan RSSI threshold is the RSSI threshold below which the FW will start running Roam scans.
  19834. * Applicable when WMI_ROAM_SCAN_MODE is not set to none.
  19835. */
  19836. typedef struct {
  19837. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param */
  19838. /** unique id identifying the VDEV, generated by the caller */
  19839. A_UINT32 vdev_id;
  19840. /** roam scan RSSI threshold */
  19841. A_UINT32 roam_scan_rssi_thresh;
  19842. /** When using Hw generated beacon RSSI interrupts */
  19843. A_UINT32 roam_rssi_thresh_diff;
  19844. /** 5G scan max count */
  19845. A_UINT32 hirssi_scan_max_count;
  19846. /** 5G scan RSSI change threshold value */
  19847. A_UINT32 hirssi_scan_delta;
  19848. /** 5G scan upper bound */
  19849. A_UINT32 hirssi_upper_bound;
  19850. /** roam scan RSSI threshold for 5G band.
  19851. * offset from roam_scan_rssi_thres, in dB units
  19852. */
  19853. A_INT32 rssi_thresh_offset_5g;
  19854. /** flags for WMI_ROAM_SCAN_RSSI_THRESHOLD Command */
  19855. A_UINT32 flags; /* see WMI_ROAM_SCAN_RSSI_THRESHOLD_FLAG defs */
  19856. /* The TLVs will follow.
  19857. * wmi_roam_scan_extended_threshold_param extended_param;
  19858. * wmi_roam_earlystop_rssi_thres_param earlystop_param;
  19859. * wmi_roam_dense_thres_param dense_param;
  19860. * wmi_roam_bg_scan_roaming_param bg_scan_param;
  19861. * wmi_roam_data_rssi_roaming_param data_rssi_param;
  19862. */
  19863. } wmi_roam_scan_rssi_threshold_fixed_param;
  19864. /**
  19865. * WMI_ROAM_BTM_CONFIG_CMDID : set BTM (BSS Transition Management. 802.11v) offload config
  19866. * Applicable only when WMI_ROAM_SCAN_MODE is enabled with WMI_ROAM_SCAN_MODE_ROAMOFFLOAD
  19867. */
  19868. /**
  19869. * btm_config.flags
  19870. * BIT 0 : Enable/Disable the BTM offload.
  19871. * BIT 1-2 : Action on non matching candidate with cache. Used WMI_ROAM_BTM_OFLD_NON_MATCHING_CND_XXX
  19872. * BIT 3-5 : Roaming handoff decisions. Use WMI_ROAM_BTM_OFLD_CNDS_MATCH_XXX
  19873. * BIT 6 : Enable/Disable solicited BTM
  19874. * BIT 7 : Roam BTM candidates based on the roam score instead of BTM preferred value
  19875. * BIT 8 : BTM query preference over 11k neighbor report request
  19876. * BIT 9 : Send BTM query with preferred candidates list
  19877. * BIT 10 : Forward MBO BTM Request to Host if MBO ASSOC RETRY attribute is set
  19878. * BIT 11-31 : Reserved
  19879. */
  19880. #define WMI_ROAM_BTM_SET_ENABLE(flags, val) WMI_SET_BITS(flags, 0, 1, val)
  19881. #define WMI_ROAM_BTM_GET_ENABLE(flags) WMI_GET_BITS(flags, 0, 1)
  19882. #define WMI_ROAM_BTM_SET_NON_MATCHING_CND_ACTION(flags, val) WMI_SET_BITS(flags, 1, 2, val)
  19883. #define WMI_ROAM_BTM_GET_NON_MATCHING_CND_ACTION(flags) WMI_GET_BITS(flags, 1, 2)
  19884. #define WMI_ROAM_BTM_SET_CNDS_MATCH_CONDITION(flags, val) WMI_SET_BITS(flags, 3, 3, val)
  19885. #define WMI_ROAM_BTM_GET_CNDS_MATCH_CONDITION(flags) WMI_GET_BITS(flags, 3, 3)
  19886. #define WMI_ROAM_BTM_SET_SOLICITED_BTM_ENABLE(flags, val) WMI_SET_BITS(flags, 6, 1, val)
  19887. #define WMI_ROAM_BTM_GET_SOLICITED_BTM_ENABLE(flags) WMI_GET_BITS(flags, 6, 1)
  19888. #define WMI_ROAM_BTM_SET_CNDS_SELECT_BASED_ON_SCORE(flags, val) WMI_SET_BITS(flags, 7, 1, val)
  19889. #define WMI_ROAM_BTM_GET_CNDS_SELECT_BASED_ON_SCORE(flags) WMI_GET_BITS(flags, 7, 1)
  19890. #define WMI_ROAM_BTM_SET_BTM_QUERY_PREFERENCE_OVER_11K(flags, val) WMI_SET_BITS(flags, 8, 1, val)
  19891. #define WMI_ROAM_BTM_GET_BTM_QUERY_PREFERENCE_OVER_11K(flags) WMI_GET_BITS(flags, 8, 1)
  19892. #define WMI_ROAM_BTM_SET_BTM_QUERY_WITH_CANDIDATE_LIST(flags, val) WMI_SET_BITS(flags, 9, 1, val)
  19893. #define WMI_ROAM_BTM_GET_BTM_QUERY_WITH_CANDIDATE_LIST(flags) WMI_GET_BITS(flags, 9, 1)
  19894. #define WMI_ROAM_BTM_SET_FORWARD_MBO_ASSOC_RETRY_BTM_REQUEST_TO_HOST(flags, val) WMI_SET_BITS(flags, 10, 1, val)
  19895. #define WMI_ROAM_BTM_GET_FORWARD_MBO_ASSOC_RETRY_BTM_REQUEST_TO_HOST(flags) WMI_GET_BITS(flags, 10, 1)
  19896. /** 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 */
  19897. #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 */
  19898. #define WMI_ROAM_BTM_NON_MATCHING_CNDS_NO_SCAN_FORWARD 1 /** Does not allow roam scan and forward BTM frame to host */
  19899. /** reserved upto 3 */
  19900. /** 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 */
  19901. #define WMI_ROAM_BTM_CNDS_MATCH_EXACT 0 /** Exactly matched with roam candidate list to BTM candidates */
  19902. #define WMI_ROAM_BTM_CNDS_MATCH_AT_LEAST_TOP 1 /** At least one or more top priority bssid matched */
  19903. /** reserved upto 7 */
  19904. typedef struct {
  19905. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_btm_config_fixed_param */
  19906. A_UINT32 tlv_header;
  19907. /** unique id identifying the VDEV on which BTM is enabled/disabled */
  19908. A_UINT32 vdev_id;
  19909. /** BTM configuration control flags */
  19910. A_UINT32 flags;
  19911. /* BTM query timeout, unit: milliseconds
  19912. * valid value range: 1-10000,
  19913. * default value: 100 will be set if invalid value is given
  19914. */
  19915. A_UINT32 solicited_timeout_ms;
  19916. /* Maximum attempt of solicited BTM
  19917. * If continuous failure reach to this value, solicited BTM to current
  19918. * ESS will be disabled.
  19919. * valid value range: 1 - (2^32-1). (2^32)-1 means sending forever
  19920. * Default value: 3 will be set if invalid value is given
  19921. */
  19922. A_UINT32 max_attempt_cnt;
  19923. /* Time to stick to current AP after BTM, unit: seconds
  19924. * valid value range: 0 -(2^16-1).
  19925. * Either 0 or (2^16)-1 means stick to AP forever.
  19926. * Default value: 300 will be set if invalid value is given
  19927. */
  19928. A_UINT32 stick_time_seconds;
  19929. /* Disassoc time threshold in milliseconds
  19930. * This time threshold allows the target to judge whether the STA
  19931. * should can move to another AP immediately, or if the STA has time
  19932. * to calculate roaming candidates.
  19933. * If the disassoc_timer_threshold value is 0x0, the field should be
  19934. * disregarded.
  19935. */
  19936. A_UINT32 disassoc_timer_threshold;
  19937. /*
  19938. * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
  19939. * positions) showing for which roam_trigger_reasons the
  19940. * btm query needs to be sent.
  19941. * If roam trigger reasons are unspecified, btm_bitmap will be 0x0.
  19942. */
  19943. A_UINT32 btm_bitmap;
  19944. /*
  19945. * Consider AP as roam candidate only if AP score is better than
  19946. * btm_candidate_min_score for BTM roam trigger
  19947. */
  19948. A_UINT32 btm_candidate_min_score;
  19949. } wmi_btm_config_fixed_param;
  19950. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED 0x0
  19951. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LINEAR 0x1
  19952. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LOG 0x2
  19953. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_EXP 0x3
  19954. typedef struct {
  19955. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_extended_threshold_param */
  19956. A_UINT32 boost_threshold_5g; /** RSSI threshold above which 5GHz RSSI is favored */
  19957. A_UINT32 penalty_threshold_5g; /** RSSI threshold below which 5GHz RSSI is penalized */
  19958. A_UINT32 boost_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
  19959. A_UINT32 boost_factor_5g; /** factor by which 5GHz RSSI is boosted */
  19960. A_UINT32 penalty_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
  19961. A_UINT32 penalty_factor_5g; /** factor by which 5GHz RSSI is penalized */
  19962. A_UINT32 max_boost_5g; /** maximum boost that can be applied to a 5GHz RSSI */
  19963. A_UINT32 max_penalty_5g; /** maximum penalty that can be applied to a 5GHz RSSI */
  19964. A_UINT32 good_rssi_threshold; /** RSSI below which roam is kicked in by background scan, although RSSI is still good */
  19965. } wmi_roam_scan_extended_threshold_param;
  19966. /**
  19967. * WMI_ROAM_SCAN_PERIOD: period for roam scan.
  19968. * Applicable when the scan mode is Periodic or both.
  19969. */
  19970. typedef struct {
  19971. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param */
  19972. /** unique id identifying the VDEV, generated by the caller */
  19973. A_UINT32 vdev_id;
  19974. /** roam scan period value */
  19975. A_UINT32 roam_scan_period; /* units = milliseconds */
  19976. /** Aging for Roam scans */
  19977. A_UINT32 roam_scan_age;
  19978. /** Inactivity monitoring time to consider device is in inactive state with data count is less than roam_inactive_count */
  19979. A_UINT32 inactivity_time_period; /* units = milliseconds */
  19980. /** Maximum allowed data packets count during inactivity_time_period */
  19981. A_UINT32 roam_inactive_count;
  19982. /** New roam scan period after device is in inactivity state */
  19983. A_UINT32 roam_scan_period_after_inactivity; /* units = milliseconds */
  19984. /** roam full scan period value */
  19985. A_UINT32 roam_full_scan_period; /* units = milliseconds */
  19986. } wmi_roam_scan_period_fixed_param;
  19987. /**
  19988. * WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD : RSSI delta to trigger the roam scan.
  19989. * Rssi change threshold used when mode is Rssi change (or) Both.
  19990. * The FW will run the roam scan when ever the RSSI changes (up or down) by the value set by this parameter.
  19991. * Note scan is triggered based on the RSSI threshold condition set by WMI_ROAM_SCAN_RSSI_THRESHOLD
  19992. */
  19993. typedef struct {
  19994. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param */
  19995. /** unique id identifying the VDEV, generated by the caller */
  19996. A_UINT32 vdev_id;
  19997. /** roam scan RSSI change threshold value */
  19998. A_UINT32 roam_scan_rssi_change_thresh;
  19999. /** When using Hw generated beacon RSSI interrupts */
  20000. A_UINT32 bcn_rssi_weight;
  20001. /** Minimum delay between two 5G scans */
  20002. A_UINT32 hirssi_delay_btw_scans;
  20003. } wmi_roam_scan_rssi_change_threshold_fixed_param;
  20004. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1
  20005. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2
  20006. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3
  20007. #define WMI_ROAM_SCAN_LIST_FLAG_FLUSH_STATIC 0x1 /* Flush static roam scan channel list in FW */
  20008. #define WMI_ROAM_SCAN_LIST_FLAG_FLUSH_DYNAMIC 0x2 /* Flush dynamic roam scan channel list in FW */
  20009. /**
  20010. * TLV for roaming channel list
  20011. */
  20012. typedef struct {
  20013. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */
  20014. /** unique id identifying the VDEV, generated by the caller */
  20015. A_UINT32 vdev_id;
  20016. /** WMI_CHAN_LIST_TAG */
  20017. A_UINT32 chan_list_type;
  20018. /** # if channels to scan */
  20019. A_UINT32 num_chan;
  20020. A_UINT32 flags; /* refer to WMI_ROAM_SCAN_LIST_FLAG_xxx defs */
  20021. /**
  20022. * TLV (tag length value) parameters follow the wmi_roam_chan_list
  20023. * structure. The TLV's are:
  20024. * A_UINT32 channel_list[]; // in MHz
  20025. **/
  20026. } wmi_roam_chan_list_fixed_param;
  20027. /** Authentication modes */
  20028. enum {
  20029. WMI_AUTH_NONE, /* no upper level auth */
  20030. WMI_AUTH_OPEN, /* open */
  20031. WMI_AUTH_SHARED, /* shared-key */
  20032. WMI_AUTH_8021X, /* 802.1x */
  20033. WMI_AUTH_AUTO, /* Auto */
  20034. WMI_AUTH_WPA, /* WPA */
  20035. WMI_AUTH_RSNA, /* WPA2/RSNA */
  20036. WMI_AUTH_CCKM, /* CCKM */
  20037. WMI_AUTH_WAPI, /* WAPI */
  20038. WMI_AUTH_AUTO_PSK,
  20039. WMI_AUTH_WPA_PSK,
  20040. WMI_AUTH_RSNA_PSK,
  20041. WMI_AUTH_WAPI_PSK,
  20042. WMI_AUTH_FT_RSNA, /* 11r FT */
  20043. WMI_AUTH_FT_RSNA_PSK,
  20044. WMI_AUTH_RSNA_PSK_SHA256,
  20045. WMI_AUTH_RSNA_8021X_SHA256,
  20046. WMI_AUTH_CCKM_WPA,
  20047. WMI_AUTH_CCKM_RSNA,
  20048. WMI_AUTH_RSNA_FILS_SHA256,
  20049. WMI_AUTH_RSNA_FILS_SHA384,
  20050. WMI_AUTH_RSNA_SUITE_B_8021X_SHA256,
  20051. WMI_AUTH_RSNA_SUITE_B_8021X_SHA384,
  20052. WMI_AUTH_FT_RSNA_SAE,
  20053. WMI_AUTH_FT_RSNA_SUITE_B_8021X_SHA384,
  20054. WMI_AUTH_FT_RSNA_FILS_SHA256,
  20055. WMI_AUTH_FT_RSNA_FILS_SHA384,
  20056. WMI_AUTH_WPA3_SAE,
  20057. WMI_AUTH_WPA3_OWE,
  20058. WMI_AUTH_PASN,
  20059. WMI_AUTH_RSNA_8021X_SHA384,
  20060. WMI_AUTH_WPA3_SAE_SHA384,
  20061. WMI_AUTH_FT_RSNA_SAE_SHA384,
  20062. };
  20063. typedef enum {
  20064. WMI_SCAN_CLIENT_NLO = 0x1, /* 1 */
  20065. WMI_SCAN_CLIENT_EXTSCAN, /* 2 */
  20066. WMI_SCAN_CLIENT_ROAM, /* 3 */
  20067. WMI_SCAN_CLIENT_P2P, /* 4 */
  20068. WMI_SCAN_CLIENT_LPI, /* 5 */
  20069. WMI_SCAN_CLIENT_NAN, /* 6 */
  20070. WMI_SCAN_CLIENT_ANQP, /* 7 */
  20071. WMI_SCAN_CLIENT_OBSS, /* 8 */
  20072. WMI_SCAN_CLIENT_PLM, /* 9 */
  20073. WMI_SCAN_CLIENT_HOST, /* 10 */
  20074. } WMI_SCAN_CLIENT_ID;
  20075. typedef struct {
  20076. /** authentication mode (defined above) */
  20077. A_UINT32 rsn_authmode;
  20078. /** unicast cipher set */
  20079. A_UINT32 rsn_ucastcipherset;
  20080. /** mcast/group cipher set */
  20081. A_UINT32 rsn_mcastcipherset;
  20082. /** mcast/group management frames cipher set */
  20083. A_UINT32 rsn_mcastmgmtcipherset;
  20084. } wmi_rsn_params;
  20085. /** looking for a wps enabled AP */
  20086. #define WMI_AP_PROFILE_FLAG_WPS 0x1
  20087. /** looking for a secure AP */
  20088. #define WMI_AP_PROFILE_FLAG_CRYPTO 0x2
  20089. /** looking for a PMF enabled AP */
  20090. #define WMI_AP_PROFILE_FLAG_PMF 0x4
  20091. /** If this flag is set roam to SAE_H2E (Hash to Element) enabled APs only */
  20092. #define WMI_AP_PROFILE_FLAG_SAE_H2E 0x8
  20093. /* the value used in wmi_roam_cnd_scoring_param->disable_bitmap */
  20094. #define WLAN_ROAM_SCORING_RSSI_DISABLE 0x00000001
  20095. #define WLAN_ROAM_SCORING_HT_DISABLE 0x00000002
  20096. #define WLAN_ROAM_SCORING_VHT_DISABLE 0x00000004
  20097. #define WLAN_ROAM_SCORING_BW_DISABLE 0x00000008
  20098. #define WLAN_ROAM_SCORING_BAND_DISABLE 0x00000010
  20099. #define WLAN_ROAM_SCORING_NSS_DISABLE 0x00000020
  20100. #define WLAN_ROAM_SCORING_CHAN_CONGESTION_DISABLE 0x00000040
  20101. #define WLAN_ROAM_SCORING_BEAMFORMING_DISABLE 0x00000080
  20102. #define WLAN_ROAM_SCORING_PCL_DISABLE 0x00000100
  20103. #define WLAN_ROAM_SCORING_HE_DISABLE 0x00000200
  20104. #define WLAN_ROAM_SCORING_OCE_WAN_DISABLE 0x00000400
  20105. #define WLAN_ROAM_SCORING_ETH_DISABLE 0x00000800
  20106. #define WLAN_ROAM_SCORING_MLO_DISABLE 0x00001000
  20107. #define WLAN_ROAM_SCORING_DISABLE_ALL 0xFFFFFFFF
  20108. #define WLAN_ROAM_SCORING_DEFAULT_PARAM_ALLOW 0x0
  20109. #define WLAN_ROAM_MAX_SELECTION_SCORE 10000
  20110. #define WLAN_ROAM_SCORE_20MHZ_BW_INDEX 0
  20111. #define WLAN_ROAM_SCORE_40MHZ_BW_INDEX 1
  20112. #define WLAN_ROAM_SCORE_80MHZ_BW_INDEX 2
  20113. #define WLAN_ROAM_SCORE_160MHZ_BW_INDEX 3
  20114. #define WLAN_ROAM_SCORE_MAX_BW_INDEX 4
  20115. #define WMI_ROAM_GET_BW_SCORE_PERCENTAGE(value32, bw_index) WMI_GET_BITS(value32, (8 * (bw_index)), 8)
  20116. #define WMI_ROAM_SET_BW_SCORE_PERCENTAGE(value32, score_pcnt, bw_index) WMI_SET_BITS(value32, (8 * (bw_index)), 8, score_pcnt)
  20117. #define WLAN_ROAM_SCORE_NSS_1x1_INDEX 0
  20118. #define WLAN_ROAM_SCORE_NSS_2x2_INDEX 1
  20119. #define WLAN_ROAM_SCORE_NSS_3x3_INDEX 2
  20120. #define WLAN_ROAM_SCORE_NSS_4x4_INDEX 3
  20121. #define WLAN_ROAM_SCORE_MAX_NSS_INDEX 4
  20122. #define WMI_ROAM_GET_NSS_SCORE_PERCENTAGE(value32, nss_index) WMI_GET_BITS(value32, (8 * (nss_index)), 8)
  20123. #define WMI_ROAM_SET_NSS_SCORE_PERCENTAGE(value32, score_pcnt, nss_index) WMI_SET_BITS(value32, (8 * (nss_index)), 8, score_pcnt)
  20124. #define WLAN_ROAM_SCORE_BAND_2G_INDEX 0
  20125. #define WLAN_ROAM_SCORE_BAND_5G_INDEX 1
  20126. #define WLAN_ROAM_SCORE_BAND_6G_INDEX 2
  20127. /* 3 is reserved */
  20128. #define WLAN_ROAM_SCORE_MAX_BAND_NUM_INDICES 4
  20129. #define WLAN_ROAM_SCORE_MAX_BAND_INDEX WLAN_ROAM_SCORE_MAX_BAND_NUM_INDICES
  20130. #define WLAN_ROAM_SCORE_SECURITY_WPA_INDEX 0
  20131. #define WLAN_ROAM_SCORE_SECURITY_WPA2_INDEX 1
  20132. #define WLAN_ROAM_SCORE_SECURITY_WPA3_INDEX 2
  20133. /* 3 is reserved */
  20134. #define WLAN_ROAM_SCORE_SECURITY_MAX_NUM_INDICES 4
  20135. #define WMI_ROAM_GET_BAND_SCORE_PERCENTAGE(value32, band_index) WMI_GET_BITS(value32, (8 * (band_index)), 8)
  20136. #define WMI_ROAM_SET_BAND_SCORE_PERCENTAGE(value32, score_pcnt, band_index) WMI_SET_BITS(value32, (8 * (band_index)), 8, score_pcnt)
  20137. #define WLAN_ROAM_SCORE_MAX_CHAN_CONGESTION_SLOT 16
  20138. #define WLAN_ROAM_SCORE_DEFAULT_CONGESTION_SLOT 0
  20139. #define WLAN_ROAM_SCORE_MAX_OCE_WAN_SLOT 16
  20140. #define WLAN_ROAM_SCORE_DEFAULT_OCE_WAN_SLOT 0
  20141. #define WLAN_ROAM_SCORE_320MHZ_BW_EXT_INDEX 0
  20142. #define WLAN_ROAM_SCORE_MAX_BW_EXT_INDEX 4
  20143. #define WLAN_ROAM_SCORE_MLSR_INDEX 0
  20144. #define WLAN_ROAM_SCORE_MLMR_INDEX 1
  20145. #define WLAN_ROAM_SCORE_EMLSR_INDEX 2
  20146. #define WLAN_ROAM_SCORE_EMLMR_INDEX 3
  20147. #define WLAN_ROAM_SCORE_MLO_INDEX 4
  20148. #define WMI_ROAM_GET_MLO_SCORE_PERCENTAGE(value32, mlo_index) WMI_GET_BITS(value32, (8 * (mlo_index)), 8)
  20149. #define WMI_ROAM_SET_MLO_SCORE_PERCENTAGE(value32, score_pcnt, mlo_index) WMI_SET_BITS(value32, (8 * (mlo_index)), 8, score_pcnt)
  20150. #define WMI_ROAM_GET_SECURITY_SCORE_PERCENTAGE(value32, security_index) \
  20151. WMI_GET_BITS(value32, (8 * (security_index)), 8)
  20152. #define WMI_ROAM_SET_SECURITY_SCORE_PERCENTAGE(value32, score_pcnt, security_index) \
  20153. WMI_SET_BITS(value32, (8 * (security_index)), 8, score_pcnt)
  20154. /**
  20155. best_rssi_threshold: Roamable AP RSSI equal or better than this threshold, full RSSI score 100. Units in dBm.
  20156. good_rssi_threshold: Below this threshold, scoring linear percentage between rssi_good_pcnt and 100. Units in dBm.
  20157. bad_rssi_threshold: Between good and bad RSSI threshold, scoring linear percentage between rssi_bad_pcnt and rssi_good_pcnt. Units in dBm.
  20158. good_rssi_pcnt: Used to assigned scoring percentage of each slot between best to good RSSI threshold. Units in percentage.
  20159. bad_rssi_pcnt: Used to assigned scoring percentage of each slot between good to bad RSSI threshold. Units in percentage.
  20160. good_bucket_size : bucket size of slot in good zone. Units in dB.
  20161. bad_bucket_size : bucket size of slot in bad zone. Units in dB.
  20162. rssi_pref_5g_rssi_thresh: Below RSSI threshold, 5G AP have given preference of band percentage. Units in dBm.
  20163. */
  20164. /**
  20165. The graph below explains how RSSI scoring percentage is calculated
  20166. as the RSSI improves. In the graph, the derived parameters good_buckets
  20167. and bad_buckets are used. These derived parameters are related to the
  20168. specified parameters as follows:
  20169. good_buckets =
  20170. (best_rssi_threshold - good_rssi_threshold) / good_bucket_size
  20171. bad_buckets =
  20172. (good_rssi_threshold - bad_rssi_threshold) / bad_bucket_size
  20173. | (x0,y0) (x0 = best_rssi, y0 = 100)
  20174. p 100 |-------o
  20175. e | |<--------- (100 - good_rssi_pct)/good_buckets
  20176. r | |___ ,---- good_bucket_size
  20177. c | | |
  20178. e | |_V_
  20179. n | |
  20180. t | |___o (x1,y1) (x1 = good_rssi, y1 = good_rssi_pcnt)
  20181. 80 | |
  20182. % | |<------ (good_rssi_pcnt - bad_rssi_pcnt)/bad_buckets
  20183. | |_____
  20184. | | ,-- bad_bucket_size
  20185. | | |
  20186. | |__v__
  20187. | |
  20188. | |
  20189. 40 | o------------
  20190. | (x2,y2) (x2 = bad_rssi, y2 = bad_rssi_pcnt)
  20191. +------o------------o-----------o------------->
  20192. -50 -70 -80 RSSI dBm
  20193. | excellent | good | bad | poor
  20194. | zone | zone | zone | zone
  20195. V V V
  20196. BEST_THRES GOOD_THRES BAD_THRES
  20197. */
  20198. typedef struct {
  20199. A_INT32 best_rssi_threshold;
  20200. A_INT32 good_rssi_threshold;
  20201. A_INT32 bad_rssi_threshold;
  20202. A_UINT32 good_rssi_pcnt;
  20203. A_UINT32 bad_rssi_pcnt;
  20204. A_UINT32 good_bucket_size;
  20205. A_UINT32 bad_bucket_size;
  20206. A_INT32 rssi_pref_5g_rssi_thresh;
  20207. } wmi_roam_cnd_rssi_scoring;
  20208. /**
  20209. Use macro WMI_ROAM_CND_GET/SET_BW_SCORE_PERCENTAGE to get and set the
  20210. value respectively of bw_scoring
  20211. BITS 0-7 :- It contains scoring percentage of 20MHz BW
  20212. BITS 8-15 :- It contains scoring percentage of 40MHz BW
  20213. BITS 16-23 :- It contains scoring percentage of 80MHz BW
  20214. BITS 24-31 :- It contains scoring percentage of 160MHz BW
  20215. Use macro WMI_ROAM_CND_GET/SET_BW_SCORE_PERCENTAGE to get and set the
  20216. value respectively of ext_bw_scoring:
  20217. BITS 0-7 :- It contains scoring percentage of 320MHz BW
  20218. BITS 8-15 :- reserved
  20219. BITS 16-23 :- reserved
  20220. BITS 24-31 :- reserved
  20221. The value of each index must be 0-100
  20222. */
  20223. typedef struct {
  20224. A_UINT32 score_pcnt;
  20225. } wmi_roam_cnd_bw_scoring;
  20226. /**
  20227. Use macro WMI_ROAM_CND_GET/SET_BAND_SCORE_PERCENTAGE to get and set the value respectively.
  20228. BITS 0-7 :- It contains scoring percentage of 2G
  20229. BITS 8-15 :- It contains scoring percentage of 5G
  20230. BITS 16-23 :- reserved
  20231. BITS 24-31 :- reserved
  20232. The value of each index must be 0-100
  20233. */
  20234. typedef struct {
  20235. A_UINT32 score_pcnt;
  20236. } wmi_roam_cnd_band_scoring;
  20237. /**
  20238. Use macro WMI_ROAM_CND_GET/SET_NSS_SCORE_PERCENTAGE to get and set the value respectively.
  20239. BITS 0-7 :- It contains scoring percentage of 1x1
  20240. BITS 8-15 :- It contains scoring percentage of 2x2
  20241. BITS 16-23 :- It contains scoring percentage of 3x3
  20242. BITS 24-31 :- It contains scoring percentage of 4x4
  20243. The value of each index must be 0-100
  20244. */
  20245. typedef struct {
  20246. A_UINT32 score_pcnt;
  20247. } wmi_roam_cnd_nss_scoring;
  20248. /**
  20249. score_pcnt: Contains roam score percentage of each slot of respective channel_congestion_pcnt.It is also used same BITS for slot(0-3)
  20250. BITS 0-7 :- the scoring pcnt when AP is not advertise QBSS/ESP info
  20251. BITS 8-15 :- SLOT_1
  20252. BITS 16-23 :- SLOT_2
  20253. BITS 24-31 :- SLOT_3
  20254. BITS 32- ...
  20255. num_slot will equally divide 100. e.g, if num_slot = 4
  20256. slot 0 = 0-25%, slot 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
  20257. */
  20258. typedef struct {
  20259. A_UINT32 num_slot; /* max 15 */
  20260. A_UINT32 score_pcnt3_to_0;
  20261. A_UINT32 score_pcnt7_to_4;
  20262. A_UINT32 score_pcnt11_to_8;
  20263. A_UINT32 score_pcnt15_to_12;
  20264. } wmi_roam_cnd_esp_qbss_scoring;
  20265. /**
  20266. score_pcnt: Contains roam score percentage of each slot of respective channel_congestion_pcnt.It is also used same BITS for slot(0-3)
  20267. BITS 0-7 :- the scoring pcnt when AP is not advertise QBSS/ESP info
  20268. BITS 8-15 :- SLOT_1
  20269. BITS 16-23 :- SLOT_2
  20270. BITS 24-31 :- SLOT_3
  20271. BITS 32- ...
  20272. num_slot will equally divide 100. e.g, if num_slot = 4
  20273. slot 0 = 0-25%, slot 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
  20274. */
  20275. typedef struct {
  20276. A_UINT32 num_slot; /* max 15 */
  20277. A_UINT32 score_pcnt3_to_0;
  20278. A_UINT32 score_pcnt7_to_4;
  20279. A_UINT32 score_pcnt11_to_8;
  20280. A_UINT32 score_pcnt15_to_12;
  20281. } wmi_roam_cnd_oce_wan_scoring;
  20282. /**
  20283. * Use macro WMI_ROAM_CND_GET/SET_SECURITY_SCORE_PERCENTAGE
  20284. * to get and set the value respectively.
  20285. * BITS 0-7 :- It contains scoring percentage of WPA security
  20286. * BITS 8-15 :- It contains scoring percentage of WPA2 security
  20287. * BITS 16-23 :- It contains scoring percentage of WPA3 security
  20288. * BITS 24-31 :- reserved
  20289. *
  20290. * The value of each score must be 0-100
  20291. */
  20292. typedef struct {
  20293. A_UINT32 score_pcnt;
  20294. } wmi_roam_cnd_security_scoring;
  20295. typedef enum {
  20296. WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID_NONE = 0, /* Legacy roam score algorithm */
  20297. WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID_RSSI_CU_BASED = 1, /* Roam score algorithm based on RSSI and CU */
  20298. } WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID;
  20299. /**
  20300. disable_bitmap :- Each bit will be either allow(0)/disallow(1) to considered the roam score param.
  20301. rssi_weightage_pcnt :- RSSI weightage out of total score in percentage
  20302. ht_weightage_pcnt :- HT weightage out of total score in percentage.
  20303. vht_weightage_pcnt :- VHT weightage out of total score in percentage.
  20304. he_weightage_pcnt :- 11ax weightage out of total score in percentage.
  20305. bw_weightage_pcnt :- Bandwidth weightage out of total score in percentage.
  20306. band_weightage_pcnt :- Band(2G/5G) weightage out of total score in percentage.
  20307. nss_weightage_pcnt:- NSS(1x1 / 2x2) weightage out of total score in percentage.
  20308. esp_qbss_weightage_pcnt: ESP/QBSS weightage out of total score in percentage.
  20309. beamforming_weightage_pcnt :- Beamforming weightage out of total score in percentage.
  20310. pcl_weightage_pcnt :- PCL weightage out of total score in percentage.
  20311. oce_wan_weightage_pcnt :- OCE WAN metrics weightage out of total score in percentage.
  20312. rssi_scoring :- RSSI scoring information.
  20313. bw_scoring :- channel BW scoring percentage information.
  20314. band_scoring : - band scording percentage information.
  20315. nss_scoring :- NSS scoring percentage information.
  20316. esp_qbss_scoring :- ESP/QBSS scoring percentage information
  20317. oce_wan_scoring : OCE WAN metrics percentage information
  20318. 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
  20319. 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.
  20320. */
  20321. typedef struct {
  20322. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_scoring_param */
  20323. A_UINT32 disable_bitmap;
  20324. A_INT32 rssi_weightage_pcnt;
  20325. A_INT32 ht_weightage_pcnt;
  20326. A_INT32 vht_weightage_pcnt;
  20327. A_INT32 he_weightage_pcnt;
  20328. A_INT32 bw_weightage_pcnt;
  20329. A_INT32 band_weightage_pcnt;
  20330. A_INT32 nss_weightage_pcnt;
  20331. A_INT32 esp_qbss_weightage_pcnt;
  20332. A_INT32 beamforming_weightage_pcnt;
  20333. A_INT32 pcl_weightage_pcnt;
  20334. A_INT32 oce_wan_weightage_pcnt;
  20335. wmi_roam_cnd_rssi_scoring rssi_scoring;
  20336. wmi_roam_cnd_bw_scoring bw_scoring;
  20337. wmi_roam_cnd_band_scoring band_scoring;
  20338. wmi_roam_cnd_nss_scoring nss_scoring;
  20339. wmi_roam_cnd_esp_qbss_scoring esp_qbss_scoring;
  20340. wmi_roam_cnd_oce_wan_scoring oce_wan_scoring;
  20341. A_UINT32 roam_score_delta_pcnt;
  20342. A_UINT32 roam_score_delta_mask;
  20343. /* Vendor specific roam score algorithm ID from WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID enum */
  20344. A_UINT32 vendor_roam_score_algorithm_id;
  20345. /*
  20346. * During CU and low RSSI based roam triggers, consider AP as
  20347. * roam candidate only if its roam score is better than connected AP score
  20348. * by at least candidate_min_roam_score_delta.
  20349. */
  20350. A_UINT32 candidate_min_roam_score_delta;
  20351. /*
  20352. * For OCE Release 2, give weightage to roam candidate tx power if
  20353. * oce_ap_tx_pwr_weightage_pcnt != 0.
  20354. */
  20355. A_UINT32 oce_ap_tx_pwr_weightage_pcnt;
  20356. /*
  20357. * For OCE Release 2, give weightage to roam candidate based on
  20358. * advertised subnet id.
  20359. * Only used if oce_ap_subnet_id_weightage_pcnt != 0.
  20360. */
  20361. A_UINT32 oce_ap_subnet_id_weightage_pcnt;
  20362. /*
  20363. * Give weightage to SAE-PK (Simultaneous Authentication of Equals -
  20364. * Public Key) enabled network APs.
  20365. * Only used if sae_pk_ap_weightage_pcnt != 0.
  20366. */
  20367. A_UINT32 sae_pk_ap_weightage_pcnt;
  20368. /*
  20369. * Give weightage to bandwidth which is greater than 160Mhz.
  20370. */
  20371. wmi_roam_cnd_bw_scoring ext_bw_scoring;
  20372. /*
  20373. * eht_weightage_pcnt :- 11be weightage out of total score in percentage.
  20374. */
  20375. A_UINT32 eht_weightage_pcnt;
  20376. /*
  20377. * mlo_weightage_pcnt :- give weightage to candidate based on MLO support.
  20378. */
  20379. A_UINT32 mlo_weightage_pcnt;
  20380. /*
  20381. * btc_score_factor :- Scale down 2.4GHz AP total score by btc_score_factor
  20382. * during BT coex.
  20383. * Value 0 should be ignored
  20384. */
  20385. A_UINT32 btc_score_factor;
  20386. /*
  20387. * btc_etp_factor :- Scale down 2.4GHz AP total etp value by btc_etp_factor
  20388. * during BT coex.
  20389. * Value 0 should be ignored
  20390. */
  20391. A_UINT32 btc_etp_factor;
  20392. /* Scoring for security mode */
  20393. A_INT32 security_weightage_pcnt;
  20394. wmi_roam_cnd_security_scoring security_scoring;
  20395. /* mlo_etp_weightage_pcnt:
  20396. * Give etp weightage to candidate based on MLO support.
  20397. * In host INI configuration, it will give boost(+) or reduction(-)
  20398. * percentage value and host will deliver actual weighted number
  20399. * based on 100. For example:
  20400. * If percentage value in INI is 20, then host will give 120 (100 * 1.2)
  20401. * as mlo_etp_weightage_pcnt.
  20402. * If percentage value in INI is -20, then host will give 80 (100 * 0.8)
  20403. * as mlo_etp_weightage_pcnt.
  20404. */
  20405. A_UINT32 mlo_etp_weightage_pcnt;
  20406. } wmi_roam_cnd_scoring_param;
  20407. typedef struct {
  20408. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_score_delta_param */
  20409. /* Roam trigger reason ID from WMI_ROAM_TRIGGER_REASON_ID */
  20410. A_UINT32 roam_trigger_reason;
  20411. /* Roam score delta in %.
  20412. * Consider AP as roam candidate only if AP score is at least
  20413. * roam_score_delta % better than connected AP score.
  20414. * Ex: roam_score_delta = 20, and connected AP score is 4000,
  20415. * then consider candidate AP only if its score is at least
  20416. * 4800 (= 4000 * 120%)
  20417. */
  20418. A_UINT32 roam_score_delta;
  20419. } wmi_roam_score_delta_param;
  20420. typedef struct {
  20421. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_min_rssi_param */
  20422. /* Roam trigger reason ID from WMI_ROAM_TRIGGER_REASON_ID */
  20423. A_UINT32 roam_trigger_reason;
  20424. /*
  20425. * Consider AP as roam candidate only if AP RSSI is better than
  20426. * candidate_min_rssi
  20427. */
  20428. A_UINT32 candidate_min_rssi; /* units = dBm */
  20429. } wmi_roam_cnd_min_rssi_param;
  20430. /** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE
  20431. * and WMI_AP_PROFILE_FLAG_CRYPTO should be clear.
  20432. * To match a WEP enabled AP, the rs_authmode should be set to WMI_AUTH_NONE
  20433. * and WMI_AP_PROFILE_FLAG_CRYPTO should be set .
  20434. */
  20435. typedef struct {
  20436. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_profile */
  20437. /** flags as defined above */
  20438. A_UINT32 flags;
  20439. /**
  20440. * RSSI threshold value in dB: the value of the candidate AP should
  20441. * higher by this threshold than the RSSI of the currently associated AP.
  20442. */
  20443. A_UINT32 rssi_threshold;
  20444. /**
  20445. * ssid value to be matched.
  20446. */
  20447. wmi_ssid ssid;
  20448. /**
  20449. * security params to be matched.
  20450. */
  20451. /** authentication mode (defined above) */
  20452. A_UINT32 rsn_authmode;
  20453. /** unicast cipher set */
  20454. A_UINT32 rsn_ucastcipherset;
  20455. /** mcast/group cipher set */
  20456. A_UINT32 rsn_mcastcipherset;
  20457. /** mcast/group management frames cipher set */
  20458. A_UINT32 rsn_mcastmgmtcipherset;
  20459. /**
  20460. * rssi_abs_threshold value: the value of the candidate AP should
  20461. * higher than this absolute RSSI threshold.
  20462. * Zero means no absolute minimum RSSI is required.
  20463. * units are the offset from the noise floor in dB.
  20464. */
  20465. A_UINT32 rssi_abs_thresh;
  20466. /**
  20467. * bg_rssi_threshold value in dB: For background scan the value of
  20468. * the candidate AP should be higher by this threshold than the RSSI
  20469. * of the currently associated AP.
  20470. */
  20471. A_UINT32 bg_rssi_threshold;
  20472. } wmi_ap_profile;
  20473. typedef struct {
  20474. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_owe_ap_profile */
  20475. /* OPEN SSID value when STA is connected to OWE transition AP in OWE security */
  20476. wmi_ssid open_ssid_for_owe_transition;
  20477. } wmi_owe_ap_profile;
  20478. typedef struct {
  20479. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_vendor_scoring_param */
  20480. A_UINT32 tlv_header;
  20481. /** Indicates the channel band for which these vendor scoring params needs to be applied.
  20482. * Refer WLAN_ROAM_SCORE_MAX_BAND_INDEX for possible band_idx values.
  20483. */
  20484. A_UINT32 band_idx;
  20485. /** Below RSSI/CU factor_value & factor_score param values are configured by vendor */
  20486. A_UINT32 rssi_factor_value1;
  20487. A_UINT32 rssi_factor_value2;
  20488. A_UINT32 rssi_factor_value3;
  20489. A_UINT32 rssi_factor_value4;
  20490. A_UINT32 rssi_factor_value5;
  20491. A_UINT32 rssi_factor_score1;
  20492. A_UINT32 rssi_factor_score2;
  20493. A_UINT32 rssi_factor_score3;
  20494. A_UINT32 rssi_factor_score4;
  20495. A_UINT32 rssi_factor_score5;
  20496. A_UINT32 cu_factor_value1;
  20497. A_UINT32 cu_factor_value2;
  20498. A_UINT32 cu_factor_score1;
  20499. A_UINT32 cu_factor_score2;
  20500. } wmi_roam_cnd_vendor_scoring_param;
  20501. /** Support early stop roaming scanning when finding a strong candidate AP
  20502. * A 'strong' candidate is
  20503. * 1) Is eligible candidate
  20504. * (all conditions are met in existing candidate selection).
  20505. * 2) Its RSSI is better than earlystop threshold.
  20506. * Earlystop threshold will be relaxed as each channel is scanned.
  20507. */
  20508. typedef struct {
  20509. A_UINT32 tlv_header;
  20510. /* Minimum RSSI threshold value for early stop, unit is dB above NF. */
  20511. A_UINT32 roam_earlystop_thres_min;
  20512. /* Maminum RSSI threshold value for early stop, unit is dB above NF. */
  20513. A_UINT32 roam_earlystop_thres_max;
  20514. } wmi_roam_earlystop_rssi_thres_param;
  20515. typedef struct {
  20516. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_dense_thres_param */
  20517. A_UINT32 tlv_header;
  20518. /** RSSI threshold offset under trffic and dense env */
  20519. A_UINT32 roam_dense_rssi_thres_offset;
  20520. /** minimum number of APs to determine dense env */
  20521. A_UINT32 roam_dense_min_aps;
  20522. /** initial dense status detected by host at the time of initial connection */
  20523. A_UINT32 roam_dense_status;
  20524. /* traffic threshold to enable aggressive roaming in dense env; units are percent of medium occupancy, 0 - 100 */
  20525. A_UINT32 roam_dense_traffic_thres;
  20526. } wmi_roam_dense_thres_param;
  20527. /* Definition for flags in wmi_roam_bg_scan_roaming_param
  20528. * Bit 0: BG roaming enabled when we connect to 2G AP only and roaming to 5G AP only.
  20529. * Bit 1-31: Reserved
  20530. */
  20531. #define WMI_ROAM_BG_SCAN_FLAGS_2G_TO_5G_ONLY 1
  20532. typedef struct {
  20533. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bg_scan_roaming_param */
  20534. A_UINT32 tlv_header;
  20535. /** RSSI threshold in dBm below which roaming will be triggered during background scan(non-roam scan). 0 will disable this threshold */
  20536. A_UINT32 roam_bg_scan_bad_rssi_thresh;
  20537. /** 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 */
  20538. A_UINT32 roam_bg_scan_client_bitmap;
  20539. /** roam scan RSSI threshold for 2 GHz band.
  20540. * offset from roam_bg_scan_bad_rssi_thresh, in dB units
  20541. */
  20542. A_INT32 bad_rssi_thresh_offset_2g;
  20543. /* flags for background roaming */
  20544. A_UINT32 flags;
  20545. } wmi_roam_bg_scan_roaming_param;
  20546. /*
  20547. * If there's rx activity during rx_inactivity_ms and avg of data_rssi
  20548. * is better than roam_data_rssi_thres, then suppress low rssi roaming.
  20549. */
  20550. #define WMI_ROAM_DATA_RSSI_FLAG_LOW_RSSI 0x00000001
  20551. /*
  20552. * If there's no rx activity during rx_inactivity_ms or avg of data_rssi
  20553. * is better than roam_data_rssi_thres, then suppress this background roaming.
  20554. */
  20555. #define WMI_ROAM_DATA_RSSI_FLAG_BACKGROUND 0x00000002
  20556. typedef struct {
  20557. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_data_rssi_roaming_param */
  20558. A_UINT32 tlv_header;
  20559. /* flags for when consider data_rssi,
  20560. * valid values are OR operation of WMI_ROAM_DATA_RSSI_FLAG_ .
  20561. * value 0 to disable the feature.
  20562. */
  20563. A_UINT32 flags;
  20564. /**
  20565. * RSSI threshold in dBm above which roaming scan will be suppressed
  20566. * during some roaming trigger.
  20567. */
  20568. A_INT32 roam_data_rssi_thres;
  20569. /** rx inactivity time, in unit of milliseconds. */
  20570. A_UINT32 rx_inactivity_ms;
  20571. } wmi_roam_data_rssi_roaming_param;
  20572. /** Beacon filter wmi command info */
  20573. #define BCN_FLT_MAX_SUPPORTED_IES 256
  20574. #define BCN_FLT_MAX_ELEMS_IE_LIST (BCN_FLT_MAX_SUPPORTED_IES/32)
  20575. typedef struct bss_bcn_stats {
  20576. A_UINT32 vdev_id;
  20577. A_UINT32 bss_bcnsdropped;
  20578. A_UINT32 bss_bcnsdelivered;
  20579. } wmi_bss_bcn_stats_t;
  20580. typedef struct bcn_filter_stats {
  20581. A_UINT32 bcns_dropped;
  20582. A_UINT32 bcns_delivered;
  20583. A_UINT32 activefilters;
  20584. wmi_bss_bcn_stats_t bss_stats;
  20585. } wmi_bcnfilter_stats_t;
  20586. typedef struct wmi_add_bcn_filter_cmd {
  20587. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param */
  20588. A_UINT32 vdev_id;
  20589. /*
  20590. * Following this structure is the TLV:
  20591. * A_UINT32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
  20592. */
  20593. } wmi_add_bcn_filter_cmd_fixed_param;
  20594. typedef struct wmi_rmv_bcn_filter_cmd {
  20595. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rmv_bcn_filter_cmd_fixed_param */
  20596. A_UINT32 vdev_id;
  20597. } wmi_rmv_bcn_filter_cmd_fixed_param;
  20598. #define WMI_BCN_SEND_DTIM_ZERO 1
  20599. #define WMI_BCN_SEND_DTIM_BITCTL_SET 2
  20600. typedef struct wmi_bcn_send_from_host {
  20601. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_send_from_host_cmd_fixed_param */
  20602. A_UINT32 vdev_id;
  20603. A_UINT32 data_len;
  20604. union {
  20605. A_UINT32 frag_ptr; /* Physical address of the frame */
  20606. A_UINT32 frag_ptr_lo; /* LSBs of physical address of the frame */
  20607. };
  20608. A_UINT32 frame_ctrl; /* farme ctrl to setup PPDU desc */
  20609. A_UINT32 dtim_flag; /* to control CABQ traffic */
  20610. A_UINT32 bcn_antenna; /* Antenna for beacon transmission */
  20611. A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
  20612. } wmi_bcn_send_from_host_cmd_fixed_param;
  20613. /* cmd to support bcn snd for all vaps at once */
  20614. typedef struct wmi_pdev_send_bcn {
  20615. A_UINT32 num_vdevs;
  20616. WMI_VAR_LEN_ARRAY1(wmi_bcn_send_from_host_cmd_fixed_param, bcn_cmd);
  20617. } wmi_pdev_send_bcn_cmd_t;
  20618. typedef struct wmi_fd_send_from_host {
  20619. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fd_send_from_host_cmd_fixed_param */
  20620. A_UINT32 vdev_id;
  20621. A_UINT32 data_len;
  20622. union {
  20623. A_UINT32 frag_ptr; /* Physical address of the frame */
  20624. A_UINT32 frag_ptr_lo; /* LSBs of physical address of the frame */
  20625. };
  20626. A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
  20627. A_UINT32 frame_ctrl; /* frame ctrl to setup PPDU desc */
  20628. } wmi_fd_send_from_host_cmd_fixed_param;
  20629. /*
  20630. * Control to send broadcast probe response instead of FD frames.
  20631. * When this flag is not set then FD frame will be transmitted when
  20632. * fd_period is non-zero
  20633. */
  20634. #define WMI_FILS_FLAGS_BITMAP_BCAST_PROBE_RSP 0x1
  20635. /*
  20636. * WMI command structure for FILS feature enable/disable
  20637. */
  20638. typedef struct {
  20639. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enable_fils_cmd_fixed_param */
  20640. /* VDEV identifier */
  20641. A_UINT32 vdev_id;
  20642. A_UINT32 fd_period; /* non-zero - enable Fils Discovery frames or broadcast probe response with this period (in TU),
  20643. * 0 - disable FD and broadcast probe response frames */
  20644. A_UINT32 flags; /* WMI_FILS_FLAGS_BITMAP flags */
  20645. } wmi_enable_fils_cmd_fixed_param;
  20646. /*
  20647. * WMI_ROAM_AP_PROFILE: AP profile of connected AP for roaming.
  20648. */
  20649. typedef struct {
  20650. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param */
  20651. /** id of AP criteria */
  20652. A_UINT32 id;
  20653. /** unique id identifying the VDEV, generated by the caller */
  20654. A_UINT32 vdev_id;
  20655. /*
  20656. * Following this structure are the TLVs:
  20657. * wmi_ap_profile ap_profile; <-- AP profile info
  20658. * wmi_roam_cnd_scoring_param roam_cnd_scoring_param
  20659. * wmi_roam_score_delta_param roam_score_delta_param_list[]
  20660. * wmi_roam_cnd_min_rssi_param roam_cnd_min_rssi_param_list[]
  20661. * wmi_roam_cnd_vendor_scoring_param roam_cnd_vendor_scoring_param[]
  20662. * wmi_owe_ap_profile owe_ap_profile[]
  20663. * A_UINT32 authmode_list[] <-- List of authmode allowed for roaming.
  20664. * Refer WMI_AUTH_ for authmode values.
  20665. */
  20666. } wmi_roam_ap_profile_fixed_param;
  20667. /**
  20668. * WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile.
  20669. */
  20670. typedef struct {
  20671. /** id of AP criteria */
  20672. A_UINT32 id;
  20673. /** unique id identifying the VDEV, generated by the caller */
  20674. A_UINT32 vdev_id;
  20675. /** AP profile info */
  20676. wmi_ap_profile ap_profile;
  20677. } wmi_ofl_scan_add_ap_profile;
  20678. /**
  20679. * WMI_OFL_SCAN_REMOVE_AP_CRITERIA: remove an ap profile.
  20680. */
  20681. typedef struct {
  20682. /** id of AP criteria */
  20683. A_UINT32 id;
  20684. /** unique id identifying the VDEV, generated by the caller */
  20685. A_UINT32 vdev_id;
  20686. } wmi_ofl_scan_remove_ap_profile;
  20687. /**
  20688. * WMI_OFL_SCAN_PERIOD: period in msec for offload scan.
  20689. * 0 will disable ofload scan and a very low value will perform a continuous
  20690. * scan.
  20691. */
  20692. typedef struct {
  20693. /** offload scan period value, used for scans used when not connected */
  20694. A_UINT32 ofl_scan_period;
  20695. } wmi_ofl_scan_period;
  20696. /* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */
  20697. #define ROAM_OFFLOAD_PMK_BYTES (32)
  20698. #define ROAM_OFFLOAD_PSK_MSK_BYTES (32)
  20699. #define ROAM_OFFLOAD_KRK_BYTES (16)
  20700. #define ROAM_OFFLOAD_BTK_BYTES (32)
  20701. #define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48)
  20702. #define ROAM_OFFLOAD_NUM_MCS_SET (16)
  20703. /* This TLV will be filled only in case roam offload for wpa2-psk/okc/ese/11r is enabled */
  20704. typedef struct {
  20705. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */
  20706. A_UINT32 rssi_cat_gap; /* gap for every category bucket */
  20707. A_UINT32 prefer_5g; /* prefer select 5G candidate */
  20708. A_UINT32 select_5g_margin;
  20709. A_UINT32 reassoc_failure_timeout; /* reassoc failure timeout */
  20710. A_UINT32 capability;
  20711. A_UINT32 ht_caps_info;
  20712. A_UINT32 ampdu_param;
  20713. A_UINT32 ht_ext_cap;
  20714. A_UINT32 ht_txbf;
  20715. A_UINT32 asel_cap;
  20716. A_UINT32 qos_enabled;
  20717. A_UINT32 qos_caps;
  20718. A_UINT32 wmm_caps;
  20719. A_UINT32 mcsset[ROAM_OFFLOAD_NUM_MCS_SET>>2]; /* since this 4 byte aligned, we don't declare it as tlv array */
  20720. A_UINT32 handoff_delay_for_rx; /* In msec. Delay Hand-Off by this duration to receive pending Rx frames from current BSS */
  20721. A_UINT32 max_mlme_sw_retries; /* maximum number of software retries for preauth and reassoc req */
  20722. A_UINT32 no_ack_timeout; /* In msec. duration to wait before another SW retry made if no ack seen for previous frame */
  20723. 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. */
  20724. A_UINT32 roam_to_current_bss_disable; /* Disable roaming to current bss */
  20725. } wmi_roam_offload_tlv_param;
  20726. /* flags for 11i offload */
  20727. #define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED 0 /* okc is enabled */
  20728. #define WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED 1 /* pmk caching is disabled */
  20729. #define WMI_ROAM_OFFLOAD_FLAG_SAE_SAME_PMKID 2 /* Use same PMKID for WPA3 SAE roaming */
  20730. /* from bit 3 to bit 31 are reserved */
  20731. #define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \
  20732. (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
  20733. } while (0)
  20734. #define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \
  20735. (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
  20736. } while (0)
  20737. #define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag) \
  20738. ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED))
  20739. #define WMI_SET_ROAM_OFFLOAD_PMK_CACHE_ENABLED(flag) \
  20740. do { \
  20741. (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED); \
  20742. } while (0)
  20743. #define WMI_SET_ROAM_OFFLOAD_PMK_CACHE_DISABLED(flag) \
  20744. do { \
  20745. (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED); \
  20746. } while (0)
  20747. #define WMI_GET_ROAM_OFFLOAD_PMK_CACHE_DISABLED(flag) \
  20748. ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED))
  20749. /* This TLV will be filled only in case of wpa-psk/wpa2-psk/wpa3 */
  20750. typedef struct {
  20751. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */
  20752. A_UINT32 flags; /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */
  20753. A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES>>2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */
  20754. A_UINT32 pmk_len; /**the length of pmk. in normal case it should be 32, but for LEAP, is should be 16*/
  20755. A_UINT32 pmk_ext_len; /** the length of extended pmk. in normal case it should be 0, but for suiteB, it should be 16*/
  20756. A_UINT32 pmk_ext[ROAM_OFFLOAD_PMK_BYTES>>2]; /* pmk ext offload. 16 bytes for suiteB */
  20757. } wmi_roam_11i_offload_tlv_param;
  20758. /* This TLV will be filled only in case of 11R*/
  20759. typedef struct {
  20760. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */
  20761. A_UINT32 mdie_present;
  20762. A_UINT32 mdid;
  20763. A_UINT32 r0kh_id[ROAM_OFFLOAD_R0KH_ID_MAX_LEN>>2];
  20764. A_UINT32 r0kh_id_len;
  20765. 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 */
  20766. A_UINT32 psk_msk_len; /**length of psk_msk*/
  20767. A_UINT32 psk_msk_ext_len; /**length of psk_msk_ext*/
  20768. A_UINT32 psk_msk_ext[ROAM_OFFLOAD_PSK_MSK_BYTES>>2];
  20769. A_UINT32 adaptive_11r; /* FW needs to perform adaptive 11r roaming */
  20770. /*
  20771. * FW needs to perform FT initial moiblity association instead of
  20772. * FT roaming for deauth roam trigger
  20773. * 0 - To disable FT-IM
  20774. * 1 - To enable FT-IM
  20775. */
  20776. A_UINT32 ft_im_for_deauth;
  20777. /*
  20778. * FW can prefer doing over-the-ds fast BSS transition instead of
  20779. * over-the-air if associated and target AP are both capable of FT over DS.
  20780. * 0 - To disable FT-over-DS
  20781. * 1 - To enable FT-over-DS
  20782. */
  20783. A_UINT32 ft_over_ds_enable;
  20784. } wmi_roam_11r_offload_tlv_param;
  20785. /* This TLV will be filled only in case of ESE */
  20786. typedef struct {
  20787. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */
  20788. A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES>>2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */
  20789. A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES>>2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */
  20790. } wmi_roam_ese_offload_tlv_param;
  20791. typedef struct {
  20792. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_sae_offload_tlv_param */
  20793. /* SAE SPMK timeout value in seconds after which FW need to perform SAE full authentication to derive new SPMK */
  20794. A_UINT32 spmk_timeout;
  20795. } wmi_roam_sae_offload_tlv_param;
  20796. typedef enum {
  20797. WMI_BL_REASON_NUD_FAILURE = 1,
  20798. WMI_BL_REASON_STA_KICKOUT,
  20799. WMI_BL_REASON_ROAM_HO_FAILURE,
  20800. /* Assoc resp with status code 71 - POOR RSSI CONDITIONS */
  20801. WMI_BL_REASON_ASSOC_REJECT_POOR_RSSI,
  20802. /* Assoc resp with status code 34 - DENIED_POOR_CHANNEL_CONDITIONS */
  20803. WMI_BL_REASON_ASSOC_REJECT_OCE,
  20804. WMI_BL_REASON_USERSPACE_BL,
  20805. WMI_BL_REASON_USERSPACE_AVOID_LIST,
  20806. WMI_BL_REASON_BTM_DIASSOC_IMMINENT,
  20807. WMI_BL_REASON_BTM_BSS_TERMINATION,
  20808. WMI_BL_REASON_BTM_MBO_RETRY,
  20809. /* Reassoc resp with status code 34 - DENIED_POOR_CHANNEL_CONDITIONS */
  20810. WMI_BL_REASON_REASSOC_RSSI_REJECT,
  20811. /* Reassoc resp with status code 17 - DENIED_NO_MORE_STAS */
  20812. WMI_BL_REASON_REASSOC_NO_MORE_STAS,
  20813. WMI_BL_REASON_BASIC_RATES_MIS_MATCH, /* Status code 18 */
  20814. WMI_BL_REASON_EHT_NOT_SUPPORTED, /* Status code 135 */
  20815. WMI_BL_REASON_EXISTING_MLD_ASSOCIATION, /* Status code 130 */
  20816. WMI_BL_REASON_LINK_TRANSMITTED_NOT_ACCEPTED, /* Status code 139 */
  20817. WMI_BL_REASON_DENIED_OTHER_REASON,
  20818. WMI_BL_REASON_BTM_LOAD_BALANCE,
  20819. } WMI_BLACKLIST_REASON_ID;
  20820. typedef enum {
  20821. WMI_BL_SOURCE_HOST = 1,
  20822. WMI_BL_SOURCE_FW,
  20823. } WMI_BLACKLIST_SOURCE_ID;
  20824. #define WMI_MAX_FAILED_LINK_COMBO_COUNT 10
  20825. typedef struct {
  20826. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_blacklist_with_timeout_tlv_param */
  20827. A_UINT32 tlv_header;
  20828. /** Blaclisted AP mac address */
  20829. wmi_mac_addr bssid;
  20830. /** How much time in milliseconds to keep AP in blacklist */
  20831. A_UINT32 timeout;
  20832. /** RSSI (dBm units) when put in blacklist */
  20833. A_INT32 rssi;
  20834. /* Blacklist reason from WMI_BLACKLIST_REASON_ID */
  20835. A_UINT32 reason;
  20836. /* Source of adding AP to BL from WMI_BLACKLIST_SOURCE_ID */
  20837. A_UINT32 source;
  20838. /*
  20839. * timestamp is the absolute time w.r.t host timer which is synchronized
  20840. * between the host and target.
  20841. * This timestamp indicates the time when AP added to blacklist.
  20842. */
  20843. A_UINT32 timestamp;
  20844. /* Original timeout value in milli seconds when AP added to BL */
  20845. A_UINT32 original_timeout;
  20846. /*
  20847. * The disallow link ID bitmap indicates links which should not be allowed
  20848. * for any assoc or partner link combination.
  20849. * If all links for MLD AP are disallowed, then the value shall be
  20850. * 0xffffffff.
  20851. */
  20852. A_UINT32 disallow_linkid_bitmap;
  20853. /* MLD address of AP */
  20854. wmi_mac_addr mld;
  20855. /* List of link combinations for which association is failed */
  20856. A_UINT32 ml_failed_links_combo_bitmap[WMI_MAX_FAILED_LINK_COMBO_COUNT];
  20857. /* Failed link combo count filled in ml_failed_links_combo_bitmap[] */
  20858. A_UINT32 ml_failed_link_combo_count;
  20859. } wmi_roam_blacklist_with_timeout_tlv_param;
  20860. /** WMI_ROAM_BLACKLIST_EVENT: generated whenever STA needs to move AP to blacklist for a particluar time
  20861. * Ex: AP which sends BTM request with disassoc imminent is set should be
  20862. * moved to blacklist until disassociation timer expires
  20863. */
  20864. typedef struct {
  20865. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_blacklist_event_fixed_param */
  20866. A_UINT32 vdev_id;
  20867. /* This TLV is followed by further TLVs:
  20868. * wmi_roam_blacklist_with_timeout_tlv_param blacklist_with_timeout[]
  20869. */
  20870. } wmi_roam_blacklist_event_fixed_param;
  20871. typedef struct {
  20872. A_UINT32 tlv_header;
  20873. /** candidate AP mac address */
  20874. wmi_mac_addr bssid;
  20875. } wmi_roam_pmkid_request_tlv_param;
  20876. /** WMI_ROAM_PMKID_REQUEST_EVENT: generated whenever FW needs the PMKID while roaming **/
  20877. typedef struct {
  20878. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_pmkid_request_event_fixed_param */
  20879. A_UINT32 vdev_id;
  20880. /* This TLV is followed by further TLVs:
  20881. * wmi_roam_pmkid_request_tlv_param pmkid_request[]
  20882. */
  20883. } wmi_roam_pmkid_request_event_fixed_param;
  20884. /** WMI_ROAM_EVENT: roam event triggering the host roam logic.
  20885. * generated when ever a better AP is found in the recent roam scan (or)
  20886. * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received
  20887. * from the current AP.
  20888. */
  20889. typedef struct {
  20890. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_event_fixed_param */
  20891. /** unique id identifying the VDEV, generated by the caller */
  20892. A_UINT32 vdev_id;
  20893. /** reason for roam event */
  20894. A_UINT32 reason;
  20895. /** associated AP's RSSI calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI */
  20896. A_UINT32 rssi;
  20897. /** roam notification */
  20898. A_UINT32 notif;
  20899. /** roam notification param
  20900. * Refer to WMI_ROAM_NOTIF_ defs to interpret the notif_params value.
  20901. * notif_params contains roam invoke fail reason from
  20902. * wmi_roam_invoke_error_t if reason is WMI_ROAM_REASON_INVOKE_ROAM_FAIL.
  20903. */
  20904. A_UINT32 notif_params;
  20905. /** roam notification param1
  20906. * Refer to WMI_ROAM_NOTIF_ defs to interpret the notif_params1 value.
  20907. * notif_params1 is exact frame length of deauth or disassoc if reason
  20908. * is WMI_ROAM_REASON_DEAUTH.
  20909. */
  20910. A_UINT32 notif_params1;
  20911. } wmi_roam_event_fixed_param;
  20912. #define WMI_ROAM_BSS_INFO_FLAG_IS_MLD 0
  20913. typedef struct {
  20914. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bss_info_param */
  20915. /*
  20916. * bit0: WMI_ROAM_BSS_INFO_FLAG_IS_MLD
  20917. */
  20918. A_UINT32 flags;
  20919. /*
  20920. * mld score if WMI_ROAM_BSS_INFO_FLAG_IS_MLD set, otherwise link score
  20921. */
  20922. A_UINT32 score;
  20923. /*
  20924. * mld address if WMI_ROAM_BSS_INFO_FLAG_IS_MLD set, otherwise link address
  20925. */
  20926. wmi_mac_addr mac_addr;
  20927. } wmi_roam_bss_info_param;
  20928. /* roam_reason: bits 0-3 */
  20929. #define WMI_ROAM_REASON_INVALID 0x0 /** invalid reason. Do not interpret reason field */
  20930. #define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */
  20931. #define WMI_ROAM_REASON_BMISS 0x2 /** beacon miss detected */
  20932. #define WMI_ROAM_REASON_LOW_RSSI 0x3 /** connected AP's low RSSI condition detected */
  20933. #define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches
  20934. SSID and Security profile in
  20935. WMI_ROAM_AP_PROFILE, found during scan
  20936. triggered upon FINAL_BMISS **/
  20937. #define WMI_ROAM_REASON_HO_FAILED 0x5 /** LFR3.0 roaming failed, indicate the disconnection to host */
  20938. /** WMI_ROAM_REASON_INVOKE_ROAM_FAIL:
  20939. * Result code of WMI_ROAM_INVOKE_CMDID.
  20940. * Any roaming failure before reassociation will be indicated to host
  20941. * with this reason.
  20942. * Any roaming failure after reassociation will be indicated to host with
  20943. * WMI_ROAM_REASON_HO_FAILED no matter WMI_ROAM_INVOKE_CMDID is called or not.
  20944. */
  20945. #define WMI_ROAM_REASON_INVOKE_ROAM_FAIL 0x6
  20946. #define WMI_ROAM_REASON_RSO_STATUS 0x7
  20947. #define WMI_ROAM_REASON_BTM 0x8 /** Roaming because of BTM request received */
  20948. #define WMI_ROAM_REASON_DEAUTH 0x9 /** deauth/disassoc received */
  20949. /* reserved up through 0xF */
  20950. /* subnet status: bits 4-5 */
  20951. typedef enum
  20952. {
  20953. WMI_ROAM_SUBNET_CHANGE_STATUS_UNKNOWN = 0,
  20954. WMI_ROAM_SUBNET_CHANGE_STATUS_UNCHANGED,
  20955. WMI_ROAM_SUBNET_CHANGE_STATUS_CHANGED,
  20956. } wmi_roam_subnet_change_status;
  20957. #define WMI_ROAM_SUBNET_CHANGE_STATUS_MASK 0x30
  20958. #define WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT 4
  20959. #define WMI_SET_ROAM_SUBNET_CHANGE_STATUS(roam_reason, status) \
  20960. do { \
  20961. (roam_reason) |= \
  20962. (((status) << WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) & \
  20963. WMI_ROAM_SUBNET_CHANGE_STATUS_MASK); \
  20964. } while (0)
  20965. #define WMI_GET_ROAM_SUBNET_CHANGE_STATUS(roam_reason) \
  20966. (((roam_reason) & WMI_ROAM_SUBNET_CHANGE_STATUS_MASK) >> \
  20967. WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT)
  20968. #define WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK 0x40
  20969. #define WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT 6
  20970. #define WMI_SET_ROAM_REQUEST_HOST_HW_MODE_CHANGE(roam_reason, status) \
  20971. do { \
  20972. (roam_reason) |= \
  20973. (((status) << WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT) & \
  20974. WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK); \
  20975. } while (0)
  20976. #define WMI_GET_ROAM_REQUEST_HOST_HW_MODE_CHANGE(roam_reason) \
  20977. (((roam_reason) & WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK) >> \
  20978. WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT)
  20979. /* Bits 0-3: stores 4 LSbs of trigger reason.
  20980. * Old host will get trigger reasons <= 15 from this bitfield.
  20981. * Bit 7 will be 1 always to indicate that bits 8-15 are valid.
  20982. * Bits 8-15: full trigger_reason, including values > 15.
  20983. * New host will gett full trigger_reason from this bitfield.
  20984. * Bits 8-11 and bits 0-3 store matching values.
  20985. */
  20986. #define WMI_SET_ROAM_EXT_TRIGGER_REASON(roam_reason, trigger_reason) \
  20987. do { \
  20988. (roam_reason) |= (trigger_reason & 0xf); \
  20989. (roam_reason) |= 0x80; \
  20990. (roam_reason) |= ((trigger_reason & 0xff) << 8); \
  20991. } while (0)
  20992. /* roaming notification */
  20993. #define WMI_ROAM_NOTIF_INVALID 0x0 /** invalid notification. Do not interpret notif field */
  20994. #define WMI_ROAM_NOTIF_ROAM_START 0x1 /** indicate that roaming is started. sent only in non WOW state */
  20995. #define WMI_ROAM_NOTIF_ROAM_ABORT 0x2 /** indicate that roaming is aborted. sent only in non WOW state */
  20996. #define WMI_ROAM_NOTIF_ROAM_REASSOC 0x3 /** indicate that reassociation is done. sent only in non WOW state */
  20997. #define WMI_ROAM_NOTIF_SCAN_MODE_SUCCESS 0x4 /** indicate that roaming scan mode is successful */
  20998. #define WMI_ROAM_NOTIF_SCAN_MODE_FAIL 0x5 /** indicate that roaming scan mode is failed due to internal roaming state */
  20999. #define WMI_ROAM_NOTIF_DISCONNECT 0x6 /** indicate that roaming not allowed due BTM req */
  21000. #define WMI_ROAM_NOTIF_SUBNET_CHANGED 0x7 /** indicate that subnet has changed */
  21001. #define WMI_ROAM_NOTIF_SCAN_START 0x8 /** indicate roam scan start, notif_params to be sent as WMI_ROAM_TRIGGER_REASON_ID */
  21002. #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 */
  21003. #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 */
  21004. #define WMI_ROAM_NOTIF_SCAN_MODE_SUCCESS_WITH_HO_FAIL 0xb /** indicate that roaming scan mode is successful but cause disconnection and subsequent
  21005. ** WMI_ROAM_REASON_HO_FAILED is event expected */
  21006. #define WMI_ROAM_NOTIF_SCAN_END 0xc /** indicate roam scan end, notif_params to be sent as WMI_ROAM_TRIGGER_REASON_ID */
  21007. /**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc)
  21008. * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on this information
  21009. */
  21010. typedef struct
  21011. {
  21012. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ric_request_fixed_param */
  21013. A_UINT32 vdev_id; /**unique id identifying the VDEV, generated by the caller*/
  21014. A_UINT32 num_ric_request; /**number of ric request ie send to firmware.(max value is 2 now)*/
  21015. A_UINT32 is_add_ric; /**support add ric or delete ric*/
  21016. } wmi_ric_request_fixed_param;
  21017. /** tspec element: refer to 8.4.2.32 of 802.11 2012 spec
  21018. * these elements are used to construct tspec field in RIC request, which allow station to require specific TS when 11r roaming
  21019. */
  21020. typedef struct {
  21021. A_UINT32 tlv_header;
  21022. A_UINT32 ts_info; /** bits value of TS Info field.*/
  21023. A_UINT32 nominal_msdu_size; /**Nominal MSDU Size field*/
  21024. A_UINT32 maximum_msdu_size; /**The Maximum MSDU Size field*/
  21025. A_UINT32 min_service_interval; /**The Minimum Service Interval field*/
  21026. A_UINT32 max_service_interval; /**The Maximum Service Interval field*/
  21027. A_UINT32 inactivity_interval; /**The Inactivity Interval field*/
  21028. A_UINT32 suspension_interval; /**The Suspension Interval field*/
  21029. A_UINT32 svc_start_time; /**The Service Start Time field*/
  21030. A_UINT32 min_data_rate; /**The Minimum Data Rate field*/
  21031. A_UINT32 mean_data_rate; /**The Mean Data Rate field*/
  21032. A_UINT32 peak_data_rate; /**The Peak Data Rate field*/
  21033. A_UINT32 max_burst_size; /**The Burst Size field*/
  21034. A_UINT32 delay_bound; /**The Delay Bound field*/
  21035. A_UINT32 min_phy_rate; /**The Minimum PHY Rate field*/
  21036. A_UINT32 surplus_bw_allowance; /**The Surplus Bandwidth Allowance field*/
  21037. A_UINT32 medium_time; /**The Medium Time field,in units of 32 us/s.*/
  21038. } wmi_ric_tspec;
  21039. /* flags for roam_invoke_cmd */
  21040. /* add this channel into roam cache channel list after this command is finished */
  21041. #define WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE 0
  21042. /* indicate to host of failure if WMI_ROAM_INVOKE_CMDID. */
  21043. #define WMI_ROAM_INVOKE_FLAG_REPORT_FAILURE 1
  21044. /* during host-invoked roaming, don't send null data frame to AP */
  21045. #define WMI_ROAM_INVOKE_FLAG_NO_NULL_FRAME_TO_AP 2
  21046. /* start extra full scan if no candidate found in previous scan */
  21047. #define WMI_ROAM_INVOKE_FLAG_FULL_SCAN_IF_NO_CANDIDATE 3
  21048. /* when bit is set:
  21049. * Candidate selection algo will based on fw score algo.
  21050. * Which means configurations like wmi_roam_score_delta_param,
  21051. * wmi_configure_roam_trigger_parameters is also configurable for
  21052. * host_invoke roam, as well as consider current BSS score as
  21053. * score algo input.
  21054. * when bit is not set:
  21055. * Candidate selection algo will ignore score and above configurations
  21056. * and ignore current BSS score.
  21057. */
  21058. #define WMI_ROAM_INVOKE_FLAG_SELECT_CANDIDATE_CONSIDER_SCORE 4
  21059. /* from bit 5 to bit 31 are reserved */
  21060. #define WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
  21061. (flag) |= (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
  21062. } while (0)
  21063. #define WMI_CLEAR_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
  21064. (flag) &= ~(1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
  21065. } while (0)
  21066. #define WMI_GET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) \
  21067. ((flag) & (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE))
  21068. #define WMI_ROAM_INVOKE_SCAN_MODE_FIXED_CH 0 /* scan given channel only */
  21069. #define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_LIST 1 /* scan cached channel list */
  21070. #define WMI_ROAM_INVOKE_SCAN_MODE_FULL_CH 2 /* scan full channel */
  21071. #define WMI_ROAM_INVOKE_SCAN_MODE_SKIP 3 /* no scan is performed. use beacon/probe resp given by the host */
  21072. #define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_MAP 4 /* scan cached channel map */
  21073. #define WMI_ROAM_INVOKE_AP_SEL_FIXED_BSSID 0 /* roam to given BSSID only */
  21074. #define WMI_ROAM_INVOKE_AP_SEL_ANY_BSSID 1 /* roam to any BSSID */
  21075. enum wlan_roam_invoke_reason {
  21076. ROAM_INVOKE_REASON_UNDEFINED = 0,
  21077. /* FW will use default parameters to do roam scan, ignore other parameters like WLM, etc. */
  21078. ROAM_INVOKE_REASON_NUD_FAILURE, /* Neighbor Unreachable Detection */
  21079. ROAM_INVOKE_REASON_USER_SPACE,
  21080. };
  21081. /** WMI_ROAM_INVOKE_CMD: command to invoke roaming forcefully
  21082. *
  21083. if <roam_scan_ch_mode> is zero and <channel_no> is not given, roaming is not executed.
  21084. if <roam_ap_sel_mode> is zero and <BSSID) is not given, roaming is not executed
  21085. This command can be used to add specific channel into roam cached channel list by following
  21086. <roam_scan_ch_mode> = 0
  21087. <roam_ap_sel_mode> = 0
  21088. <roam_delay> = 0
  21089. <flag> |= WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE
  21090. <BSSID> = do not fill (there will be no actual roaming because of ap_sel_mode is zero, but no BSSID is given)
  21091. <channel_no> = channel list to be added
  21092. */
  21093. typedef struct {
  21094. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_invoke_fixed_param */
  21095. A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming is invoked */
  21096. A_UINT32 flags; /** flags. see WMI_ROAM_INVOKE_FLAG_ above */
  21097. A_UINT32 roam_scan_mode; /** see WMI_ROAM_INVOKE_SCAN_ above */
  21098. A_UINT32 roam_ap_sel_mode; /** see WMI_ROAM_INVOKE_AP_SEL_ above */
  21099. A_UINT32 roam_delay; /** 0 = immediate roam, 1-2^32 = roam after this delay (msec) */
  21100. A_UINT32 num_chan; /** # if channels to scan. In the TLV channel_list[] */
  21101. A_UINT32 num_bssid; /** number of bssids. In the TLV bssid_list[] */
  21102. A_UINT32 num_buf; /** number of buffers In the TLV bcn_prb_buf_list[] */
  21103. A_UINT32 reason; /** reason of invoke roam, see enum wlan_roam_invoke_reason */
  21104. /**
  21105. * TLV (tag length value) parameters follows roam_invoke_req
  21106. * The TLV's are:
  21107. * A_UINT32 channel_list[]; // in MHz
  21108. * wmi_mac_addr bssid_list[];
  21109. * wmi_tlv_buf_len_param bcn_prb_buf_list[];
  21110. * A_UINT8 bcn_prb_frm[];
  21111. */
  21112. } wmi_roam_invoke_cmd_fixed_param;
  21113. /* Definition for op_bitmap */
  21114. enum {
  21115. ROAM_FILTER_OP_BITMAP_BLACK_LIST = 0x1,
  21116. ROAM_FILTER_OP_BITMAP_WHITE_LIST = 0x2,
  21117. ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4,
  21118. ROAM_FILTER_OP_BITMAP_LCA_DISALLOW = 0x8,
  21119. ROAM_FILTER_OP_BITMAP_RSSI_REJECTION_OCE = 0x10,
  21120. };
  21121. /** lca_enable_source_bitmap */
  21122. #define WMI_ROAM_LCA_DISALLOW_SOURCE_PER 0x1
  21123. #define WMI_ROAM_LCA_DISALLOW_SOURCE_BMISS 0x2
  21124. #define WMI_ROAM_LCA_DISALLOW_SOURCE_LOW_RSSI 0x4
  21125. #define WMI_ROAM_LCA_DISALLOW_SOURCE_HIGH_RSSI 0x8
  21126. #define WMI_ROAM_LCA_DISALLOW_SOURCE_PERIODIC 0x10
  21127. #define WMI_ROAM_LCA_DISALLOW_SOURCE_MAWC 0x20 /* MAWC = Motion Aided Wifi connectivity */
  21128. #define WMI_ROAM_LCA_DISALLOW_SOURCE_DENSE 0x40
  21129. #define WMI_ROAM_LCA_DISALLOW_SOURCE_BACKGROUND 0x80
  21130. #define WMI_ROAM_LCA_DISALLOW_SOURCE_FORCED 0x100
  21131. typedef struct {
  21132. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_rejection_list_config_param */
  21133. A_UINT32 tlv_header;
  21134. /** BSSID of AP, who reject (re-)assoc due to low RSSI */
  21135. wmi_mac_addr bssid;
  21136. /** Disallowed AP for certain duration, in units of milliseconds */
  21137. A_UINT32 remaining_disallow_duration;
  21138. /** AP will be allowed for candidate, when AP RSSI better than expected RSSI units in dBm */
  21139. A_INT32 requested_rssi;
  21140. } wmi_roam_rejection_list_config_param;
  21141. 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 */
  21142. typedef struct {
  21143. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */
  21144. A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming filter is adopted */
  21145. A_UINT32 flags; /** flags for filter */
  21146. A_UINT32 op_bitmap; /** 32 bit bitmap to be set on. bit0 = first param, bit 1 = second param...etc. Can be or'ed */
  21147. A_UINT32 num_bssid_black_list; /* number of blacklist in the TLV variable bssid_black_list */
  21148. A_UINT32 num_ssid_white_list; /* number of whitelist in the TLV variable ssid_white_list */
  21149. A_UINT32 num_bssid_preferred_list; /* only for lfr 3.0. number of preferred list & factor in the TLV */
  21150. A_UINT32 num_rssi_rejection_ap; /** number of list of AP who rejected STA due to low RSSI */
  21151. A_UINT32 delta_rssi; /** (dB units) when AB in RSSI blacklist improved by at least delta_rssi, it will be removed from blacklist */
  21152. /**
  21153. * TLV (tag length value) parameters follows roam_filter_list_cmd
  21154. * The TLV's are:
  21155. * wmi_mac_addr bssid_black_list[];
  21156. * wmi_ssid ssid_white_list[];
  21157. * wmi_mac_addr bssid_preferred_list[];
  21158. * A_UINT32 bssid_preferred_factor[];
  21159. * wmi_roam_lca_disallow_config_tlv_param lca_disallow_param[0/1] (opt)
  21160. * wmi_roam_rejection_list_config_param rssi_rejection_list[]
  21161. */
  21162. } wmi_roam_filter_fixed_param;
  21163. typedef struct {
  21164. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_lca_disallow_config_tlv_param */
  21165. A_UINT32 disallow_duration; /** How long LCA AP will be disallowed before it can be a roaming candidate again, in units of seconds */
  21166. 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 */
  21167. A_UINT32 num_disallowed_aps; /** How many APs the target should maintain in its LCA (Last Connected AP) list */
  21168. 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) */
  21169. } wmi_roam_lca_disallow_config_tlv_param;
  21170. typedef struct {
  21171. A_UINT8 address[4]; /* IPV4 address in Network Byte Order */
  21172. } WMI_IPV4_ADDR;
  21173. typedef struct _WMI_IPV6_ADDR {
  21174. A_UINT8 address[16]; /* IPV6 in Network Byte Order */
  21175. } WMI_IPV6_ADDR;
  21176. /* flags for subnet change detection */
  21177. #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0
  21178. #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1
  21179. /* bit 2 to bit 31 are reserved */
  21180. /* set IPv4 enabled/disabled flag and get the flag */
  21181. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \
  21182. (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
  21183. } while (0)
  21184. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \
  21185. (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
  21186. } while (0)
  21187. #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \
  21188. ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED))
  21189. /* set IPv6 enabled flag, disabled and get the flag */
  21190. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \
  21191. (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
  21192. } while (0)
  21193. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \
  21194. (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
  21195. } while (0)
  21196. #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) \
  21197. ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED))
  21198. /**
  21199. * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses
  21200. * to FW. FW uses these parameters for subnet change detection.
  21201. */
  21202. typedef struct {
  21203. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param */
  21204. /** unique id identifying the VDEV, generated by the caller */
  21205. A_UINT32 vdev_id;
  21206. /** IPv4/IPv6 enabled/disabled */
  21207. /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/DISABLED */
  21208. A_UINT32 flag;
  21209. /** Gateway MAC address */
  21210. wmi_mac_addr inet_gw_mac_addr;
  21211. /** IP addresses */
  21212. WMI_IPV4_ADDR inet_gw_ip_v4_addr;
  21213. WMI_IPV6_ADDR inet_gw_ip_v6_addr;
  21214. /** Number of software retries for ARP/Neighbor solicitation request */
  21215. A_UINT32 max_retries;
  21216. /** timeout in milliseconds for each ARP request*/
  21217. A_UINT32 timeout;
  21218. /** number of skipped aps **/
  21219. A_UINT32 num_skip_subnet_change_detection_bssid_list;
  21220. /**
  21221. * TLV (tag length value) parameters follows roam_subnet_change_config_cmd
  21222. * structure. The TLV's are:
  21223. * wmi_mac_addr skip_subnet_change_detection_bssid_list [];
  21224. **/
  21225. } wmi_roam_subnet_change_config_fixed_param;
  21226. typedef enum {
  21227. /** No change in scan mode, use legacy modes */
  21228. ROAM_TRIGGER_SCAN_MODE_NONE = 0,
  21229. /** Trigger only partial roam scan */
  21230. ROAM_TRIGGER_SCAN_MODE_PARTIAL,
  21231. /** Trigger only FULL roam scan */
  21232. ROAM_TRIGGER_SCAN_MODE_FULL,
  21233. /** Don't trigger any roam scan and disconnect from AP */
  21234. ROAM_TRIGGER_SCAN_MODE_NO_SCAN_DISCONNECTION,
  21235. } WMI_ROAM_TRIGGER_SCAN_MODE;
  21236. typedef struct {
  21237. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_configure_roam_trigger_parameters */
  21238. A_UINT32 trigger_reason; /** Roam trigger reason from WMI_ROAM_TRIGGER_REASON_ID */
  21239. A_UINT32 enable; /** 0 - Disable, non-zero - enable */
  21240. A_UINT32 scan_mode; /** Scan mode from WMI_ROAM_TRIGGER_SCAN_MODE */
  21241. /** consider roam trigger if connected AP RSSI is worse than trigger_rssi_threshold */
  21242. A_INT32 trigger_rssi_threshold; /* Units in dBm */
  21243. /*
  21244. * Consider 2.4GHz AP as roam candidate only if AP RSSI is better than
  21245. * cand_ap_min_rssi_threshold
  21246. * If valid (non-zero) cand_ap_min_rssi_threshold_5g and
  21247. * cand_ap_min_rssi_threshold_6g values are provided,
  21248. * then cand_ap_min_rssi_threshold should only be applied to 2.4 GHz APs.
  21249. * But if cand_ap_min_rssi_threshold_5g and cand_ap_min_rssi_threshold_6g
  21250. * are zeros, then cand_ap_min_rssi_threshold should be applied to all APs.
  21251. */
  21252. A_INT32 cand_ap_min_rssi_threshold; /* Units in dBm */
  21253. /* Roam score delta in %.
  21254. * Consider AP as roam candidate only if AP score is at least
  21255. * roam_score_delta % better than connected AP score.
  21256. * Ex: roam_score_delta = 20, and connected AP score is 4000,
  21257. * then consider candidate AP only if its score is at least
  21258. * 4800 (= 4000 * 120%)
  21259. */
  21260. A_UINT32 roam_score_delta_percentage;
  21261. /* Reason code to be filled in the response frame from STA.
  21262. Ex: Reason code in the BTM response frame
  21263. Valid values are 0 - 255 */
  21264. A_UINT32 reason_code;
  21265. /*
  21266. * Consider 5GHz AP as roam candidate only if AP RSSI is better than
  21267. * cand_ap_min_rssi_threshold_5g
  21268. */
  21269. A_INT32 cand_ap_min_rssi_threshold_5g; /* Units in dBm */
  21270. /*
  21271. * Consider 6 GHz AP as roam candidate only if AP RSSI is better than
  21272. * cand_ap_min_rssi_threshold_6g
  21273. */
  21274. A_INT32 cand_ap_min_rssi_threshold_6g; /* Units in dBm */
  21275. } wmi_configure_roam_trigger_parameters;
  21276. /**
  21277. * WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON:
  21278. * Enable or disable roaming triggers in FW.
  21279. */
  21280. typedef struct {
  21281. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_enable_disable_trigger_reason_fixed_param */
  21282. /** unique id identifying the VDEV, generated by the caller */
  21283. A_UINT32 vdev_id;
  21284. /**
  21285. * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
  21286. * positions) showing for which roam_trigger_reasons are enabled by
  21287. * bit value equal 0x1, and which roam_trigger_reasons are disabled by
  21288. * bit value equal 0x0.
  21289. */
  21290. A_UINT32 trigger_reason_bitmask;
  21291. /**
  21292. * The following TLVs will follow this fixed_param TLV:
  21293. *
  21294. * wmi_configure_roam_trigger_parameters config_roam_trigger_param[]
  21295. * Roam trigger configuration per roam trigger.
  21296. * The number of elements in this TLV array is limited to
  21297. * WMI_ROAM_TRIGGER_EXT_REASON_MAX
  21298. */
  21299. } wmi_roam_enable_disable_trigger_reason_fixed_param;
  21300. /** WMI_PROFILE_MATCH_EVENT: offload scan
  21301. * generated when ever atleast one of the matching profiles is found
  21302. * in recent NLO scan. no data is carried with the event.
  21303. */
  21304. /** P2P specific commands */
  21305. /**
  21306. * WMI_P2P_DEV_SET_DEVICE_INFO : p2p device info, which will be used by
  21307. * FW to generate P2P IE tobe carried in probe response frames.
  21308. * FW will respond to probe requests while in listen state.
  21309. */
  21310. typedef struct {
  21311. /* number of secondary device types,supported */
  21312. A_UINT32 num_secondary_dev_types;
  21313. /**
  21314. * followed by 8 bytes of primary device id and
  21315. * num_secondary_dev_types * 8 bytes of secondary device
  21316. * id.
  21317. */
  21318. } wmi_p2p_dev_set_device_info;
  21319. /** WMI_P2P_DEV_SET_DISCOVERABILITY: enable/disable discoverability
  21320. * state. if enabled, an active STA/AP will respond to P2P probe requests on
  21321. * the operating channel of the VDEV.
  21322. */
  21323. typedef struct {
  21324. /* 1:enable disoverability, 0:disable discoverability */
  21325. A_UINT32 enable_discoverability;
  21326. } wmi_p2p_set_discoverability;
  21327. /** WMI_P2P_GO_SET_BEACON_IE: P2P IE to be added to
  21328. * beacons generated by FW. used in FW beacon mode.
  21329. * the FW will add this IE to beacon in addition to the beacon
  21330. * template set by WMI_BCN_TMPL_CMDID command.
  21331. */
  21332. typedef struct {
  21333. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_set_beacon_ie_fixed_param */
  21334. /** unique id identifying the VDEV, generated by the caller */
  21335. A_UINT32 vdev_id;
  21336. /* ie length */
  21337. A_UINT32 ie_buf_len;
  21338. /* Following this structure is the TLV byte stream of ie data of length ie_buf_len:
  21339. * A_UINT8 ie_data[]; <-- length in byte given by field num_data.
  21340. */
  21341. } wmi_p2p_go_set_beacon_ie_fixed_param;
  21342. /** WMI_P2P_GO_PROBE_RESP_IE: P2P IE to be added to
  21343. * probe response generated by FW. used in FW beacon mode.
  21344. * the FW will add this IE to probe response in addition to the probe response
  21345. * template set by WMI_PRB_TMPL_CMDID command.
  21346. */
  21347. typedef struct {
  21348. /** unique id identifying the VDEV, generated by the caller */
  21349. A_UINT32 vdev_id;
  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_go_set_probe_resp_ie;
  21354. /** WMI_P2P_SET_VENDOR_IE_DATA_CMDID: Vendor specific P2P IE data, which will
  21355. * be used by the FW to parse the P2P NoA attribute in beacons, probe responses
  21356. * and action frames received by the P2P Client.
  21357. * Note: This command is currently used only for Apple P2P implementation.
  21358. */
  21359. typedef struct {
  21360. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param */
  21361. /** OS specific P2P IE OUI (3 bytes) + OUI type (1 byte) */
  21362. A_UINT32 p2p_ie_oui_type;
  21363. /** OS specific NoA Attribute ID */
  21364. A_UINT32 p2p_noa_attribute;
  21365. } wmi_p2p_set_vendor_ie_data_cmd_fixed_param;
  21366. /*----P2P disc offload definition ----*/
  21367. typedef struct {
  21368. A_UINT32 pattern_type;
  21369. /**
  21370. * TLV (tag length value) parameters follow the pattern structure.
  21371. * TLV can contain bssid list, ssid list and
  21372. * ie. the TLV tags are defined above;
  21373. */
  21374. } wmi_p2p_disc_offload_pattern_cmd;
  21375. typedef struct {
  21376. /* unique id identifying the VDEV, generated by the caller */
  21377. A_UINT32 vdev_id;
  21378. /* mgmt type of the ie*/
  21379. A_UINT32 mgmt_type;
  21380. /* ie length */
  21381. A_UINT32 ie_buf_len;
  21382. /*followed by byte stream of ie data of length ie_buf_len */
  21383. } wmi_p2p_disc_offload_appie_cmd;
  21384. typedef struct {
  21385. /* enable/disable p2p find offload*/
  21386. A_UINT32 enable;
  21387. /* unique id identifying the VDEV, generated by the caller */
  21388. A_UINT32 vdev_id;
  21389. /* p2p find type */
  21390. A_UINT32 disc_type;
  21391. /* p2p find perodic */
  21392. A_UINT32 perodic;
  21393. /* p2p find listen channel in MHz */
  21394. A_UINT32 listen_channel;
  21395. /* p2p find full channel number */
  21396. A_UINT32 num_scan_chans;
  21397. /**
  21398. * TLV (tag length value) parameters follow the pattern structure.
  21399. * TLV contain channel list in MHz
  21400. */
  21401. } wmi_p2p_disc_offload_config_cmd;
  21402. /*----P2P OppPS definition ----*/
  21403. typedef struct {
  21404. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param */
  21405. A_UINT32 tlv_header;
  21406. /* unique id identifying the VDEV, generated by the caller */
  21407. A_UINT32 vdev_id;
  21408. /* OppPS attributes */
  21409. /** Bit 0: Indicate enable/disable of OppPS
  21410. * Bits 7-1: Ctwindow in TUs
  21411. * Bits 31-8: Reserved
  21412. */
  21413. A_UINT32 oppps_attr;
  21414. } wmi_p2p_set_oppps_cmd_fixed_param;
  21415. #define WMI_UNIFIED_OPPPS_ATTR_ENALBED 0x1
  21416. #define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S 0
  21417. #define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr) \
  21418. WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED)
  21419. #define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr) \
  21420. WMI_F_RMW((hdr)->oppps_attr, 0x1, \
  21421. WMI_UNIFIED_OPPPS_ATTR_ENALBED);
  21422. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN 0xfe
  21423. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S 1
  21424. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr) \
  21425. WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN)
  21426. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v) \
  21427. WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f, \
  21428. WMI_UNIFIED_OPPPS_ATTR_CTWIN);
  21429. typedef enum p2p_lo_start_ctrl_flags_e {
  21430. P2P_LO_START_CTRL_FLAG_FLUSH_LISTEN_RESULT = 1 << 0, /* flush prob. req when host is awake */
  21431. } p2p_lo_start_ctrl_flags;
  21432. #define P2P_LO_PER_DEV_TYPE_LEN 8
  21433. #define P2P_LO_DEV_TYPES_COUNT_MAX 10
  21434. #define P2P_LO_DEV_TYPES_LEN_MAX (P2P_LO_PER_DEV_TYPE_LEN * P2P_LO_DEV_TYPES_COUNT_MAX)
  21435. #define P2P_LO_PROB_RESP_MAX_LEN 512
  21436. typedef struct {
  21437. A_UINT32 tlv_header;
  21438. A_UINT32 vdev_id;
  21439. A_UINT32 ctl_flags; /* refer to enum_p2p_lo_start_ctrl_flags_e */
  21440. A_UINT32 channel; /* MHz */
  21441. A_UINT32 period; /* ms */
  21442. A_UINT32 interval; /* ms, interval should be larger than period */
  21443. A_UINT32 count; /* 0 means forever */
  21444. /*
  21445. * device_types_len specifies the number of bytes in the
  21446. * device_types_data[] byte-array TLV that follows this TLV.
  21447. * The data in device_types_data[] is in 8-byte elements, so
  21448. * device_types_len will be a multiple of 8.
  21449. * Refer to P2P_LO_DEV_TYPES_LEN_MAX
  21450. */
  21451. A_UINT32 device_types_len;
  21452. /*
  21453. * prob_resp_len specifies the number of bytes in the
  21454. * prob_resp_data[] byte-array TLV that follows this TLV.
  21455. * Refer to P2P_LO_PROB_RESP_MAX_LEN
  21456. */
  21457. A_UINT32 prob_resp_len;
  21458. /* MAC address to be used for P2P discovery */
  21459. wmi_mac_addr p2p_disc_mac_addr;
  21460. /*
  21461. * Two other TLVs follow this TLV:
  21462. * A_UINT8 device_types_data[device_types_len];
  21463. * A_UINT8 prob_resp_data[prob_resp_len];
  21464. * The information in device_types_data[] and prob_resp_data[]
  21465. * needs to be provided to the target in over-the-air byte order.
  21466. * On a big-endian host, if device_types_data and prob_resp_data
  21467. * are initially in the correct over-the-air byte order,
  21468. * the automatic byteswap for endianness-correction during WMI
  21469. * message download will mess up the byte order.
  21470. * Thus, a big-endian host needs to explicitly byte-swap the bytes
  21471. * within each quad-byte segment of device_types_data[] and
  21472. * prob_resp_data[], so that the automatic byte-swap applied during
  21473. * WMI download from a big-endian host to the little-endian target
  21474. * will restore device_types_data and prob_resp_data into the
  21475. * correct byte ordering.
  21476. */
  21477. } wmi_p2p_lo_start_cmd_fixed_param;
  21478. typedef struct {
  21479. A_UINT32 tlv_header;
  21480. A_UINT32 vdev_id;
  21481. } wmi_p2p_lo_stop_cmd_fixed_param;
  21482. typedef enum p2p_lo_stopped_reason_e {
  21483. P2P_LO_STOPPED_REASON_COMPLETE = 0, /* finished as scheduled */
  21484. P2P_LO_STOPPED_REASON_RECV_STOP_CMD, /* host stops it */
  21485. P2P_LO_STOPPED_REASON_INVALID_LO_PAR, /* invalid listen offload par */
  21486. P2P_LO_STOPPED_REASON_FW_NOT_SUPPORT, /* vdev cannot support it right now */
  21487. } p2p_lo_stopped_reason;
  21488. typedef struct {
  21489. A_UINT32 tlv_header;
  21490. A_UINT32 vdev_id;
  21491. A_UINT32 reason;/* refer to p2p_lo_stopped_reason_e */
  21492. } wmi_p2p_lo_stopped_event_fixed_param;
  21493. typedef enum {
  21494. WMI_MNT_FILTER_CONFIG_MANAGER,
  21495. WMI_MNT_FILTER_CONFIG_CONTROL,
  21496. WMI_MNT_FILTER_CONFIG_DATA,
  21497. WMI_MNT_FILTER_CONFIG_ALL,
  21498. WMI_MNT_FILTER_CONFIG_UNKNOWN,
  21499. } WMI_MNT_FILTER_CONFIG_TYPE;
  21500. typedef struct {
  21501. A_UINT32 tlv_header;
  21502. A_UINT32 vdev_id;
  21503. A_UINT32 clear_or_set;
  21504. A_UINT32 configure_type; /* see WMI_MNT_FILTER_CONFIG_TYPE */
  21505. } wmi_mnt_filter_cmd_fixed_param;
  21506. typedef struct {
  21507. A_UINT32 time32; /* upper 32 bits of time stamp */
  21508. A_UINT32 time0; /* lower 32 bits of time stamp */
  21509. } A_TIME64;
  21510. typedef enum wmi_peer_sta_kickout_reason {
  21511. WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0, /* default value to preserve legacy behavior */
  21512. WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1,
  21513. WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2,
  21514. WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3,
  21515. WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4, /* TDLS peer has disappeared. All tx is failing */
  21516. WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5,
  21517. WMI_PEER_STA_KICKOUT_REASON_ROAMING_EVENT = 6, /* Directly connected peer has roamed to a repeater */
  21518. WMI_PEER_STA_KICKOUT_REASON_PMF_ERROR = 7, /* PMF error threshold is hit */
  21519. } PEER_KICKOUT_REASON;
  21520. typedef struct {
  21521. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_kickout_event_fixed_param */
  21522. /** peer mac address */
  21523. wmi_mac_addr peer_macaddr;
  21524. /** Reason code, defined as above */
  21525. A_UINT32 reason;
  21526. /** RSSI of the last bcn (averaged) in dB. 0 means Noise Floor value */
  21527. A_UINT32 rssi;
  21528. } wmi_peer_sta_kickout_event_fixed_param;
  21529. #define WMI_WLAN_PROFILE_MAX_HIST 3
  21530. #define WMI_WLAN_PROFILE_MAX_BIN_CNT 32
  21531. typedef struct _wmi_wlan_profile_t {
  21532. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_t */
  21533. A_UINT32 id;
  21534. A_UINT32 cnt;
  21535. A_UINT32 tot;
  21536. A_UINT32 min;
  21537. A_UINT32 max;
  21538. A_UINT32 hist_intvl;
  21539. A_UINT32 hist[WMI_WLAN_PROFILE_MAX_HIST];
  21540. } wmi_wlan_profile_t;
  21541. typedef struct _wmi_wlan_profile_ctx_t {
  21542. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_ctx_t */
  21543. A_UINT32 tot; /* time in us */
  21544. A_UINT32 tx_msdu_cnt;
  21545. A_UINT32 tx_mpdu_cnt;
  21546. A_UINT32 tx_ppdu_cnt;
  21547. A_UINT32 rx_msdu_cnt;
  21548. A_UINT32 rx_mpdu_cnt;
  21549. A_UINT32 bin_count;
  21550. } wmi_wlan_profile_ctx_t;
  21551. typedef struct {
  21552. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_trigger_cmd_fixed_param */
  21553. A_UINT32 enable;
  21554. } wmi_wlan_profile_trigger_cmd_fixed_param;
  21555. typedef struct {
  21556. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_get_prof_data_cmd_fixed_param */
  21557. A_UINT32 value;
  21558. } wmi_wlan_profile_get_prof_data_cmd_fixed_param;
  21559. typedef struct {
  21560. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_set_hist_intvl_cmd_fixed_param */
  21561. A_UINT32 profile_id;
  21562. A_UINT32 value;
  21563. } wmi_wlan_profile_set_hist_intvl_cmd_fixed_param;
  21564. typedef struct {
  21565. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_enable_profile_id_cmd_fixed_param */
  21566. A_UINT32 profile_id;
  21567. A_UINT32 enable;
  21568. } wmi_wlan_profile_enable_profile_id_cmd_fixed_param;
  21569. /*Wifi header is upto 26, LLC is 8, with 14 byte duplicate in 802.3 header, that's 26+8-14=20.
  21570. 146-128=18. So this means it is converted to non-QoS header. Riva FW take care of the QOS/non-QOS
  21571. when comparing wifi header.*/
  21572. /* NOTE: WOW_DEFAULT_BITMAP_PATTERN_SIZE(_DWORD) and WOW_DEFAULT_BITMASK_SIZE(_DWORD) can't be changed without breaking the compatibility */
  21573. #define WOW_DEFAULT_BITMAP_PATTERN_SIZE 146
  21574. #define WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD 37 /* Convert WOW_DEFAULT_EVT_BUF_SIZE into Int32 size */
  21575. #define WOW_DEFAULT_BITMASK_SIZE 146
  21576. #define WOW_DEFAULT_BITMASK_SIZE_DWORD 37
  21577. #define WOW_MAX_BITMAP_FILTERS 32
  21578. #define WOW_DEFAULT_MAGIG_PATTERN_MATCH_CNT 16
  21579. #define WOW_EXTEND_PATTERN_MATCH_CNT 16
  21580. #define WOW_SHORT_PATTERN_MATCH_CNT 8
  21581. #define WOW_DEFAULT_EVT_BUF_SIZE 148 /* Maximum 148 bytes of the data is copied starting from header incase if the match is found.
  21582. The 148 comes from (128 - 14) payload size + 8bytes LLC + 26bytes MAC header*/
  21583. #define WOW_DEFAULT_IOAC_PATTERN_SIZE 6
  21584. #define WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD 2
  21585. #define WOW_DEFAULT_IOAC_RANDOM_SIZE 6
  21586. #define WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD 2
  21587. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE 120
  21588. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD 30
  21589. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE 32
  21590. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD 8
  21591. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE 32
  21592. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD 8
  21593. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE 128
  21594. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD 32
  21595. typedef enum pattern_type_e {
  21596. WOW_PATTERN_MIN = 0,
  21597. WOW_BITMAP_PATTERN = WOW_PATTERN_MIN,
  21598. WOW_IPV4_SYNC_PATTERN,
  21599. WOW_IPV6_SYNC_PATTERN,
  21600. WOW_WILD_CARD_PATTERN,
  21601. WOW_TIMER_PATTERN,
  21602. WOW_MAGIC_PATTERN,
  21603. WOW_IPV6_RA_PATTERN,
  21604. WOW_IOAC_PKT_PATTERN,
  21605. WOW_IOAC_TMR_PATTERN,
  21606. WOW_IOAC_SOCK_PATTERN,
  21607. WOW_PATTERN_MAX
  21608. } WOW_PATTERN_TYPE;
  21609. typedef enum event_type_e {
  21610. WOW_BMISS_EVENT = 0, /* 0 */
  21611. WOW_BETTER_AP_EVENT, /* 1 */
  21612. WOW_DEAUTH_RECVD_EVENT, /* 2 */
  21613. WOW_MAGIC_PKT_RECVD_EVENT, /* 3 */
  21614. WOW_GTK_ERR_EVENT, /* 4 */
  21615. WOW_FOURWAY_HSHAKE_EVENT, /* 5 */
  21616. WOW_EAPOL_RECVD_EVENT, /* 6 */
  21617. WOW_NLO_DETECTED_EVENT, /* 7 */
  21618. WOW_DISASSOC_RECVD_EVENT, /* 8 */
  21619. WOW_PATTERN_MATCH_EVENT, /* 9 */
  21620. WOW_CSA_IE_EVENT, /* 10 */
  21621. WOW_PROBE_REQ_WPS_IE_EVENT, /* 11 */
  21622. WOW_AUTH_REQ_EVENT, /* 12 */
  21623. WOW_ASSOC_REQ_EVENT, /* 13 */
  21624. WOW_HTT_EVENT, /* 14 */
  21625. WOW_RA_MATCH_EVENT, /* 15 */
  21626. WOW_HOST_AUTO_SHUTDOWN_EVENT, /* 16 */
  21627. WOW_IOAC_MAGIC_EVENT, /* 17 */
  21628. WOW_IOAC_SHORT_EVENT, /* 18 */
  21629. WOW_IOAC_EXTEND_EVENT, /* 19 */
  21630. WOW_IOAC_TIMER_EVENT, /* 20 */
  21631. WOW_DFS_PHYERR_RADAR_EVENT, /* 21 */
  21632. WOW_BEACON_EVENT, /* 22 */
  21633. WOW_CLIENT_KICKOUT_EVENT, /* 23 */
  21634. WOW_NAN_EVENT, /* 24 */
  21635. WOW_EXTSCAN_EVENT, /* 25 */
  21636. WOW_IOAC_REV_KA_FAIL_EVENT, /* 26 */
  21637. WOW_IOAC_SOCK_EVENT, /* 27 */
  21638. WOW_NLO_SCAN_COMPLETE_EVENT, /* 28 */
  21639. WOW_NAN_DATA_EVENT, /* 29 */
  21640. WOW_NAN_RTT_EVENT, /* DEPRECATED, UNUSED; 30 */
  21641. WOW_OEM_RESPONSE_EVENT = WOW_NAN_RTT_EVENT, /* reuse deprecated event value; 30 */
  21642. WOW_TDLS_CONN_TRACKER_EVENT, /* 31 */
  21643. WOW_CRITICAL_LOG_EVENT, /* 32 + 0 */
  21644. WOW_CHIP_POWER_FAILURE_DETECT_EVENT, /* 32 + 1 */
  21645. WOW_11D_SCAN_EVENT, /* 32 + 2 */
  21646. WOW_SAP_OBSS_DETECTION_EVENT, /* 32 + 3 */
  21647. WOW_BSS_COLOR_COLLISION_DETECT_EVENT, /* 32 + 4 */
  21648. WOW_TKIP_MIC_ERR_FRAME_RECVD_EVENT, /* 32 + 5 */
  21649. WOW_ROAM_PREAUTH_START_EVENT, /* 32 + 6 */
  21650. WOW_ROAM_PMKID_REQUEST_EVENT, /* 32 + 7 */
  21651. WOW_DFS_CAC_COMPLETE_EVENT, /* 32 + 8 */
  21652. WOW_VDEV_DISCONNECT_EVENT, /* 32 + 9 */
  21653. WOW_TWT_EVENT, /* 32 + 10 */
  21654. WOW_DCS_INTERFERENCE_DET, /* 32 + 11 */
  21655. WOW_ROAM_STATS_EVENT, /* 32 + 12 */
  21656. WOW_RTT_11AZ_EVENT, /* 32 + 13 */
  21657. WOW_P2P_NOA_EVENT, /* 32 + 14 */
  21658. WOW_XGAP_EVENT, /* 32 + 15 */
  21659. WOW_PAGE_FAULT_EVENT, /* 32 + 16 */
  21660. } WOW_WAKE_EVENT_TYPE;
  21661. typedef enum wake_reason_e {
  21662. WOW_REASON_UNSPECIFIED = -1,
  21663. WOW_REASON_NLOD = 0,
  21664. WOW_REASON_AP_ASSOC_LOST,
  21665. WOW_REASON_LOW_RSSI,
  21666. WOW_REASON_DEAUTH_RECVD,
  21667. WOW_REASON_DISASSOC_RECVD,
  21668. WOW_REASON_GTK_HS_ERR,
  21669. WOW_REASON_EAP_REQ,
  21670. WOW_REASON_FOURWAY_HS_RECV,
  21671. WOW_REASON_TIMER_INTR_RECV,
  21672. WOW_REASON_PATTERN_MATCH_FOUND,
  21673. WOW_REASON_RECV_MAGIC_PATTERN,
  21674. WOW_REASON_P2P_DISC,
  21675. WOW_REASON_WLAN_HB,
  21676. WOW_REASON_CSA_EVENT,
  21677. WOW_REASON_PROBE_REQ_WPS_IE_RECV,
  21678. WOW_REASON_AUTH_REQ_RECV,
  21679. WOW_REASON_ASSOC_REQ_RECV,
  21680. WOW_REASON_HTT_EVENT,
  21681. WOW_REASON_RA_MATCH,
  21682. WOW_REASON_HOST_AUTO_SHUTDOWN,
  21683. WOW_REASON_IOAC_MAGIC_EVENT,
  21684. WOW_REASON_IOAC_SHORT_EVENT,
  21685. WOW_REASON_IOAC_EXTEND_EVENT,
  21686. WOW_REASON_IOAC_TIMER_EVENT,
  21687. WOW_REASON_ROAM_HO,
  21688. WOW_REASON_DFS_PHYERR_RADADR_EVENT,
  21689. WOW_REASON_BEACON_RECV,
  21690. WOW_REASON_CLIENT_KICKOUT_EVENT,
  21691. WOW_REASON_NAN_EVENT,
  21692. WOW_REASON_EXTSCAN,
  21693. WOW_REASON_RSSI_BREACH_EVENT,
  21694. WOW_REASON_IOAC_REV_KA_FAIL_EVENT,
  21695. WOW_REASON_IOAC_SOCK_EVENT,
  21696. WOW_REASON_NLO_SCAN_COMPLETE,
  21697. WOW_REASON_PACKET_FILTER_MATCH,
  21698. WOW_REASON_ASSOC_RES_RECV,
  21699. WOW_REASON_REASSOC_REQ_RECV,
  21700. WOW_REASON_REASSOC_RES_RECV,
  21701. WOW_REASON_ACTION_FRAME_RECV,
  21702. WOW_REASON_BPF_ALLOW,
  21703. WOW_REASON_NAN_DATA,
  21704. WOW_REASON_NAN_RTT, /* DEPRECATED, UNUSED */
  21705. WOW_REASON_OEM_RESPONSE_EVENT = WOW_REASON_NAN_RTT, /* reuse deprecated reason value */
  21706. WOW_REASON_TDLS_CONN_TRACKER_EVENT,
  21707. WOW_REASON_CRITICAL_LOG,
  21708. WOW_REASON_P2P_LISTEN_OFFLOAD,
  21709. WOW_REASON_NAN_EVENT_WAKE_HOST,
  21710. WOW_REASON_CHIP_POWER_FAILURE_DETECT,
  21711. WOW_REASON_11D_SCAN,
  21712. WOW_REASON_THERMAL_CHANGE,
  21713. WOW_REASON_OIC_PING_OFFLOAD,
  21714. WOW_REASON_WLAN_DHCP_RENEW,
  21715. WOW_REASON_SAP_OBSS_DETECTION,
  21716. WOW_REASON_BSS_COLOR_COLLISION_DETECT,
  21717. WOW_REASON_TKIP_MIC_ERR_FRAME_RECVD_DETECT,
  21718. WOW_REASON_WLAN_MD, /* motion detected */
  21719. WOW_REASON_WLAN_BL, /* baselining done */
  21720. WOW_REASON_NTH_BCN_OFLD, /* nth beacon forward to host */
  21721. WOW_REASON_PKT_CAPTURE_MODE_WAKE,
  21722. WOW_REASON_PAGE_FAULT, /* Host wake up due to page fault */
  21723. WOW_REASON_ROAM_PREAUTH_START,
  21724. WOW_REASON_ROAM_PMKID_REQUEST,
  21725. WOW_REASON_RFKILL,
  21726. WOW_REASON_DFS_CAC,
  21727. WOW_REASON_VDEV_DISCONNECT,
  21728. WOW_REASON_LOCAL_DATA_UC_DROP,
  21729. WOW_REASON_GENERIC_WAKE, /* A generic reason that host should be woken up */
  21730. WOW_REASON_ERR_PKT_TRIGGERED_WAKEUP,
  21731. WOW_REASON_TWT,
  21732. WOW_REASON_FATAL_EVENT_WAKE,
  21733. WOW_REASON_DCS_INT_DET,
  21734. WOW_REASON_ROAM_STATS,
  21735. WOW_REASON_MDNS_WAKEUP,
  21736. WOW_REASON_RTT_11AZ,
  21737. WOW_REASON_P2P_NOA_UPDATE,
  21738. /* When Host configured timer elapsed for delayed wakeup */
  21739. WOW_REASON_DELAYED_WAKEUP_HOST_CFG_TIMER_ELAPSED,
  21740. /* Data store list is full, so Host wakeup should be triggered */
  21741. WOW_REASON_DELAYED_WAKEUP_DATA_STORE_LIST_FULL,
  21742. /* Sched PM FW initiated termination event */
  21743. WOW_REASON_SCHED_PM_TERMINATED,
  21744. /* XGAP entry/exit response */
  21745. WOW_REASON_XGAP,
  21746. /* COEX channel avoid event */
  21747. WOW_REASON_COEX_CHAVD,
  21748. /* vdev repurpose request event */
  21749. WOW_REASON_VDEV_REPURPOSE,
  21750. /* STX High duty cycle event */
  21751. WOW_REASON_STX_WOW_HIGH_DUTY_CYCLE,
  21752. /* WoW exit reason MCC lite */
  21753. WOW_REASON_MCC_LITE,
  21754. /* P2P CLI detected BMISS from DFS master AP */
  21755. WOW_REASON_P2P_CLI_DFS_AP_BMISS_DETECTED,
  21756. /* if Page Fault blocking feature enabled and PF observed under WoW */
  21757. WOW_REASON_PF_BLOCKING_LAST_TIME,
  21758. /* add new WOW_REASON_ defs before this line */
  21759. WOW_REASON_MAX,
  21760. WOW_REASON_DEBUG_TEST = 0xFF,
  21761. } WOW_WAKE_REASON_TYPE;
  21762. typedef enum {
  21763. WOW_IFACE_PAUSE_ENABLED,
  21764. WOW_IFACE_PAUSE_DISABLED
  21765. } WOW_IFACE_STATUS;
  21766. enum {
  21767. WMI_WOW_FLAG_IGNORE_PCIE_RESET = 0x00000001, /* some win10 platform will not assert pcie_reset for wow.*/
  21768. /* WMI_WOW_FLAG_SEND_PM_PME
  21769. * Some platforms have issues if the PM_PME message is sent after WoW,
  21770. * so don't send PM_PME after WoW unless the host uses this flag
  21771. * to request it.
  21772. */
  21773. WMI_WOW_FLAG_SEND_PM_PME = 0x00000002,
  21774. /* Flag to indicate unit test */
  21775. WMI_WOW_FLAG_UNIT_TEST_ENABLE = 0x00000004,
  21776. /* Force HTC wakeup */
  21777. WMI_WOW_FLAG_DO_HTC_WAKEUP = 0x00000008,
  21778. /* Enable L1SS sleep for PCIE DRV case */
  21779. WMI_WOW_FLAG_ENABLE_DRV_PCIE_L1SS_SLEEP = 0x00000010,
  21780. /*
  21781. * To differentiate system suspend Vs RTPM BIT set -
  21782. * System Suspend WOW, BIT Reset- RTPM (DRV)
  21783. */
  21784. WMI_WOW_FLAG_SYSTEM_SUSPEND_WOW = 0x00000020,
  21785. /*
  21786. * Feature flag for INI enable_mod_dtim_on_system_suspend
  21787. * This flag/bit will be set if INI settings enable mod_dtim_on_sys_suspend.
  21788. */
  21789. WMI_WOW_FLAG_MOD_DTIM_ON_SYS_SUSPEND = 0x00000040,
  21790. /*
  21791. * Forced dtim in suspend mode enable Flag.
  21792. * setDtimInSuspendMode
  21793. */
  21794. WMI_WOW_FLAG_FORCED_DTIM_ON_SYS_SUSPEND = 0x00000080,
  21795. /* Flag to force DPD lock. */
  21796. WMI_WOW_FLAG_FORCED_DPD_LOCK = 0x00000100,
  21797. /*
  21798. * Feature flag for INI 'enable_teles_dtim_on_system_suspend'
  21799. * This flag/bit will be set if INI 'enable_teles_dtim_on_system_suspend'
  21800. * is enabled.
  21801. */
  21802. WMI_WOW_FLAG_TELES_DTIM_ON_SYS_SUSPEND = 0x00000200,
  21803. };
  21804. typedef struct {
  21805. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param */
  21806. A_UINT32 enable;
  21807. A_UINT32 pause_iface_config;
  21808. A_UINT32 flags; /* WMI_WOW_FLAG enums */
  21809. } wmi_wow_enable_cmd_fixed_param;
  21810. typedef enum {
  21811. WMI_WOW_RESUME_FLAG_TX_DATA = 0x00000001, /* TX data pending to be sent in resume */
  21812. } WMI_WOW_RESUME_FLAG_ENUM;
  21813. /* wow nack reason codes */
  21814. typedef enum {
  21815. /* WoW error due to unnkown reason */
  21816. WMI_WOW_NON_ACK_REASON_UNKNOWN = 0,
  21817. /* WoW error due to TX failure */
  21818. WMI_WOW_NON_ACK_REASON_TX = 1,
  21819. /* WoW error due to some data blocked */
  21820. WMI_WOW_NON_ACK_REASON_IS_BLOCK = 2,
  21821. /* WoW error in WFA mode */
  21822. WMI_WOW_NON_ACK_REASON_NOT_ALLOW = 3,
  21823. /* WoW error mac operation fail */
  21824. WMI_WOW_NON_ACK_REASON_HW_FAIL = 4,
  21825. /* WoW error due to timeout */
  21826. WMI_WOW_NON_ACK_REASON_TIMEOUT = 5,
  21827. /* WoW error due to RTT or CFR capture active */
  21828. WMI_WOW_NON_ACK_REASON_RTT_DMA = 6,
  21829. /* WoW error due to roam module holding lock */
  21830. WMI_WOW_NON_ACK_REASON_ROAM = 7,
  21831. /* WoW error remote peer not sleeping */
  21832. WMI_WOW_NON_ACK_REASON_PEER_ACTIVE = 8,
  21833. /* WoW error due to WoW entry defer failed */
  21834. WMI_WOW_NON_ACK_REASON_DEFER_FAILURE = 9,
  21835. /* WoW error due to WoW entry defer timeout */
  21836. WMI_WOW_NON_ACK_REASON_DEFER_TIMEOUT = 10,
  21837. /* WoW error due to FATAL event */
  21838. WMI_WOW_NON_ACK_REASON_FATAL_EVENT = 11,
  21839. /* WoW error if close to TBTT */
  21840. WMI_WOW_NON_ACK_REASON_CLOSE_TO_TBTT = 12,
  21841. } WMI_WOW_NACK_STATUS;
  21842. typedef struct {
  21843. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_hostwakeup_from_sleep_cmd_fixed_param */
  21844. /* reserved0:
  21845. * This "reserved" field is not actually reserved any more.
  21846. * It is being used in certain FW branches to hold flags, whose values
  21847. * are defined by WMI_WOW_RESUME_FLAG_ENUM.
  21848. */
  21849. union {
  21850. A_UINT32 reserved0;
  21851. A_UINT32 flags;
  21852. };
  21853. } wmi_wow_hostwakeup_from_sleep_cmd_fixed_param;
  21854. #define WOW_ICMPV6_NA_FILTER_DISABLE 0
  21855. #define WOW_ICMPV6_NA_FILTER_ENABLE 1
  21856. typedef struct {
  21857. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param */
  21858. A_UINT32 vdev_id;
  21859. A_UINT32 enable; /* WOW_ICMPV6_NA_FILTER_ENABLE/DISABLE */
  21860. } wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param;
  21861. typedef struct bitmap_pattern_s {
  21862. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T */
  21863. A_UINT32 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD];
  21864. A_UINT32 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE_DWORD];
  21865. A_UINT32 pattern_offset;
  21866. A_UINT32 pattern_len;
  21867. A_UINT32 bitmask_len;
  21868. A_UINT32 pattern_id; /* must be less than max_bitmap_filters */
  21869. } WOW_BITMAP_PATTERN_T;
  21870. typedef struct ipv4_sync_s {
  21871. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV4_SYNC_PATTERN_T */
  21872. A_UINT32 ipv4_src_addr;
  21873. A_UINT32 ipv4_dst_addr;
  21874. A_UINT32 tcp_src_prt;
  21875. A_UINT32 tcp_dst_prt;
  21876. } WOW_IPV4_SYNC_PATTERN_T;
  21877. typedef struct ipv6_sync_s {
  21878. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV6_SYNC_PATTERN_T */
  21879. A_UINT32 ipv6_src_addr[4];
  21880. A_UINT32 ipv6_dst_addr[4];
  21881. A_UINT32 tcp_src_prt;
  21882. A_UINT32 tcp_dst_prt;
  21883. } WOW_IPV6_SYNC_PATTERN_T;
  21884. typedef struct WOW_MAGIC_PATTERN_CMD
  21885. {
  21886. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_MAGIC_PATTERN_CMD */
  21887. wmi_mac_addr macaddr;
  21888. } WOW_MAGIC_PATTERN_CMD;
  21889. typedef enum wow_ioac_pattern_type {
  21890. WOW_IOAC_MAGIC_PATTERN = 1,
  21891. WOW_IOAC_SHORT_PATTERN,
  21892. WOW_IOAC_EXTEND_PATTERN,
  21893. } WOW_IOAC_PATTERN_TYPE;
  21894. typedef struct ioac_sock_pattern_s {
  21895. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_SOCK_PATTERN_T */
  21896. A_UINT32 id;
  21897. A_UINT32 local_ipv4;
  21898. A_UINT32 remote_ipv4;
  21899. A_UINT32 local_port;
  21900. A_UINT32 remote_port;
  21901. A_UINT32 pattern_len; /* units = bytes */
  21902. A_UINT32 pattern[WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD];
  21903. WMI_IPV6_ADDR local_ipv6;
  21904. WMI_IPV6_ADDR remote_ipv6;
  21905. A_UINT32 ack_nak_len;
  21906. A_UINT32 ackpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
  21907. A_UINT32 nakpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
  21908. } WOW_IOAC_SOCK_PATTERN_T;
  21909. typedef struct ioac_pkt_pattern_s {
  21910. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_PKT_PATTERN_T */
  21911. A_UINT32 pattern_type;
  21912. A_UINT32 pattern[WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD];
  21913. A_UINT32 random[WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD];
  21914. A_UINT32 pattern_len;
  21915. A_UINT32 random_len;
  21916. } WOW_IOAC_PKT_PATTERN_T;
  21917. typedef struct ioac_tmr_pattern_s {
  21918. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_TMR_PATTERN_T */
  21919. A_UINT32 wake_in_s;
  21920. A_UINT32 vdev_id;
  21921. } WOW_IOAC_TMR_PATTERN_T;
  21922. typedef struct {
  21923. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param */
  21924. A_UINT32 nID;
  21925. } WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param;
  21926. typedef struct {
  21927. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param */
  21928. A_UINT32 nID;
  21929. } WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param;
  21930. typedef struct ioac_keepalive_s {
  21931. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_KEEPALIVE_T */
  21932. A_UINT32 keepalive_pkt_buf[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD];
  21933. A_UINT32 keepalive_pkt_len;
  21934. A_UINT32 period_in_ms;
  21935. A_UINT32 vdev_id;
  21936. A_UINT32 max_loss_cnt;
  21937. A_UINT32 local_ipv4;
  21938. A_UINT32 remote_ipv4;
  21939. A_UINT32 local_port;
  21940. A_UINT32 remote_port;
  21941. A_UINT32 recv_period_in_ms;
  21942. A_UINT32 rev_ka_size;
  21943. A_UINT32 rev_ka_data[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD];
  21944. WMI_IPV6_ADDR local_ipv6;
  21945. WMI_IPV6_ADDR remote_ipv6;
  21946. } WMI_WOW_IOAC_KEEPALIVE_T;
  21947. typedef struct {
  21948. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param */
  21949. A_UINT32 vdev_id;
  21950. A_UINT32 pattern_type;
  21951. /*
  21952. * Following this struct are these TLVs. Note that they are all array of structures
  21953. * but can have at most one element. Which TLV is empty or has one element depends
  21954. * on the field pattern_type. This is to emulate an union.
  21955. * WOW_IOAC_PKT_PATTERN_T pattern_info_pkt[];
  21956. * WOW_IOAC_TMR_PATTERN_T pattern_info_tmr[];
  21957. */
  21958. } WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param;
  21959. typedef struct {
  21960. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param */
  21961. A_UINT32 vdev_id;
  21962. A_UINT32 pattern_type;
  21963. A_UINT32 pattern_id;
  21964. } WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param;
  21965. typedef struct {
  21966. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_PATTERN_CMD_fixed_param */
  21967. A_UINT32 vdev_id;
  21968. A_UINT32 pattern_id;
  21969. A_UINT32 pattern_type;
  21970. /*
  21971. * Following this struct are these TLVs. Note that they are all array of structures
  21972. * but can have at most one element. Which TLV is empty or has one element depends
  21973. * on the field pattern_type. This is to emulate an union.
  21974. * WOW_BITMAP_PATTERN_T pattern_info_bitmap[];
  21975. * WOW_IPV4_SYNC_PATTERN_T pattern_info_ipv4[];
  21976. * WOW_IPV6_SYNC_PATTERN_T pattern_info_ipv6[];
  21977. * WOW_MAGIC_PATTERN_CMD pattern_info_magic_pattern[];
  21978. * A_UINT32 pattern_info_timeout[];
  21979. * A_UINT32 ra_ratelimit_interval;
  21980. */
  21981. } WMI_WOW_ADD_PATTERN_CMD_fixed_param;
  21982. typedef struct {
  21983. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_DEL_PATTERN_CMD_fixed_param */
  21984. A_UINT32 vdev_id;
  21985. A_UINT32 pattern_id;
  21986. A_UINT32 pattern_type;
  21987. } WMI_WOW_DEL_PATTERN_CMD_fixed_param;
  21988. #define WMI_WOW_MAX_EVENT_BM_LEN 4
  21989. typedef struct {
  21990. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_DEL_EVT_CMD_fixed_param */
  21991. A_UINT32 vdev_id;
  21992. A_UINT32 is_add;
  21993. union {
  21994. A_UINT32 event_bitmap;
  21995. A_UINT32 event_bitmaps[WMI_WOW_MAX_EVENT_BM_LEN];
  21996. };
  21997. } WMI_WOW_ADD_DEL_EVT_CMD_fixed_param;
  21998. /*
  21999. * This structure is used to set the pattern to check UDP packet in WOW mode.
  22000. * If match, construct a tx frame in a local buffer to send through the peer
  22001. * AP to the entity in the IP network that sent the UDP packet to this STA.
  22002. */
  22003. typedef struct {
  22004. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param */
  22005. A_UINT32 vdev_id;
  22006. A_UINT32 enable; /* 1: enable, 0: disable*/
  22007. /* dest_port -
  22008. * bits 7:0 contain the LSB of the UDP dest port,
  22009. * bits 15:8 contain the MSB of the UDP dest port
  22010. */
  22011. A_UINT32 dest_port;
  22012. A_UINT32 pattern_len; /* length in byte of pattern[] */
  22013. A_UINT32 response_len; /* length in byte of response[] */
  22014. /* Following this struct are the TLV's:
  22015. * A_UINT8 pattern[]; <-- payload of UDP packet to be checked, network byte order
  22016. * A_UINT8 response[]; <-- payload of UDP packet to be response, network byte order
  22017. */
  22018. } WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param;
  22019. /*
  22020. * This structure is used to set the pattern for WOW host wakeup pin pulse pattern confirguration.
  22021. */
  22022. typedef struct {
  22023. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param */
  22024. A_UINT32 enable; /* 1: enable, 0: disable */
  22025. A_UINT32 pin; /* pin for host wakeup */
  22026. A_UINT32 interval_low; /* interval for keeping low voltage, unit: ms */
  22027. A_UINT32 interval_high; /* interval for keeping high voltage, unit: ms */
  22028. A_UINT32 repeat_cnt; /* repeat times for pulse (0xffffffff means forever) */
  22029. A_UINT32 init_state; /* Sense of the GPIO pin used for host wakeups.
  22030. * If init_state is 0, a low --> high transition
  22031. * causes a host wakeup interrupt.
  22032. * If init_state is 1, a high --> low transition
  22033. * causes a host wakeup interrupt.
  22034. */
  22035. } WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param;
  22036. #define MAX_SUPPORTED_ACTION_CATEGORY 256
  22037. #define MAX_SUPPORTED_ACTION_SUBCATEGORY 32
  22038. #define MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST (MAX_SUPPORTED_ACTION_CATEGORY/32)
  22039. typedef enum {
  22040. WOW_ACTION_WAKEUP_OPERATION_RESET = 0,
  22041. WOW_ACTION_WAKEUP_OPERATION_SET,
  22042. WOW_ACTION_WAKEUP_OPERATION_ADD_SET,
  22043. WOW_ACTION_WAKEUP_OPERATION_DELETE_SET,
  22044. } WOW_ACTION_WAKEUP_OPERATION;
  22045. typedef struct {
  22046. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param */
  22047. A_UINT32 vdev_id;
  22048. A_UINT32 operation; /* 0 reset to fw default, 1 set the bits, 2 add the setting bits, 3 delete the setting bits */
  22049. A_UINT32 action_category_map[MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST];
  22050. /* This fixed_param TLV is followed by these additional TLV's
  22051. * action_bitmaps_per_category -
  22052. * Each element is a 32-bit bitmap indicating which subcategories
  22053. * for that particular action category are considered for WoW wakeup
  22054. * (if the subcategory's bit is 0) or ignored for WoW wakeup (if the
  22055. * subcategory's bit is 1).
  22056. *
  22057. * A_UINT32 action_bitmaps_per_category[]; <-- variable length array
  22058. */
  22059. } WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param;
  22060. typedef union {
  22061. /* the bytes within these IP addresses are arranged in network byte order */
  22062. A_UINT8 ipv4_addr[4];
  22063. A_UINT8 ipv6_addr[16];
  22064. } WMI_IP_ADDR;
  22065. #define WMI_COAP_IPTV6_BIT_POS 0
  22066. #define WMI_COAP_ADDR_TYPE_BIT_POS 1
  22067. #define WMI_COAP_IPV6_SET(param, value) \
  22068. WMI_SET_BITS(param, WMI_COAP_IPTV6_BIT_POS, 1, value)
  22069. #define WMI_COAP_IPV6_GET(param) \
  22070. WMI_GET_BITS(param, WMI_COAP_IPTV6_BIT_POS, 1)
  22071. #define WMI_COAP_ADDR_TYPE_SET(param, value) \
  22072. WMI_SET_BITS(param, WMI_COAP_ADDR_TYPE_BIT_POS, 1, value)
  22073. #define WMI_COAP_ADDR_TYPE_GET(param) \
  22074. WMI_GET_BITS(param, WMI_COAP_ADDR_TYPE_BIT_POS, 1)
  22075. typedef struct {
  22076. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_ADD_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. A_UINT32 timeout; /* the cached packet expire timeout in ms */
  22089. /* the dst ip address(uc/mc/bc), dst port to match CoAP message */
  22090. WMI_IP_ADDR match_udp_ip; /* network byte order */
  22091. A_UINT32 match_udp_port;
  22092. /* DUT ip address and port for CoAP replay message */
  22093. WMI_IP_ADDR udp_local_ip; /* network byte order */
  22094. A_UINT32 udp_local_port;
  22095. A_UINT32 verify_offset; /* UDP payload offset to verify */
  22096. A_UINT32 verify_len; /* UDP payload length to verofy*/
  22097. A_UINT32 coapmsg_len; /* CoAP reply message length */
  22098. /* The below TLV (tag length value) parameters follow this fixed_param TLV:
  22099. * A_UINT8 verify_string[]; verify content,
  22100. * length identified by verify_len;
  22101. * A_UINT8 coapmsg[]; CoAP reply message,
  22102. * length identified by coapmsg_len;
  22103. */
  22104. } WMI_WOW_COAP_ADD_PATTERN_CMD_fixed_param;
  22105. typedef struct {
  22106. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_DEL_PATTERN_CMD_fixed_param */
  22107. A_UINT32 vdev_id;
  22108. A_UINT32 pattern_id;
  22109. } WMI_WOW_COAP_DEL_PATTERN_CMD_fixed_param;
  22110. typedef struct {
  22111. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMD_fixed_param */
  22112. A_UINT32 vdev_id;
  22113. A_UINT32 pattern_id;
  22114. /* pattern_type:
  22115. * Indicates the type of pattern to be enabled
  22116. * Bit 0: Indicate pattern IP ADDR is IPV6 or IPV4
  22117. * Bit 1: Indicate pattern ADDR TYPE is BC or UC/MC
  22118. * Bits 31:2 Reserved for future use
  22119. *
  22120. * Refer to WMI_COAP_IPV6_SET,GET and WMI_COAP_ADDR_TYPE_SET,GET macros
  22121. */
  22122. A_UINT32 pattern_type;
  22123. /* ip address and port for CoAP send keepalive message */
  22124. WMI_IP_ADDR udp_local_ip; /* network byte order */
  22125. A_UINT32 udp_local_port;
  22126. WMI_IP_ADDR udp_remote_ip; /* network byte order */
  22127. A_UINT32 udp_remote_port;
  22128. A_UINT32 timeout; /* the periorid to send keepalive message in ms */
  22129. A_UINT32 coapmsg_len; /* keeplive CoAP message length */
  22130. /* The below TLV (tag length value) parameters follow this fixed_param TLV:
  22131. * A_UINT8 coapmsg[]; CoAP keepalive message,
  22132. * length specified by coapmsg_len field
  22133. */
  22134. } WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMD_fixed_param;
  22135. typedef struct {
  22136. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMD_fixed_param */
  22137. A_UINT32 vdev_id;
  22138. A_UINT32 pattern_id;
  22139. } WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMD_fixed_param;
  22140. typedef struct {
  22141. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_GET_BUF_INFO_CMD_fixed_param */
  22142. A_UINT32 vdev_id;
  22143. A_UINT32 pattern_id;
  22144. } WMI_WOW_COAP_GET_BUF_INFO_CMD_fixed_param;
  22145. typedef struct {
  22146. A_UINT32 tlv_hdr; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_coap_tuple */
  22147. A_UINT64 tsf; /* host and firmware sync tsf */
  22148. /* flag:
  22149. * Indicates the type of ip address
  22150. * Bit 0: Indicate ip address is IPV6 or IPV4
  22151. * Bits 31:1 Reserved for future use
  22152. *
  22153. * Refer to WMI_COAP_IPV6_SET,GET macros
  22154. */
  22155. A_UINT32 flag;
  22156. WMI_IP_ADDR src_ip; /* network byte order */
  22157. A_UINT32 payload_len;
  22158. } wmi_coap_tuple;
  22159. typedef struct {
  22160. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_BUF_INFO_fixed_param */
  22161. A_UINT32 vdev_id;
  22162. A_UINT32 pattern_id;
  22163. /** more_data will be set depending on the number of tuples need transmit */
  22164. A_UINT32 more_tuples;
  22165. /* The below TLV (tag length value) parameters follow this fixed_param TLV:
  22166. * wmi_coap_tuple coap_tuple[]; <-- Array of coap_tuple.
  22167. * A_UINT32 payloads[] <-- the cached received CoAP messages.
  22168. * The number of message payloads combined into the payloads[]
  22169. * array matches the number of coap tuples.
  22170. * The length of each message payload is specified by the
  22171. * "payload_len" field in the corresponding coap_tuple.
  22172. * The subsequent message payload starts at the next 4-byte aligned
  22173. * position within payloads[].
  22174. * For example, if there are 3 coap_tuples, with
  22175. * coap_tuples[0].payload_len = 12
  22176. * coap_tuples[1].payload_len = 23
  22177. * coap_tuples[2].payload_len = 34
  22178. * then msg 0 payload will be stored in payloads[0] - payloads[11]
  22179. * message 1 payload will be stored in payloads[12] - payloads[34]
  22180. * message 2 payload will be stored in payloads[36] - payloads[69]
  22181. */
  22182. } WMI_WOW_COAP_BUF_INFO_EVENT_fixed_param;
  22183. typedef struct wow_event_info_s {
  22184. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param */
  22185. A_UINT32 vdev_id;
  22186. A_UINT32 flag; /*This is current reserved.*/
  22187. A_INT32 wake_reason;
  22188. A_UINT32 data_len;
  22189. A_UINT32 delayed_pkt_count;
  22190. } WOW_EVENT_INFO_fixed_param;
  22191. typedef struct wow_initial_wakeup_event_s {
  22192. A_UINT32 tlv_header; /* TLV tag and len; tag equals WOW_INITIAL_WAKEUP_EVENT_fixed_param */
  22193. A_UINT32 vdev_id;
  22194. } WOW_INITIAL_WAKEUP_EVENT_fixed_param;
  22195. typedef enum {
  22196. WOW_EVENT_INFO_TYPE_PACKET = 0x0001,
  22197. WOW_EVENT_INFO_TYPE_BITMAP,
  22198. WOW_EVENT_INFO_TYPE_GTKIGTK,
  22199. } WOW_EVENT_INFO_TYPE;
  22200. typedef struct wow_event_info_section_s {
  22201. A_UINT32 data_type;
  22202. A_UINT32 data_len;
  22203. } WOW_EVENT_INFO_SECTION;
  22204. typedef struct wow_event_info_section_packet_s {
  22205. A_UINT8 packet[WOW_DEFAULT_EVT_BUF_SIZE];
  22206. } WOW_EVENT_INFO_SECTION_PACKET;
  22207. typedef struct wow_event_info_section_bitmap_s {
  22208. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_SECTION_BITMAP */
  22209. A_UINT32 flag; /*This is current reserved.*/
  22210. A_UINT32 value; /*This could be the pattern id for bitmap pattern.*/
  22211. A_UINT32 org_len; /*The length of the original packet.*/
  22212. } WOW_EVENT_INFO_SECTION_BITMAP;
  22213. /**
  22214. * This command is sent from WLAN host driver to firmware to
  22215. * enable or disable D0-WOW. D0-WOW means APSS suspend with
  22216. * PCIe link and DDR being active.
  22217. *
  22218. *
  22219. * Entering D0-WOW Mode (based on kernel suspend request):
  22220. * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 1)
  22221. * target: Take action (e.g. dbglog suspend)
  22222. * target->host: HTC_ACK (HTC_MSG_SEND_SUSPEND_COMPLETE message)
  22223. *
  22224. * Exiting D0-WOW mode (based on kernel resume OR target->host message received)
  22225. * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 0)
  22226. * target: Take action (e.g. dbglog resume)
  22227. * target->host: WMI_D0_WOW_DISABLE_ACK_EVENTID
  22228. *
  22229. * This command is applicable only on the PCIE LL systems
  22230. * Host can enter either D0-WOW or WOW mode, but NOT both at same time
  22231. * Decision to enter D0-WOW or WOW is based on active interfaces
  22232. *
  22233. */
  22234. typedef struct {
  22235. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param */
  22236. A_UINT32 enable; /* 1 = enable, 0 = disable */
  22237. } wmi_d0_wow_enable_disable_cmd_fixed_param;
  22238. typedef enum extend_wow_type_e {
  22239. EXTWOW_TYPE_APP_TYPE1, /* extend wow type: only enable wakeup for app type1 */
  22240. EXTWOW_TYPE_APP_TYPE2, /* extend wow type: only enable wakeup for app type2 */
  22241. EXTWOW_TYPE_APP_TYPE1_2, /* extend wow type: enable wakeup for app type1&2 */
  22242. EXTWOW_TYPE_APP_PULSETEST,
  22243. EXTWOW_DISABLED = 255,
  22244. } EXTWOW_TYPE;
  22245. typedef struct {
  22246. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param */
  22247. A_UINT32 vdev_id;
  22248. A_UINT32 type;
  22249. A_UINT32 wakeup_pin_num;
  22250. A_UINT32 swol_pulsetest_type;
  22251. A_UINT32 swol_pulsetest_application;
  22252. } wmi_extwow_enable_cmd_fixed_param;
  22253. #define SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX 8
  22254. #define SWOL_INDOOR_KEY_LEN 16
  22255. typedef struct {
  22256. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param */
  22257. A_UINT32 vdev_id;
  22258. wmi_mac_addr wakee_mac;
  22259. A_UINT8 ident[8];
  22260. A_UINT8 passwd[16];
  22261. A_UINT32 ident_len;
  22262. A_UINT32 passwd_len;
  22263. /* indoor check parameters */
  22264. /* key for mac addresses specified in swol_indoor_key_mac
  22265. * Big-endian hosts need to byte-swap the bytes within each 4-byte
  22266. * segment of this array, so the bytes will return to their original
  22267. * order when the entire WMI message contents are byte-swapped to
  22268. * convert from big-endian to little-endian format.
  22269. */
  22270. A_UINT8 swol_indoor_key[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX][SWOL_INDOOR_KEY_LEN];
  22271. /* key length for specified mac address index
  22272. * Big-endian hosts need to byte-swap the bytes within each 4-byte
  22273. * segment of this array, so the bytes will return to their original
  22274. * order when the entire WMI message contents are byte-swapped to
  22275. * convert from big-endian to little-endian format.
  22276. */
  22277. A_UINT8 swol_indoor_key_len[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  22278. /* mac address array allowed to wakeup host*/
  22279. wmi_mac_addr swol_indoor_key_mac[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  22280. /* app mask for the mac addresses specified in swol_indoor_key_mac */
  22281. A_UINT32 swol_indoor_app_mask[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  22282. A_UINT32 swol_indoor_waker_check; /* whether to do indoor waker check */
  22283. A_UINT32 swol_indoor_pw_check; /* whether to check password */
  22284. A_UINT32 swol_indoor_pattern; /* wakeup pattern */
  22285. A_UINT32 swol_indoor_exception; /* wakeup when exception happens */
  22286. A_UINT32 swol_indoor_exception_app;
  22287. A_UINT32 swol_assist_enable; /* whether to enable IoT mode */
  22288. } wmi_extwow_set_app_type1_params_cmd_fixed_param;
  22289. typedef struct {
  22290. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param */
  22291. A_UINT32 vdev_id;
  22292. A_UINT8 rc4_key[16];
  22293. A_UINT32 rc4_key_len;
  22294. /** ip header parameter */
  22295. A_UINT32 ip_id; /* NC id */
  22296. A_UINT32 ip_device_ip; /* NC IP address */
  22297. A_UINT32 ip_server_ip; /* Push server IP address */
  22298. /** tcp header parameter */
  22299. A_UINT16 tcp_src_port; /* NC TCP port */
  22300. A_UINT16 tcp_dst_port; /* Push server TCP port */
  22301. A_UINT32 tcp_seq;
  22302. A_UINT32 tcp_ack_seq;
  22303. A_UINT32 keepalive_init; /* Initial ping interval */
  22304. A_UINT32 keepalive_min; /* Minimum ping interval */
  22305. A_UINT32 keepalive_max; /* Maximum ping interval */
  22306. A_UINT32 keepalive_inc; /* Increment of ping interval */
  22307. wmi_mac_addr gateway_mac;
  22308. A_UINT32 tcp_tx_timeout_val;
  22309. A_UINT32 tcp_rx_timeout_val;
  22310. /** add extra parameter for backward-compatible */
  22311. /*
  22312. * For all byte arrays, natural order is used. E.g.
  22313. * rc4_write_sandbox[0] holds the 1st RC4 S-box byte,
  22314. * rc4_write_sandbox[1] holds the 2nd RC4 S-box byte, etc.
  22315. */
  22316. /* used to encrypt transmit packet such as keep-alive */
  22317. A_UINT8 rc4_write_sandbox[256];
  22318. A_UINT32 rc4_write_x;
  22319. A_UINT32 rc4_write_y;
  22320. /* used to decrypt received packet such as wow data */
  22321. A_UINT8 rc4_read_sandbox[256];
  22322. A_UINT32 rc4_read_x;
  22323. A_UINT32 rc4_read_y;
  22324. /* used to calculate HMAC hash for transmit packet such as keep-alive */
  22325. A_UINT8 ssl_write_seq[8];
  22326. A_UINT8 ssl_sha1_write_key[64];
  22327. A_UINT32 ssl_sha1_write_key_len;
  22328. /* used to calculate HAMC hash for receive packet such as wow data */
  22329. A_UINT8 ssl_read_seq[8];
  22330. A_UINT8 ssl_sha1_read_key[64];
  22331. A_UINT32 ssl_sha1_read_key_len;
  22332. /* optional element for specifying TCP options data to include in
  22333. * transmit packets such as keep-alive
  22334. */
  22335. A_UINT32 tcp_options_len;
  22336. A_UINT8 tcp_options[40];
  22337. A_UINT32 async_id; /* keep-alive request id */
  22338. } wmi_extwow_set_app_type2_params_cmd_fixed_param;
  22339. #define WMI_RXERR_CRC 0x01 /* CRC error on frame */
  22340. #define WMI_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
  22341. #define WMI_RXERR_MIC 0x10 /* Michael MIC decrypt error */
  22342. #define WMI_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
  22343. #define WMI_RX_OFFLOAD_MON_MODE 0x40 /* Offload dropped mgmt pkt's for only in capture mode*/
  22344. #define WMI_RXERR_PN 0x80 /* Invalid PN number on frame */
  22345. typedef enum {
  22346. PKT_PWR_SAVE_PAID_MATCH = 0x00000001,
  22347. PKT_PWR_SAVE_GID_MATCH = 0x00000002,
  22348. PKT_PWR_SAVE_EARLY_TIM_CLEAR = 0x00000004,
  22349. PKT_PWR_SAVE_EARLY_DTIM_CLEAR = 0x00000008,
  22350. PKT_PWR_SAVE_EOF_PAD_DELIM = 0x00000010,
  22351. PKT_PWR_SAVE_MACADDR_MISMATCH = 0x00000020,
  22352. PKT_PWR_SAVE_DELIM_CRC_FAIL = 0x00000040,
  22353. PKT_PWR_SAVE_GID_NSTS_ZERO = 0x00000080,
  22354. PKT_PWR_SAVE_RSSI_CHECK = 0x00000100,
  22355. PKT_PWR_SAVE_5G_EBT = 0x00000200,
  22356. PKT_PWR_SAVE_2G_EBT = 0x00000400,
  22357. PKT_PWR_SAVE_BSS_COLOR_MISMATCH = 0x00000800,
  22358. PKT_PWR_SAVE_UL_FLAG = 0x00001000,
  22359. PKT_PWR_SAVE_STA_ID_MISMATCH = 0x00002000,
  22360. PKT_PWR_SAVE_MACADDR_MISMATCH_FCS = 0x00004000,
  22361. PKT_PWR_SAVE_ENABLE = 0x80000000,
  22362. } WMI_PKT_PWR_SAVE_TYPE;
  22363. typedef struct {
  22364. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_cmd_fixed_param */
  22365. A_UINT32 num_data; /** length in byte of data[]. */
  22366. /** pdev_id for identifying the MAC
  22367. * See macros starting with WMI_PDEV_ID_ for values.
  22368. */
  22369. A_UINT32 pdev_id;
  22370. /* This structure is used to send Factory Test Mode [FTM] command
  22371. * from host to firmware for integrated chips which are binary blobs.
  22372. * Following this structure is the TLV:
  22373. * A_UINT8 data[]; <-- length in byte given by field num_data.
  22374. */
  22375. } wmi_ftm_intg_cmd_fixed_param;
  22376. typedef struct {
  22377. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_event_fixed_param */
  22378. A_UINT32 num_data; /** length in byte of data[]. */
  22379. /* This structure is used to receive Factory Test Mode [FTM] event
  22380. * from firmware to host for integrated chips which are binary blobs.
  22381. * Following this structure is the TLV:
  22382. * A_UINT8 data[]; <-- length in byte given by field num_data.
  22383. */
  22384. } wmi_ftm_intg_event_fixed_param;
  22385. #define WMI_MAX_NS_OFFLOADS 2
  22386. #define WMI_MAX_ARP_OFFLOADS 2
  22387. #define WMI_ARPOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
  22388. #define WMI_ARPOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
  22389. #define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
  22390. typedef struct {
  22391. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */
  22392. A_UINT32 flags; /* flags */
  22393. A_UINT8 target_ipaddr[4]; /* IPV4 addresses of the local node*/
  22394. A_UINT8 remote_ipaddr[4]; /* source address of the remote node requesting the ARP (qualifier) */
  22395. wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
  22396. } WMI_ARP_OFFLOAD_TUPLE;
  22397. #define WMI_NSOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
  22398. #define WMI_NSOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
  22399. #define WMI_NSOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
  22400. #define WMI_NSOFF_FLAGS_IS_IPV6_ANYCAST (1 << 3) /* whether the configured IPv6 address is anycast */
  22401. #define WMI_NSOFF_MAX_TARGET_IPS 2
  22402. typedef struct {
  22403. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE */
  22404. A_UINT32 flags; /* flags */
  22405. /* NOTE: This size of array target_ipaddr[] cannot be changed without breaking WMI compatibility. */
  22406. WMI_IPV6_ADDR target_ipaddr[WMI_NSOFF_MAX_TARGET_IPS]; /* IPV6 target addresses of the local node */
  22407. WMI_IPV6_ADDR solicitation_ipaddr; /* multi-cast source IP addresses for receiving solicitations */
  22408. WMI_IPV6_ADDR remote_ipaddr; /* address of remote node requesting the solicitation (qualifier) */
  22409. wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
  22410. } WMI_NS_OFFLOAD_TUPLE;
  22411. typedef struct {
  22412. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param */
  22413. A_UINT32 flags;
  22414. A_UINT32 vdev_id;
  22415. A_UINT32 num_ns_ext_tuples;
  22416. /* Following this structure are the TLVs:
  22417. * WMI_NS_OFFLOAD_TUPLE ns_tuples[WMI_MAX_NS_OFFLOADS];
  22418. * WMI_ARP_OFFLOAD_TUPLE arp_tuples[WMI_MAX_ARP_OFFLOADS];
  22419. * WMI_NS_OFFLOAD_TUPLE ns_ext_tuples[]; <-- size based on num_ns_ext_tuples
  22420. */
  22421. } WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param;
  22422. typedef struct {
  22423. A_UINT32 tlv_header;
  22424. A_UINT32 vdev_id;
  22425. A_UINT32 pattern_id;
  22426. A_UINT32 timeout;
  22427. A_UINT32 length;
  22428. /*Following this would be the pattern
  22429. A_UINT8 pattern[] of length specified by length
  22430. field in the structure.*/
  22431. } WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
  22432. typedef struct {
  22433. A_UINT32 tlv_header;
  22434. A_UINT32 vdev_id;
  22435. A_UINT32 pattern_id;
  22436. } WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
  22437. typedef struct {
  22438. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_addba_cmd_fixed_param */
  22439. /** unique id identifying the VDEV, generated by the caller */
  22440. A_UINT32 vdev_id;
  22441. /** peer MAC address */
  22442. wmi_mac_addr peer_macaddr;
  22443. /** Tid number */
  22444. A_UINT32 tid;
  22445. /** Initiator (1) or Responder (0) for this aggregation */
  22446. A_UINT32 initiator;
  22447. /** size of the negotiated window */
  22448. A_UINT32 window_size;
  22449. /** starting sequence number (only valid for initiator) */
  22450. A_UINT32 ssn;
  22451. /** timeout field represents the time to wait for Block Ack in
  22452. * initiator case and the time to wait for BAR in responder
  22453. * case. 0 represents no timeout. */
  22454. A_UINT32 timeout;
  22455. /* BA policy: immediate ACK (0) or delayed ACK (1) */
  22456. A_UINT32 policy;
  22457. } wmi_peer_tid_addba_cmd_fixed_param;
  22458. typedef struct {
  22459. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd */
  22460. /** unique id identifying the VDEV, generated by the caller */
  22461. A_UINT32 vdev_id;
  22462. /** peer MAC address */
  22463. wmi_mac_addr peer_macaddr;
  22464. /** Tid number */
  22465. A_UINT32 tid;
  22466. /** Initiator (1) or Responder (0) for this aggregation */
  22467. A_UINT32 initiator;
  22468. } wmi_peer_tid_delba_cmd_fixed_param;
  22469. typedef struct {
  22470. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param */
  22471. /** unique id identifying the VDEV, generated by the caller */
  22472. A_UINT32 vdev_id;
  22473. /** peer MAC address */
  22474. wmi_mac_addr peer_macaddr;
  22475. /** Tid number */
  22476. A_UINT32 tid;
  22477. /** Event status */
  22478. A_UINT32 status;
  22479. } wmi_tx_addba_complete_event_fixed_param;
  22480. typedef struct {
  22481. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_delba_complete_event_fixed_param */
  22482. /** unique id identifying the VDEV, generated by the caller */
  22483. A_UINT32 vdev_id;
  22484. /** peer MAC address */
  22485. wmi_mac_addr peer_macaddr;
  22486. /** Tid number */
  22487. A_UINT32 tid;
  22488. /** Event status */
  22489. A_UINT32 status;
  22490. } wmi_tx_delba_complete_event_fixed_param;
  22491. /*
  22492. * Structure to request sequence numbers for a given
  22493. * peer station on different TIDs. The TIDs are
  22494. * indicated in the tidBitMap, tid 0 would
  22495. * be represented by LSB bit 0. tid 1 would be
  22496. * represented by LSB bit 1 etc.
  22497. * The target will retrieve the current sequence
  22498. * numbers for the peer on all the TIDs requested
  22499. * and send back a response in a WMI event.
  22500. */
  22501. typedef struct
  22502. {
  22503. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  22504. WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */
  22505. wmi_mac_addr peer_macaddr;
  22506. A_UINT32 tidBitmap;
  22507. } wmi_ba_req_ssn;
  22508. typedef struct {
  22509. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  22510. WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */
  22511. /** unique id identifying the VDEV, generated by the caller */
  22512. A_UINT32 vdev_id;
  22513. /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
  22514. A_UINT32 num_ba_req_ssn;
  22515. /* Following this struct are the TLV's:
  22516. * wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested
  22517. */
  22518. } wmi_ba_req_ssn_cmd_fixed_param;
  22519. /*
  22520. * Max transmit categories
  22521. *
  22522. * Note: In future if we need to increase WMI_MAX_TC definition
  22523. * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID.
  22524. */
  22525. #define WMI_MAX_TC 8
  22526. /*
  22527. * Structure to send response sequence numbers
  22528. * for a give peer and tidmap.
  22529. */
  22530. typedef struct
  22531. {
  22532. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  22533. WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */
  22534. wmi_mac_addr peer_macaddr;
  22535. /* A boolean to indicate if ssn is present */
  22536. A_UINT32 ssn_present_for_tid[WMI_MAX_TC];
  22537. /* The ssn from target, valid only if
  22538. * ssn_present_for_tid[tidn] equals 1
  22539. */
  22540. A_UINT32 ssn_for_tid[WMI_MAX_TC];
  22541. } wmi_ba_event_ssn;
  22542. typedef struct {
  22543. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  22544. WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */
  22545. /** unique id identifying the VDEV, generated by the caller */
  22546. A_UINT32 vdev_id;
  22547. /** Event status, success or failure of the overall operation */
  22548. A_UINT32 status;
  22549. /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
  22550. A_UINT32 num_ba_event_ssn;
  22551. /* Following this struct are the TLV's:
  22552. * wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested
  22553. */
  22554. } wmi_ba_rsp_ssn_event_fixed_param;
  22555. enum wmi_aggr_state_req_type {
  22556. WMI_DISABLE_AGGREGATION,
  22557. WMI_ENABLE_AGGREGATION
  22558. };
  22559. /*
  22560. * This event is generated by the COEX module
  22561. * when esco call is begins the coex module in fw generated this event to host to
  22562. * disable the RX aggregation and after completion of the esco call fw will indicate to
  22563. * enable back the Rx aggregation .
  22564. */
  22565. typedef struct {
  22566. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_aggr_state_trig_event_fixed_param */
  22567. /** unique id identifying the VDEV, generated by the caller */
  22568. A_UINT32 vdev_id;
  22569. /** req_type contains values from enum
  22570. * wmi_aggr_state_req_type; 0 (disable) 1(enable) */
  22571. A_UINT32 req_type;
  22572. } wmi_aggr_state_trig_event_fixed_param;
  22573. typedef struct {
  22574. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */
  22575. /** unique id identifying the VDEV, generated by the caller */
  22576. A_UINT32 vdev_id;
  22577. /** MAC address used for installing */
  22578. wmi_mac_addr peer_macaddr;
  22579. /** key index */
  22580. A_UINT32 key_ix;
  22581. /** key flags */
  22582. A_UINT32 key_flags;
  22583. /** Event status */
  22584. A_UINT32 status;
  22585. } wmi_vdev_install_key_complete_event_fixed_param;
  22586. typedef enum {
  22587. /* CSA_SA_QUERY_TIMEOUT:
  22588. * Disconnect due to SA query timeout after moving to new channel
  22589. * due to CSA in OCV enabled case.
  22590. */
  22591. WLAN_DISCONNECT_REASON_CSA_SA_QUERY_TIMEOUT = 1,
  22592. /* MOVE_TO_CELLULAR:
  22593. * Disconnect from WiFi to move to cellular
  22594. */
  22595. WLAN_DISCONNECT_REASON_MOVE_TO_CELLULAR,
  22596. } WMI_VDEV_DISCONNECT_REASON_ID;
  22597. typedef struct {
  22598. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_disconnect_event_fixed_param */
  22599. /** unique id identifying the VDEV, generated by the caller */
  22600. A_UINT32 vdev_id;
  22601. /* Disconnect reason from WMI_VDEV_DISCONNECT_REASON_ID */
  22602. A_UINT32 reason;
  22603. } wmi_vdev_disconnect_event_fixed_param;
  22604. typedef enum _WMI_NLO_AUTH_ALGORITHM {
  22605. WMI_NLO_AUTH_ALGO_80211_OPEN = 1,
  22606. WMI_NLO_AUTH_ALGO_80211_SHARED_KEY = 2,
  22607. WMI_NLO_AUTH_ALGO_WPA = 3,
  22608. WMI_NLO_AUTH_ALGO_WPA_PSK = 4,
  22609. WMI_NLO_AUTH_ALGO_WPA_NONE = 5,
  22610. WMI_NLO_AUTH_ALGO_RSNA = 6,
  22611. WMI_NLO_AUTH_ALGO_RSNA_PSK = 7,
  22612. } WMI_NLO_AUTH_ALGORITHM;
  22613. typedef enum _WMI_NLO_CIPHER_ALGORITHM {
  22614. WMI_NLO_CIPHER_ALGO_NONE = 0x00,
  22615. WMI_NLO_CIPHER_ALGO_WEP40 = 0x01,
  22616. WMI_NLO_CIPHER_ALGO_TKIP = 0x02,
  22617. WMI_NLO_CIPHER_ALGO_CCMP = 0x04,
  22618. WMI_NLO_CIPHER_ALGO_WEP104 = 0x05,
  22619. WMI_NLO_CIPHER_ALGO_BIP = 0x06,
  22620. WMI_NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
  22621. WMI_NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
  22622. WMI_NLO_CIPHER_ALGO_WEP = 0x101,
  22623. } WMI_NLO_CIPHER_ALGORITHM;
  22624. /* SSID broadcast type passed in NLO params */
  22625. typedef enum _WMI_NLO_SSID_BcastNwType
  22626. {
  22627. WMI_NLO_BCAST_UNKNOWN = 0,
  22628. WMI_NLO_BCAST_NORMAL = 1,
  22629. WMI_NLO_BCAST_HIDDEN = 2,
  22630. } WMI_NLO_SSID_BcastNwType;
  22631. #define WMI_NLO_MAX_SSIDS 16
  22632. #define WMI_NLO_MAX_CHAN 48
  22633. #define WMI_NLO_CONFIG_STOP (0x1 << 0)
  22634. #define WMI_NLO_CONFIG_START (0x1 << 1)
  22635. #define WMI_NLO_CONFIG_RESET (0x1 << 2)
  22636. #define WMI_NLO_CONFIG_SLOW_SCAN (0x1 << 4)
  22637. #define WMI_NLO_CONFIG_FAST_SCAN (0x1 << 5)
  22638. #define WMI_NLO_CONFIG_SSID_HIDE_EN (0x1 << 6)
  22639. /* This bit is used to indicate if EPNO Profile is enabled */
  22640. #define WMI_NLO_CONFIG_ENLO (0x1 << 7)
  22641. #define WMI_NLO_CONFIG_SCAN_PASSIVE (0x1 << 8)
  22642. #define WMI_NLO_CONFIG_ENLO_RESET (0x1 << 9)
  22643. #define WMI_NLO_CONFIG_SPOOFED_MAC_IN_PROBE_REQ (0x1 << 10)
  22644. #define WMI_NLO_CONFIG_RANDOM_SEQ_NO_IN_PROBE_REQ (0x1 << 11)
  22645. #define WMI_NLO_CONFIG_ENABLE_IE_WHITELIST_IN_PROBE_REQ (0x1 << 12)
  22646. #define WMI_NLO_CONFIG_ENABLE_CNLO_RSSI_CONFIG (0x1 << 13)
  22647. /*
  22648. * This bit is used to indicate if MRSNO IE parsing for WiFi6 standard
  22649. * is enabled.
  22650. */
  22651. #define WMI_NLO_CONFIG_ENABLE_MRSNO_WIFI6 (0x1 << 14)
  22652. /*
  22653. * This bit is used to indicate if MRSNO IE parsing for WiFi7 standard
  22654. * is enabled.
  22655. */
  22656. #define WMI_NLO_CONFIG_ENABLE_MRSNO_WIFI7 (0x1 << 15)
  22657. /* Whether directed scan needs to be performed (for hidden SSIDs) */
  22658. #define WMI_ENLO_FLAG_DIRECTED_SCAN 1
  22659. /* Whether PNO event shall be triggered if the network is found on A band */
  22660. #define WMI_ENLO_FLAG_A_BAND 2
  22661. /* Whether PNO event shall be triggered if the network is found on G band */
  22662. #define WMI_ENLO_FLAG_G_BAND 4
  22663. /* Whether strict matching is required (i.e. firmware shall not match on the entire SSID) */
  22664. #define WMI_ENLO_FLAG_STRICT_MATCH 8
  22665. /* Code for matching the beacon AUTH IE - additional codes TBD */
  22666. /* open */
  22667. #define WMI_ENLO_AUTH_CODE_OPEN 1
  22668. /* WPA_PSK or WPA2PSK */
  22669. #define WMI_ENLO_AUTH_CODE_PSK 2
  22670. /* any EAPOL */
  22671. #define WMI_ENLO_AUTH_CODE_EAPOL 4
  22672. /* NOTE: wmi_nlo_ssid_param structure can't be changed without breaking the compatibility */
  22673. typedef struct wmi_nlo_ssid_param
  22674. {
  22675. A_UINT32 valid;
  22676. wmi_ssid ssid;
  22677. } wmi_nlo_ssid_param;
  22678. /* NOTE: wmi_nlo_enc_param structure can't be changed without breaking the compatibility */
  22679. typedef struct wmi_nlo_enc_param
  22680. {
  22681. A_UINT32 valid;
  22682. A_UINT32 enc_type;
  22683. } wmi_nlo_enc_param;
  22684. /* NOTE: wmi_nlo_auth_param structure can't be changed without breaking the compatibility */
  22685. typedef struct wmi_nlo_auth_param
  22686. {
  22687. A_UINT32 valid;
  22688. A_UINT32 auth_type;
  22689. } wmi_nlo_auth_param;
  22690. /* NOTE: wmi_nlo_bcast_nw_param structure can't be changed without breaking the compatibility */
  22691. typedef struct wmi_nlo_bcast_nw_param
  22692. {
  22693. A_UINT32 valid;
  22694. /* If WMI_NLO_CONFIG_EPNO is not set. Supplicant PNO is enabled. The value should be true/false
  22695. Otherwise EPNO is enabled. bcast_nw_type would be used as a bit flag contains WMI_ENLO_FLAG_XXX */
  22696. A_UINT32 bcast_nw_type;
  22697. } wmi_nlo_bcast_nw_param;
  22698. /* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */
  22699. typedef struct wmi_nlo_rssi_param
  22700. {
  22701. A_UINT32 valid;
  22702. A_INT32 rssi;
  22703. } wmi_nlo_rssi_param;
  22704. typedef struct nlo_configured_parameters {
  22705. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */
  22706. wmi_nlo_ssid_param ssid;
  22707. wmi_nlo_enc_param enc_type;
  22708. wmi_nlo_auth_param auth_type;
  22709. wmi_nlo_rssi_param rssi_cond;
  22710. wmi_nlo_bcast_nw_param bcast_nw_type; /* indicates if the SSID is hidden or not */
  22711. } nlo_configured_parameters;
  22712. /* Support channel prediction for PNO scan after scanning top_k_num channels
  22713. * if stationary_threshold is met.
  22714. */
  22715. typedef struct nlo_channel_prediction_cfg {
  22716. A_UINT32 tlv_header;
  22717. /* Enable or disable this feature. */
  22718. A_UINT32 enable;
  22719. /* Top K channels will be scanned before deciding whether to further scan
  22720. * or stop. Minimum value is 3 and maximum is 5. */
  22721. A_UINT32 top_k_num;
  22722. /* Preconfigured stationary threshold.
  22723. * Lesser value means more conservative. Bigger value means more aggressive.
  22724. * Maximum is 100 and minimum is 0. */
  22725. A_UINT32 stationary_threshold;
  22726. /* Periodic full channel scan in milliseconds unit.
  22727. * After full_scan_period_ms since last full scan, channel prediction
  22728. * scan is suppressed and will do full scan.
  22729. * This is to help detecting sudden AP power-on or -off. Value 0 means no
  22730. * full scan at all (not recommended).
  22731. */
  22732. A_UINT32 full_scan_period_ms;
  22733. } nlo_channel_prediction_cfg;
  22734. typedef struct enlo_candidate_score_params_t {
  22735. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enlo_candidate_score_param */
  22736. A_INT32 min5GHz_rssi; /* minimum 5GHz RSSI for a BSSID to be considered (units = dBm) */
  22737. A_INT32 min24GHz_rssi; /* minimum 2.4GHz RSSI for a BSSID to be considered (units = dBm) */
  22738. A_UINT32 initial_score_max; /* the maximum score that a network can have before bonuses */
  22739. /* current_connection_bonus:
  22740. * only report when there is a network's score this much higher
  22741. * than the current connection
  22742. */
  22743. A_UINT32 current_connection_bonus;
  22744. A_UINT32 same_network_bonus; /* score bonus for all networks with the same network flag */
  22745. A_UINT32 secure_bonus; /* score bonus for networks that are not open */
  22746. A_UINT32 band5GHz_bonus; /* 5GHz RSSI score bonus (applied to all 5GHz networks) */
  22747. } enlo_candidate_score_params;
  22748. typedef struct connected_nlo_bss_band_rssi_pref_t {
  22749. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_connected_nlo_bss_band_rssi_pref */
  22750. /** band which needs to get preference over other band - see wmi_set_vdev_ie_band enum */
  22751. A_UINT32 band;
  22752. /* Amount of RSSI preference (in dB) that can be given to band (mentioned above) over other band */
  22753. A_INT32 rssi_pref;
  22754. } connected_nlo_bss_band_rssi_pref;
  22755. typedef struct connected_nlo_rssi_params_t {
  22756. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_connected_nlo_rssi_params */
  22757. /* Relative RSSI threshold (in dB) by which new BSS should have better RSSI than
  22758. * the current connected BSS.
  22759. */
  22760. A_INT32 relative_rssi;
  22761. /* The amount of RSSI preference (in dB) that can be given to a 5G BSS over 2.4G BSS. */
  22762. A_INT32 relative_rssi_5g_pref;
  22763. } connected_nlo_rssi_params;
  22764. typedef struct wmi_nlo_config {
  22765. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param */
  22766. A_UINT32 flags;
  22767. A_UINT32 vdev_id;
  22768. A_UINT32 fast_scan_max_cycles;
  22769. A_UINT32 active_dwell_time;
  22770. A_UINT32 passive_dwell_time; /* PDT in msecs */
  22771. A_UINT32 probe_bundle_size;
  22772. A_UINT32 rest_time; /* ART = IRT */
  22773. A_UINT32 max_rest_time; /* Max value that can be reached after SBM */
  22774. A_UINT32 scan_backoff_multiplier; /* SBM */
  22775. A_UINT32 fast_scan_period; /* SCBM */
  22776. A_UINT32 slow_scan_period; /* specific to windows */
  22777. A_UINT32 no_of_ssids;
  22778. A_UINT32 num_of_channels;
  22779. A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */
  22780. /** MAC Address to use in Probe Req as SA **/
  22781. wmi_mac_addr mac_addr;
  22782. /** Mask on which MAC has to be randomized **/
  22783. wmi_mac_addr mac_mask;
  22784. /** IE bitmap to use in Probe Req **/
  22785. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  22786. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  22787. A_UINT32 num_vendor_oui;
  22788. /** Number of connected NLO band preferences **/
  22789. A_UINT32 num_cnlo_band_pref;
  22790. /** dwell time in msec on active 2GHz channels */
  22791. A_UINT32 active_dwell_time_2ghz;
  22792. /** dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked as an active channel */
  22793. A_UINT32 active_dwell_time_6ghz;
  22794. /** dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked as a passive channel */
  22795. A_UINT32 passive_dwell_time_6ghz;
  22796. /* The TLVs will follow.
  22797. * nlo_configured_parameters nlo_list[];
  22798. * A_UINT32 channel_list[num_of_channels]; // in MHz
  22799. * channel_list:
  22800. * If FW supports WMI_SERVICE_PNO_SCAN_CONFIG_PER_CHANNEL,
  22801. * then channel_list may fill the upper 12 bits with channel flags,
  22802. * while using only the lower 20 bits for channel frequency.
  22803. * Check WMI_SCAN_CHANNEL_FLAG macros for the channel flags
  22804. * If FW doesn't support WMI_SERVICE_PNO_SCAN_CONFIG_PER_CHANNEL,
  22805. * then channel_list only holds the frequency value
  22806. * nlo_channel_prediction_cfg ch_prediction_cfg;
  22807. * enlo_candidate_score_params candidate_score_params;
  22808. * wmi_vendor_oui vendor_oui[num_vendor_oui];
  22809. * connected_nlo_rssi_params cnlo_rssi_params;
  22810. * connected_nlo_bss_band_rssi_pref cnlo_bss_band_rssi_pref[num_cnlo_band_pref];
  22811. * A_UINT32 preferred_chan_list[]; // in MHz
  22812. */
  22813. } wmi_nlo_config_cmd_fixed_param;
  22814. typedef struct wmi_nlo_event
  22815. {
  22816. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_event */
  22817. A_UINT32 vdev_id;
  22818. } wmi_nlo_event;
  22819. /* WMI_PASSPOINT_CONFIG_SET
  22820. * Sets a list for passpoint networks for PNO purposes;
  22821. * it should be matched against any passpoint networks found
  22822. * during regular PNO scan.
  22823. */
  22824. #define WMI_PASSPOINT_CONFIG_SET (0x1 << 0)
  22825. /* WMI_PASSPOINT_CONFIG_RESET
  22826. * Reset passpoint network list -
  22827. * no Passpoint networks should be matched after this.
  22828. */
  22829. #define WMI_PASSPOINT_CONFIG_RESET (0x1 << 1)
  22830. #define PASSPOINT_REALM_LEN 256
  22831. #define PASSPOINT_ROAMING_CONSORTIUM_ID_LEN 5
  22832. #define PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
  22833. #define PASSPOINT_PLMN_ID_LEN 3
  22834. #define PASSPOINT_PLMN_ID_ALLOC_LEN /* round up to A_UINT32 boundary */ \
  22835. (((PASSPOINT_PLMN_ID_LEN + 3) >> 2) << 2)
  22836. /*
  22837. * Confirm PASSPOINT_REALM_LEN is a multiple of 4, so the
  22838. * A_UINT8 realm[PASSPOINT_REALM_LEN]
  22839. * array will end on a 4-byte boundary.
  22840. * (This 4-byte alignment simplifies endianness-correction byte swapping.)
  22841. */
  22842. A_COMPILE_TIME_ASSERT(
  22843. check_passpoint_realm_size,
  22844. (PASSPOINT_REALM_LEN % sizeof(A_UINT32)) == 0);
  22845. /*
  22846. * Confirm the product of PASSPOINT_ROAMING_CONSORTIUM_ID_NUM and
  22847. * PASSPOINT_ROAMING_CONSORTIUM_ID_LEN is a multiple of 4, so the
  22848. * roaming_consortium_ids array below will end on a 4-byte boundary.
  22849. * (This 4-byte alignment simplifies endianness-correction byte swapping.)
  22850. */
  22851. A_COMPILE_TIME_ASSERT(
  22852. check_passpoint_roaming_consortium_ids_size,
  22853. ((PASSPOINT_ROAMING_CONSORTIUM_ID_NUM*PASSPOINT_ROAMING_CONSORTIUM_ID_LEN) % sizeof(A_UINT32)) == 0);
  22854. /* wildcard ID to allow an action (reset) to apply to all networks */
  22855. #define WMI_PASSPOINT_NETWORK_ID_WILDCARD 0xFFFFFFFF
  22856. typedef struct wmi_passpoint_config {
  22857. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_passpoint_config_cmd_fixed_param */
  22858. /* (network) id
  22859. * identifier of the matched network, report this in event
  22860. * This id can be a wildcard (WMI_PASSPOINT_NETWORK_ID_WILDCARD)
  22861. * that indicates the action should be applied to all networks.
  22862. * Currently, the only action that is applied to all networks is "reset".
  22863. * If a non-wildcard ID is specified, that particular network is configured.
  22864. * If a wildcard ID is specified, all networks are reset.
  22865. */
  22866. A_UINT32 id;
  22867. A_UINT32 req_id;
  22868. A_UINT8 realm[PASSPOINT_REALM_LEN]; /*null terminated UTF8 encoded realm, 0 if unspecified*/
  22869. A_UINT8 roaming_consortium_ids[PASSPOINT_ROAMING_CONSORTIUM_ID_NUM][PASSPOINT_ROAMING_CONSORTIUM_ID_LEN]; /*roaming consortium ids to match, 0s if unspecified*/
  22870. /*This would be bytes-stream as same as defition of realm id in 802.11 standard*/
  22871. A_UINT8 plmn[PASSPOINT_PLMN_ID_ALLOC_LEN]; /*PLMN id mcc/mnc combination as per rules, 0s if unspecified */
  22872. } wmi_passpoint_config_cmd_fixed_param;
  22873. typedef struct {
  22874. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_passpoint_event_hdr */
  22875. A_UINT32 id; /* identifier of the matched network */
  22876. A_UINT32 vdev_id;
  22877. A_UINT32 timestamp; /* time since boot (in microsecond) when the result was retrieved*/
  22878. wmi_ssid ssid;
  22879. wmi_mac_addr bssid; /* bssid of the network */
  22880. A_UINT32 channel_mhz; /* channel frequency in MHz */
  22881. A_UINT32 rssi; /* RSSI value */
  22882. A_UINT32 rtt; /* timestamp in nanoseconds*/
  22883. A_UINT32 rtt_sd; /* standard deviation in rtt */
  22884. A_UINT32 beacon_period; /* beacon advertised in the beacon */
  22885. A_UINT32 capability; /* capabilities advertised in the beacon */
  22886. A_UINT32 ie_length; /* size of the ie_data blob */
  22887. A_UINT32 anqp_length; /* length of ANQP blob */
  22888. /* Following this structure is the byte stream of ie data of length ie_buf_len:
  22889. * A_UINT8 ie_data[]; <-- length in byte given by field ie_length, blob of ie data in beacon
  22890. * A_UINT8 anqp_ie[]; <-- length in byte given by field anqp_len, blob of anqp data of IE
  22891. * 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.
  22892. */
  22893. } wmi_passpoint_event_hdr;
  22894. #define GTK_OFFLOAD_OPCODE_MASK 0xFF000000
  22895. /** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */
  22896. #define GTK_OFFLOAD_ENABLE_OPCODE 0x01000000
  22897. /** Disable GTK offload */
  22898. #define GTK_OFFLOAD_DISABLE_OPCODE 0x02000000
  22899. /** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */
  22900. #define GTK_OFFLOAD_REQUEST_STATUS_OPCODE 0x04000000
  22901. enum wmi_chatter_mode {
  22902. /* Chatter enter/exit happens
  22903. * automatically based on preset
  22904. * params
  22905. */
  22906. WMI_CHATTER_MODE_AUTO,
  22907. /* Chatter enter is triggered
  22908. * manually by the user
  22909. */
  22910. WMI_CHATTER_MODE_MANUAL_ENTER,
  22911. /* Chatter exit is triggered
  22912. * manually by the user
  22913. */
  22914. WMI_CHATTER_MODE_MANUAL_EXIT,
  22915. /* Placeholder max value, always last*/
  22916. WMI_CHATTER_MODE_MAX
  22917. };
  22918. enum wmi_chatter_query_type {
  22919. /*query coalescing filter match counter*/
  22920. WMI_CHATTER_QUERY_FILTER_MATCH_CNT,
  22921. WMI_CHATTER_QUERY_MAX
  22922. };
  22923. typedef struct {
  22924. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_set_mode_cmd_fixed_param */
  22925. A_UINT32 chatter_mode;
  22926. } wmi_chatter_set_mode_cmd_fixed_param;
  22927. /** maximum number of filter supported*/
  22928. #define CHATTER_MAX_COALESCING_RULES 11
  22929. /** maximum number of field tests per filter*/
  22930. #define CHATTER_MAX_FIELD_TEST 5
  22931. /** maximum field length in number of DWORDS*/
  22932. #define CHATTER_MAX_TEST_FIELD_LEN32 2
  22933. /** field test kinds*/
  22934. #define CHATTER_COALESCING_TEST_EQUAL 1
  22935. #define CHATTER_COALESCING_TEST_MASKED_EQUAL 2
  22936. #define CHATTER_COALESCING_TEST_NOT_EQUAL 3
  22937. /** packet type*/
  22938. #define CHATTER_COALESCING_PKT_TYPE_UNICAST (1 << 0)
  22939. #define CHATTER_COALESCING_PKT_TYPE_MULTICAST (1 << 1)
  22940. #define CHATTER_COALESCING_PKT_TYPE_BROADCAST (1 << 2)
  22941. /** coalescing field test*/
  22942. typedef struct _chatter_pkt_coalescing_hdr_test {
  22943. /** offset from start of mac header, for windows native wifi host driver
  22944. * should assume standard 802.11 frame format without QoS info and address4
  22945. * FW would account for any non-stand fields for final offset value.
  22946. */
  22947. A_UINT32 offset;
  22948. A_UINT32 length; /* length of test field*/
  22949. A_UINT32 test; /*equal, not equal or masked equal*/
  22950. A_UINT32 mask[CHATTER_MAX_TEST_FIELD_LEN32]; /*mask byte stream*/
  22951. A_UINT32 value[CHATTER_MAX_TEST_FIELD_LEN32]; /*value byte stream*/
  22952. } chatter_pkt_coalescing_hdr_test;
  22953. /** packet coalescing filter*/
  22954. typedef struct _chatter_pkt_coalescing_filter {
  22955. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter */
  22956. A_UINT32 filter_id; /* unique id assigned by OS */
  22957. A_UINT32 max_coalescing_delay; /* max milliseconds 1st pkt can be held */
  22958. A_UINT32 pkt_type; /* unicast/multicast/broadcast */
  22959. A_UINT32 num_of_test_field; /* number of field test in table */
  22960. chatter_pkt_coalescing_hdr_test test_fields[CHATTER_MAX_FIELD_TEST]; /* field test tbl */
  22961. } chatter_pkt_coalescing_filter;
  22962. /** packet coalescing filter add command*/
  22963. typedef struct {
  22964. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param */
  22965. A_UINT32 num_of_filters;
  22966. /* Following this tlv, there comes an array of structure of type chatter_pkt_coalescing_filter
  22967. chatter_pkt_coalescing_filter rx_filter[1];*/
  22968. } wmi_chatter_coalescing_add_filter_cmd_fixed_param;
  22969. /** packet coalescing filter delete command*/
  22970. typedef struct {
  22971. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param */
  22972. A_UINT32 filter_id; /*filter id which will be deleted*/
  22973. } wmi_chatter_coalescing_delete_filter_cmd_fixed_param;
  22974. /** packet coalescing query command*/
  22975. typedef struct {
  22976. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_query_cmd_fixed_param */
  22977. A_UINT32 type; /*type of query*/
  22978. } wmi_chatter_coalescing_query_cmd_fixed_param;
  22979. /** chatter query reply event*/
  22980. typedef struct {
  22981. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param */
  22982. A_UINT32 type; /*query type*/
  22983. A_UINT32 filter_match_cnt; /*coalescing filter match counter*/
  22984. } wmi_chatter_query_reply_event_fixed_param;
  22985. /* NOTE: This constants GTK_OFFLOAD_KEK_BYTES, GTK_OFFLOAD_KCK_BYTES, and GTK_REPLAY_COUNTER_BYTES
  22986. * cannot be changed without breaking WMI compatibility. */
  22987. #define GTK_OFFLOAD_KEK_BYTES 16
  22988. #define GTK_OFFLOAD_KCK_BYTES 16
  22989. /* NOTE: GTK_REPLAY_COUNTER_BYTES, WMI_MAX_KEY_LEN, IGTK_PN_SIZE cannot be changed in the future without breaking WMI compatibility */
  22990. #define GTK_REPLAY_COUNTER_BYTES 8
  22991. #define WMI_MAX_KEY_LEN 32
  22992. #define IGTK_PN_SIZE 6
  22993. typedef struct {
  22994. /**
  22995. * WMITLV_TAG_STRUC_wmi_roam_ml_key_material_param will exist when link is not created by fw.
  22996. */
  22997. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ml_link_key_material_param */
  22998. 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 */
  22999. /** key index */
  23000. A_UINT32 key_ix;
  23001. /** key cipher, defined as WMI_CIPHER_ */
  23002. A_UINT32 key_cipher;
  23003. A_UINT8 pn[WMI_MAX_PN_LEN];
  23004. A_UINT8 key_buff[WMI_MAX_KEY_LEN];
  23005. /*
  23006. * When link_id is 0xf, this field will be MLD address.
  23007. * Otherwise, it will be bssid which specified with link_id.
  23008. */
  23009. wmi_mac_addr mac_addr;
  23010. A_UINT32 key_len; /* number of valid bytes within key_buff */
  23011. A_UINT32 key_flags;
  23012. } wmi_roam_ml_key_material_param;
  23013. typedef struct {
  23014. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param */
  23015. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  23016. A_UINT32 flags; /* status flags */
  23017. A_UINT32 refresh_cnt; /* number of successful GTK refresh exchanges since last SET operation */
  23018. /*
  23019. * As with all WMI messages, this message uses little-endian byte
  23020. * ordering within each A_UINT32 field.
  23021. * If a big-endian host is using automatic swapping of the bytes within
  23022. * each 4-byte A_UINT32 to automatically correct the endianness of the
  23023. * A_UINT32 fields as the message is uploaded from target --> host, the
  23024. * big-endian host will have to undo the automatic byte swapping for the
  23025. * below A_UINT8 fields, to restore them to their original order.
  23026. */
  23027. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* current replay counter */
  23028. A_UINT8 igtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
  23029. A_UINT8 igtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
  23030. A_UINT8 igtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
  23031. A_UINT8 igtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
  23032. A_UINT8 gtk_keyIndex; /* GTK key index */
  23033. A_UINT8 gtk_keyLength; /* GTK key length */
  23034. A_UINT8 gtk_keyRSC[GTK_REPLAY_COUNTER_BYTES]; /* GTK key replay sequence counter */
  23035. A_UINT8 gtk_key[WMI_MAX_KEY_LEN]; /* GTK key data */
  23036. A_UINT8 bigtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
  23037. A_UINT8 bigtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
  23038. A_UINT8 bigtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
  23039. A_UINT8 bigtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
  23040. } WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param;
  23041. typedef struct {
  23042. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param */
  23043. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  23044. A_UINT32 flags; /* control flags, GTK offload command use high byte */
  23045. /* The size of following 3 arrays cannot be changed without breaking WMI compatibility. */
  23046. A_UINT8 KEK[GTK_OFFLOAD_KEK_BYTES]; /* key encryption key */
  23047. A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
  23048. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
  23049. /*
  23050. * Following structure will be appended when fils:
  23051. * wmi_gtk_offload_fils_tlv_param wmi_fils_gtk_info;
  23052. * Following structure will be appended to the above KEK[] when kek length
  23053. * is larger than GTK_OFFLOAD_KEK_BYTES:
  23054. * A_UINT8 kek_ext[];
  23055. * Following structure will be appended to the above KCK[] when kck length
  23056. * is larger than GTK_OFFLOAD_KCK_BYTES:
  23057. * A_UINT8 kck_ext[];
  23058. */
  23059. } WMI_GTK_OFFLOAD_CMD_fixed_param;
  23060. typedef struct {
  23061. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_offload_extended_tlv_param */
  23062. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  23063. A_UINT32 flags; /* control flags, GTK offload command use high byte */
  23064. A_UINT32 kek_len;
  23065. A_UINT8 KEK[GTK_OFFLOAD_KEK_EXTENDED_BYTES]; /* key encryption key */
  23066. A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
  23067. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
  23068. } wmi_gtk_offload_fils_tlv_param;
  23069. typedef struct {
  23070. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param */
  23071. A_UINT32 vdev_id;
  23072. A_UINT32 sa_query_retry_interval; /* in msec */
  23073. A_UINT32 sa_query_max_retry_count;
  23074. } WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param;
  23075. typedef enum {
  23076. WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */
  23077. WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */
  23078. WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK*/
  23079. WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4, /* gratuitous ARP req*/
  23080. WMI_STA_KEEPALIVE_METHOD_MGMT_VENDOR_ACTION = 5, /* vendor action frame */
  23081. } WMI_STA_KEEPALIVE_METHOD;
  23082. typedef struct {
  23083. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE */
  23084. WMI_IPV4_ADDR sender_prot_addr; /* Sender protocol address */
  23085. WMI_IPV4_ADDR target_prot_addr; /* Target protocol address */
  23086. wmi_mac_addr dest_mac_addr; /* destination MAC address */
  23087. } WMI_STA_KEEPALVE_ARP_RESPONSE;
  23088. typedef struct {
  23089. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param */
  23090. A_UINT32 vdev_id;
  23091. A_UINT32 enable; /* 1 - Enable, 0 - disable */
  23092. A_UINT32 method; /* keep alive method */
  23093. A_UINT32 interval; /* time interval in seconds */
  23094. /*
  23095. * NOTE: following this structure is the TLV for ARP Response:
  23096. * WMI_STA_KEEPALVE_ARP_RESPONSE arp_resp; <-- ARP response
  23097. */
  23098. } WMI_STA_KEEPALIVE_CMD_fixed_param;
  23099. typedef struct {
  23100. A_UINT32 tlv_header;
  23101. A_UINT32 vdev_id;
  23102. A_UINT32 action;
  23103. } WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param;
  23104. typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD;
  23105. typedef struct {
  23106. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */
  23107. A_UINT32 vdev_id;
  23108. A_UINT32 keepaliveInterval; /* seconds */
  23109. A_UINT32 keepaliveMethod;
  23110. } wmi_vdev_set_keepalive_cmd_fixed_param;
  23111. typedef struct {
  23112. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param */
  23113. A_UINT32 vdev_id;
  23114. } wmi_vdev_get_keepalive_cmd_fixed_param;
  23115. typedef struct {
  23116. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_event_fixed_param */
  23117. A_UINT32 vdev_id;
  23118. A_UINT32 keepaliveInterval; /* seconds */
  23119. A_UINT32 keepaliveMethod; /* seconds */
  23120. } wmi_vdev_get_keepalive_event_fixed_param;
  23121. typedef enum {
  23122. WMI_CLEAR_ARP_STATS_COLLECTED = 0x0,
  23123. WMI_START_ARP_STATS_COLLECTION,
  23124. } WMI_ARP_STATS_ACTION;
  23125. typedef enum {
  23126. WMI_ARP_STATS_RX_PKT_TYPE_ARP = 0x1,
  23127. } WMI_ARP_STATS_RX_PKT_TYPE;
  23128. typedef enum {
  23129. WMI_BA_SESSION_ESTABLISHMENT_STATUS_SUCCESS = 0x0,
  23130. WMI_BA_SESSION_ESTABLISHMENT_STATUS_FAILURE,
  23131. } WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS;
  23132. typedef enum {
  23133. WMI_CONNECTION_STATUS_FAILURE = 0x0,
  23134. WMI_CONNECTION_STATUS_SUCCESS,
  23135. } WMI_ARP_STATS_CONNECTION_STATUS;
  23136. /* ARP stats set (configure) req */
  23137. typedef struct {
  23138. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_arp_stats_cmd_fixed_param */
  23139. A_UINT32 vdev_id;
  23140. A_UINT32 set_clr; /* WMI_ARP_STATS_ACTION */
  23141. A_UINT32 pkt_type; /* WMI_ARP_STATS_RX_PKT_TYPE */
  23142. A_UINT32 ipv4; /* target will maintain ARP stats (only) for frames containing this IP address */
  23143. } wmi_vdev_set_arp_stats_cmd_fixed_param;
  23144. /* ARP stats get req */
  23145. typedef struct {
  23146. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_cmd_fixed_param */
  23147. A_UINT32 vdev_id;
  23148. } wmi_vdev_get_arp_stats_cmd_fixed_param;
  23149. /* per vdev based ARP stats */
  23150. typedef struct {
  23151. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_event_fixed_param */
  23152. A_UINT32 vdev_id;
  23153. A_UINT32 arp_req_enqueue;
  23154. A_UINT32 arp_req_tx_success;
  23155. A_UINT32 arp_req_tx_failure; /* number of times a tx MPDU containing a unicast ARP request went unacked */
  23156. A_UINT32 arp_rsp_recvd;
  23157. A_UINT32 out_of_order_arp_rsp_drop_cnt;
  23158. A_UINT32 dad_detected; /* duplicate address detection */
  23159. A_UINT32 connect_status; /* WMI_ARP_STATS_CONNECTION_STATUS */
  23160. A_UINT32 ba_session_establishment_status; /* WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS */
  23161. } wmi_vdev_get_arp_stats_event_fixed_param;
  23162. typedef struct {
  23163. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_connectivity_check_stats */
  23164. A_UINT32 pkt_type_bitmap; /* WMI_IP_CONNECTIVITY_STATS_RX_PKT_TYPE_BITMAP - only for DNS, TCP and ICMP */
  23165. A_UINT32 tcp_src_port; /* target will maintain TCP stats (only) for frames with this src port */
  23166. A_UINT32 tcp_dst_port; /* target will maintain TCP stats (only) for frames with this dst port */
  23167. A_UINT32 icmp_ipv4; /* target will maintain ICMPv4 stats (only) for frames containing this IP address */
  23168. } wmi_vdev_set_connectivity_check_stats;
  23169. /* per vdev dns/icmp/tcp based stats*/
  23170. typedef struct {
  23171. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_connectivity_check_stats */
  23172. A_UINT32 tcp_ack_recvd; /* number of tcp syn ack's received by FW */
  23173. A_UINT32 icmpv4_rsp_recvd; /* number of icmpv4 responses received by FW */
  23174. } wmi_vdev_get_connectivity_check_stats;
  23175. typedef struct {
  23176. A_UINT32 tlv_header;
  23177. A_UINT32 vdev_id;
  23178. #define IPSEC_NATKEEPALIVE_FILTER_DISABLE 0
  23179. #define IPSEC_NATKEEPALIVE_FILTER_ENABLE 1
  23180. A_UINT32 action;
  23181. } WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param;
  23182. typedef WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD;
  23183. typedef struct {
  23184. A_UINT32 tlv_header;
  23185. A_UINT32 vdev_id;
  23186. A_UINT32 mcc_tbttmode;
  23187. wmi_mac_addr mcc_bssid;
  23188. } wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param;
  23189. #define WMI_MAX_VENDOR_OUI_ACTION_SUPPORTED_PER_ACTION 10
  23190. #define WMI_MAX_VENDOR_OUI_DATA_LENGTH 20
  23191. typedef enum
  23192. {
  23193. WMI_VENDOR_OUI_ACTION_CONNECTION_1X1 = 0, /* Connect in 1X1 only */
  23194. 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 */
  23195. WMI_VENDOR_OUI_ACTION_CCKM_1X1 = 2, /* TX (only) CCKM rates with 1 chain only */
  23196. WMI_VENDOR_OUI_ACTION_ALT_ITO = 3, /* inactivity time-out */
  23197. WMI_VENDOR_OUI_ACTION_SWITCH_TO_11N_MODE = 4, /* Switch from 11ac to 11n mode to avoid IOT issues with ONM frame */
  23198. /* WMI_VENDOR_OUI_ACTION_CONNECTION_1X1_NUM_TX_RX_CHAINS_1
  23199. * Connect in 1x1 only and Use only one chain for both Tx and Rx
  23200. * to avoid IOT issues due to change in number of Tx and Rx chains
  23201. */
  23202. WMI_VENDOR_OUI_ACTION_CONNECTION_1X1_NUM_TX_RX_CHAINS_1 = 5,
  23203. /* Disable burst and assist, and restrict A-MPDU size to 32 */
  23204. WMI_VENDOR_OUI_ACTION_DISABLE_AGGRESSIVE_TX = 6,
  23205. /* Disable FW triggered TWT if vendor OUI is received in beacon */
  23206. WMI_VENDOR_OUI_ACTION_DISABLE_FW_TRIGGERED_TWT = 7,
  23207. /* Extend ITO under WOW mode if vendor OUI is received in beacon */
  23208. WMI_VENDOR_OUI_ACTION_EXTEND_WOW_ITO = 8,
  23209. /*
  23210. * Turn on station 80211BE feature if AP's vendor OUI is in the list
  23211. * for specific customer
  23212. */
  23213. WMI_VENDOR_OUI_ACTION_ALLOW_11BE = 9,
  23214. /*
  23215. * Turn off FW's dynamic qos null tx rate if specific vendor OUI
  23216. * received in beacon.
  23217. */
  23218. WMI_VENDOR_OUI_ACTION_DISABLE_DYNAMIC_QOS_NULL_TX_RATE = 10,
  23219. /*
  23220. * Enable CTS2SELF with QoS null frame if specific vendor OUI
  23221. * received in beacon.
  23222. */
  23223. WMI_VENDOR_OUI_ACTION_ENABLE_CTS2SELF_WITH_QOS_NULL = 11,
  23224. /*
  23225. * Send SMPS frame following OMN frame on VHT conncection if specific
  23226. * vendor OUI received in beacon.
  23227. */
  23228. WMI_VENDOR_OUI_ACTION_SEND_SMPS_FRAME_WITH_OMN = 12,
  23229. /* Restrict SLO if specific vendor OUI received in beacon. */
  23230. WMI_VENDOR_OUI_ACTION_RESTRICT_SLO = 13,
  23231. /*
  23232. * Force MLSR mode if specific vendor OUI received in beacon
  23233. * when connect with MLO.
  23234. */
  23235. WMI_VENDOR_OUI_ACTION_FORCE_MLSR = 14,
  23236. /*
  23237. * Disable AUX learning and AUX listen if OUI matches
  23238. */
  23239. WMI_VENDOR_OUI_ACTION_DISABLE_AUXL = 15,
  23240. /* Add any action before this line */
  23241. WMI_VENDOR_OUI_ACTION_MAX_ACTION_ID
  23242. } wmi_vendor_oui_action_id;
  23243. typedef struct {
  23244. A_UINT32 tlv_header;
  23245. /** vendor OUI actions */
  23246. A_UINT32 action_id; /* enum wmi_vendor_oui_action_id */
  23247. A_UINT32 total_num_vendor_oui; /* total number of OUI present in ini for all actions.
  23248. ** For first command, this value will be used for allocating memory in FW accordingly */
  23249. A_UINT32 num_vendor_oui_ext; /* the number of wmi_vendor_oui_ext for action_id */
  23250. /* followed by TLVs, an array of structure of type wmi_vendor_oui_ext
  23251. ** wmi_vendor_oui_ext vendor_oui_ext[num_vendor_oui_ext];
  23252. */
  23253. /* followed by A_UINT8 data[] of concatenated data for each vendor_oui_ext[] element
  23254. ** first byte contains the index i of structure vendor_oui_ext[]
  23255. ** for which data is coming and length of the data is extracted as
  23256. ** wmi_vendor_oui_ext[i].buf_data_length. No padding between data of
  23257. ** N th OUI and (N+1) th OUI.
  23258. ** For example, if vendor_oui_ext[0].buf_data_length is 18, then
  23259. ** data[0] will hold the index value 0, data[1] through data[17]
  23260. ** will hold the OUI data for this first OUI, data[18] will hold
  23261. ** the index value 1, and the OUI data for the second OUI will
  23262. ** begin at data[19].
  23263. */
  23264. } wmi_pdev_config_vendor_oui_action_fixed_param;
  23265. typedef struct {
  23266. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ac_tx_queue_optimized_cmd_fixed_param */
  23267. /** pdev_id for identifying the MAC
  23268. * See macros starting with WMI_PDEV_ID_ for values.
  23269. */
  23270. A_UINT32 pdev_id;
  23271. /** AC number */
  23272. A_UINT32 ac; /* refer to wmi_traffic_ac */
  23273. /**
  23274. * Enable/disable tx queue optimizations (such as dropping stale tx frms)
  23275. * for the specified AC.
  23276. */
  23277. A_UINT32 ac_tx_queue_optimize_enable;
  23278. } wmi_pdev_set_ac_tx_queue_optimized_cmd_fixed_param;
  23279. typedef struct {
  23280. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rx_filter_promiscuous_cmd_fixed_param */
  23281. /** pdev_id for identifying the MAC
  23282. * See macros starting with WMI_PDEV_ID_ for values.
  23283. */
  23284. A_UINT32 pdev_id;
  23285. /** Enable/disable rx filter promiscuous */
  23286. A_UINT32 rx_filter_promiscuous_enable;
  23287. } wmi_pdev_set_rx_filter_promiscuous_cmd_fixed_param;
  23288. typedef enum {
  23289. WMI_BEACON_INFO_PRESENCE_OUI_EXT = 1 << 0,
  23290. WMI_BEACON_INFO_PRESENCE_MAC_ADDRESS = 1 << 1,
  23291. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_NSS = 1 << 2,
  23292. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_HT = 1 << 3,
  23293. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_VHT = 1 << 4,
  23294. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_BAND = 1 << 5,
  23295. } wmi_beacon_info_presence_items;
  23296. typedef struct _wmi_vendor_oui_ext {
  23297. A_UINT32 tlv_header;
  23298. A_UINT32 buf_data_length; /* length of data in bytes for this OUI including index byte */
  23299. A_UINT32 info_presence_bit_mask; /* see enum wmi_beacon_info_presence_items */
  23300. A_UINT32 oui_header_length; /* either 3 or 5 bytes */
  23301. 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 */
  23302. A_UINT32 mac_address_length; /* MAC address length in bytes
  23303. ** (This value will always be 6,
  23304. ** but is explicitly specified for sake
  23305. ** of uniformity and completeness).
  23306. */
  23307. A_UINT32 capability_data_length; /* length of capability in bytes */
  23308. } wmi_vendor_oui_ext;
  23309. #define WMI_INFO_CAPABILITY_NSS_MASK 0x0f
  23310. #define WMI_INFO_CAPABILITY_NSS_OFFSET 0
  23311. #define WMI_INFO_CAPABILITY_HT_ENABLE_MASK 0x10
  23312. #define WMI_INFO_CAPABILITY_HT_ENABLE_OFFSET 4
  23313. #define WMI_INFO_CAPABILITY_VHT_ENABLE_MASK 0x20
  23314. #define WMI_INFO_CAPABILITY_VHT_ENABLE_OFFSET 5
  23315. #define WMI_INFO_CAPABILITY_BAND_MASK 0xc0
  23316. #define WMI_INFO_CAPABILITY_BAND_OFFSET 6
  23317. /* definition of WMI_INFO_CAPABILITY_NSS_MASK */
  23318. #define WMI_INFO_CAPABILITY_NSS_1X1 1
  23319. #define WMI_INFO_CAPABILITY_NSS_2X2 2
  23320. #define WMI_INFO_CAPABILITY_NSS_3X3 3
  23321. #define WMI_INFO_CAPABILITY_NSS_4X4 4
  23322. /* definition of WMI_INFO_CAPABILITY_BAND_MASK */
  23323. #define WMI_INFO_CAPABILITY_2G_BAND_MASK (1 << 0)
  23324. #define WMI_INFO_CAPABILITY_5G_BAND_MASK (1 << 1)
  23325. typedef struct {
  23326. A_UINT32 tlv_header;
  23327. A_UINT32 vdev_id; /* home vdev id */
  23328. A_UINT32 meas_token; /* from measure request frame */
  23329. A_UINT32 dialog_token;
  23330. A_UINT32 number_bursts; /* zero keep sending until cancel, bigger than 0 means times e.g. 1,2 */
  23331. A_UINT32 burst_interval; /* unit in mill seconds, interval between consecutive burst*/
  23332. A_UINT32 burst_cycle; /* times cycle through within one burst */
  23333. A_UINT32 tx_power; /* for path frame */
  23334. A_UINT32 off_duration; /* uint in mill seconds, channel off duraiton for path loss frame sending */
  23335. wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */
  23336. A_UINT32 num_chans;
  23337. /*
  23338. * This fixed_param TLV is followed by other TLVs:
  23339. * A_UINT32 channel_list[num_chans]; // in MHz
  23340. */
  23341. } wmi_vdev_plmreq_start_cmd_fixed_param;
  23342. typedef struct {
  23343. A_UINT32 tlv_header;
  23344. A_UINT32 vdev_id;
  23345. A_UINT32 meas_token; /* same value from req*/
  23346. } wmi_vdev_plmreq_stop_cmd_fixed_param;
  23347. typedef struct {
  23348. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param */
  23349. A_UINT32 tlv_header;
  23350. /* unique id identifying the VDEV, generated by the caller */
  23351. A_UINT32 vdev_id;
  23352. /* enable/disable NoA */
  23353. A_UINT32 enable;
  23354. /** number of NoA desc. In the TLV noa_descriptor[] */
  23355. A_UINT32 num_noa;
  23356. /**
  23357. * TLV (tag length value) parameters follow the pattern structure.
  23358. * TLV contain NoA desc with num of num_noa
  23359. */
  23360. } wmi_p2p_set_noa_cmd_fixed_param;
  23361. typedef struct {
  23362. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param */
  23363. A_UINT32 tlv_header;
  23364. /* unique id identifying the VDEV, generated by the caller */
  23365. A_UINT32 vdev_id;
  23366. /* Identify the wlan module */
  23367. A_UINT32 module_id;
  23368. /* Num of test arguments passed */
  23369. A_UINT32 num_args;
  23370. /* unique id identifying the unit test cmd, generated by the caller */
  23371. A_UINT32 diag_token;
  23372. /**
  23373. * TLV (tag length value) parameters follow the wmi_unit_test_cmd_fixed_param
  23374. * structure. The TLV's are:
  23375. * A_UINT32 args[];
  23376. **/
  23377. } wmi_unit_test_cmd_fixed_param;
  23378. /** Roaming offload SYNCH_COMPLETE from host when host finished sync logic
  23379. * after it received WMI_ROAM_SYNCH_EVENTID.
  23380. */
  23381. typedef struct {
  23382. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */
  23383. /** unique id identifying the VDEV, generated by the caller */
  23384. A_UINT32 vdev_id;
  23385. } wmi_roam_synch_complete_fixed_param;
  23386. typedef enum {
  23387. RECOVERY_SIM_ASSERT = 0x01,
  23388. RECOVERY_SIM_NO_DETECT = 0x02,
  23389. RECOVERY_SIM_CTR_EP_FULL = 0x03,
  23390. RECOVERY_SIM_EMPTY_POINT = 0x04,
  23391. RECOVERY_SIM_STACK_OV = 0x05,
  23392. RECOVERY_SIM_INFINITE_LOOP = 0x06,
  23393. RECOVERY_SIM_PCIE_LINKDOWN = 0x07,
  23394. RECOVERY_SIM_SELF_RECOVERY = 0x08,
  23395. RECOVERY_SIM_BT_RECOVERY = 0x09,
  23396. } RECOVERY_SIM_TYPE;
  23397. /* WMI_FORCE_FW_HANG_CMDID */
  23398. typedef struct {
  23399. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param */
  23400. A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3: simulate ep-full(),4:...*/
  23401. A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms)*/
  23402. } WMI_FORCE_FW_HANG_CMD_fixed_param;
  23403. typedef enum {
  23404. WMI_MCAST_FILTER_SET = 1,
  23405. WMI_MCAST_FILTER_DELETE
  23406. } WMI_SET_SINGLE_MCAST_FILTER_OP;
  23407. typedef struct {
  23408. A_UINT32 tlv_header;
  23409. A_UINT32 vdev_id;
  23410. A_UINT32 index;
  23411. A_UINT32 action;
  23412. wmi_mac_addr mcastbdcastaddr;
  23413. } WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param;
  23414. typedef enum {
  23415. WMI_MULTIPLE_MCAST_FILTER_CLEAR = 1, /* clear all previous mc list */
  23416. WMI_MULTIPLE_MCAST_FILTER_SET, /* clear all previous mc list, and set new list */
  23417. WMI_MULTIPLE_MCAST_FILTER_DELETE, /* delete one/multiple mc list */
  23418. WMI_MULTIPLE_MCAST_FILTER_ADD /* add one/multiple mc list */
  23419. } WMI_MULTIPLE_MCAST_FILTER_OP;
  23420. typedef struct {
  23421. A_UINT32 tlv_header;
  23422. A_UINT32 vdev_id;
  23423. A_UINT32 operation; /* refer WMI_MULTIPLE_MCAST_FILTER_OP */
  23424. A_UINT32 num_mcastaddrs; /* number of elements in the subsequent mcast addr list */
  23425. /**
  23426. * TLV (tag length value) parameters follow the
  23427. * structure. The TLV's are:
  23428. * wmi_mac_addr mcastaddr_list[num_mcastaddrs];
  23429. */
  23430. } WMI_SET_MULTIPLE_MCAST_FILTER_CMD_fixed_param;
  23431. /* WMI_DBGLOG_TIME_STAMP_SYNC_CMDID */
  23432. typedef enum {
  23433. WMI_TIME_STAMP_SYNC_MODE_MS, /* millisecond units */
  23434. WMI_TIME_STAMP_SYNC_MODE_US, /* microsecond units */
  23435. } WMI_TIME_STAMP_SYNC_MODE;
  23436. typedef struct {
  23437. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dbglog_time_stamp_sync_cmd_fixed_param */
  23438. A_UINT32 mode; /* 0: millisec, 1: microsec (see WMI_TIME_STAMP_SYNC_MODE) */
  23439. A_UINT32 time_stamp_low; /* lower 32 bits of remote time stamp */
  23440. A_UINT32 time_stamp_high; /* higher 32 bits of remote time stamp */
  23441. } WMI_DBGLOG_TIME_STAMP_SYNC_CMD_fixed_param;
  23442. /* GPIO Command and Event data structures */
  23443. /* WMI_GPIO_CONFIG_CMDID */
  23444. enum {
  23445. WMI_GPIO_PULL_NONE, /** Do not specify a pull. */
  23446. WMI_GPIO_PULL_UP, /** Pull the GPIO up. */
  23447. WMI_GPIO_PULL_DOWN, /** Pull the GPIO down. */
  23448. WMI_GPIO_PULL_KEEPER, /** Designate as a keeper. */
  23449. };
  23450. enum wmi_gpio_drive_strength {
  23451. WMI_GPIO_2MA, /** Specify a 2 mA drive. */
  23452. WMI_GPIO_4MA, /** Specify a 4 mA drive. */
  23453. WMI_GPIO_6MA, /** Specify a 6 mA drive. */
  23454. WMI_GPIO_8MA, /** Specify an 8 mA drive. */
  23455. WMI_GPIO_10MA, /** Specify a 10 mA drive. */
  23456. WMI_GPIO_12MA, /** Specify a 12 mA drive. */
  23457. WMI_GPIO_14MA, /** Specify a 14 mA drive. */
  23458. WMI_GPIO_16MA, /** Specify a 16 mA drive. */
  23459. };
  23460. enum wmi_tlmm_gpio_config {
  23461. WMI_TLMM_GPIO_DISABLE, /** Use the internal inactive configuration. */
  23462. WMI_TLMM_GPIO_ENABLE, /** Use the configuration passed as parameter. */
  23463. };
  23464. enum {
  23465. WMI_GPIO_INTTYPE_DISABLE,
  23466. WMI_GPIO_INTTYPE_RISING_EDGE,
  23467. WMI_GPIO_INTTYPE_FALLING_EDGE,
  23468. WMI_GPIO_INTTYPE_BOTH_EDGE,
  23469. WMI_GPIO_INTTYPE_LEVEL_LOW,
  23470. WMI_GPIO_INTTYPE_LEVEL_HIGH
  23471. };
  23472. typedef struct {
  23473. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_config_cmd_fixed_param */
  23474. A_UINT32 gpio_num; /* GPIO number to be setup */
  23475. A_UINT32 input; /* 0 - Output/ 1 - Input */
  23476. A_UINT32 pull_type; /* Pull type defined above */
  23477. A_UINT32 intr_mode; /* Interrupt mode defined above (Input) */
  23478. /* mux_config_val - configure pin MUX
  23479. * A value of 0x0 for this field means to use the default MUX configuration.
  23480. * Valid non-zero values are as follows:
  23481. * Rome:
  23482. * 0x4 - use the pin as GPIO (rather than UART)
  23483. */
  23484. A_UINT32 mux_config_val;
  23485. /*
  23486. * The drive strength to use in the configuration of a GPIO.
  23487. * Refer to the wmi_gpio_drive_strength enum.
  23488. */
  23489. A_UINT32 drive;
  23490. /*
  23491. * Use the internal inactive configuration or configuration passed
  23492. * as parameter.
  23493. * Refer to the wmi_tlmm_gpio_config enum.
  23494. */
  23495. A_UINT32 init_enable;
  23496. } wmi_gpio_config_cmd_fixed_param;
  23497. /* WMI_GPIO_OUTPUT_CMDID */
  23498. typedef struct {
  23499. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_output_cmd_fixed_param */
  23500. A_UINT32 gpio_num; /* GPIO number to be setup */
  23501. A_UINT32 set; /* Set the GPIO pin*/
  23502. } wmi_gpio_output_cmd_fixed_param;
  23503. /* WMI_GPIO_STATE_REQ_CMDID */
  23504. typedef struct {
  23505. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_state_req_cmd_fixed_param */
  23506. A_UINT32 gpio_num; /* GPIO number to get state */
  23507. } wmi_gpio_state_req_cmd_fixed_param;
  23508. /* WMI_GPIO_INPUT_EVENTID */
  23509. typedef struct {
  23510. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param */
  23511. A_UINT32 gpio_num; /* GPIO number which changed state */
  23512. } wmi_gpio_input_event_fixed_param;
  23513. typedef enum {
  23514. /**
  23515. * The following wmi_gpio_state_type is mutually exclusive.
  23516. * 0: gpio_invalid_state
  23517. * 1: gpio_state is LO
  23518. * 2: gpio_state is HIGH
  23519. */
  23520. WMI_GPIO_STATE_INVALID, /* GPIO state is invalid. */
  23521. WMI_GPIO_STATE_LOW, /* GPIO state is low. */
  23522. WMI_GPIO_STATE_HIGH, /* GPIO state is high. */
  23523. } WMI_GPIO_STATE_TYPE;
  23524. /* WMI_GPIO_STATE_RES_EVENTID */
  23525. typedef struct {
  23526. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_state_res_event_fixed_param */
  23527. A_UINT32 gpio_num; /* GPIO number */
  23528. A_UINT32 gpio_state; /* state of GPIO pin defined in WMI_GPIO_STATE_TYPE 0 invalid 1 - LO, 2 -HI*/
  23529. } wmi_gpio_state_res_event_fixed_param;
  23530. /* WMI_ANT_CONTROLLER_CMDID */
  23531. typedef struct {
  23532. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ant_controller_cmd_fixed_param */
  23533. A_UINT32 ant_controller_enable;
  23534. } wmi_ant_controller_cmd_fixed_param;
  23535. /* WMI_P2P_DISC_EVENTID */
  23536. enum {
  23537. P2P_DISC_SEARCH_PROB_REQ_HIT = 0, /* prob req hit the p2p find pattern */
  23538. P2P_DISC_SEARCH_PROB_RESP_HIT, /* prob resp hit the p2p find pattern */
  23539. };
  23540. enum {
  23541. P2P_DISC_MODE_SEARCH = 0, /* do search when p2p find offload*/
  23542. P2P_DISC_MODE_LISTEN, /* do listen when p2p find offload*/
  23543. P2P_DISC_MODE_AUTO, /* do listen and search when p2p find offload*/
  23544. };
  23545. enum {
  23546. P2P_DISC_PATTERN_TYPE_BSSID = 0, /* BSSID pattern */
  23547. P2P_DISC_PATTERN_TYPE_DEV_NAME, /* device name pattern */
  23548. };
  23549. typedef struct {
  23550. A_UINT32 vdev_id;
  23551. A_UINT32 reason; /* P2P DISC wake up reason*/
  23552. } wmi_p2p_disc_event;
  23553. typedef WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param WOW_EVENT_INFO_SECTION_GTKIGTK;
  23554. typedef enum {
  23555. WMI_FAKE_TXBFER_SEND_NDPA,
  23556. WMI_FAKE_TXBFER_SEND_MU,
  23557. WMI_FAKE_TXBFER_NDPA_FBTYPE,
  23558. WMI_FAKE_TXBFER_NDPA_NCIDX,
  23559. WMI_FAKE_TXBFER_NDPA_POLL,
  23560. WMI_FAKE_TXBFER_NDPA_BW,
  23561. WMI_FAKE_TXBFER_NDPA_PREAMBLE,
  23562. WMI_FAKE_TXBFER_NDPA_RATE,
  23563. WMI_FAKE_TXBFER_NDP_BW,
  23564. WMI_FAKE_TXBFER_NDP_NSS,
  23565. WMI_TXBFEE_ENABLE_UPLOAD_H,
  23566. WMI_TXBFEE_ENABLE_CAPTURE_H,
  23567. WMI_TXBFEE_SET_CBF_TBL,
  23568. WMI_TXBFEE_CBF_TBL_LSIG,
  23569. WMI_TXBFEE_CBF_TBL_SIGA1,
  23570. WMI_TXBFEE_CBF_TBL_SIGA2,
  23571. WMI_TXBFEE_CBF_TBL_SIGB,
  23572. WMI_TXBFEE_CBF_TBL_PAD,
  23573. WMI_TXBFEE_CBF_TBL_DUR,
  23574. WMI_TXBFEE_SU_NCIDX,
  23575. WMI_TXBFEE_CBIDX,
  23576. WMI_TXBFEE_NGIDX,
  23577. } WMI_TXBF_PARAM_ID;
  23578. typedef struct {
  23579. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_txbf_cmd_fixed_param */
  23580. /** parameter id */
  23581. A_UINT32 param_id;
  23582. /** parameter value */
  23583. A_UINT32 param_value;
  23584. } wmi_txbf_cmd_fixed_param;
  23585. typedef struct {
  23586. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_upload_h_hdr */
  23587. A_UINT32 h_length;
  23588. A_UINT32 cv_length;
  23589. /* This TLV is followed by array of bytes:
  23590. * A_UINT8 bufp[]; <-- h_cv info buffer
  23591. */
  23592. } wmi_upload_h_hdr;
  23593. typedef struct {
  23594. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_capture_h_event_hdr */
  23595. A_UINT32 svd_num;
  23596. A_UINT32 tone_num;
  23597. A_UINT32 reserved;
  23598. } wmi_capture_h_event_hdr;
  23599. typedef struct {
  23600. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_range_desc */
  23601. A_UINT32 start_freq; /* start frequency, not channel center freq */
  23602. A_UINT32 end_freq; /* end frequency */
  23603. } wmi_avoid_freq_range_desc;
  23604. typedef struct {
  23605. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_ranges_event_fixed_param */
  23606. /* bad channel range count, multi range is allowed, 0 means all channel clear */
  23607. A_UINT32 num_freq_ranges;
  23608. /* The TLVs will follow.
  23609. * multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc
  23610. * wmi_avoid_freq_range_desc avd_freq_range[]; <-- message buffer, NULL terminated
  23611. */
  23612. } wmi_avoid_freq_ranges_event_fixed_param;
  23613. enum {
  23614. WMI_SAR2_SUCCESS = 0,
  23615. WMI_SAR2_INVALID_ANTENNA_INDEX = 1,
  23616. WMI_SAR2_INVALID_TABLE_INDEX = 2,
  23617. WMI_SAR2_STATE_ERROR = 4,
  23618. WMI_SAR2_BDF_NO_TABLE = 8,
  23619. };
  23620. typedef struct {
  23621. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar2_result_event_fixed_param */
  23622. A_UINT32 result; /* refer to the above WMI_SAR2_ result definitions */
  23623. } wmi_sar2_result_event_fixed_param;
  23624. typedef struct {
  23625. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param */
  23626. /** Reserved for future use */
  23627. A_UINT32 reserved0;
  23628. A_UINT32 vdev_id;
  23629. } wmi_gtk_rekey_fail_event_fixed_param;
  23630. typedef enum WLAN_COEX_EVENT {
  23631. WLAN_COEX_EVENT_BT_NONE = 0,
  23632. WLAN_COEX_EVENT_BT_A2DP_PROFILE_ADD = 1,
  23633. WLAN_COEX_EVENT_BT_A2DP_PROFILE_REMOVE = 2,
  23634. WLAN_COEX_EVENT_BT_VOICE_PROFILE_ADD = 3,
  23635. WLAN_COEX_EVENT_BT_VOICE_PROFILE_REMOVE = 4,
  23636. WLAN_COEX_EVENT_BT_SCAN_START = 5,
  23637. WLAN_COEX_EVENT_BT_SCAN_STOP = 6,
  23638. WLAN_COEX_EVENT_BT_PROFILE_CONNECTED = 7,
  23639. WLAN_COEX_EVENT_BT_PROFILE_DISCONNECTED = 8,
  23640. } WLAN_COEX_EVENT;
  23641. typedef struct {
  23642. A_UINT32 tlv_header;
  23643. A_UINT32 coex_profile_evt; //uses the enum values from WLAN_COEX_EVENT
  23644. } wmi_coex_bt_activity_event_fixed_param;
  23645. enum wmm_ac_downgrade_policy {
  23646. WMM_AC_DOWNGRADE_DEPRIO,
  23647. WMM_AC_DOWNGRADE_DROP,
  23648. WMM_AC_DOWNGRADE_INVALID,
  23649. };
  23650. /* WMM EDCA Params type */
  23651. #define WMM_PARAM_TYPE_LEGACY 0
  23652. /* Relaxed EDCA parameters for 11ax to be used in case of triggered access */
  23653. #define WMM_PARAM_TYPE_11AX_EDCA 1
  23654. typedef struct {
  23655. A_UINT32 tlv_header;
  23656. A_UINT32 cwmin;
  23657. A_UINT32 cwmax;
  23658. A_UINT32 aifs;
  23659. union {
  23660. A_UINT32 txoplimit;
  23661. A_UINT32 mu_edca_timer;
  23662. };
  23663. A_UINT32 acm;
  23664. A_UINT32 no_ack;
  23665. } wmi_wmm_vparams;
  23666. typedef struct {
  23667. A_UINT32 tlv_header;
  23668. A_UINT32 vdev_id;
  23669. wmi_wmm_vparams wmm_params[4]; /* 0 be, 1 bk, 2 vi, 3 vo */
  23670. A_UINT32 wmm_param_type; /* see WMM_PARAM_TYPE_xxx defs */
  23671. } wmi_vdev_set_wmm_params_cmd_fixed_param;
  23672. typedef struct {
  23673. A_UINT32 tlv_header;
  23674. A_UINT32 vdev_id;
  23675. A_UINT32 gtxRTMask[2]; /* for HT and VHT rate masks */
  23676. A_UINT32 userGtxMask; /* host request for GTX mask */
  23677. A_UINT32 gtxPERThreshold; /* default: 10% */
  23678. A_UINT32 gtxPERMargin; /* default: 2% */
  23679. A_UINT32 gtxTPCstep; /* default: 1 */
  23680. A_UINT32 gtxTPCMin; /* default: 5 */
  23681. A_UINT32 gtxBWMask; /* 20/40/80/160 Mhz */
  23682. } wmi_vdev_set_gtx_params_cmd_fixed_param;
  23683. typedef struct
  23684. {
  23685. A_UINT32 tlv_header;
  23686. A_UINT32 vdev_id;
  23687. A_UINT32 ac;
  23688. A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */
  23689. A_UINT32 downgrade_type;
  23690. } wmi_vdev_wmm_addts_cmd_fixed_param;
  23691. typedef struct
  23692. {
  23693. A_UINT32 tlv_header;
  23694. A_UINT32 vdev_id;
  23695. A_UINT32 ac;
  23696. } wmi_vdev_wmm_delts_cmd_fixed_param;
  23697. /* DEPRECATED */
  23698. typedef struct {
  23699. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param */
  23700. /** Reserved for future use */
  23701. A_UINT32 reserved0;
  23702. } wmi_pdev_dfs_enable_cmd_fixed_param;
  23703. /* DEPRECATED */
  23704. typedef struct {
  23705. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_disable_cmd_fixed_param */
  23706. /** pdev_id for identifying the MAC
  23707. * See macros starting with WMI_PDEV_ID_ for values.
  23708. */
  23709. A_UINT32 pdev_id;
  23710. } wmi_pdev_dfs_disable_cmd_fixed_param;
  23711. typedef struct {
  23712. /** TLV tag and len; tag equals
  23713. * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param
  23714. */
  23715. A_UINT32 tlv_header;
  23716. /** pdev_id for identifying the MAC
  23717. * See macros starting with WMI_PDEV_ID_ for values.
  23718. */
  23719. A_UINT32 pdev_id;
  23720. } wmi_dfs_phyerr_filter_ena_cmd_fixed_param;
  23721. typedef struct {
  23722. /** TLV tag and len; tag equals
  23723. * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param
  23724. */
  23725. A_UINT32 tlv_header;
  23726. /** pdev_id for identifying the MAC
  23727. * See macros starting with WMI_PDEV_ID_ for values.
  23728. */
  23729. A_UINT32 pdev_id;
  23730. } wmi_dfs_phyerr_filter_dis_cmd_fixed_param;
  23731. typedef struct {
  23732. A_UINT32 tlv_header;
  23733. A_UINT32 pdev_id;
  23734. } wmi_pdev_dfs_phyerr_offload_enable_cmd_fixed_param;
  23735. typedef struct {
  23736. A_UINT32 tlv_header;
  23737. A_UINT32 pdev_id;
  23738. } wmi_pdev_dfs_phyerr_offload_disable_cmd_fixed_param;
  23739. typedef enum {
  23740. QUICK_OCAC = 0,
  23741. EXTENSIVE_OCAC,
  23742. QUICK_RCAC,
  23743. } WMI_ADFS_OCAC_MODE;
  23744. typedef struct {
  23745. A_UINT32 tlv_header;
  23746. A_UINT32 vdev_id;
  23747. A_UINT32 ocac_mode; /* WMI_ADFS_OCAC_MODE */
  23748. A_UINT32 min_duration_ms; /* in milliseconds */
  23749. A_UINT32 max_duration_ms; /* in milliseconds */
  23750. A_UINT32 chan_freq; /* in MHz */
  23751. A_UINT32 chan_width; /* in MHz */
  23752. /*
  23753. * Two center frequencies are required since agile channel switch
  23754. * has to support 160/165 MHz for products like Pine.
  23755. * For agile which supports only up to 80MHz (HK),
  23756. * freq2 will be 0 and ignored.
  23757. */
  23758. union {
  23759. A_UINT32 center_freq; /* in MHz */ /* old name */
  23760. A_UINT32 center_freq1; /* in MHz */ /* new name */
  23761. };
  23762. A_UINT32 center_freq2; /* in MHz */
  23763. } wmi_vdev_adfs_ch_cfg_cmd_fixed_param;
  23764. typedef struct {
  23765. A_UINT32 tlv_header;
  23766. A_UINT32 vdev_id;
  23767. } wmi_vdev_adfs_ocac_abort_cmd_fixed_param;
  23768. typedef enum {
  23769. IN_SERVICE_MODE = 0,
  23770. OCAC_MODE,
  23771. } WMI_DFS_RADAR_DETECTION_MODE;
  23772. typedef struct {
  23773. A_UINT32 tlv_header;
  23774. A_UINT32 pdev_id;
  23775. /* In-service mode or O-CAC mode */
  23776. A_UINT32 detection_mode; /* WMI_DFS_RADAR_DETECTION_MODE */
  23777. A_UINT32 chan_freq; /* in MHz */
  23778. A_UINT32 chan_width; /* in MHz */
  23779. A_UINT32 detector_id;
  23780. A_UINT32 segment_id;
  23781. A_UINT32 timestamp;
  23782. A_UINT32 is_chirp;
  23783. A_INT32 freq_offset; /* in MHz */
  23784. A_INT32 sidx; /* segment index (where was the radar within the channel) */
  23785. } wmi_pdev_dfs_radar_detection_event_fixed_param;
  23786. typedef struct {
  23787. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_RADAR_FLAGS */
  23788. /*
  23789. * Bit 0:
  23790. * 0 - need check sub channel marking
  23791. * 1 - full bandwidth need put to NOL
  23792. * Refer to WMI_RADAR_FLAGS_FULL_BW_NOL_GET and _SET macros
  23793. * [1:31] reserved
  23794. */
  23795. A_UINT32 flags;
  23796. } WMI_RADAR_FLAGS;
  23797. #define WMI_RADAR_FLAGS_FULL_BW_NOL_BITPOS 0
  23798. #define WMI_RADAR_FLAGS_FULL_BW_NOL_NUM_BITS 1
  23799. #define WMI_RADAR_FLAGS_FULL_BW_NOL_GET(flag) \
  23800. WMI_GET_BITS(flag, \
  23801. WMI_RADAR_FLAGS_FULL_BW_NOL_BITPOS, \
  23802. WMI_RADAR_FLAGS_FULL_BW_NOL_NUM_BITS)
  23803. #define WMI_RADAR_FLAGS_FULL_BW_NOL_SET(flag, val) \
  23804. WMI_SET_BITS(flag, \
  23805. WMI_RADAR_FLAGS_FULL_BW_NOL_BITPOS, \
  23806. WMI_RADAR_FLAGS_FULL_BW_NOL_NUM_BITS, val)
  23807. typedef enum {
  23808. OCAC_COMPLETE = 0,
  23809. OCAC_ABORT,
  23810. } WMI_VDEV_OCAC_COMPLETE_STATUS;
  23811. typedef struct {
  23812. A_UINT32 tlv_header;
  23813. A_UINT32 vdev_id;
  23814. A_UINT32 chan_freq; /* in MHz */
  23815. A_UINT32 chan_width; /* in MHz */
  23816. /*
  23817. * Two center frequencies are required since agile channel switch
  23818. * has to support 160/165 MHz for products like Pine.
  23819. * For agile which supports only up to 80MHz (HK),
  23820. * freq2 will be 0 and ignored.
  23821. */
  23822. union {
  23823. A_UINT32 center_freq; /* in MHz */ /* old name */
  23824. A_UINT32 center_freq1; /* in MHz */ /* new name */
  23825. };
  23826. A_UINT32 status; /* WMI_VDEV_OCAC_COMPLETE_STATUS */
  23827. A_UINT32 center_freq2; /* in MHz */
  23828. } wmi_vdev_adfs_ocac_complete_event_fixed_param;
  23829. typedef struct {
  23830. A_UINT32 tlv_header;
  23831. A_UINT32 vdev_id;
  23832. } wmi_vdev_dfs_cac_complete_event_fixed_param;
  23833. /** TDLS COMMANDS */
  23834. /* WMI_TDLS_SET_STATE_CMDID */
  23835. /* TDLS State */
  23836. enum wmi_tdls_state {
  23837. /** TDLS disable */
  23838. WMI_TDLS_DISABLE,
  23839. /** TDLS enabled - no firmware connection tracking/notifications */
  23840. WMI_TDLS_ENABLE_PASSIVE,
  23841. /** TDLS enabled - with firmware connection tracking/notifications */
  23842. WMI_TDLS_ENABLE_ACTIVE,
  23843. /** TDLS enabled - firmware waits for peer mac for connection tracking */
  23844. WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL,
  23845. /** TDLS enabled - TDLS connection tracking is done in host */
  23846. WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST,
  23847. };
  23848. /* TDLS Options */
  23849. #define WMI_TDLS_OFFCHAN_EN (1 << 0) /** TDLS Off Channel support */
  23850. #define WMI_TDLS_BUFFER_STA_EN (1 << 1) /** TDLS Buffer STA support */
  23851. #define WMI_TDLS_SLEEP_STA_EN (1 << 2) /** TDLS Sleep STA support (not currently supported) */
  23852. typedef struct {
  23853. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param */
  23854. A_UINT32 tlv_header;
  23855. /** unique id identifying the VDEV */
  23856. A_UINT32 vdev_id;
  23857. /** Enable/Disable TDLS (wmi_tdls_state) */
  23858. A_UINT32 state;
  23859. /** Duration (in ms) over which to calculate tx/rx threshold to trigger TDLS Discovery */
  23860. A_UINT32 notification_interval_ms;
  23861. /** number of packets OVER which notify/suggest TDLS Discovery:
  23862. * if current tx pps counter / notification interval >= threshold
  23863. * then a notification will be sent to host to advise TDLS Discovery */
  23864. A_UINT32 tx_discovery_threshold;
  23865. /** number of packets UNDER which notify/suggest TDLS Teardown:
  23866. * if current tx pps counter / notification interval < threshold
  23867. * then a notification will be sent to host to advise TDLS Tear down */
  23868. A_UINT32 tx_teardown_threshold;
  23869. /** Absolute RSSI value under which notify/suggest TDLS Teardown */
  23870. A_INT32 rssi_teardown_threshold;
  23871. /** Peer RSSI < (AP RSSI + delta) will trigger a teardown */
  23872. A_INT32 rssi_delta;
  23873. /** TDLS Option Control
  23874. * Off-Channel, Buffer STA, (later)Sleep STA support */
  23875. A_UINT32 tdls_options;
  23876. /* Buffering time in number of beacon intervals */
  23877. A_UINT32 tdls_peer_traffic_ind_window;
  23878. /* Wait time for PTR frame */
  23879. A_UINT32 tdls_peer_traffic_response_timeout_ms;
  23880. /* Self PUAPSD mask */
  23881. A_UINT32 tdls_puapsd_mask;
  23882. /* Inactivity timeout */
  23883. A_UINT32 tdls_puapsd_inactivity_time_ms;
  23884. /* Max of rx frame during SP */
  23885. A_UINT32 tdls_puapsd_rx_frame_threshold;
  23886. /**Duration (in ms) over which to check whether TDLS link needs to be torn down */
  23887. A_UINT32 teardown_notification_ms;
  23888. /** STA kickout threshold for TDLS peer */
  23889. A_UINT32 tdls_peer_kickout_threshold;
  23890. /* TDLS discovery WAKE timeout in ms.
  23891. * DUT will wake until this timeout to receive TDLS discovery response
  23892. * from peer.
  23893. * If tdls_discovery_wake_timeout is 0x0, the DUT will choose autonomously
  23894. * what wake timeout value to use.
  23895. */
  23896. A_UINT32 tdls_discovery_wake_timeout;
  23897. } wmi_tdls_set_state_cmd_fixed_param;
  23898. /* WMI_TDLS_PEER_UPDATE_CMDID */
  23899. enum wmi_tdls_peer_state {
  23900. /** tx peer TDLS link setup now starting, traffic to DA should be
  23901. * paused (except TDLS frames) until state is moved to CONNECTED (or
  23902. * TEARDOWN on setup failure) */
  23903. WMI_TDLS_PEER_STATE_PEERING,
  23904. /** tx peer TDLS link established, running (all traffic to DA unpaused) */
  23905. WMI_TDLS_PEER_STATE_CONNECTED,
  23906. /** tx peer TDLS link tear down started (link paused, any frames
  23907. * queued for DA will be requeued back through the AP)*/
  23908. WMI_TDLS_PEER_STATE_TEARDOWN,
  23909. /** Add peer mac into connection table */
  23910. WMI_TDLS_PEER_ADD_MAC_ADDR,
  23911. /** Remove peer mac from connection table */
  23912. WMI_TDLS_PEER_REMOVE_MAC_ADDR,
  23913. };
  23914. /* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */
  23915. #define WMI_TDLS_MAX_SUPP_CHANNELS 128
  23916. #define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
  23917. typedef struct {
  23918. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities */
  23919. A_UINT32 tlv_header;
  23920. /* Peer's QoS Info - for U-APSD */
  23921. /* AC FLAGS - accessed through macros below */
  23922. /* Ack, SP, More Data Ack - accessed through macros below */
  23923. A_UINT32 peer_qos;
  23924. /*TDLS Peer's U-APSD Buffer STA Support*/
  23925. A_UINT32 buff_sta_support;
  23926. /*TDLS off channel related params */
  23927. A_UINT32 off_chan_support;
  23928. A_UINT32 peer_curr_operclass;
  23929. A_UINT32 self_curr_operclass;
  23930. /* Number of channels available for off channel operation */
  23931. A_UINT32 peer_chan_len;
  23932. A_UINT32 peer_operclass_len;
  23933. A_UINT8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
  23934. /* Is peer initiator or responder of TDLS setup request */
  23935. A_UINT32 is_peer_responder;
  23936. /* Preferred off channel number as configured by user */
  23937. A_UINT32 pref_offchan_num;
  23938. /* Preferred off channel bandwidth as configured by user */
  23939. A_UINT32 pref_offchan_bw;
  23940. /* Preferred off channel frequency in MHz as configured by user */
  23941. A_UINT32 pref_offchan_freq;
  23942. /** Followed by the variable length TLV peer_chan_list:
  23943. * wmi_channel peer_chan_list[].
  23944. * Array size would be peer_chan_len.
  23945. * This array is intersected channels which is supported by both peer
  23946. * and DUT. freq1 in chan_info shall be same as mhz, freq2 shall be 0.
  23947. * FW shall compute BW for an offchan based on peer's ht/vht cap
  23948. * received in peer_assoc cmd during change STA operation
  23949. */
  23950. } wmi_tdls_peer_capabilities;
  23951. #define WMI_TDLS_QOS_VO_FLAG 0
  23952. #define WMI_TDLS_QOS_VI_FLAG 1
  23953. #define WMI_TDLS_QOS_BK_FLAG 2
  23954. #define WMI_TDLS_QOS_BE_FLAG 3
  23955. #define WMI_TDLS_QOS_ACK_FLAG 4
  23956. #define WMI_TDLS_QOS_SP_FLAG 5
  23957. #define WMI_TDLS_QOS_MOREDATA_FLAG 7
  23958. #define WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps,flag) do { \
  23959. (ppeer_caps)->peer_qos |= (1 << flag); \
  23960. } while (0)
  23961. #define WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps,flag) \
  23962. (((ppeer_caps)->peer_qos & (1 << flag)) >> flag)
  23963. #define WMI_SET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
  23964. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
  23965. #define WMI_GET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
  23966. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
  23967. #define WMI_SET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
  23968. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
  23969. #define WMI_GET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
  23970. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
  23971. #define WMI_SET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
  23972. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
  23973. #define WMI_GET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
  23974. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
  23975. #define WMI_SET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
  23976. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
  23977. #define WMI_GET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
  23978. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
  23979. #define WMI_SET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
  23980. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
  23981. #define WMI_GET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
  23982. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
  23983. /* SP has 2 bits */
  23984. #define WMI_SET_TDLS_PEER_SP_UAPSD(ppeer_caps,val) do { \
  23985. (ppeer_caps)->peer_qos |= (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
  23986. } while (0)
  23987. #define WMI_GET_TDLS_PEER_SP_UAPSD(ppeer_caps) \
  23988. (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
  23989. #define WMI_SET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
  23990. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
  23991. #define WMI_GET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
  23992. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
  23993. #define WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd,flag) do { \
  23994. (pset_cmd)->tdls_puapsd_mask |= (1 << flag); \
  23995. } while (0)
  23996. #define WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd,flag) \
  23997. (((pset_cmd)->tdls_puapsd_mask & (1 << flag)) >> flag)
  23998. #define WMI_SET_TDLS_SELF_VO_UAPSD(pset_cmd) \
  23999. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
  24000. #define WMI_GET_TDLS_SELF_VO_UAPSD(pset_cmd) \
  24001. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
  24002. #define WMI_SET_TDLS_SELF_VI_UAPSD(pset_cmd) \
  24003. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
  24004. #define WMI_GET_TDLS_SELF_VI_UAPSD(pset_cmd) \
  24005. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
  24006. #define WMI_SET_TDLS_SELF_BK_UAPSD(pset_cmd) \
  24007. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
  24008. #define WMI_GET_TDLS_SELF__BK_UAPSD(pset_cmd) \
  24009. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
  24010. #define WMI_SET_TDLS_SELF_BE_UAPSD(pset_cmd) \
  24011. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
  24012. #define WMI_GET_TDLS_SELF_BE_UAPSD(pset_cmd) \
  24013. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
  24014. #define WMI_SET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
  24015. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
  24016. #define WMI_GET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
  24017. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
  24018. /* SP has 2 bits */
  24019. #define WMI_SET_TDLS_SELF_SP_UAPSD(pset_cmd,val) do { \
  24020. (pset_cmd)->tdls_puapsd_mask |= (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
  24021. } while (0)
  24022. #define WMI_GET_TDLS_SELF_SP_UAPSD(pset_cmd) \
  24023. (((pset_cmd)->tdls_puapsd_mask & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
  24024. #define WMI_SET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
  24025. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
  24026. #define WMI_GET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
  24027. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
  24028. typedef struct {
  24029. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param */
  24030. A_UINT32 tlv_header;
  24031. /** unique id identifying the VDEV */
  24032. A_UINT32 vdev_id;
  24033. /** peer MAC address */
  24034. wmi_mac_addr peer_macaddr;
  24035. /** new TDLS state for peer (wmi_tdls_peer_state) */
  24036. A_UINT32 peer_state;
  24037. /* The TLV for wmi_tdls_peer_capabilities will follow.
  24038. * wmi_tdls_peer_capabilities peer_caps;
  24039. */
  24040. /** Followed by the variable length TLV chan_info:
  24041. * wmi_channel chan_info[] */
  24042. } wmi_tdls_peer_update_cmd_fixed_param;
  24043. /* WMI_TDLS_SET_OFFCHAN_MODE_CMDID */
  24044. /* bitmap 20, 40, 80 or 160 MHz wide channel */
  24045. #define WMI_TDLS_OFFCHAN_20MHZ 0x1 /* 20 MHz wide channel */
  24046. #define WMI_TDLS_OFFCHAN_40MHZ 0x2 /* 40 MHz wide channel */
  24047. #define WMI_TDLS_OFFCHAN_80MHZ 0x4 /* 80 MHz wide channel */
  24048. #define WMI_TDLS_OFFCHAN_160MHZ 0x8 /* 160 MHz wide channel */
  24049. enum wmi_tdls_offchan_mode {
  24050. WMI_TDLS_ENABLE_OFFCHANNEL,
  24051. WMI_TDLS_DISABLE_OFFCHANNEL, /* passive offchannel disable */
  24052. WMI_TDLS_ACTIVE_DISABLE_OFFCHANNEL,
  24053. };
  24054. typedef struct {
  24055. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_offchan_mode_cmd_fixed_param */
  24056. A_UINT32 tlv_header;
  24057. /** unique id identifying the VDEV */
  24058. A_UINT32 vdev_id;
  24059. /** Enable/Disable TDLS offchannel */
  24060. A_UINT32 offchan_mode;
  24061. /** peer MAC address */
  24062. wmi_mac_addr peer_macaddr;
  24063. /* Is peer initiator or responder of TDLS setup request */
  24064. A_UINT32 is_peer_responder;
  24065. /* off channel number*/
  24066. A_UINT32 offchan_num;
  24067. /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */
  24068. A_UINT32 offchan_bw_bitmap;
  24069. /* operating class for offchan */
  24070. A_UINT32 offchan_oper_class;
  24071. /* off channel frequency in MHz */
  24072. A_UINT32 offchan_freq;
  24073. /** This fixed_param TLV is followed by the below additional TLVs:
  24074. * - wmi_channel peer_chan_info[]: optional per-peer chan_info
  24075. */
  24076. } wmi_tdls_set_offchan_mode_cmd_fixed_param;
  24077. /** TDLS EVENTS */
  24078. enum wmi_tdls_peer_notification {
  24079. /** tdls discovery recommended for peer (based
  24080. * on tx bytes per second > tx_discover threshold) */
  24081. WMI_TDLS_SHOULD_DISCOVER,
  24082. /** tdls link tear down recommended for peer
  24083. * due to tx bytes per second below tx_teardown_threshold
  24084. * NB: this notification sent once */
  24085. WMI_TDLS_SHOULD_TEARDOWN,
  24086. /** tx peer TDLS link tear down complete */
  24087. WMI_TDLS_PEER_DISCONNECTED,
  24088. /** TDLS/BT role change notification for connection tracker */
  24089. WMI_TDLS_CONNECTION_TRACKER_NOTIFICATION,
  24090. };
  24091. enum wmi_tdls_peer_reason {
  24092. /** tdls teardown recommended due to low transmits */
  24093. WMI_TDLS_TEARDOWN_REASON_TX,
  24094. /** tdls link tear down recommended due to poor RSSI */
  24095. WMI_TDLS_TEARDOWN_REASON_RSSI,
  24096. /** tdls link tear down recommended due to offchannel scan */
  24097. WMI_TDLS_TEARDOWN_REASON_SCAN,
  24098. /** tdls peer disconnected due to peer deletion */
  24099. WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE,
  24100. /** tdls peer disconnected due to PTR timeout */
  24101. WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT,
  24102. /** tdls peer disconnected due wrong PTR format */
  24103. WMI_TDLS_TEARDOWN_REASON_BAD_PTR,
  24104. /** tdls peer not responding */
  24105. WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE,
  24106. /** tdls entered buffer STA role, TDLS connection tracker needs to handle this */
  24107. WMI_TDLS_ENTER_BUF_STA,
  24108. /** tdls exited buffer STA role, TDLS connection tracker needs to handle this */
  24109. WMI_TDLS_EXIT_BUF_STA,
  24110. /** BT entered busy mode, TDLS connection tracker needs to handle this */
  24111. WMI_TDLS_ENTER_BT_BUSY_MODE,
  24112. /** BT exited busy mode, TDLS connection tracker needs to handle this */
  24113. WMI_TDLS_EXIT_BT_BUSY_MODE,
  24114. /** TDLS module received a scan start event, TDLS connection tracker needs to handle this */
  24115. WMI_TDLS_SCAN_STARTED_EVENT,
  24116. /** TDLS module received a scan complete event, TDLS connection tracker needs to handle this */
  24117. WMI_TDLS_SCAN_COMPLETED_EVENT,
  24118. };
  24119. /* WMI_TDLS_PEER_EVENTID */
  24120. typedef struct {
  24121. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param */
  24122. A_UINT32 tlv_header;
  24123. /** peer MAC address */
  24124. wmi_mac_addr peer_macaddr;
  24125. /** TDLS peer status (wmi_tdls_peer_notification)*/
  24126. A_UINT32 peer_status;
  24127. /** TDLS peer reason (wmi_tdls_peer_reason) */
  24128. A_UINT32 peer_reason;
  24129. /** unique id identifying the VDEV */
  24130. A_UINT32 vdev_id;
  24131. } wmi_tdls_peer_event_fixed_param;
  24132. /* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please
  24133. don't use this for any new implementations */
  24134. typedef struct {
  24135. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param */
  24136. /** unique id identifying the VDEV, generated by the caller */
  24137. A_UINT32 vdev_id;
  24138. /* New beacon interval to be used for the specified VDEV suggested by firmware */
  24139. A_UINT32 new_bcn_intvl;
  24140. } wmi_vdev_mcc_bcn_intvl_change_event_fixed_param;
  24141. /* WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID */
  24142. typedef struct {
  24143. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param */
  24144. A_UINT32 tlv_header;
  24145. /** 1: enable fw based adaptive ocs,
  24146. * 0: disable fw based adaptive ocs
  24147. */
  24148. A_UINT32 enable;
  24149. /** This field contains the MAC identifier in order to lookup the appropriate OCS instance. */
  24150. union {
  24151. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  24152. /** pdev_id for identifying the MAC
  24153. * See macros starting with WMI_PDEV_ID_ for values.
  24154. */
  24155. A_UINT32 pdev_id;
  24156. };
  24157. } wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param;
  24158. /* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */
  24159. typedef struct {
  24160. /* Frequency of the channel for which the quota is set */
  24161. A_UINT32 chan_mhz;
  24162. /* Requested channel time quota expressed as percentage */
  24163. A_UINT32 channel_time_quota;
  24164. } wmi_resmgr_chan_time_quota;
  24165. typedef struct {
  24166. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_chan_time_quota_tlv */
  24167. A_UINT32 tlv_header;
  24168. wmi_resmgr_chan_time_quota chan_time_quota;
  24169. } wmi_resmgr_chan_time_quota_tlv;
  24170. typedef struct {
  24171. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */
  24172. A_UINT32 tlv_header;
  24173. /** number of channel time quota command structures
  24174. * (wmi_resmgr_chan_time_quota) 1 or 2
  24175. */
  24176. A_UINT32 num_chans;
  24177. /* This TLV is followed by another TLV of array of bytes
  24178. * A_UINT8 data[];
  24179. * This data array contains
  24180. * num_chans * size of(struct wmi_resmgr_chan_time_quota)
  24181. */
  24182. } wmi_resmgr_set_chan_time_quota_cmd_fixed_param;
  24183. typedef enum {
  24184. WMI_RESMGR_QUOTA_TYPE_CLEAR = 0,
  24185. WMI_RESMGR_QUOTA_TYPE_FIXED = 1,
  24186. WMI_RESMGR_QUOTA_TYPE_DYNAMIC = 2,
  24187. } wmi_resmgr_quota_type;
  24188. typedef struct {
  24189. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_chan_time_quota_changed_event_fixed_param */
  24190. A_UINT32 tlv_header;
  24191. /** quota_type: refer to wmi_resmgr_quota_type
  24192. * 0 : clear quota
  24193. * 1 : fixed quota
  24194. * 2 : dynamic quota
  24195. */
  24196. A_UINT32 quota_type;
  24197. /* This TLV is followed by another TLV of array of struct
  24198. * wmi_resmgr_chan_time_quota_tlv chan_quota[num_chans];
  24199. */
  24200. } wmi_resmgr_chan_time_quota_changed_event_fixed_param;
  24201. /* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */
  24202. typedef struct {
  24203. /* Frequency of the channel for which the latency is set */
  24204. A_UINT32 chan_mhz;
  24205. /* Requested channel latency in milliseconds */
  24206. A_UINT32 latency;
  24207. } wmi_resmgr_chan_latency;
  24208. typedef struct {
  24209. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */
  24210. A_UINT32 tlv_header;
  24211. /** number of channel latency command structures
  24212. * (wmi_resmgr_chan_latency) 1 or 2
  24213. */
  24214. A_UINT32 num_chans;
  24215. /* This TLV is followed by another TLV of array of bytes
  24216. * A_UINT8 data[];
  24217. * This data array contains
  24218. * num_chans * size of(struct wmi_resmgr_chan_latency)
  24219. */
  24220. } wmi_resmgr_set_chan_latency_cmd_fixed_param;
  24221. /* WMI_STA_SMPS_FORCE_MODE_CMDID */
  24222. /** STA SMPS Forced Mode */
  24223. typedef enum {
  24224. WMI_SMPS_FORCED_MODE_NONE = 0,
  24225. WMI_SMPS_FORCED_MODE_DISABLED,
  24226. WMI_SMPS_FORCED_MODE_STATIC,
  24227. WMI_SMPS_FORCED_MODE_DYNAMIC
  24228. } wmi_sta_smps_forced_mode;
  24229. typedef struct {
  24230. /** TLV tag and len; tag equals
  24231. * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */
  24232. A_UINT32 tlv_header;
  24233. /** Unique id identifying the VDEV */
  24234. A_UINT32 vdev_id;
  24235. /** The mode of SMPS that is to be forced in the FW. */
  24236. A_UINT32 forced_mode;
  24237. } wmi_sta_smps_force_mode_cmd_fixed_param;
  24238. /** wlan HB commands */
  24239. #define WMI_WLAN_HB_ITEM_UDP 0x1
  24240. #define WMI_WLAN_HB_ITEM_TCP 0x2
  24241. #define WMI_WLAN_HB_MAX_FILTER_SIZE 32 /* should be equal to WLAN_HB_MAX_FILTER_SIZE,
  24242. must be a multiple of 4 bytes */
  24243. typedef struct {
  24244. /** TLV tag and len; tag equals
  24245. * WMITLV_TAG_STRUC_wmi_hb_set_enable_cmd_fixed_param */
  24246. A_UINT32 tlv_header; /** TLV header*/
  24247. A_UINT32 vdev_id; /** Vdev ID */
  24248. A_UINT32 enable; /** 1: Enable, 0: Disable`*/
  24249. A_UINT32 item; /** 1: UDP, 2: TCP */
  24250. A_UINT32 session; /** Session ID from HOST */
  24251. } wmi_hb_set_enable_cmd_fixed_param;
  24252. typedef struct {
  24253. /** TLV tag and len; tag equals
  24254. * WMITLV_TAG_STRUC_wmi_hb_set_tcp_params_cmd_fixed_param */
  24255. A_UINT32 tlv_header; /** TLV header*/
  24256. A_UINT32 vdev_id; /** Vdev ID */
  24257. A_UINT32 srv_ip; /** Server IP address (IPv4) */
  24258. A_UINT32 dev_ip; /** Device IP address (IPv4) */
  24259. A_UINT32 seq; /** TCP Sequence no */
  24260. A_UINT32 src_port; /** Source port */
  24261. A_UINT32 dst_port; /** Destination port */
  24262. A_UINT32 interval; /** Keep alive interval */
  24263. A_UINT32 timeout; /** Timeout if keep alive fails */
  24264. A_UINT32 session; /** Session ID from HOST */
  24265. wmi_mac_addr gateway_mac; /** Server Mac Address */
  24266. } wmi_hb_set_tcp_params_cmd_fixed_param;
  24267. typedef struct {
  24268. /** TLV tag and len; tag equals
  24269. * WMITLV_TAG_STRUC_wmi_hb_set_tcp_pkt_filter_cmd_fixed_param */
  24270. A_UINT32 tlv_header;
  24271. A_UINT32 vdev_id;
  24272. A_UINT32 length;
  24273. A_UINT32 offset;
  24274. A_UINT32 session;
  24275. A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
  24276. } wmi_hb_set_tcp_pkt_filter_cmd_fixed_param;
  24277. typedef struct {
  24278. /** TLV tag and len; tag equals
  24279. * WMITLV_TAG_STRUC_wmi_hb_set_udp_params_cmd_fixed_param */
  24280. A_UINT32 tlv_header;
  24281. A_UINT32 vdev_id;
  24282. A_UINT32 srv_ip;
  24283. A_UINT32 dev_ip;
  24284. A_UINT32 src_port;
  24285. A_UINT32 dst_port;
  24286. A_UINT32 interval;
  24287. A_UINT32 timeout;
  24288. A_UINT32 session;
  24289. wmi_mac_addr gateway_mac;
  24290. } wmi_hb_set_udp_params_cmd_fixed_param;
  24291. typedef struct {
  24292. /** TLV tag and len; tag equals
  24293. * WMITLV_TAG_STRUC_wmi_hb_set_udp_pkt_filter_cmd_fixed_param */
  24294. A_UINT32 tlv_header;
  24295. A_UINT32 vdev_id;
  24296. A_UINT32 length;
  24297. A_UINT32 offset;
  24298. A_UINT32 session;
  24299. A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
  24300. } wmi_hb_set_udp_pkt_filter_cmd_fixed_param;
  24301. /** wlan HB events */
  24302. typedef enum {
  24303. WMI_WLAN_HB_REASON_UNKNOWN = 0,
  24304. WMI_WLAN_HB_REASON_TCP_TIMEOUT = 1,
  24305. WMI_WLAN_HB_REASON_UDP_TIMEOUT = 2,
  24306. } WMI_HB_WAKEUP_REASON;
  24307. typedef struct {
  24308. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hb_ind_event_fixed_param */
  24309. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  24310. A_UINT32 session; /** Session ID from HOST */
  24311. A_UINT32 reason; /** wakeup reason */
  24312. } wmi_hb_ind_event_fixed_param;
  24313. typedef struct {
  24314. /** TLV tag and len; tag equals
  24315. * WMITLV_TAG_STRUC_wmi_oic_set_enable_cmd_fixed_param */
  24316. A_UINT32 tlv_header; /** TLV Header */
  24317. A_UINT32 vdev_id; /** Vdev ID */
  24318. A_UINT32 session; /** Session number from the HOST */
  24319. A_UINT32 srv_ip; /** IPv4 address of the OCF server */
  24320. A_UINT32 dev_ip; /** IPv4 address of the device */
  24321. A_UINT32 tcp_tx_seq; /** TCP sequence number */
  24322. A_UINT32 src_port; /** Source port */
  24323. A_UINT32 dst_port; /** Destination port */
  24324. A_UINT32 protocol; /** Protocol used: TCP:0, UDP:1 */
  24325. 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 */
  24326. A_UINT32 timeout_retries; /** timeout[31:16]: TCP ACK timeout, time to wait for a TCP ACK in ms
  24327. retries[15:0]: Number of TCP level retries of OIC ping request */
  24328. wmi_mac_addr peer_macaddr; /** MAC address of the OCF server */
  24329. A_UINT32 oic_ping_pkt0; /** OIC ping packet content [Byte03:Byte00] */
  24330. A_UINT32 oic_ping_pkt1; /** OIC ping packet content [Byte07:Byte04] */
  24331. A_UINT32 oic_ping_pkt2; /** OIC ping packet content [Byte11:Byte08] */
  24332. A_UINT32 oic_ping_pkt3; /** OIC ping packet content [Byte15:Byte12] */
  24333. A_UINT32 tls_cipher_suite_version; /** Cipher suite [31:16] as defined in https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml
  24334. TLS version [15:00] */
  24335. A_UINT32 tls_tx_seq0; /** Tx sequence number [31:00], incremented after every TLS packet transmission */
  24336. A_UINT32 tls_tx_seq1; /** Tx sequence number [63:32] */
  24337. A_UINT32 tls_rx_seq0; /** Rx sequence number [31:00], incremented after every TLS packet reception */
  24338. A_UINT32 tls_rx_seq1; /** Rx sequence number [63:32] */
  24339. A_UINT32 tls_tx_key0; /** client_write_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  24340. A_UINT32 tls_tx_key1; /** client_write_key[Byte07:Byte04] */
  24341. A_UINT32 tls_tx_key2; /** client_write_key[Byte11:Byte08] */
  24342. A_UINT32 tls_tx_key3; /** client_write_key[Byte15:Byte12] */
  24343. A_UINT32 tls_rx_key0; /** server_write_key[Byte03:Byte00] */
  24344. A_UINT32 tls_rx_key1; /** server_write_key[Byte07:Byte04] */
  24345. A_UINT32 tls_rx_key2; /** server_write_key[Byte11:Byte08] */
  24346. A_UINT32 tls_rx_key3; /** server_write_key[Byte15:Byte12] */
  24347. A_UINT32 tls_MAC_write_key0; /** client_write_MAC_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  24348. A_UINT32 tls_MAC_write_key1; /** client_write_MAC_key[Byte07:Byte04] */
  24349. A_UINT32 tls_MAC_write_key2; /** client_write_MAC_key[Byte11:Byte08] */
  24350. A_UINT32 tls_MAC_write_key3; /** client_write_MAC_key[Byte15:Byte12] */
  24351. A_UINT32 tls_MAC_write_key4; /** client_write_MAC_key[Byte19:Byte16] */
  24352. A_UINT32 tls_MAC_write_key5; /** client_write_MAC_key[Byte23:Byte20] */
  24353. A_UINT32 tls_MAC_write_key6; /** client_write_MAC_key[Byte27:Byte24] */
  24354. A_UINT32 tls_MAC_write_key7; /** client_write_MAC_key[Byte31:Byte28] */
  24355. A_UINT32 tls_MAC_read_key0; /** server_write_MAC_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  24356. A_UINT32 tls_MAC_read_key1; /** server_write_MAC_key[Byte07:Byte04] */
  24357. A_UINT32 tls_MAC_read_key2; /** server_write_MAC_key[Byte11:Byte08] */
  24358. A_UINT32 tls_MAC_read_key3; /** server_write_MAC_key[Byte15:Byte12] */
  24359. A_UINT32 tls_MAC_read_key4; /** server_write_MAC_key[Byte19:Byte16] */
  24360. A_UINT32 tls_MAC_read_key5; /** server_write_MAC_key[Byte23:Byte20] */
  24361. A_UINT32 tls_MAC_read_key6; /** server_write_MAC_key[Byte27:Byte24] */
  24362. A_UINT32 tls_MAC_read_key7; /** server_write_MAC_key[Byte31:Byte28] */
  24363. A_UINT32 tls_client_IV0; /** CBC Mode: CBC_residue [Byte03:Byte00] refer section 6.2.3.2. CBC Block Cipher in RFC 5246
  24364. GCM Mode: GCMNonce.salt [Byte03:Byte00] refer Section 3 of RFC 5288 */
  24365. A_UINT32 tls_client_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  24366. A_UINT32 tls_client_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  24367. A_UINT32 tls_client_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  24368. A_UINT32 tls_server_IV0; /** CBC Mode: CBC_residue [Byte3:Byte0] refer section 6.2.3.2. CBC Block Cipher in RFC 5246
  24369. GCM Mode: GCMNonce.salt [Byte4: Byte0] refer Section 3 of RFC 5288 */
  24370. A_UINT32 tls_server_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  24371. A_UINT32 tls_server_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  24372. A_UINT32 tls_server_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  24373. } wmi_oic_ping_offload_params_cmd_fixed_param;
  24374. typedef struct {
  24375. /** TLV tag and len; tag equals
  24376. * WMITLV_TAG_STRUC_wmi_oic_set_enable_cmd_fixed_param */
  24377. A_UINT32 tlv_header; /** TLV Header*/
  24378. A_UINT32 vdev_id; /** Interface number */
  24379. A_UINT32 session; /** Session ID*/
  24380. A_UINT32 enable; /** 1: Enable , 0: Disable */
  24381. } wmi_oic_ping_offload_set_enable_cmd_fixed_param;
  24382. /** wlan OIC events */
  24383. typedef enum {
  24384. WMI_WLAN_OIC_REASON_UNKNOWN = 0, /** Unknown */
  24385. WMI_WLAN_OIC_REASON_HOST_WAKE = 1, /** No error , but host is woken up due to other reasons */
  24386. WMI_WLAN_OIC_REASON_TCP_TIMEOUT = 2, /** TCP Timeout */
  24387. WMI_WLAN_OIC_REASON_PING_TIMEOUT = 3, /** OIC Ping resposnse timeout */
  24388. WMI_WLAN_OIC_REASON_TLS_ERROR = 4, /** TLS decryption error */
  24389. } WMI_OIC_WAKEUP_REASON;
  24390. typedef struct {
  24391. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oic_ind_event_fixed_param */
  24392. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  24393. A_UINT32 session; /** Session ID from driver */
  24394. A_UINT32 reason; /** wakeup reason as per WMI_OIC_WAKEUP_REASON */
  24395. A_UINT32 tcp_tx_seq; /** Current TCP sequence number */
  24396. A_UINT32 tcp_ack_num; /** Current TCP Acknowledgement number */
  24397. A_UINT32 tls_tx_seq0; /** Tx sequence number [31:00], incremented after every TLS packet transmission */
  24398. A_UINT32 tls_tx_seq1; /** Tx sequence number [63:32] */
  24399. A_UINT32 tls_rx_seq0; /** Rx sequence number [31:00], incremented after every TLS packet reception */
  24400. A_UINT32 tls_rx_seq1; /** Rx sequence number [63:32] */
  24401. A_UINT32 tls_client_IV0; /** CBC Mode: CBC_residue [Byte03:Byte00] refer section 6.2.3.2. CBC Block Cipher in RFC 5246 */
  24402. A_UINT32 tls_client_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  24403. A_UINT32 tls_client_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  24404. A_UINT32 tls_client_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  24405. A_UINT32 tls_server_IV0; /** CBC Mode: CBC_residue [Byte3:Byte0] refer section 6.2.3.2. CBC Block Cipher in RFC 5246 */
  24406. A_UINT32 tls_server_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  24407. A_UINT32 tls_server_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  24408. A_UINT32 tls_server_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  24409. } wmi_oic_ping_handoff_event;
  24410. typedef struct {
  24411. /** TLV tag and len; tag equals
  24412. * WMITLV_TAG_STRUC_wmi_dhcp_lease_renew_offload_fixed_param */
  24413. A_UINT32 tlv_header; /** TLV Header*/
  24414. A_UINT32 vdev_id; /** Vdev ID */
  24415. A_UINT32 enable; /** 1: Enable 0: Disable*/
  24416. A_UINT32 srv_ip; /** DHCP Server IP address (IPv4) */
  24417. A_UINT32 client_ip; /** Device IP address (IPv4) */
  24418. wmi_mac_addr srv_mac; /** DHCP Server MAC address */
  24419. A_UINT32 parameter_list; /** Optional Parameter list. RFC 1533 gives the complete set of options defined for use with DHCP */
  24420. } wmi_dhcp_lease_renew_offload_cmd_fixed_param;
  24421. /** WLAN DHCP Lease Renew Events */
  24422. typedef enum {
  24423. WMI_WLAN_DHCP_RENEW_REASON_UNKNOWN = 0, /** Unknown */
  24424. WMI_WLAN_DHCP_RENEW_REASON_ACK_TIMEOUT = 1, /** DHCP ACK Timeout */
  24425. WMI_WLAN_DHCP_RENEW_REASON_NACK = 2, /** DHCP error */
  24426. } WMI_DHCP_RENEW_WAKEUP_REASON;
  24427. typedef struct {
  24428. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dhcp_renew_ind_event_fixed_param */
  24429. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  24430. A_UINT32 reason; /** wakeup reason as per enum WMI_DHCP_RENEW_WAKEUP_REASON*/
  24431. } wmi_dhcp_lease_renew_event;
  24432. /** WMI_STA_SMPS_PARAM_CMDID */
  24433. typedef enum {
  24434. /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */
  24435. WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0,
  24436. /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or
  24437. * to enter D-SMPS mode from Stalled-D-SMPS mode */
  24438. WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1,
  24439. /** RSSI threshold to disable SMPS modes */
  24440. WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2,
  24441. /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */
  24442. WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3,
  24443. /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */
  24444. WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4,
  24445. /** Enable/Disable DTIM 1chRx feature */
  24446. WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5,
  24447. /** Enable/Disable dynamic bw feature */
  24448. WMI_STA_SMPS_PARAM_DYNAMIC_BW_SWITCH = 6,
  24449. } wmi_sta_smps_param;
  24450. typedef struct {
  24451. /** TLV tag and len; tag equals
  24452. * WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */
  24453. A_UINT32 tlv_header;
  24454. /** Unique id identifying the VDEV */
  24455. A_UINT32 vdev_id;
  24456. /** SMPS parameter (see wmi_sta_smps_param) */
  24457. A_UINT32 param;
  24458. /** Value of SMPS parameter */
  24459. A_UINT32 value;
  24460. } wmi_sta_smps_param_cmd_fixed_param;
  24461. typedef struct {
  24462. /** TLV tag and len; tag equals
  24463. * WMITLV_TAG_STRUC_wmi_mcc_sched_sta_traffic_stats */
  24464. A_UINT32 tlv_header;
  24465. /* TX stats */
  24466. A_UINT32 txBytesPushed;
  24467. A_UINT32 txPacketsPushed;
  24468. /* RX stats */
  24469. A_UINT32 rxBytesRcvd;
  24470. A_UINT32 rxPacketsRcvd;
  24471. A_UINT32 rxTimeTotal;
  24472. /** peer MAC address */
  24473. wmi_mac_addr peer_macaddr;
  24474. } wmi_mcc_sched_sta_traffic_stats;
  24475. typedef struct {
  24476. /** TLV tag and len; tag equals
  24477. * WMITLV_TAG_STRUC_wmi_mcc_sched_traffic_stats_cmd_fixed_param */
  24478. A_UINT32 tlv_header;
  24479. /** Duration over which the host stats were collected */
  24480. A_UINT32 duration;
  24481. /** Number of stations filled in following stats array */
  24482. A_UINT32 num_sta;
  24483. /* Following this struct are the TLVs:
  24484. * wmi_mcc_sched_sta_traffic_stats mcc_sched_sta_traffic_stats_list;
  24485. */
  24486. } wmi_mcc_sched_traffic_stats_cmd_fixed_param;
  24487. typedef struct
  24488. {
  24489. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */
  24490. /* unique id identifying the VDEV, generated by the caller */
  24491. A_UINT32 vdev_id;
  24492. /*Batch scan enable command parameters*/
  24493. A_UINT32 scanInterval;
  24494. A_UINT32 numScan2Batch;
  24495. A_UINT32 bestNetworks;
  24496. A_UINT32 rfBand;
  24497. A_UINT32 rtt;
  24498. } wmi_batch_scan_enable_cmd_fixed_param;
  24499. typedef struct
  24500. {
  24501. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param */
  24502. A_UINT32 supportedMscan;
  24503. } wmi_batch_scan_enabled_event_fixed_param;
  24504. typedef struct
  24505. {
  24506. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */
  24507. /* unique id identifying the VDEV, generated by the caller */
  24508. A_UINT32 vdev_id;
  24509. A_UINT32 param;
  24510. } wmi_batch_scan_disable_cmd_fixed_param;
  24511. typedef struct
  24512. {
  24513. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */
  24514. /** unique id identifying the VDEV, generated by the caller */
  24515. A_UINT32 vdev_id;
  24516. A_UINT32 param;
  24517. } wmi_batch_scan_trigger_result_cmd_fixed_param;
  24518. typedef struct
  24519. {
  24520. A_UINT32 tlv_header;
  24521. wmi_mac_addr bssid; /* BSSID */
  24522. wmi_ssid ssid; /* SSID */
  24523. A_UINT32 ch; /* Channel number */
  24524. A_UINT32 rssi; /* RSSI or Level */
  24525. /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */
  24526. A_UINT32 timestamp;
  24527. A_UINT32 ch_freq; /* Channel frequency in MHz */
  24528. } wmi_batch_scan_result_network_info;
  24529. typedef struct
  24530. {
  24531. A_UINT32 tlv_header;
  24532. A_UINT32 scanId; /* Scan List ID. */
  24533. /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */
  24534. A_UINT32 numNetworksInScanList;
  24535. A_UINT32 netWorkStartIndex; /* indicate the start index of network info*/
  24536. } wmi_batch_scan_result_scan_list;
  24537. #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. */
  24538. #define LPI_IE_BITMAP_IS_PROBE 0x00000002 /* send true or false based on scan response frame being a Probe Rsp or not */
  24539. #define LPI_IE_BITMAP_SSID 0x00000004 /* send ssid from received scan response frame */
  24540. #define LPI_IE_BITMAP_RSSI 0x00000008 /* send RSSI value reported by HW for the received scan response after adjusting with noise floor */
  24541. #define LPI_IE_BITMAP_CHAN 0x00000010 /* send channel number from the received scan response */
  24542. #define LPI_IE_BITMAP_AP_TX_PWR 0x00000020 /* send Tx power from TPC IE of scan rsp */
  24543. #define LPI_IE_BITMAP_TX_RATE 0x00000040 /* send rate of the received frame as reported by HW. */
  24544. #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. */
  24545. #define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100 /* send timestamp reported in the received scan rsp frame. */
  24546. #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. */
  24547. /*
  24548. * TEMPORARY alias of incorrect old name the correct name.
  24549. * This alias will be removed once all references to the old name have been fixed.
  24550. */
  24551. #define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT
  24552. #define LPI_IE_BITMAP_CONN_STATUS 0x00000400 /* If an infra STA is active and connected to an AP, true value is sent else false. */
  24553. #define LPI_IE_BITMAP_MSAP_IE 0x00000800 /* info on the vendor specific proprietary IE MSAP */
  24554. #define LPI_IE_BITMAP_SEC_STATUS 0x00001000 /* we indicate true or false based on if the AP has WPA or RSN security enabled */
  24555. #define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000 /* info about the beacons coming from an AP or P2P or NAN device. */
  24556. #define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000 /* info on whether the scan rsp was received from a passive channel */
  24557. #define LPI_IE_BITMAP_DWELL_TIME 0x00008000 /* send the scan dwell time of the channel on which the current scan rsp frame was received. */
  24558. #define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000 /* the center frequencies in case AP is supporting wider channels than 20 MHz */
  24559. #define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000 /* same as above */
  24560. #define LPI_IE_BITMAP_PHY_MODE 0x00040000 /* PHY mode indicates a, b, ,g, ac and other combinations */
  24561. #define LPI_IE_BITMAP_SCAN_MODULE_ID 0x00080000 /* scan module id indicates the scan client who originated the scan */
  24562. #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. */
  24563. #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 */
  24564. #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 */
  24565. #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. */
  24566. #define LPI_IE_BITMAP_CHRE_RADIO_CHAIN 0x01000000 /* include radio chain and RSSI per chain information if this bit is set - for CHRE */
  24567. #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 */
  24568. #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 */
  24569. /* 0x08000000 is unused / available */
  24570. #define LPI_IE_BITMAP_CHRE_ESS 0x10000000 /* ESS capability info for CHRE */
  24571. #define LPI_IE_BITMAP_CHRE_SEC_MODE 0x20000000 /* Security capability info for CHRE */
  24572. #define LPI_IE_BITMAP_CHRE_SUPPORTED_RATE 0x40000000 /* Highest MCS corresponding NCC for TX and RX */
  24573. #define LPI_IE_BITMAP_ALL 0xFFFFFFFF
  24574. typedef struct {
  24575. A_UINT32 tlv_header;
  24576. /**A_BOOL indicates LPI mgmt snooping enable/disable*/
  24577. A_UINT32 enable;
  24578. /**LPI snooping mode*/
  24579. A_UINT32 snooping_mode;
  24580. /** LPI interested IEs in snooping context */
  24581. A_UINT32 ie_bitmap;
  24582. } wmi_lpi_mgmt_snooping_config_cmd_fixed_param;
  24583. typedef struct {
  24584. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
  24585. /** Scan ID */
  24586. A_UINT32 scan_id;
  24587. /** Scan requestor ID */
  24588. A_UINT32 scan_req_id;
  24589. /** VDEV id(interface) that is requesting scan */
  24590. A_UINT32 vdev_id;
  24591. /** LPI interested IEs in scan context */
  24592. A_UINT32 ie_bitmap;
  24593. /** Scan Priority, input to scan scheduler */
  24594. A_UINT32 scan_priority;
  24595. /** dwell time in msec on active channels */
  24596. A_UINT32 dwell_time_active;
  24597. /** dwell time in msec on passive channels */
  24598. A_UINT32 dwell_time_passive;
  24599. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  24600. A_UINT32 min_rest_time;
  24601. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  24602. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  24603. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  24604. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  24605. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  24606. * irrespective of activity. activity is determined by the idle_time parameter.
  24607. */
  24608. A_UINT32 max_rest_time;
  24609. /** time before sending next set of probe requests.
  24610. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  24611. * The number of probe requests specified depends on the ssid_list and bssid_list
  24612. */
  24613. A_UINT32 repeat_probe_time;
  24614. /** time in msec between 2 consecutive probe requests with in a set. */
  24615. A_UINT32 probe_spacing_time;
  24616. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  24617. A_UINT32 idle_time;
  24618. /** maximum time in msec allowed for scan */
  24619. A_UINT32 max_scan_time;
  24620. /** delay in msec before sending first probe request after switching to a channel */
  24621. A_UINT32 probe_delay;
  24622. /** Scan control flags */
  24623. A_UINT32 scan_ctrl_flags;
  24624. /** Burst duration time in msec*/
  24625. A_UINT32 burst_duration;
  24626. /** # if channels to scan. In the TLV channel_list[] */
  24627. A_UINT32 num_chan;
  24628. /** number of bssids. In the TLV bssid_list[] */
  24629. A_UINT32 num_bssid;
  24630. /** number of ssid. In the TLV ssid_list[] */
  24631. A_UINT32 num_ssids;
  24632. /** number of bytes in ie data. In the TLV ie_data[] */
  24633. A_UINT32 ie_len;
  24634. /** Scan control flags extended (see WMI_SCAN_FLAG_EXT_xxx) */
  24635. A_UINT32 scan_ctrl_flags_ext;
  24636. /**
  24637. * TLV (tag length value) parameters follow the scan_cmd
  24638. * structure. The TLV's are:
  24639. * A_UINT32 channel_list[]; // in MHz
  24640. * wmi_ssid ssid_list[];
  24641. * wmi_mac_addr bssid_list[];
  24642. * A_UINT8 ie_data[];
  24643. */
  24644. } wmi_lpi_start_scan_cmd_fixed_param;
  24645. typedef struct {
  24646. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
  24647. /** Scan requestor ID */
  24648. A_UINT32 scan_req_id;
  24649. /** Scan ID */
  24650. A_UINT32 scan_id;
  24651. /**
  24652. * Req Type
  24653. * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
  24654. * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
  24655. * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
  24656. * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
  24657. */
  24658. A_UINT32 req_type;
  24659. /**
  24660. * vDev ID
  24661. * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
  24662. */
  24663. A_UINT32 vdev_id;
  24664. } wmi_lpi_stop_scan_cmd_fixed_param;
  24665. typedef enum {
  24666. WMI_LPI_DEVICE_TYPE_AP = 1,
  24667. WMI_LPI_DEVICE_TYPE_P2P = 2,
  24668. WMI_LPI_DEVICE_TYPE_NAN = 3,
  24669. } wmi_lpi_device_type;
  24670. typedef struct
  24671. {
  24672. A_UINT32 tlv_header;
  24673. /** Scan requestor ID */
  24674. A_UINT32 scan_req_id;
  24675. A_UINT32 ie_bitmap;
  24676. A_UINT32 data_len;
  24677. } wmi_lpi_result_event_fixed_param;
  24678. typedef enum {
  24679. /** User scan Request completed */
  24680. WMI_LPI_STATUS_SCAN_REQ_COMPLED = 0,
  24681. /** User Request was never serviced */
  24682. WMI_LPI_STATUS_DROPPED_REQ = 1,
  24683. /** Illegal channel Req */
  24684. WMI_LPI_STATUS_ILLEGAL_CHAN_REQ = 2,
  24685. /** Illegal Operation Req */
  24686. WMI_LPI_STATUS_ILLEGAL_OPER_REQ = 3,
  24687. /** Request Aborted */
  24688. WMI_LPI_STATUS_REQ_ABORTED = 4,
  24689. /** Request Timed Out */
  24690. WMI_LPI_STATUS_REQ_TIME_OUT = 5,
  24691. /** Medium Busy, already there
  24692. * is a scan is going on */
  24693. WMI_LPI_STATUS_MEDIUM_BUSY = 6,
  24694. /** Extscan is the scan client whose scan complete event is triggered */
  24695. WMI_LPI_STATUS_EXTSCAN_CYCLE_AND_SCAN_REQ_COMPLETED = 7,
  24696. } wmi_lpi_staus;
  24697. typedef struct
  24698. {
  24699. A_UINT32 tlv_header;
  24700. wmi_lpi_staus status;
  24701. /** Scan requestor ID */
  24702. A_UINT32 scan_req_id;
  24703. } wmi_lpi_status_event_fixed_param;
  24704. typedef struct
  24705. {
  24706. A_UINT32 tlv_header;
  24707. wmi_mac_addr bssid;
  24708. wmi_ssid ssid;
  24709. A_UINT32 freq;
  24710. A_UINT32 rssi;
  24711. A_UINT32 vdev_id;
  24712. } wmi_lpi_handoff_event_fixed_param;
  24713. typedef struct
  24714. {
  24715. A_UINT32 tlv_header;
  24716. A_UINT32 timestamp; /*timestamp of batch scan event*/
  24717. A_UINT32 numScanLists; /*number of scan in this event*/
  24718. A_UINT32 isLastResult; /*is this event a last event of the whole batch scan*/
  24719. } wmi_batch_scan_result_event_fixed_param;
  24720. typedef enum { /* DEPRECATED - DO NOT USE */
  24721. /** beacons not received from P2P GO */
  24722. WMI_P2P_GO_BMISS = 0,
  24723. /** beacons not received from P2 GO's STA's connected AP */
  24724. WMI_DFS_AP_BMISS = 1,
  24725. } wmi_dfs_ap_bmiss_reason; /* DEPRECATED - DO NOT USE */
  24726. typedef struct {
  24727. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_cli_dfs_ap_bmiss_fixed_param*/
  24728. A_UINT32 vdev_id;
  24729. /* NOTE:
  24730. * The reason_code field is deprecated, and should be ignored.
  24731. */
  24732. A_UINT32 reason_code; /* contains a wmi_dfs_ap_bmiss_reason value */
  24733. } wmi_p2p_cli_dfs_ap_bmiss_fixed_param;
  24734. typedef struct {
  24735. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param */
  24736. A_UINT32 vdev_id;
  24737. /* This TLV is followed by p2p_noa_info for vdev :
  24738. * wmi_p2p_noa_info p2p_noa_info;
  24739. */
  24740. } wmi_p2p_noa_event_fixed_param;
  24741. #define WMI_RFKILL_CFG_RADIO_LEVEL_OFFSET 6
  24742. #define WMI_RFKILL_CFG_RADIO_LEVEL_MASK 0x1
  24743. #define WMI_RFKILL_CFG_GPIO_PIN_NUM_OFFSET 0
  24744. #define WMI_RFKILL_CFG_GPIO_PIN_NUM_MASK 0x3f
  24745. #define WMI_RFKILL_CFG_PIN_AS_GPIO_OFFSET 7
  24746. #define WMI_RFKILL_CFG_PIN_AS_GPIO_MASK 0xf
  24747. typedef struct {
  24748. /** TLV tag and len; tag equals
  24749. * */
  24750. A_UINT32 tlv_header;
  24751. /** gpip pin number */
  24752. A_UINT32 gpio_pin_num;
  24753. /** gpio interrupt type */
  24754. A_UINT32 int_type;
  24755. /** RF radio status */
  24756. A_UINT32 radio_state;
  24757. } wmi_rfkill_mode_param;
  24758. typedef enum {
  24759. WMI_SET_LED_SYS_POWEROFF,
  24760. WMI_SET_LED_SYS_S3_SUSPEND,
  24761. WMI_SET_LED_SYS_S4_S5,
  24762. WMI_SET_LED_SYS_DRIVER_DISABLE,
  24763. WMI_SET_LED_SYS_WAKEUP,
  24764. WMI_SET_LED_SYS_ALWAYS_ON, /* just for test! */
  24765. WMI_SET_LED_SYS_POWERON,
  24766. } wmi_led_sys_state_param;
  24767. typedef enum {
  24768. WMI_CONFIG_LED_TO_VDD = 0,
  24769. WMI_CONFIG_LED_TO_GND = 1,
  24770. } wmi_config_led_connect_type;
  24771. typedef enum {
  24772. WMI_CONFIG_LED_NOT_WITH_BT = 0,
  24773. WMI_CONFIG_LED_WITH_BT = 1,
  24774. } wmi_config_led_with_bt_flag;
  24775. typedef enum {
  24776. WMI_CONFIG_LED_DISABLE = 0,
  24777. WMI_CONFIG_LED_ENABLE = 1,
  24778. } wmi_config_led_enable_flag;
  24779. typedef enum {
  24780. WMI_CONFIG_LED_HIGH_UNSPECIFIED = 0,
  24781. WMI_CONFIG_LED_HIGH_OFF = 1,
  24782. WMI_CONFIG_LED_HIGH_ON = 2,
  24783. } wmi_config_led_on_flag;
  24784. typedef enum {
  24785. WMI_CONFIG_LED_UNSPECIFIED = 0,
  24786. WMI_CONFIG_LED_ON = 1,
  24787. WMI_CONFIG_LED_OFF = 2,
  24788. WMI_CONFIG_LED_DIM = 3,
  24789. WMI_CONFIG_LED_BLINK = 4,
  24790. WMI_CONFIG_LED_TXRX = 5,
  24791. } wmi_config_led_operation_type;
  24792. typedef struct {
  24793. /** TLV tag and len; tag equals
  24794. * WMITLV_TAG_STRUC_wmi_pdev_set_led_config_cmd_fixed_param */
  24795. A_UINT32 tlv_header;
  24796. /* Set GPIO pin */
  24797. A_UINT32 led_gpio_pin;
  24798. /* Set connect type defined in wmi_config_led_connect_type */
  24799. A_UINT32 connect_type;
  24800. /* Set flag defined in wmi_config_led_with_bt_flag*/
  24801. A_UINT32 with_bt;
  24802. /* Set LED enablement defined in wmi_config_led_enable_flag */
  24803. A_UINT32 led_enable;
  24804. /** pdev_id for identifying the MAC
  24805. * See macros starting with WMI_PDEV_ID_ for values.
  24806. */
  24807. A_UINT32 pdev_id;
  24808. /* see wmi_config_led_operation_type enum */
  24809. A_UINT32 led_operation_type;
  24810. /* see wmi_config_led_on_flag enum */
  24811. A_UINT32 led_on_flag; /* configure high/low on/off sense */
  24812. A_UINT32 led_on_interval; /* for blink function; unit: ms */
  24813. A_UINT32 led_off_interval; /* for blink function; unit: ms */
  24814. A_UINT32 led_repeat_cnt; /* for blink function: how many blinks */
  24815. } wmi_pdev_set_led_config_cmd_fixed_param;
  24816. #define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0
  24817. #define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK 0xff
  24818. /** WMI_SMARTANT_STATE_CHANGE_EVENTIDWMI_SMARTANT_STATE_CHANGE_EVENTID
  24819. * report Smart Antenna status to host */
  24820. typedef struct {
  24821. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_smartant_event_fixed_param */
  24822. A_UINT32 tlv_header;
  24823. /** whether Antenna Controller is still alive or offline. */
  24824. A_UINT32 smart_ant_AC_alive;
  24825. } wmi_smartant_state_param;
  24826. /** WMI_PEER_INFO_REQ_CMDID
  24827. * Request FW to provide peer info */
  24828. typedef struct {
  24829. /** TLV tag and len; tag equals
  24830. * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */
  24831. A_UINT32 tlv_header;
  24832. /** In order to get the peer info for a single peer, host shall
  24833. * issue the peer_mac_address of that peer. For getting the
  24834. * info all peers, the host shall issue 0xFFFFFFFF as the mac
  24835. * address. The firmware will return the peer info for all the
  24836. * peers on the specified vdev_id */
  24837. wmi_mac_addr peer_mac_address;
  24838. /** vdev id */
  24839. A_UINT32 vdev_id;
  24840. } wmi_peer_info_req_cmd_fixed_param;
  24841. typedef struct {
  24842. /** TLV tag and len; tag equals
  24843. * WMITLV_TAG_STRUC_wmi_peer_info */
  24844. A_UINT32 tlv_header;
  24845. /** mac addr of the peer */
  24846. wmi_mac_addr peer_mac_address;
  24847. /** data_rate of the peer */
  24848. A_UINT32 data_rate;
  24849. /** RSSI of the peer */
  24850. A_UINT32 rssi;
  24851. /** tx fail count */
  24852. A_UINT32 tx_fail_cnt;
  24853. } wmi_peer_info;
  24854. /** FW response with the peer info */
  24855. typedef struct {
  24856. /** TLV tag and len; tag equals
  24857. * WMITLV_TAG_STRUC_wmi_peer_info_event_fixed_param */
  24858. A_UINT32 tlv_header;
  24859. /** number of peers in peer_info */
  24860. A_UINT32 num_peers;
  24861. /* Set to 1 only if vdev_id field is valid */
  24862. A_UINT32 valid_vdev_id;
  24863. /* VDEV to which the peer belongs to */
  24864. A_UINT32 vdev_id;
  24865. /* This TLV is followed by another TLV of array of structs
  24866. * wmi_peer_info peer_info[];
  24867. */
  24868. } wmi_peer_info_event_fixed_param;
  24869. /** WMI_PEER_ANTDIV_INFO_REQ_CMDID
  24870. * Request FW to provide peer info */
  24871. typedef struct {
  24872. /** TLV tag and len; tag equals
  24873. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_req_cmd_fixed_param */
  24874. A_UINT32 tlv_header;
  24875. /** In order to get the peer antdiv info for a single peer, host shall
  24876. * issue the peer_mac_address of that peer. For getting the
  24877. * info all peers, the host shall issue 0xFFFFFFFF as the mac
  24878. * address. The firmware will return the peer info for all the
  24879. * peers on the specified vdev_id */
  24880. wmi_mac_addr peer_mac_address;
  24881. /** vdev id */
  24882. A_UINT32 vdev_id;
  24883. } wmi_peer_antdiv_info_req_cmd_fixed_param;
  24884. /** FW response with the peer antdiv info */
  24885. typedef struct {
  24886. /** TLV tag and len; tag equals
  24887. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_event_fixed_param */
  24888. A_UINT32 tlv_header;
  24889. /** number of peers in peer_info */
  24890. A_UINT32 num_peers;
  24891. /* VDEV to which the peer belongs to */
  24892. A_UINT32 vdev_id;
  24893. /* This TLV is followed by another TLV of array of structs
  24894. * wmi_peer_antdiv_info peer_antdiv_info[];
  24895. */
  24896. } wmi_peer_antdiv_info_event_fixed_param;
  24897. typedef struct {
  24898. /** TLV tag and len; tag equals
  24899. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info */
  24900. A_UINT32 tlv_header;
  24901. /** mac addr of the peer */
  24902. wmi_mac_addr peer_mac_address;
  24903. /** per chain RSSI of the peer, for up to 8 chains.
  24904. * Each chain's entry reports the RSSI for different bandwidths:
  24905. * bits 7:0 -> primary 20 MHz
  24906. * bits 15:8 -> secondary 20 MHz of 40 MHz channel (if applicable)
  24907. * bits 23:16 -> secondary 40 MHz of 80 MHz channel (if applicable)
  24908. * bits 31:24 -> secondary 80 MHz of 160 MHz channel (if applicable)
  24909. * Each of these 8-bit RSSI reports is in dB units, with respect to
  24910. * the noise floor.
  24911. * 0x80 means invalid.
  24912. * All unused bytes within used chain_rssi indices shall be set to 0x80.
  24913. * All unused chain_rssi indices shall be set to 0x80808080.
  24914. */
  24915. A_INT32 chain_rssi[8];
  24916. } wmi_peer_antdiv_info;
  24917. typedef struct {
  24918. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_msduq_qdepth_thresh_update */
  24919. /** tid_number */
  24920. A_UINT32 tid_num;
  24921. /** msduq_mask to set the value
  24922. * bit 0 - HI-PRI msdu flowq qdepth threshold need to update if set
  24923. * bit 1 - LOW-PRI msdu flowq qdepth threshold need to update if set
  24924. * bit 2 - UDP msdu flowq qdepth threshold need to update if set
  24925. * bit 3 - NON-UDP msdu flowq qdepth threshold need to update if set
  24926. * rest of bits are reserved and set to 0.
  24927. */
  24928. A_UINT32 msduq_update_mask;
  24929. /** Qdepth threshold value
  24930. * If number of msdus in a queue excess over qdepth_thresh_value value
  24931. * while queuing msdu's then we drop new msdus.
  24932. * (Though dropping older (stale) data rather than newer data might be
  24933. * preferable, the dropping is performed by MAC HW, and there's no option
  24934. * to configure the HW to do head dropping rather than tail dropping.)
  24935. */
  24936. A_UINT32 qdepth_thresh_value;
  24937. } wmi_msduq_qdepth_thresh_update;
  24938. /** WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID
  24939. * Request FW to update msduq qdepth threshold per TID per peer */
  24940. typedef struct {
  24941. /** TLV tag and len; tag equals
  24942. * WMITLV_TAG_STRUC_wmi_peer_tid_msduq_qdepth_thresh_update_cmd_fixed_param
  24943. */
  24944. A_UINT32 tlv_header;
  24945. /** pdev id
  24946. * The pdev_id can be determined from the vdev_id, but the pdev_id
  24947. * is explicitly provided so it can be used for sanity checking.
  24948. */
  24949. A_UINT32 pdev_id;
  24950. /** vdev id */
  24951. A_UINT32 vdev_id;
  24952. /**
  24953. * To set the peer msduq qdepth threshold update for a single peer,
  24954. * the host shall send mac address for which peer need to be updated.
  24955. */
  24956. wmi_mac_addr peer_mac_address;
  24957. /** number of payload update tlvs */
  24958. A_UINT32 num_of_msduq_updates;
  24959. /** Followed by the variable length TLV msduq_qdepth_updates:
  24960. * wmi_msduq_qdepth_th_update msduq_qdepth_thshd_update_list[]
  24961. */
  24962. } wmi_peer_tid_msduq_qdepth_thresh_update_cmd_fixed_param;
  24963. /**
  24964. * ACK policy to be followed for the TID
  24965. */
  24966. typedef enum {
  24967. /** Used when the host does not want to configure the ACK policy */
  24968. WMI_PEER_TID_CONFIG_ACK_POLICY_IGNORE,
  24969. /** Allow ACK for the TID */
  24970. WMI_PEER_TID_CONFIG_ACK,
  24971. /** Do not expect ACK for the TID */
  24972. WMI_PEER_TID_CONFIG_NOACK,
  24973. } WMI_PEER_TID_CONFIG_ACK_POLICY;
  24974. /**
  24975. * Aggregation control policy for the TID
  24976. */
  24977. typedef enum {
  24978. /** Used when the host does not want to configure the aggregation policy */
  24979. WMI_PEER_TID_CONFIG_AGGR_CONTROL_IGNORE,
  24980. /** Enable aggregation for the TID */
  24981. WMI_PEER_TID_CONFIG_AGGR_CONTROL_ENABLE,
  24982. /** Disable aggregation for the TID */
  24983. WMI_PEER_TID_CONFIG_AGGR_CONTROL_DISABLE,
  24984. } WMI_PEER_TID_CONFIG_AGGR_CONTROL;
  24985. /**
  24986. * Rate control policy for the TID
  24987. */
  24988. typedef enum {
  24989. /** Used when the host does not want to configure the rate control policy */
  24990. WMI_PEER_TID_CONFIG_RATE_CONTROL_IGNORE,
  24991. /** Auto rate control */
  24992. WMI_PEER_TID_CONFIG_RATE_CONTROL_AUTO,
  24993. /** Fixed rate control */
  24994. WMI_PEER_TID_CONFIG_RATE_CONTROL_FIXED_RATE,
  24995. /** Set the Default lowest rate (6Mbps in 5GHZ and 1Mbps in 2GHZ) */
  24996. WMI_PEER_TID_CONFIG_RATE_CONTROL_DEFAULT_LOWEST_RATE,
  24997. /**
  24998. * Set the highest rate cap allowed for this TID.
  24999. * Rate cap is specified in rate code format,
  25000. * i.e. NSS and MCS combined as shown below:
  25001. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3, 3 - 4x4)
  25002. * b'3-b'0 indicate the MCS
  25003. */
  25004. WMI_PEER_TID_CONFIG_RATE_UPPER_CAP,
  25005. } WMI_PEER_TID_CONFIG_RATE_CONTROL;
  25006. /**
  25007. * SW retry threshold for the TID
  25008. */
  25009. typedef enum {
  25010. /** Used when the host does not want to configure the SW retry threshold */
  25011. WMI_PEER_TID_SW_RETRY_IGNORE = 0,
  25012. WMI_PEER_TID_SW_RETRY_MIN = 1,
  25013. WMI_PEER_TID_SW_RETRY_MAX = 30,
  25014. /** No SW retry for the TID */
  25015. WMI_PEER_TID_SW_RETRY_NO_RETRY = 0xFFFFFFFF,
  25016. } WMI_PEER_TID_CONFIG_SW_RETRY_THRESHOLD;
  25017. /*
  25018. * values for tid_config_supported_bitmap field,
  25019. * in wmi_peer_tid_configurations_cmd structure.
  25020. */
  25021. typedef enum {
  25022. /* Used to indicate that disable_rts_cts field is valid */
  25023. WMI_PEER_TID_DISABLE_RTS_CTS_VALID = 0x00000001,
  25024. WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_VALID = 0x00000002,
  25025. WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_VALID = 0x00000004,
  25026. } WMI_PEER_TID_EXT_CONFIG_VALID_BITMAP;
  25027. /*
  25028. * Per TID level enable/disable of RTS/CTS for that peer.
  25029. * Currently applicable only for "data tids" within targets which set
  25030. * the RTSCTS_FOR_UNICAST_MGMT WMI service bit.
  25031. *
  25032. * Enum values/Expected values for disable_rts_cts of
  25033. * WMI_PEER_TID_DISABLE_RTS_CTS_VALID as below:
  25034. *
  25035. * 0 (WMI_RTSCTS_RESET) - Use default RTS/CTS
  25036. * 1 (WMI_RTSCTS_DISABLE) - Disable RTS/CTS for every ppdu for that
  25037. * configured data TID
  25038. * 2 (WMI_RTSCTS_ENABLE) - Enable RTS/CTS for every ppdu for that
  25039. * configured data TID
  25040. */
  25041. typedef enum {
  25042. WMI_RTSCTS_RESET = 0,
  25043. WMI_RTSCTS_DISABLE = 1,
  25044. WMI_RTSCTS_ENABLE = 2,
  25045. } WMI_PEER_TID_CONFIG_RTSCTS_CONTROL;
  25046. /**
  25047. * MPDU Aggregate value for the TID
  25048. */
  25049. typedef enum {
  25050. /** Set the default Aggregation value configured in FW */
  25051. WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_DEFAULT,
  25052. WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_MIN = 1,
  25053. WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_MAX = 1024,
  25054. } WMI_PEER_TID_CONFIG_MAX_NUM_MPDU_IN_PPDU;
  25055. /**
  25056. * MSDU Aggregate value for the TID
  25057. */
  25058. typedef enum {
  25059. /** Set the default Aggregation value configured in FW */
  25060. WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_DEFAULT,
  25061. WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_MIN = 1,
  25062. WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_MAX = 7,
  25063. } WMI_PEER_TID_CONFIG_MAX_NUM_MSDU_IN_MPDU;
  25064. /**
  25065. * Command format for the TID configuration
  25066. */
  25067. typedef struct {
  25068. /** TLV tag and len; tag equals
  25069. * WMITLV_TAG_STRUC_wmi_peer_tid_configurations_cmd_fixed_param
  25070. */
  25071. A_UINT32 tlv_header;
  25072. /** vdev id */
  25073. A_UINT32 vdev_id;
  25074. /** peer MAC address */
  25075. wmi_mac_addr peer_mac_address;
  25076. /** TID number, generated by the caller.
  25077. * Valid range for QoS TID : 0-15
  25078. * Valid range for non QOS/Mgmt TID: 16-19
  25079. * Any other TID number is invalid.
  25080. */
  25081. A_UINT32 tid_num;
  25082. /** ACK policy - of type WMI_PEER_TID_CONFIG_ACK_POLICY */
  25083. A_UINT32 ack_policy;
  25084. /** Aggregation control - of type WMI_PEER_TID_CONFIG_AGGR_CONTROL */
  25085. A_UINT32 aggr_control;
  25086. /** Rate control - of type WMI_PEER_TID_CONFIG_RATE_CONTROL */
  25087. A_UINT32 rate_control;
  25088. /** Fixed rate control parameters - of type WMI_PEER_PARAM_FIXED_RATE.
  25089. * This is applicable only when rate_control is
  25090. * WMI_PEER_TID_CONFIG_RATE_CONTROL_FIXED_RATE
  25091. */
  25092. A_UINT32 rcode_rcflags;
  25093. /** MPDU SW retry threshold - of type WMI_PEER_TID_CONFIG_SW_RETRY_THRESHOLD
  25094. * This SW retry threshold limits the total number of retransmits of
  25095. * nacked or unacked MPDUs, but it is up to the FW to decide what
  25096. * tx rate to use during each retransmission.
  25097. */
  25098. A_UINT32 sw_retry_threshold;
  25099. /*--- Start of extended structure ---*/
  25100. /* Bitmap to indicate which fields in the extended structure are valid.
  25101. * Bitmap values correspond to enum WMI_PEER_TID_EXT_CONFIG_VALID_BITMAP
  25102. */
  25103. A_UINT32 tid_config_supported_bitmap;
  25104. /* Knob to enable/disable RTS/CTS per TID
  25105. * Enum values/Expected values:
  25106. *
  25107. * 0 (WMI_RTSCTS_RESET) - Use default RTS/CTS
  25108. * 1 (WMI_RTSCTS_DISABLE) - Disable RTS/CTS for every ppdu for
  25109. * that configured data TID
  25110. * 2 (WMI_RTSCTS_ENABLE) - Enable RTS/CTS for every ppdu for
  25111. * that configured data TID
  25112. */
  25113. A_UINT32 disable_rts_cts;
  25114. /** Size for mpdu aggregation
  25115. * (max MPDUs per PPDU)
  25116. * Valid range : 1-1024 (refer to WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_MIN,MAX)
  25117. * When this field is set to 0, default aggregation value configured
  25118. * in the fw will be used.
  25119. * This is applicable only when aggr_control is
  25120. * WMI_PEER_TID_CONFIG_AGGR_CONTROL_ENABLE
  25121. */
  25122. A_UINT32 max_num_mpdu_in_ppdu;
  25123. /** Size for msdu aggregation
  25124. * (max MSDUs per MPDU)
  25125. * Valid range : 1-7 (refer to WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_MIN,MAX)
  25126. * When this field is set to 0, default aggregation value configured
  25127. * in the fw will be used.
  25128. * This is applicable only when aggr_control is
  25129. * WMI_PEER_TID_CONFIG_AGGR_CONTROL_ENABLE
  25130. */
  25131. A_UINT32 max_num_msdu_in_mpdu;
  25132. } wmi_peer_tid_configurations_cmd_fixed_param;
  25133. /* The below enable/disable macros are used for both per peer CFR capture
  25134. * control (as in wmi_peer_cfr_capture_cmd) and control of the entire periodic
  25135. * CFR capture feature (as in WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE)
  25136. */
  25137. #define WMI_PEER_CFR_CAPTURE_ENABLE 1
  25138. #define WMI_PEER_CFR_CAPTURE_DISABLE 0
  25139. #define WMI_PEER_CFR_ONE_SHOT_REQUEST 0
  25140. #define WMI_PEER_CFR_PERIODICITY_MIN 10 /* 10ms */
  25141. #define WMI_PEER_CFR_PERIODICITY_MAX 10*60*1000 /* 10 minutes */
  25142. /* Bandwidth of peer CFR captures */
  25143. typedef enum {
  25144. WMI_PEER_CFR_CAPTURE_BW_20MHZ = 0,
  25145. WMI_PEER_CFR_CAPTURE_BW_40MHZ = 1,
  25146. WMI_PEER_CFR_CAPTURE_BW_80MHZ = 2,
  25147. WMI_PEER_CFR_CAPTURE_BW_160MHZ = 3,
  25148. WMI_PEER_CFR_CAPTURE_BW_80_80MHZ = 4,
  25149. WMI_PEER_CFR_CAPTURE_BW_MAX,
  25150. } WMI_PEER_CFR_CAPTURE_BW;
  25151. /* Peer CFR capture method */
  25152. typedef enum {
  25153. /* Send null frame on the requested bw and capture CFR on ACK */
  25154. WMI_PEER_CFR_CAPTURE_METHOD_NULL_FRAME = 0,
  25155. WMI_PEER_CFR_CAPTURE_METHOD_NULL_FRAME_WITH_PHASE = 1,
  25156. WMI_PEER_CFR_CAPTURE_METHOD_PROBE_RESP = 2,
  25157. /* New methods to be added here */
  25158. WMI_PEER_CFR_CAPTURE_METHOD_MAX,
  25159. } WMI_PEER_CFR_CAPTURE_METHOD;
  25160. /*
  25161. * Peer command structure to configure the CFR capture
  25162. */
  25163. typedef struct {
  25164. /** TLV tag and len; tag equals
  25165. * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_cmd_fixed_param
  25166. */
  25167. A_UINT32 tlv_header;
  25168. /* WMI_PEER_CFR_CAPTURE_ENABLE: Enable CFR capture for the peer
  25169. * WMI_PEER_CFR_CAPTURE_DISABLE: Disable CFR capture for the peer
  25170. */
  25171. A_UINT32 request;
  25172. /* Peer MAC address. In AP mode, this is the address of the connected peer
  25173. * for which CFR capture is needed. In case of STA mode, this is the address
  25174. * of the AP to which the STA is connected
  25175. */
  25176. wmi_mac_addr mac_addr;
  25177. /* vdev id */
  25178. A_UINT32 vdev_id;
  25179. /* Periodicity of measurement in ms.
  25180. * WMI_PEER_CFR_ONE_SHOT_REQUEST: One-shot request i.e., Only one CFR
  25181. * capture for the request and no periodic CFR captures.
  25182. * The min value is WMI_PEER_CFR_PERIODICITY_MIN
  25183. * The max value is WMI_PEER_CFR_PERIODICITY_MAX
  25184. */
  25185. A_UINT32 periodicity;
  25186. /* BW of measurement - of type WMI_PEER_CFR_CAPTURE_BW */
  25187. A_UINT32 bandwidth;
  25188. /* Method used to capture CFR - of type WMI_PEER_CFR_CAPTURE_METHOD */
  25189. A_UINT32 capture_method;
  25190. } wmi_peer_cfr_capture_cmd_fixed_param;
  25191. typedef enum {
  25192. WMI_PEER_IND_SMPS = 0x0, /* spatial multiplexing power save */
  25193. WMI_PEER_IND_OMN, /* operating mode notification */
  25194. WMI_PEER_IND_OMI, /* operating mode indication */
  25195. } WMI_PEER_OPER_MODE_IND;
  25196. typedef struct {
  25197. /** TLV tag and len; tag equals
  25198. * WMITLV_TAG_STRUC_wmi_peer_oper_mode_change */
  25199. A_UINT32 tlv_header;
  25200. /** mac addr of the peer */
  25201. wmi_mac_addr peer_mac_address;
  25202. /** Peer type indication WMI_PEER_OPER_MODE_IND. */
  25203. A_UINT32 ind_type;
  25204. /** new_rxnss valid for all peer_operating mode ind. */
  25205. A_UINT32 new_rxnss;
  25206. /** new_bw valid for peer_operating mode ind. OMN/OMI
  25207. * value of this bw is as per 11ax/ac standard:
  25208. * 0 = 20MHz,1 = 40MHz, 2= 80MHz, 3 = 160MHz
  25209. */
  25210. A_UINT32 new_bw;
  25211. /** new_txnss valid for peer_operating mode ind. OMI */
  25212. A_UINT32 new_txnss;
  25213. /** new_disablemu: disable mu mode
  25214. * valid for peer_operating mode ind. OMI
  25215. */
  25216. A_UINT32 new_disablemu;
  25217. } wmi_peer_oper_mode_change_event_fixed_param;
  25218. /** FW response when tx failure count has reached threshold
  25219. * for a peer */
  25220. typedef struct {
  25221. /** TLV tag and len; tag equals
  25222. * WMITLV_TAG_STRUC_wmi_peer_tx_fail_cnt_thr_event_fixed_param */
  25223. A_UINT32 tlv_header;
  25224. /** vdev id*/
  25225. A_UINT32 vdev_id;
  25226. /** mac address */
  25227. wmi_mac_addr peer_mac_address;
  25228. /** tx failure count - will eventually be removed and not used */
  25229. A_UINT32 tx_fail_cnt;
  25230. /** seq number of the nth tx_fail_event */
  25231. A_UINT32 seq_no;
  25232. } wmi_peer_tx_fail_cnt_thr_event_fixed_param;
  25233. enum wmi_rmc_mode {
  25234. /** Disable RMC */
  25235. WMI_RMC_MODE_DISABLED = 0,
  25236. /** Enable RMC */
  25237. WMI_RMC_MODE_ENABLED = 1,
  25238. };
  25239. /** Enable RMC transmitter functionality. Upon
  25240. * receiving this, the FW shall mutlicast frames with
  25241. * reliability. This is a vendor
  25242. * proprietary feature. */
  25243. typedef struct {
  25244. /** TLV tag and len; tag equals
  25245. * WMITLV_TAG_STRUC_wmi_rmc_set_mode_cmd_fixed_param */
  25246. A_UINT32 tlv_header;
  25247. /** vdev id*/
  25248. A_UINT32 vdev_id;
  25249. /** enable_rmc contains values from enum wmi_rmc_mode;
  25250. * Default value: 0 (disabled) */
  25251. A_UINT32 enable_rmc;
  25252. } wmi_rmc_set_mode_cmd_fixed_param;
  25253. /** Configure transmission periodicity of action frames in a
  25254. * RMC network for the multicast transmitter */
  25255. typedef struct {
  25256. /** TLV tag and len; tag equals
  25257. * WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */
  25258. A_UINT32 tlv_header;
  25259. /** vdev id */
  25260. A_UINT32 vdev_id;
  25261. /** time period in milliseconds. Default: 300 ms.
  25262. An action frame indicating the current leader is transmitted by the
  25263. RMC transmitter once every 'periodity_msec' */
  25264. A_UINT32 periodicity_msec;
  25265. } wmi_rmc_set_action_period_cmd_fixed_param;
  25266. /** Optimise Leader selection process in RMC functionality. For
  25267. * Enhancement/Debug purposes only */
  25268. typedef struct {
  25269. /** TLV tag and len; tag equals
  25270. * WMITLV_TAG_STRUC_wmi_rmc_config_cmd_fixed_param */
  25271. A_UINT32 tlv_header;
  25272. /** vdev id */
  25273. A_UINT32 vdev_id;
  25274. /** flags ::
  25275. * 0x0001 - Enable beacon averaging
  25276. * 0x0002 - Force leader selection
  25277. * 0x0004 - Enable Timer based leader switch
  25278. * 0x0008 - Use qos/NULL based for multicast reliability */
  25279. A_UINT32 flags;
  25280. /** control leader change timeperiod (in seconds) */
  25281. A_UINT32 peridocity_leader_switch;
  25282. /** control activity timeout value for data rx (in seconds) */
  25283. A_UINT32 data_activity_timeout;
  25284. /** mac address of leader */
  25285. wmi_mac_addr forced_leader_mac_addr;
  25286. } wmi_rmc_config_cmd_fixed_param;
  25287. /** MHF is generally implemented in
  25288. * the kernel. To decrease system power consumption, the
  25289. * driver can enable offloading this to the chipset. In
  25290. * order for the offload, the firmware needs the routing table.
  25291. * The host shall plumb the routing table into FW. The firmware
  25292. * shall perform an IP address lookup and forward the packet to
  25293. * the next hop using next hop's mac address. This is a vendor
  25294. * proprietary feature. */
  25295. enum wmi_mhf_ofl_mode {
  25296. /** Disable MHF offload */
  25297. WMI_MHF_OFL_MODE_DISABLED = 0,
  25298. /** Enable MHF offload */
  25299. WMI_MHF_OFL_MODE_ENABLED = 1,
  25300. };
  25301. typedef struct {
  25302. /** TLV tag and len; tag equals
  25303. * WMITLV_TAG_STRUC_wmi_mhf_offload_set_mode_cmd_fixed_param */
  25304. A_UINT32 tlv_header;
  25305. /** vdev id*/
  25306. A_UINT32 vdev_id;
  25307. /** enable_mhf_ofl contains values from enum
  25308. * wmi_mhf_ofl_mode; Default value: 0 (disabled) */
  25309. A_UINT32 enable_mhf_ofl;
  25310. } wmi_mhf_offload_set_mode_cmd_fixed_param;
  25311. enum wmi_mhf_ofl_table_action {
  25312. /** Create MHF offload table in FW */
  25313. WMI_MHF_OFL_TBL_CREATE = 0,
  25314. /** Append to existing MHF offload table */
  25315. WMI_MHF_OFL_TBL_APPEND = 1,
  25316. /** Flush entire MHF offload table in FW */
  25317. WMI_MHF_OFL_TBL_FLUSH = 2,
  25318. };
  25319. typedef struct {
  25320. /** TLV tag and len; tag equals
  25321. * WMITLV_TAG_STRUC_wmi_mhf_offload_plumb_routing_table_cmd_fixed_param */
  25322. A_UINT32 tlv_header;
  25323. /** vdev id*/
  25324. A_UINT32 vdev_id;
  25325. /** action corresponds to values from enum
  25326. * wmi_mhf_ofl_table_action */
  25327. A_UINT32 action;
  25328. /** number of entries in the table */
  25329. A_UINT32 num_entries;
  25330. /** Followed by the variable length TLV
  25331. * wmi_mhf_offload_routing_table_entry entries[] */
  25332. } wmi_mhf_offload_plumb_routing_table_cmd;
  25333. typedef struct {
  25334. /** TLV tag and len; tag equals
  25335. * WMITLV_TAG_STRUC_wmi_mhf_offload_routing_table_entry */
  25336. A_UINT32 tlv_header;
  25337. /** Destination node's IP address */
  25338. WMI_IPV4_ADDR dest_ipv4_addr;
  25339. /** Next hop node's MAC address */
  25340. wmi_mac_addr next_hop_mac_addr;
  25341. } wmi_mhf_offload_routing_table_entry;
  25342. enum {
  25343. WMI_DFS_RADAR_PULSE_FLAG_MASK_PSIDX_DIFF_VALID = 0x00000001,
  25344. };
  25345. typedef struct {
  25346. /** tlv tag and len, tag equals
  25347. * WMITLV_TAG_STRUC_wmi_dfs_radar_event */
  25348. A_UINT32 tlv_header;
  25349. /** full 64 tsf timestamp get from MAC tsf timer indicates
  25350. * the time that the radar event uploading to host, split
  25351. * it to high 32 bit and lower 32 bit in fulltsf_high and
  25352. * full_tsf_low
  25353. */
  25354. A_UINT32 upload_fullts_low;
  25355. A_UINT32 upload_fullts_high;
  25356. /** timestamp indicates the time when DFS pulse is detected
  25357. * equal to ppdu_end_ts - radar_pusle_summary_ts_offset
  25358. */
  25359. A_UINT32 pulse_detect_ts;
  25360. /** the duaration of the pulse in us */
  25361. A_UINT32 pulse_duration;
  25362. /** the center frequency of the radar pulse detected, KHz */
  25363. A_UINT32 pulse_center_freq;
  25364. /** bandwidth of current DFS channel, MHz */
  25365. A_UINT32 ch_bandwidth;
  25366. /** center channel frequency1 of current DFS channel, MHz */
  25367. A_UINT16 ch_center_freq1;
  25368. /** center channel frequency2 of current DFS channel, MHz,
  25369. * reserved for 160 BW mode
  25370. */
  25371. A_UINT16 ch_center_freq2;
  25372. /** flag to indicate if this pulse is chirp */
  25373. A_UINT8 pulse_is_chirp;
  25374. /** RSSI recorded in the ppdu */
  25375. A_UINT8 rssi;
  25376. /** extended RSSI info */
  25377. A_UINT8 rssi_ext;
  25378. union {
  25379. A_UINT8 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
  25380. /** pdev_id for identifying the MAC
  25381. * See macros starting with WMI_PDEV_ID_ for values.
  25382. */
  25383. A_UINT8 pdev_id;
  25384. };
  25385. /** index of peak magnitude bin (signed) */
  25386. A_INT32 peak_sidx;
  25387. /** Max pulse chirp velocity in delta bins over chirp FFT interval */
  25388. A_INT32 pulse_delta_peak;
  25389. /** Max pulse chirp velocity variance in delta bins */
  25390. A_INT32 pulse_delta_diff;
  25391. /** the difference in the FFT peak index between short FFT and the first long FFT
  25392. * psidx_diff = (first_long_fft_psidx - 4*first_short_fft_psidx),
  25393. */
  25394. A_INT32 psidx_diff;
  25395. /** pulse_flags: see WMI_DFS_RADAR_PULSE_FLAG_MASK enum values
  25396. * 0x0001 - set if psidx_diff is valid
  25397. */
  25398. A_UINT32 pulse_flags;
  25399. } wmi_dfs_radar_event_fixed_param;
  25400. enum {
  25401. /* DEFAULT - target chooses what action to take, based on its thermal
  25402. * management policy
  25403. * Targets which throttle tx (and potentially rx) based on thermal
  25404. * management thresholds specified by the host will shut down tx
  25405. * if the temperature exceeds upper_thresh_degreeC.
  25406. * Targets which simply inform the host about threshold breaches will
  25407. * send a notification message to the host if the temperature exceeds
  25408. * upper_thresh_degreeC.
  25409. * Conversely, if the temperature was above upper_thresh_degreeC but
  25410. * then drops to below lower_threshold_degreeC, the target will either
  25411. * resume tx, or notify the host.
  25412. */
  25413. WMI_THERMAL_MGMT_ACTION_DEFAULT = 0,
  25414. /* HALT_TRAFFIC -
  25415. * If the temperature rises above upper_thresh_degreeC, the target will
  25416. * halt tx.
  25417. * If the temperature falls back below lower_thresh_degreeC, the target
  25418. * will resume tx.
  25419. */
  25420. WMI_THERMAL_MGMT_ACTION_HALT_TRAFFIC = 1,
  25421. /* NOTIFY_HOST - the target will notify the host if the temperature
  25422. * either rises above upper_thresh_degreeC or falls below
  25423. * lower_thresh_degreeC.
  25424. */
  25425. WMI_THERMAL_MGMT_ACTION_NOTIFY_HOST = 2,
  25426. /* CHAIN SCALING -
  25427. * The target will switch tx chain mask from multi chains to single chain
  25428. * if the temperature rises above upper_thresh_degreeC.
  25429. * The target will switch tx chainmask back to multi chains if the
  25430. * temperature drops below upper_thresh_degreeC.
  25431. */
  25432. WMI_THERMAL_MGMT_ACTION_CHAINSCALING = 3,
  25433. };
  25434. typedef struct {
  25435. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_cmd_fixed_param */
  25436. /*Thermal thresholds*/
  25437. A_UINT32 lower_thresh_degreeC; /* in degree C*/
  25438. A_UINT32 upper_thresh_degreeC; /* in degree C*/
  25439. /*Enable/Disable Thermal Monitoring for Mitigation*/
  25440. A_UINT32 enable;
  25441. /* action: what the target should do when a thermal upper/lower threshold
  25442. * is crossed.
  25443. * Refer to the WMI_THERMAL_MGMT_ACTION enum.
  25444. */
  25445. A_UINT32 action;
  25446. A_UINT32 threshold_warning_degreeC;
  25447. A_UINT32 sample_rate_ms;
  25448. } wmi_thermal_mgmt_cmd_fixed_param;
  25449. typedef struct {
  25450. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param */
  25451. A_UINT32 temperature_degreeC;/* temperature in degree C*/
  25452. } wmi_thermal_mgmt_event_fixed_param;
  25453. /**
  25454. * This command is sent from WLAN host driver to firmware to
  25455. * request firmware to configure auto shutdown timer in fw
  25456. * 0 - Disable <1-19600>-Enabled and timer value is seconds (86400 seconds = 1 day maximum>
  25457. */
  25458. typedef struct {
  25459. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_cfg_cmd_param */
  25460. A_UINT32 timer_value; /** timer value; 0=disable */
  25461. } wmi_host_auto_shutdown_cfg_cmd_fixed_param;
  25462. enum wmi_host_auto_shutdown_reason {
  25463. WMI_HOST_AUTO_SHUTDOWN_REASON_UNKNOWN = 0,
  25464. WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY = 1,
  25465. WMI_HOST_AUTO_SHUTDOWN_REASON_MAX,
  25466. };
  25467. /* WMI_HOST_AUTO_SHUTDOWN_EVENTID */
  25468. typedef struct {
  25469. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_event_fixed_param */
  25470. A_UINT32 shutdown_reason; /* value: wmi_host_auto_shutdown_reason */
  25471. } wmi_host_auto_shutdown_event_fixed_param;
  25472. /** New WMI command to support TPC CHAINMASK ADJUSTMENT ACCORDING TO a set of conditions specified in the command.
  25473. * fw will save c tpc offset/chainmask along with conditions and adjust tpc/chainmask when condition meet.
  25474. * This command is only used by some customer for verification test. It is not for end-user.
  25475. *
  25476. * array of wmi_tpc_chainmask_config structures are passed with the command to specify multiple conditions.
  25477. *
  25478. * The set of conditions include bt status, stbc status, band, phy_mode, 1stream/2streams, channel, rate. when all these conditions meet,
  25479. * the output(tpc_offset,chainmask) will be applied on per packet basis. ack_offset is applied based on channel condition only. When multiple
  25480. * conditions has the same channel ,then the first ack_offset will be applied. It is better for host driver to make sure the
  25481. * <channel, ack_offset> pair is unique.
  25482. *
  25483. * the conditions (bt status, stbc status, band, phy_mode, 1steam/2streams, tpc_offset, ack_offset, chainmask) are combinedi into a single word
  25484. * called basic_config_info by bitmap
  25485. * to save memory. And channel & rate info will be tracked by 'channel' field and 'rate0', 'rate1' field because of its large combination.
  25486. *
  25487. * '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
  25488. * is ignored.
  25489. * disable will remove preious conditions from FW.
  25490. * conditions from the later command will over write conditions stored from a previous command.
  25491. *
  25492. */
  25493. #define WMI_TPC_CHAINMASK_CONFIG_BT_ON_OFF 0 /** dont' care the bt status */
  25494. #define WMI_TPC_CHAINMASK_CONFIG_BT_ON 1 /** apply only when bt on */
  25495. #define WMI_TPC_CHAINMASK_CONFIG_BT_OFF 2 /** apply only when bt off */
  25496. #define WMI_TPC_CHAINMASK_CONFIG_BT_RESV1 3 /** reserved */
  25497. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_DONT_CARE 0 /** don't care the chainmask */
  25498. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0 1 /** force to use Chain0 to send */
  25499. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN1 2 /** force to use Chain1 to send */
  25500. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0_CHAIN1 3 /** force to use Chain0 & Chain1 to send */
  25501. #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON_OFF 0 /** don't care about stbc */
  25502. #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON 1 /** apply only when stbc on */
  25503. #define WMI_TPC_CHAINMASK_CONFIG_STBC_OFF 2 /** apply only when stbc off */
  25504. #define WMI_TPC_CHAINMASK_CONFIG_STBC_RESV1 3 /** reserved */
  25505. #define WMI_TPC_CHAINMASK_CONFIG_BAND_2G 0 /** 2G */
  25506. #define WMI_TPC_CHAINMASK_CONFIG_BAND_5G 1 /** 5G */
  25507. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11B_2G 0 /** 11b 2G */
  25508. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11G_2G 1 /** 11g 2G */
  25509. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_2G 2 /** 11n 2G */
  25510. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G 3 /** 11n + 11ac 2G */
  25511. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11A_5G 4 /** 11a 5G */
  25512. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_5G 5 /** 11n 5G */
  25513. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11AC_5G 6 /** 11ac 5G */
  25514. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G 7 /** 11n + 11ac 5G */
  25515. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_1 0 /** 1 stream */
  25516. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_2 1 /** 2 streams */
  25517. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_OFF 0 /** channel field is ignored */
  25518. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_ON 1 /** channel field needs to be checked */
  25519. #define WMI_TPC_CHAINMASK_CONFIG_RATE_OFF 0 /** rate field is ignored */
  25520. #define WMI_TPC_CHAINMASK_CONFIG_RATE_ON 1 /** rate field needs to be checked */
  25521. /** Bit map definition for basic_config_info starts */
  25522. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S 0
  25523. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S)
  25524. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
  25525. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_SET(x,z) WMI_F_RMW(x,(z) & 0x1f,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
  25526. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S 5
  25527. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S)
  25528. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
  25529. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_SET(x,z) WMI_F_RMW(x, (z) & 0x1f, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
  25530. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S 10
  25531. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK (0x3 << WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S)
  25532. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
  25533. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
  25534. #define WMI_TPC_CHAINMASK_CONFIG_BT_S 12
  25535. #define WMI_TPC_CHAINMASK_CONFIG_BT (0x3 << WMI_TPC_CHAINMASK_CONFIG_BT_S)
  25536. #define WMI_TPC_CHAINMASK_CONFIG_BT_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BT)
  25537. #define WMI_TPC_CHAINMASK_CONFIG_BT_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_BT)
  25538. #define WMI_TPC_CHAINMASK_CONFIG_STBC_S 14
  25539. #define WMI_TPC_CHAINMASK_CONFIG_STBC (0x3 << WMI_TPC_CHAINMASK_CONFIG_STBC_S)
  25540. #define WMI_TPC_CHAINMASK_CONFIG_STBC_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STBC)
  25541. #define WMI_TPC_CHAINMASK_CONFIG_STBC_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_STBC)
  25542. #define WMI_TPC_CHAINMASK_CONFIG_BAND_S 16
  25543. #define WMI_TPC_CHAINMASK_CONFIG_BAND (0x1 << WMI_TPC_CHAINMASK_CONFIG_BAND_S)
  25544. #define WMI_TPC_CHAINMASK_CONFIG_BAND_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BAND)
  25545. #define WMI_TPC_CHAINMASK_CONFIG_BAND_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_BAND)
  25546. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_S 17
  25547. #define WMI_TPC_CHAINMASK_CONFIG_STREAM (0x1 << WMI_TPC_CHAINMASK_CONFIG_STREAM_S)
  25548. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STREAM)
  25549. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_STREAM)
  25550. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S 18
  25551. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE (0x7 << WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S)
  25552. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
  25553. #define WMI_TPC_CHAINAMSK_CONFIG_PHY_MODE_SET(x,z) WMI_F_RMW(x, (z) & 0x7, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
  25554. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S 21
  25555. /*
  25556. * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST)
  25557. * is temporarily maintained as an alias for the correct name
  25558. * (WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  25559. */
  25560. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST WMI_TPC_CHAINMASK_CONFIG_CHANNEL
  25561. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL (0x1 << WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S)
  25562. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  25563. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  25564. #define WMI_TPC_CHAINMASK_CONFIG_RATE_S 22
  25565. /*
  25566. * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST)
  25567. * is temporarily maintained as an alias for the correct name
  25568. * (WMI_TPC_CHAINMASK_CONFIG_RATE)
  25569. */
  25570. #define WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST WMI_TPC_CHAINMASK_CONFIG_RATE
  25571. #define WMI_TPC_CHAINMASK_CONFIG_RATE (0x1 << WMI_TPC_CHAINMASK_CONFIG_RATE_S)
  25572. #define WMI_TPC_CHAINMASK_CONFIG_RATE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_RATE)
  25573. #define WMI_TPC_CHAINMASK_CONFIG_RATE_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_RATE)
  25574. /** Bit map definition for basic_config_info ends */
  25575. typedef struct {
  25576. A_UINT32 tlv_header;
  25577. /** Basic condition defined as bit map above, bitmap is chosen to save memory.
  25578. * Bit0 ~ Bit4: tpc offset which will be adjusted if condition matches, the unit is 0.5dB. bit4 indicates signed
  25579. * Bit5 ~ Bit9: ack offset which will be adjusted if condition matches, the unit is 0.5dB. bit9 indicates signed
  25580. * 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
  25581. * 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
  25582. * 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
  25583. * Bit16 : band condition b'0: 2G, b'1: 5G
  25584. * Bit17 : stream condition: b'0: 1 stream, b'1: 2 streams
  25585. * 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
  25586. * Bit21 : channel bit, if this bit is 0, then the following channel field is ignored
  25587. * Bit22 : rate bit, if this bit is 0, then the following rate0&rate1 is ignored.
  25588. * Bit23 ~ Bit31: reserved
  25589. */
  25590. A_UINT32 basic_config_info;
  25591. /** channel mapping bit rule: The lower bit corresponds with smaller channel.
  25592. * it depends on Bit14 of basic_config_info
  25593. * Total 24 channels for 5G
  25594. * 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165
  25595. * Total 14 channels for 2G
  25596. * 1 ~ 14
  25597. */
  25598. A_UINT32 channel;
  25599. /** rate mapping bit rule: The lower bit corresponds with lower rate.
  25600. * it depends on Bit16 ~ Bit18 of basic_config_info, "phy mode condition"
  25601. * Legacy rates , 11b, 11g, 11A
  25602. * 11n one stream (ht20, ht40) 8+8
  25603. * 11n two streams (ht20, ht40) 8+8
  25604. * 11ac one stream (vht20, vht40, vht80) 10+10+10
  25605. * 11ac two streams (vht20, vht40, vht80) 10+10+10
  25606. */
  25607. A_UINT32 rate0;
  25608. /** For example, for 11b, when rate0 equals 0x3, it means if actual_rate in [ "1Mbps", "2Mbps"] connection, the rate condition is true.
  25609. * 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
  25610. */
  25611. /** 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
  25612. */
  25613. A_UINT32 rate1;
  25614. } wmi_tpc_chainmask_config;
  25615. #define WMI_TPC_CHAINMASK_CONFIG_DISABLE 0 /** control the off for the tpc & chainmask*/
  25616. #define WMI_TPC_CHAINMASK_CONFIG_ENABLE 1 /** control the on for the tpc & chainmask*/
  25617. typedef struct {
  25618. A_UINT32 tlv_header;
  25619. A_UINT32 enable; /** enable to set tpc & chainmask when conditions meet, 0: disabled, 1: enabled. */
  25620. A_UINT32 num_tpc_chainmask_configs;
  25621. /** following this structure is num_tpc_chainmask_configs number of wmi_tpc_chainmask_config */
  25622. } wmi_tpc_chainmask_config_cmd_fixed_param;
  25623. typedef struct {
  25624. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_ring_cfg_req_fixed_param */
  25625. A_UINT32 pdev_id;
  25626. /**
  25627. * Bits 31:0: base address of ring [31:0]
  25628. */
  25629. A_UINT32 base_addr_lo;
  25630. /**
  25631. * Bits 3:0: base address of ring [35:32]
  25632. * Bits 31:4: reserved
  25633. */
  25634. A_UINT32 base_addr_hi;
  25635. /**
  25636. * Bits 31:0: address of head index [31:0]
  25637. */
  25638. A_UINT32 head_idx_addr_lo;
  25639. /**
  25640. * Bits 3:0: address of head index [35:32]
  25641. * Bits 31:4: reserved
  25642. */
  25643. A_UINT32 head_idx_addr_hi;
  25644. /**
  25645. * Bits 31:0: address of tail index [31:0]
  25646. */
  25647. A_UINT32 tail_idx_addr_lo;
  25648. /**
  25649. * Bits 3:0: address of tail index [35:32]
  25650. * Bits 31:4: reserved
  25651. */
  25652. A_UINT32 tail_idx_addr_hi;
  25653. A_UINT32 num_ptr; /** Number of pointers in the ring */
  25654. } wmi_oem_dma_ring_cfg_req_fixed_param;
  25655. #define WMI_OEM_DMA_RING_ADDR_LO_S 0
  25656. #define WMI_OEM_DMA_RING_ADDR_LO 0xffffffff
  25657. #define WMI_OEM_DMA_RING_ADDR_LO_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_RING_ADDR_LO)
  25658. #define WMI_OEM_DMA_RING_ADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_RING_ADDR_LO)
  25659. #define WMI_OEM_DMA_RING_ADDR_HI_S 0
  25660. #define WMI_OEM_DMA_RING_ADDR_HI 0xf
  25661. #define WMI_OEM_DMA_RING_ADDR_HI_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_RING_ADDR_HI)
  25662. #define WMI_OEM_DMA_RING_ADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_RING_ADDR_HI)
  25663. typedef struct {
  25664. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_ring_cfg_rsp_fixed_param */
  25665. A_UINT32 pdev_id;
  25666. A_UINT32 cfg_status; /** Configuration status; see A_STATUS */
  25667. } wmi_oem_dma_ring_cfg_rsp_fixed_param;
  25668. typedef struct {
  25669. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_indirect_data */
  25670. A_UINT32 pdev_id; /** ID of pdev whose OEM DMA ring produced the data */
  25671. /**
  25672. * Bits 31:0: address of data [31:0]
  25673. */
  25674. A_UINT32 addr_lo;
  25675. /**
  25676. * Bits 3:0: address of data [35:32]
  25677. * Bits 11:4: reserved
  25678. * Bits 31:12: opaque host context data [19:0]
  25679. */
  25680. A_UINT32 addr_hi;
  25681. A_UINT32 len; /** Length of data in bytes */
  25682. } wmi_oem_indirect_data;
  25683. #define WMI_OEM_DMA_DATA_ADDR_LO_S 0
  25684. #define WMI_OEM_DMA_DATA_ADDR_LO 0xffffffff
  25685. #define WMI_OEM_DMA_DATA_ADDR_LO_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_LO)
  25686. #define WMI_OEM_DMA_DATA_ADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_LO)
  25687. #define WMI_OEM_DMA_DATA_ADDR_HI_S 0
  25688. #define WMI_OEM_DMA_DATA_ADDR_HI 0xf
  25689. #define WMI_OEM_DMA_DATA_ADDR_HI_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_HI)
  25690. #define WMI_OEM_DMA_DATA_ADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_HI)
  25691. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_S 12
  25692. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA 0xfffff
  25693. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA)
  25694. #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)
  25695. typedef struct {
  25696. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_buf_release_hdr */
  25697. A_UINT32 pdev_id; /** ID of pdev whose OEM DMA ring produced the data */
  25698. } wmi_oem_dma_buf_release_fixed_param;
  25699. typedef struct {
  25700. /**
  25701. * Bits 31:0: address of data [31:0]
  25702. */
  25703. A_UINT32 addr_lo;
  25704. /**
  25705. * Bits 3:0: address of data [35:32]
  25706. * Bits 11:4: reserved
  25707. * Bits 31:12: host context data [19:0]
  25708. */
  25709. A_UINT32 addr_hi;
  25710. } wmi_oem_dma_buf_release_entry;
  25711. typedef struct {
  25712. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_data_cmd_fixed_param */
  25713. A_UINT32 tlv_header;
  25714. /** Unique id identifying the VDEV */
  25715. A_UINT32 vdev_id;
  25716. /** Actual length in byte of data[]. */
  25717. A_UINT32 data_len;
  25718. /**
  25719. * pdev_vdev_flag - 0 follow old method (vdev_id is valid, ignore pdev_id)
  25720. * pdev_vdev_flag - 1 pdev_id is valid
  25721. */
  25722. A_UINT32 pdev_vdev_flag;
  25723. /** Unique id identifying the PDEV */
  25724. A_UINT32 pdev_id;
  25725. /** This structure is used to send OEM DATA binary blobs from
  25726. * application/service to firmware where Host driver is pass through.
  25727. * The OEM-specific commands from OEM-specific userspace applications
  25728. * are passed to OEM-specific feature handlers in firmware as OEM DATA
  25729. * binary blobs. The format of the data is per agreement between FW and
  25730. * userspace applications, with the binary blob beginning with a header
  25731. * that identifies to the FW the nature of the remaining data within the
  25732. * blob.
  25733. *
  25734. * Following this structure is the TLV:
  25735. * A_UINT8 data[]; <-- actual length in byte given by field data_len.
  25736. */
  25737. } wmi_oem_data_cmd_fixed_param;
  25738. typedef struct {
  25739. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */
  25740. A_UINT32 data_len; /** length in byte of data[]. */
  25741. /* This structure is used to send REQ binary blobs
  25742. * from application/service to firmware where Host drv is pass through .
  25743. * Following this structure is the TLV:
  25744. * A_UINT8 data[]; <-- length in byte given by field data_len.
  25745. */
  25746. } wmi_nan_cmd_param;
  25747. typedef enum {
  25748. WMI_NAN_VENDOR1_REQ1 = 1,
  25749. } WMI_NAN_OEM_DATA_TYPE;
  25750. typedef struct {
  25751. /** oem_data_type:
  25752. * Indicate what kind of OEM-specific data is present in the
  25753. * oem_data_buffer[].
  25754. * Possible values are listed in the enum WMI_NAN_OEM_DATA_TYPE.
  25755. */
  25756. A_UINT32 oem_data_type;
  25757. /** oem_data_len:
  25758. * Actual length in bytes of the OEM-specific data within the
  25759. * oem_data_buffer[].
  25760. * Note that it is possible for a single message to contain multiple
  25761. * OEM opaque data blobs. In such cases, the oem_data_len field of
  25762. * nan_oem_data_hdr[0] not only specifies the size of the first such
  25763. * opaque blob, but furthermore specifies the offset in oem_data_buffer[]
  25764. * where the second opaque blob begins.
  25765. */
  25766. A_UINT32 oem_data_len;
  25767. } wmi_nan_oem_data_hdr;
  25768. typedef struct {
  25769. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_oem_data_cmd_fixed_param */
  25770. /* Following this structure are the below TLVs:
  25771. * - wmi_nan_oem_data_hdr nan_oem_data_hdr[];
  25772. * This TLV explains the type and size of the one or more OEM NAN
  25773. * opaque data blobs carried in this message.
  25774. * - A_UINT8 nan_oem_data_buffer[];
  25775. * This TLV holds the contents of the one or more OEM NAN opaque data
  25776. * blobs carried in this message.
  25777. */
  25778. } wmi_nan_oem_data_cmd_fixed_param;
  25779. #define WMI_NAN_GET_RANGING_INITIATOR_ROLE(flag) WMI_GET_BITS(flag, 0, 1)
  25780. #define WMI_NAN_SET_RANGING_INITIATOR_ROLE(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  25781. #define WMI_NAN_GET_RANGING_RESPONDER_ROLE(flag) WMI_GET_BITS(flag, 1, 1)
  25782. #define WMI_NAN_SET_RANGING_RESPONDER_ROLE(flag, val) WMI_SET_BITS(flag, 1, 1, val)
  25783. #define WMI_NAN_GET_NAN_6G_DISABLE(flag) WMI_GET_BITS(flag, 2, 1)
  25784. #define WMI_NAN_SET_NAN_6G_DISABLE(flag, val) WMI_SET_BITS(flag, 2, 1, val)
  25785. typedef struct {
  25786. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_host_config_param */
  25787. A_UINT32 nan_2g_disc_disable:1; /** This bit when set to 1 indicate NAN 2G discovery should be disabled */
  25788. A_UINT32 nan_5g_disc_disable:1; /** This bit when set to 1 indicate NAN 5G discovery should be disabled */
  25789. A_UINT32 reserved:30;
  25790. /** Flags: refer to WMI_NAN_GET/SET macros
  25791. * Bit 0 -> Nan ranging initiator role (0 - Disable, 1 - Enable)
  25792. * Bit 1 -> Nan ranging responder role (0 - Disable, 1 - Enable)
  25793. * Bit 2 -> Nan 6 GHz support (1 - Disable, 0 - Enable)
  25794. * Bits 3-31 -> Reserved
  25795. */
  25796. A_UINT32 flags;
  25797. } wmi_nan_host_config_param_PROTOTYPE;
  25798. #define wmi_nan_host_config_param wmi_nan_host_config_param_PROTOTYPE
  25799. typedef struct {
  25800. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */
  25801. A_UINT32 data_len; /** length in byte of data[]. */
  25802. /* This structure is used to send REQ binary blobs
  25803. * from firmware to application/service where Host drv is pass through .
  25804. * Following this structure is the TLV:
  25805. * A_UINT8 data[]; <-- length in byte given by field data_len.
  25806. */
  25807. } wmi_nan_event_hdr;
  25808. typedef struct {
  25809. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_oem_data_event_fixed_param */
  25810. /* Following this structure are the below TLVs:
  25811. * - wmi_nan_oem_data_hdr nan_oem_data_hdr[];
  25812. * This TLV explains the type and size of the one or more OEM NAN
  25813. * opaque data blobs carried in this message.
  25814. * - A_UINT8 nan_oem_data_buffer[];
  25815. * This TLV holds the contents of the one or more OEM NAN opaque data
  25816. * blobs carried in this message.
  25817. */
  25818. } wmi_nan_oem_data_event_fixed_param;
  25819. typedef struct {
  25820. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_info */
  25821. 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 */
  25822. 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 */
  25823. A_UINT32 reserved:31;
  25824. 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 */
  25825. } wmi_nan_event_info_PROTOTYPE;
  25826. #define wmi_nan_event_info wmi_nan_event_info_PROTOTYPE
  25827. /**
  25828. * Event to indicate NAN discovery interface created
  25829. */
  25830. typedef struct {
  25831. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param */
  25832. A_UINT32 tlv_header;
  25833. /** Unique id identifying the VDEV */
  25834. A_UINT32 vdev_id;
  25835. /** NAN interface MAC address */
  25836. wmi_mac_addr nan_interface_macaddr;
  25837. } wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE;
  25838. #define wmi_nan_disc_iface_created_event_fixed_param wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE
  25839. /**
  25840. * Event to indicate NAN discovery interface deleted
  25841. */
  25842. typedef struct {
  25843. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_deleted_event_fixed_param */
  25844. A_UINT32 tlv_header;
  25845. /** Unique id identifying the VDEV */
  25846. A_UINT32 vdev_id;
  25847. } wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE;
  25848. #define wmi_nan_disc_iface_deleted_event_fixed_param wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE
  25849. /**
  25850. * Event to indicate NAN device started new cluster
  25851. */
  25852. typedef struct {
  25853. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_started_cluster_event_fixed_param */
  25854. A_UINT32 tlv_header;
  25855. /** Unique id identifying the VDEV */
  25856. A_UINT32 vdev_id;
  25857. /** NAN Cluster ID */
  25858. A_UINT32 nan_cluster_id;
  25859. } wmi_nan_started_cluster_event_fixed_param_PROTOTYPE;
  25860. #define wmi_nan_started_cluster_event_fixed_param wmi_nan_started_cluster_event_fixed_param_PROTOTYPE
  25861. /**
  25862. * Event to indicate NAN device joined to cluster
  25863. */
  25864. typedef struct {
  25865. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_joined_cluster_event_fixed_param */
  25866. A_UINT32 tlv_header;
  25867. /** Unique id identifying the VDEV */
  25868. A_UINT32 vdev_id;
  25869. /** NAN Cluster ID */
  25870. A_UINT32 nan_cluster_id;
  25871. } wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE;
  25872. #define wmi_nan_joined_cluster_event_fixed_param wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE
  25873. typedef struct {
  25874. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_dmesg_event_fixed_param */
  25875. A_UINT32 tlv_header;
  25876. /** length in byte of msg[]. */
  25877. A_UINT32 msg_len;
  25878. /* Following this structure is the TLV:
  25879. * A_UINT8 msg[]; <-- length in byte given by field data_len.
  25880. * This data contains the string message which will be given to Host to dump it to kernel logs.
  25881. */
  25882. } wmi_nan_dmesg_event_fixed_param;
  25883. typedef struct {
  25884. /** TLV tag and len; tag equals WMITLV_TAG_STRUCT_wmi_nan_capabilities */
  25885. A_UINT32 tlv_header;
  25886. /** Maximum number of ndp sessions supported by the Firmware */
  25887. A_UINT32 max_ndp_sessions;
  25888. /** Maximum number of nan pairing sessions supported by the Firmware */
  25889. A_UINT32 max_pairing_sessions;
  25890. } wmi_nan_capabilities;
  25891. /** NAN DATA CMD's */
  25892. /**
  25893. * NAN Data get capabilities req
  25894. */
  25895. typedef struct {
  25896. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param */
  25897. A_UINT32 tlv_header;
  25898. /** unique id generated in upper layer for the transaction */
  25899. A_UINT32 transaction_id;
  25900. } wmi_ndi_get_cap_req_fixed_param_PROTOTYPE;
  25901. #define wmi_ndi_get_cap_req_fixed_param wmi_ndi_get_cap_req_fixed_param_PROTOTYPE
  25902. /**
  25903. * NDP Response code
  25904. */
  25905. typedef enum {
  25906. NDP_RSP_CODE_REQUEST_ACCEPT = 0x00,
  25907. NDP_RSP_CODE_REQUEST_REJECT = 0x01,
  25908. NDP_RSP_CODE_REQUEST_DEFER = 0x02,
  25909. } wmi_ndp_rsp_code_PROTOTYPE;
  25910. #define wmi_ndp_rsp_code wmi_ndp_rsp_code_PROTOTYPE
  25911. /**
  25912. * NDP Channel configuration type
  25913. */
  25914. typedef enum {
  25915. WMI_NDP_CHANNEL_NOT_REQUESTED = 0, /* Channel will not configured */
  25916. WMI_NDP_REQUEST_CHANNEL_SETUP = 1, /* Channel will be provided and is optional/hint */
  25917. WMI_NDP_FORCE_CHANNEL_SETUP = 2/* NDP must start on the provided channel */
  25918. } wmi_ndp_channel_cfg_PROTOTYPE;
  25919. /*
  25920. * The WMI_NDP_IPV6_INTF_ADDR_LEN macro cannot be changed without breaking
  25921. * WMI compatibility.
  25922. */
  25923. #define WMI_NDP_IPV6_INTF_ADDR_LEN 16
  25924. typedef struct {
  25925. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_transport_ip_param */
  25926. /* Presence of ipv6_intf_addr */
  25927. A_UINT32 ipv6_addr_present;
  25928. /* Presence of transport Port */
  25929. A_UINT32 trans_port_present;
  25930. /* Presence of transport Protocol */
  25931. A_UINT32 trans_proto_present;
  25932. /* ipv6 Interface address */
  25933. A_UINT8 ipv6_intf_addr[WMI_NDP_IPV6_INTF_ADDR_LEN];
  25934. /* Transport Port */
  25935. A_UINT32 transport_port;
  25936. /* Transport Protocol */
  25937. A_UINT32 transport_protocol;
  25938. } wmi_ndp_transport_ip_param;
  25939. #define wmi_ndp_channel_cfg wmi_ndp_channel_cfg_PROTOTYPE
  25940. typedef struct {
  25941. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_channel_info */
  25942. A_UINT32 mac_id; /* mac_id associated with ndp channel at same index */
  25943. } wmi_ndp_channel_info_PROTOTYPE;
  25944. #define wmi_ndp_channel_info wmi_ndp_channel_info_PROTOTYPE
  25945. typedef struct {
  25946. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_event_param */
  25947. A_UINT32 vdev_id; /* NDI VDEV ID */
  25948. 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 */
  25949. A_UINT32 reserved:31;
  25950. } wmi_ndp_event_param_PROTOTYPE;
  25951. #define wmi_ndp_event_param wmi_ndp_event_param_PROTOTYPE
  25952. /**
  25953. * NDP Initiator requesting a data session
  25954. */
  25955. typedef struct {
  25956. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_req_fixed_param */
  25957. A_UINT32 tlv_header;
  25958. /** Unique id identifying the VDEV */
  25959. A_UINT32 vdev_id;
  25960. /** unique id generated in upper layer for the transaction */
  25961. A_UINT32 transaction_id;
  25962. /** Unique Instance Id identifying the Responder's service */
  25963. A_UINT32 service_instance_id;
  25964. /** Discovery MAC addr of the publisher/peer */
  25965. wmi_mac_addr peer_discovery_mac_addr;
  25966. /** Actual number of bytes in TLV ndp_cfg */
  25967. A_UINT32 ndp_cfg_len;
  25968. /** Actual number of bytes in TLV ndp_app_info */
  25969. A_UINT32 ndp_app_info_len;
  25970. /** NDP channel configuration type defined in wmi_ndp_channel_cfg */
  25971. A_UINT32 ndp_channel_cfg;
  25972. /** NAN Cipher Suite Shared Key */
  25973. A_UINT32 nan_csid;
  25974. /** Actual number of bytes in TLV ndp_pmk */
  25975. A_UINT32 nan_pmk_len;
  25976. /** Actual number of bytes in TLV ndp_passphrase */
  25977. A_UINT32 nan_passphrase_len;
  25978. /** Actual number of bytes in TLV nan_servicename */
  25979. A_UINT32 nan_servicename_len;
  25980. /** NAN Cipher Suite Capability field */
  25981. A_UINT32 nan_csid_cap;
  25982. /** GTK protection is required for the NDP */
  25983. A_UINT32 nan_gtk_required;
  25984. /**
  25985. * TLV (tag length value) parameters follow the ndp_initiator_req
  25986. * structure. The TLV's are:
  25987. * wmi_channel channel;
  25988. * A_UINT8 ndp_cfg[];
  25989. * A_UINT8 ndp_app_info[];
  25990. * A_UINT8 ndp_pmk[];
  25991. * A_INT8 ndp_passphrase[];
  25992. * A_INT8 nan_servicename[];
  25993. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  25994. */
  25995. } wmi_ndp_initiator_req_fixed_param_PROTOTYPE;
  25996. #define wmi_ndp_initiator_req_fixed_param wmi_ndp_initiator_req_fixed_param_PROTOTYPE
  25997. /**
  25998. * Initiate a data response on the responder side
  25999. * for data request indication from the peer
  26000. */
  26001. typedef struct {
  26002. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_req_fixed_param */
  26003. A_UINT32 tlv_header;
  26004. /** Unique id identifying the VDEV */
  26005. A_UINT32 vdev_id;
  26006. /** unique id generated in upper layer for the transaction */
  26007. A_UINT32 transaction_id;
  26008. /**
  26009. * Unique token Id generated on the initiator/responder
  26010. * side used for a NDP session between two NAN devices
  26011. */
  26012. A_UINT32 ndp_instance_id;
  26013. /** Response Code defined in wmi_ndp_rsp_code */
  26014. A_UINT32 rsp_code;
  26015. /** Number of bytes in TLV ndp_cfg */
  26016. A_UINT32 ndp_cfg_len;
  26017. /** Number of bytes in TLV ndp_app_info */
  26018. A_UINT32 ndp_app_info_len;
  26019. /** NAN Cipher Suite Shared Key */
  26020. A_UINT32 nan_csid;
  26021. /** Actual number of bytes in TLV ndp_pmk */
  26022. A_UINT32 nan_pmk_len;
  26023. /** Actual number of bytes in TLV ndp_passphrase */
  26024. A_UINT32 nan_passphrase_len;
  26025. /** Actual number of bytes in TLV nan_servicename */
  26026. A_UINT32 nan_servicename_len;
  26027. /** NAN Cipher Suite Capability field */
  26028. A_UINT32 nan_csid_cap;
  26029. /** GTK protection is required for the NDP */
  26030. A_UINT32 nan_gtk_required;
  26031. /**
  26032. * TLV (tag length value) parameters follow the ndp_responder_req
  26033. * structure. The TLV's are:
  26034. * A_UINT8 ndp_cfg[];
  26035. * A_UINT8 ndp_app_info[];
  26036. * A_UINT8 ndp_pmk[];
  26037. * A_INT8 ndp_passphrase[];
  26038. * A_INT8 nan_servicename[];
  26039. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  26040. */
  26041. } wmi_ndp_responder_req_fixed_param_PROTOTYPE;
  26042. #define wmi_ndp_responder_req_fixed_param wmi_ndp_responder_req_fixed_param_PROTOTYPE
  26043. /**
  26044. * NDP end type
  26045. */
  26046. typedef enum {
  26047. WMI_NDP_END_TYPE_UNSPECIFIED = 0x00,
  26048. WMI_NDP_END_TYPE_PEER_UNAVAILABLE = 0x01,
  26049. WMI_NDP_END_TYPE_OTA_FRAME = 0x02,
  26050. WMI_NDP_END_TYPE_DATA_INACTIVITY = 0x03,
  26051. } wmi_ndp_end_type_PROTOTYPE;
  26052. #define wmi_ndp_end_type wmi_ndp_end_type_PROTOTYPE
  26053. /**
  26054. * NDP end reason code
  26055. */
  26056. typedef enum {
  26057. WMI_NDP_END_REASON_UNSPECIFIED = 0x00,
  26058. WMI_NDP_END_REASON_INACTIVITY = 0x01,
  26059. WMI_NDP_END_REASON_PEER_DATA_END = 0x02,
  26060. WMI_NDP_END_REASON_DATA_INACTIVITY = 0x03,
  26061. } wmi_ndp_end_reason_code_PROTOTYPE;
  26062. #define wmi_ndp_end_reason_code wmi_ndp_end_reason_code_PROTOTYPE
  26063. /**
  26064. * NDP end request
  26065. */
  26066. typedef struct {
  26067. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req */
  26068. A_UINT32 tlv_header;
  26069. /** NDP instance id */
  26070. A_UINT32 ndp_instance_id;
  26071. /** vdev_id valid flag */
  26072. A_UINT32 vdev_id_valid;
  26073. /** vdev id */
  26074. A_UINT32 vdev_id;
  26075. } wmi_ndp_end_req_PROTOTYPE;
  26076. #define wmi_ndp_end_req wmi_ndp_end_req_PROTOTYPE
  26077. typedef struct {
  26078. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_cmd_param */
  26079. A_UINT32 vdev_id; /* NDI VDEV ID */
  26080. A_UINT32 ndp_disable:1; /** This bit when set to 1 indicates to terminate all NDPs associated with NDI vdev ID */
  26081. A_UINT32 reserved:31;
  26082. } wmi_ndp_cmd_param_PROTOTYPE;
  26083. #define wmi_ndp_cmd_param wmi_ndp_cmd_param_PROTOTYPE
  26084. /**
  26085. * NDP End request
  26086. */
  26087. typedef struct {
  26088. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req_fixed_param */
  26089. A_UINT32 tlv_header;
  26090. /** unique id generated in upper layer for the transaction */
  26091. A_UINT32 transaction_id;
  26092. /**
  26093. * TLV (tag length value) parameters follow the ndp_end_req
  26094. * structure. The TLV's are:
  26095. * wmi_ndp_end_req ndp_end_req_list[];
  26096. */
  26097. } wmi_ndp_end_req_fixed_param_PROTOTYPE;
  26098. #define wmi_ndp_end_req_fixed_param wmi_ndp_end_req_fixed_param_PROTOTYPE
  26099. /* NAN DATA RSP EVENTS */
  26100. /**
  26101. * Event to indicate NAN Data Interface capabilities cmd
  26102. */
  26103. typedef struct {
  26104. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_cap_rsp_event_fixed_param */
  26105. A_UINT32 tlv_header;
  26106. /** Copy of transaction_id received in wmi_ndi_get_cap_req */
  26107. A_UINT32 transaction_id;
  26108. /** Max ndi interface support */
  26109. A_UINT32 max_ndi_interfaces;
  26110. /** Max ndp sessions can support */
  26111. A_UINT32 max_ndp_sessions;
  26112. /** Max number of peer's per ndi */
  26113. A_UINT32 max_peers_per_ndi;
  26114. /** which combination of bands is supported - see NAN_DATA_SUPPORTED_BAND enums */
  26115. A_UINT32 nan_data_supported_bands;
  26116. } wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE;
  26117. #define wmi_ndi_cap_rsp_event_fixed_param wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE
  26118. /**
  26119. * NDP command response code
  26120. */
  26121. typedef enum {
  26122. NDP_CMD_RSP_STATUS_SUCCESS = 0x00,
  26123. NDP_CMD_RSP_STATUS_ERROR = 0x01,
  26124. } wmi_ndp_cmd_rsp_status_PROTOTYPE;
  26125. #define wmi_ndp_cmd_rsp_status wmi_ndp_cmd_rsp_status_PROTOTYPE
  26126. /**
  26127. * Event response for wmi_ndp_initiator_req
  26128. */
  26129. typedef struct {
  26130. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_rsp_event_fixed_param */
  26131. A_UINT32 tlv_header;
  26132. /** Unique id identifying the VDEV */
  26133. A_UINT32 vdev_id;
  26134. /** Copy of transaction_id received in wmi_ndp_initiator_req */
  26135. A_UINT32 transaction_id;
  26136. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  26137. A_UINT32 rsp_status;
  26138. A_UINT32 reason_code;
  26139. /**
  26140. * Unique token Id generated on the initiator/responder
  26141. * side used for a NDP session between two NAN devices
  26142. */
  26143. A_UINT32 ndp_instance_id;
  26144. } wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE;
  26145. #define wmi_ndp_initiator_rsp_event_fixed_param wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE
  26146. /**
  26147. * Event response for wmi_ndp_responder_req cmd
  26148. */
  26149. typedef struct {
  26150. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param */
  26151. A_UINT32 tlv_header;
  26152. /** Unique id identifying the VDEV */
  26153. A_UINT32 vdev_id;
  26154. /** Copy of transaction_id received in wmi_ndp_responder_req */
  26155. A_UINT32 transaction_id;
  26156. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  26157. A_UINT32 rsp_status;
  26158. A_UINT32 reason_code;
  26159. /**
  26160. * Unique token Id generated on the initiator/responder
  26161. * side used for a NDP session between two NAN devices
  26162. */
  26163. A_UINT32 ndp_instance_id;
  26164. /** NDI mac address of the peer */
  26165. wmi_mac_addr peer_ndi_mac_addr;
  26166. /** Host can create peer if this entry is TRUE */
  26167. A_UINT32 create_peer;
  26168. } wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE;
  26169. #define wmi_ndp_responder_rsp_event_fixed_param wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE
  26170. /**
  26171. * Active ndp instance id
  26172. */
  26173. typedef struct {
  26174. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_active_ndp_instance_id */
  26175. A_UINT32 tlv_header;
  26176. /** NDP instance id */
  26177. A_UINT32 ndp_instance_id;
  26178. } wmi_active_ndp_instance_id_PROTOTYPE;
  26179. #define wmi_active_ndp_instance_id wmi_active_ndp_instance_id_PROTOTYPE
  26180. /**
  26181. * NDP end response per ndi
  26182. */
  26183. typedef struct {
  26184. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_per_ndi */
  26185. A_UINT32 tlv_header;
  26186. /** Unique id identifying the VDEV */
  26187. A_UINT32 vdev_id;
  26188. /** Peer MAC addr */
  26189. wmi_mac_addr peer_mac_addr;
  26190. /** Number of active ndps on this ndi */
  26191. A_UINT32 num_active_ndps_on_ndi;
  26192. } wmi_ndp_end_rsp_per_ndi_PROTOTYPE;
  26193. #define wmi_ndp_end_rsp_per_ndi wmi_ndp_end_rsp_per_ndi_PROTOTYPE
  26194. /**
  26195. * Event response for wmi_ndp_end_req cmd
  26196. */
  26197. typedef struct {
  26198. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_event_fixed_param */
  26199. A_UINT32 tlv_header;
  26200. /** Copy of transaction_id received in wmi_ndp_end_req */
  26201. A_UINT32 transaction_id;
  26202. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  26203. A_UINT32 rsp_status;
  26204. A_UINT32 reason_code;
  26205. /**
  26206. * TLV (tag length value) parameters follow the ndp_end_rsp
  26207. * structure. The TLV's are:
  26208. * wmi_ndp_end_rsp_per_ndi ndp_end_rsp_per_ndis[];
  26209. * wmi_active_ndp_instance_id active_ndp_instances_id[];
  26210. */
  26211. } wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE;
  26212. #define wmi_ndp_end_rsp_event_fixed_param wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE
  26213. /** NAN DATA EVENTS */
  26214. /**
  26215. * NDP self role
  26216. */
  26217. typedef enum {
  26218. WMI_NDP_INITIATOR_ROLE,
  26219. WMI_NDP_RESPONDER_ROLE,
  26220. } wmi_ndp_self_role_PROTOTYPE;
  26221. #define wmi_ndp_self_role wmi_ndp_self_role_PROTOTYPE
  26222. /**
  26223. * NDP accept policy
  26224. */
  26225. typedef enum {
  26226. WMI_NDP_ACCEPT_POLICY_NONE,
  26227. WMI_NDP_ACCEPT_POLICY_ALL,
  26228. } wmi_ndp_accept_policy_PROTOTYPE;
  26229. #define wmi_ndp_accept_policy wmi_ndp_accept_policy_PROTOTYPE
  26230. /**
  26231. * Event indication received on the responder side when a NDP Initiator request/
  26232. * NDP session is initiated on the Initiator side (self role will be NDP_RESPONDER_ROLE)
  26233. *
  26234. * Event indication received on the initiator side when a
  26235. * NDP responder request on the Initiator side (self role will be NDP_INITIATOR_ROLE)
  26236. */
  26237. typedef struct {
  26238. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_indication_event_fixed_param */
  26239. A_UINT32 tlv_header;
  26240. /** Unique id identifying the VDEV */
  26241. A_UINT32 vdev_id;
  26242. /** Self NDP Role defined in wmi_ndp_self_role */
  26243. A_UINT32 self_ndp_role;
  26244. /** Accept policy defined in wmi_ndp_accept_policy */
  26245. A_UINT32 accept_policy;
  26246. /** Unique Instance Id corresponding to a service/session. */
  26247. A_UINT32 service_instance_id;
  26248. /** Discovery MAC addr of the peer/initiator */
  26249. wmi_mac_addr peer_discovery_mac_addr;
  26250. /** NDI mac address of the peer */
  26251. wmi_mac_addr peer_ndi_mac_addr;
  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. /** Number of bytes in TLV wmi_ndp_cfg */
  26258. A_UINT32 ndp_cfg_len;
  26259. /** Number of bytes in TLV wmi_ndp_app_info */
  26260. A_UINT32 ndp_app_info_len;
  26261. /** Peer NAN Cipher Suite Shared Key */
  26262. A_UINT32 nan_csid;
  26263. /** Actual number of bytes in TLV nan_scid */
  26264. A_UINT32 nan_scid_len;
  26265. /** Self NDI mac address */
  26266. wmi_mac_addr self_ndi_mac_addr;
  26267. /** Number of bytes in TLV service_id */
  26268. A_UINT32 service_id_len;
  26269. /** NAN Cipher Suite Capability field */
  26270. A_UINT32 nan_csid_cap;
  26271. /** GTK protection is required for the NDP */
  26272. A_UINT32 nan_gtk_required;
  26273. /**
  26274. * TLV (tag length value) parameters follow the ndp_indication
  26275. * structure. The TLV's are:
  26276. * A_UINT8 ndp_cfg[];
  26277. * A_UINT8 ndp_app_info[];
  26278. * A_UINT8 nan_scid[];
  26279. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  26280. * A_UINT8 service_id[service_id_len]; <- holds a single service ID of an
  26281. * indeterminate number of bytes (most likely 6 bytes)
  26282. */
  26283. } wmi_ndp_indication_event_fixed_param_PROTOTYPE;
  26284. #define wmi_ndp_indication_event_fixed_param wmi_ndp_indication_event_fixed_param_PROTOTYPE
  26285. /**
  26286. * Event indication of data confirm is received on both
  26287. * initiator and responder side confirming a NDP session
  26288. */
  26289. typedef struct {
  26290. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_confirm_event_fixed_param */
  26291. A_UINT32 tlv_header;
  26292. /** Unique id identifying the VDEV */
  26293. A_UINT32 vdev_id;
  26294. /**
  26295. * Unique token Id generated on the initiator/responder
  26296. * side used for a NDP session between two NAN devices
  26297. */
  26298. A_UINT32 ndp_instance_id;
  26299. /** NDI mac address of the peer (required to derive target ipv6 address) */
  26300. wmi_mac_addr peer_ndi_mac_addr;
  26301. /** Response Code defined in wmi_ndp_rsp_code */
  26302. A_UINT32 rsp_code;
  26303. /** Number of bytes in TLV wmi_ndp_cfg */
  26304. A_UINT32 ndp_cfg_len;
  26305. /** Number of bytes in TLV wmi_ndp_app_info */
  26306. A_UINT32 ndp_app_info_len;
  26307. /** Reason Code */
  26308. A_UINT32 reason_code;
  26309. /** Number of active ndps on this peer */
  26310. A_UINT32 num_active_ndps_on_peer;
  26311. /** Number of channels on this peer */
  26312. A_UINT32 num_ndp_channels;
  26313. /**
  26314. * TLV (tag length value) parameters follow the ndp_confirm
  26315. * structure. The TLV's are:
  26316. * A_UINT8 ndp_cfg[];
  26317. * A_UINT8 ndp_app_info[];
  26318. * wmi_channel ndp_channel_list[];
  26319. * A_UINT32 nss_list[]; // Nss indexing should match with channel indexing,
  26320. * // since Nss is associated with the channel
  26321. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  26322. */
  26323. } wmi_ndp_confirm_event_fixed_param_PROTOTYPE;
  26324. #define wmi_ndp_confirm_event_fixed_param wmi_ndp_confirm_event_fixed_param_PROTOTYPE
  26325. /**
  26326. * Event indication received on the initiator/responder side terminating a NDP session
  26327. */
  26328. typedef struct {
  26329. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_indication */
  26330. A_UINT32 tlv_header;
  26331. /** type defined in wmi_ndp_end_type */
  26332. A_UINT32 type;
  26333. /** Unique id identifying the VDEV */
  26334. A_UINT32 vdev_id;
  26335. /** reason_code defined in wmi_ndp_end_reason_code */
  26336. A_UINT32 reason_code;
  26337. /** NDP instance id */
  26338. A_UINT32 ndp_instance_id;
  26339. /** NDI MAC addr of the peer */
  26340. wmi_mac_addr peer_ndi_mac_addr;
  26341. /** Number of active ndps on this peer */
  26342. A_UINT32 num_active_ndps_on_peer;
  26343. } wmi_ndp_end_indication_PROTOTYPE;
  26344. #define wmi_ndp_end_indication wmi_ndp_end_indication_PROTOTYPE
  26345. typedef struct
  26346. {
  26347. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndl_schedule_update_fixed_param */
  26348. /** Unique id identifying the VDEV */
  26349. A_UINT32 vdev_id;
  26350. /** peer MAC address */
  26351. wmi_mac_addr peer_macaddr;
  26352. /** Flags:
  26353. * Bit 0 -> Nss updated
  26354. * Bit 1 -> channel list updated
  26355. * Bits 2-31 -> Reserved
  26356. */
  26357. A_UINT32 flags;
  26358. /** num of channels */
  26359. A_UINT32 num_channels;
  26360. /** num of ndp instances */
  26361. A_UINT32 num_ndp_instances;
  26362. /**
  26363. * TLV (tag length value) parameters follow the ndl_schedule_update
  26364. * structure. The TLV's are:
  26365. * A_UINT32 ndp_instance_list[];
  26366. * wmi_channel ndl_channel_list[];
  26367. * A_UINT32 nss_list[]; // Nss indexing should match with channel indexing,
  26368. * // since Nss is associate with a channel
  26369. */
  26370. } wmi_ndl_schedule_update_fixed_param_PROTOTYPE;
  26371. #define wmi_ndl_schedule_update_fixed_param wmi_ndl_schedule_update_fixed_param_PROTOTYPE
  26372. typedef struct {
  26373. A_UINT32 tlv_header;
  26374. A_UINT32 num_data;
  26375. /* followed by WMITLV_TAG_ARRAY_BYTE */
  26376. } wmi_diag_data_container_event_fixed_param;
  26377. enum {
  26378. WMI_PDEV_PARAM_TXPOWER_REASON_NONE = 0,
  26379. WMI_PDEV_PARAM_TXPOWER_REASON_SAR,
  26380. WMI_PDEV_PARAM_TXPOWER_REASON_MAX
  26381. };
  26382. #define PDEV_PARAM_TXPOWER_VALUE_MASK 0x000000FF
  26383. #define PDEV_PARAM_TXPOWER_VALUE_SHIFT 0
  26384. #define PDEV_PARAM_TXPOWER_REASON_MASK 0x0000FF00
  26385. #define PDEV_PARAM_TXPOWER_REASON_SHIFT 8
  26386. #define SET_PDEV_PARAM_TXPOWER_VALUE(txpower_param, value) \
  26387. ((txpower_param) &= ~PDEV_PARAM_TXPOWER_VALUE_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_VALUE_SHIFT))
  26388. #define SET_PDEV_PARAM_TXPOWER_REASON(txpower_param, value) \
  26389. ((txpower_param) &= ~PDEV_PARAM_TXPOWER_REASON_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_REASON_SHIFT))
  26390. #define GET_PDEV_PARAM_TXPOWER_VALUE(txpower_param) \
  26391. (((txpower_param) & PDEV_PARAM_TXPOWER_VALUE_MASK) >> PDEV_PARAM_TXPOWER_VALUE_SHIFT)
  26392. #define GET_PDEV_PARAM_TXPOWER_REASON(txpower_param) \
  26393. (((txpower_param) & PDEV_PARAM_TXPOWER_REASON_MASK) >> PDEV_PARAM_TXPOWER_REASON_SHIFT)
  26394. #define PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK 0x00000001
  26395. #define PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT 0
  26396. #define SET_PDEV_SMART_CHAINMASK_SCHEME_DECISION(param, value) \
  26397. do { \
  26398. (param) &= ~PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK; \
  26399. (param) |= (value) << PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT; \
  26400. } while (0)
  26401. #define GET_PDEV_SMART_CHAINMASK_SCHEME_DECISION(param) \
  26402. (((param) & PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK) >> PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT)
  26403. /**
  26404. * This command is sent from WLAN host driver to firmware to
  26405. * notify the current modem power state. Host would receive a
  26406. * message from modem when modem is powered on. Host driver
  26407. * would then send this command to firmware. Firmware would then
  26408. * power on WCI-2 (UART) interface for LTE/MWS Coex.
  26409. *
  26410. * This command is only applicable for APQ platform which has
  26411. * modem on the platform. If firmware doesn't support MWS Coex,
  26412. * this command can be dropped by firmware.
  26413. *
  26414. * This is a requirement from modem team that WCN can't toggle
  26415. * UART before modem is powered on.
  26416. */
  26417. typedef struct {
  26418. /** TLV tag and len; tag equals
  26419. * WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param */
  26420. A_UINT32 tlv_header;
  26421. /** Modem power state parameter */
  26422. A_UINT32 modem_power_state;
  26423. } wmi_modem_power_state_cmd_param;
  26424. enum {
  26425. WMI_MODEM_STATE_OFF = 0,
  26426. WMI_MODEM_STATE_ON
  26427. };
  26428. /**
  26429. * This command is sent from WLAN host driver to firmware to
  26430. * notify the updated Specific Absorption Rate (SAR) limits.
  26431. * A critical regulation for FCC compliance, OEMs require methods to set
  26432. * limits on TX power of WLAN/WWAN.
  26433. * Host would receive instructions on what to set the limits per
  26434. * band/chain/modulation to, it would then interpret and send the limits
  26435. * to FW using this WMI message.
  26436. * Since it is possible to have too many commands to fit into one message,
  26437. * FW will keep receiving the messages, until it finds one with
  26438. * commit_limits = 1, at which point it will apply all the received
  26439. * specifications.
  26440. */
  26441. typedef struct {
  26442. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limits_cmd_param */
  26443. A_UINT32 tlv_header;
  26444. /** when set to WMI_SAR_FEATURE_ON_*, enable SAR feature
  26445. * with BDF (SET_0 to 4) or WMI
  26446. * if set to WMI_SAR_FEATURE_OFF, disable feature;
  26447. * if set to WMI_SAR_FEATURE_NO_CHANGE, do not alter state of feature;
  26448. */
  26449. A_UINT32 sar_enable;
  26450. /** number of items in sar_limits[] */
  26451. A_UINT32 num_limit_rows;
  26452. /** once received and is set to 1, FW will calculate the power limits
  26453. * and send set_power command to apply them.
  26454. * Otherwise just update local values stored in FW until a future msg
  26455. * with commit_limits=1 arrives.
  26456. */
  26457. A_UINT32 commit_limits;
  26458. /**
  26459. * TLV (tag length value) parameters follow the sar_limit_cmd_row
  26460. * structure. The TLV's are:
  26461. * wmi_sar_limit_cmd_row sar_limits[];
  26462. */
  26463. } wmi_sar_limits_cmd_fixed_param;
  26464. enum wmi_sar_feature_state_flags {
  26465. WMI_SAR_FEATURE_OFF = 0,
  26466. WMI_SAR_FEATURE_ON_SET_0,
  26467. WMI_SAR_FEATURE_ON_SET_1,
  26468. WMI_SAR_FEATURE_ON_SET_2,
  26469. WMI_SAR_FEATURE_ON_SET_3,
  26470. WMI_SAR_FEATURE_ON_SET_4,
  26471. WMI_SAR_FEATURE_NO_CHANGE,
  26472. WMI_SAR_FEATURE_ON_USER_DEFINED,
  26473. WMI_SAR_FEATURE_ON_SAR_V2_0,
  26474. WMI_SAR_FEATURE_ON_SAR_V3,
  26475. };
  26476. typedef struct {
  26477. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limit_cmd_row */
  26478. /** Current values: WMI_SAR_2G_ID, WMI_SAR_5G_ID. Can be extended by adding
  26479. * new band_id values .
  26480. */
  26481. A_UINT32 band_id;
  26482. A_UINT32 chain_id;
  26483. /** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */
  26484. A_UINT32 mod_id;
  26485. /**
  26486. * To be backwards-compatible with older code use a union with
  26487. * limit_value & limit_index as alternate names / interpretations
  26488. * of the same message information element.
  26489. * The older code still uses limit_value, while the new code will
  26490. * use limit_index.
  26491. * The interpretation of the field as value or index depends on
  26492. * WMI_SAR_FEATURE_ON_*
  26493. * WMI_SAR_FEATURE_ON_SAR_V2_0 will use it as index, other case
  26494. * still use it as value.
  26495. */
  26496. union {
  26497. /** actual power limit value, in steps of 0.5 dBm */
  26498. A_UINT32 limit_value;
  26499. A_UINT32 limit_index;
  26500. };
  26501. /** in case the OEM doesn't care about one of the qualifiers from above,
  26502. * the bit for that qualifier within the validity_bitmap can be set to 0
  26503. * so that limit is applied to all possible cases of this qualifier
  26504. * (i.e. if a qualifier's validity_bitmap flag is 0, the qualifier is
  26505. * treated as a wildcard).
  26506. * Current masks:
  26507. * WMI_SAR_BAND_ID_VALID_MASK
  26508. * WMI_SAR_CHAIN_ID_VALID_MASK
  26509. * WMI_SAR_MOD_ID_VALID_MASK
  26510. * Example: if !WMI_IS_SAR_MOD_ID_VALID(bitmap),
  26511. * it means apply same limit_value to both WMI_SAR_MOD_CCK and
  26512. * WMI_SAR_MOD_OFDM cases.
  26513. */
  26514. A_UINT32 validity_bitmap;
  26515. } wmi_sar_limit_cmd_row;
  26516. enum wmi_sar_band_id_flags {
  26517. WMI_SAR_2G_ID = 0,
  26518. WMI_SAR_5G_ID
  26519. };
  26520. enum wmi_sar_mod_id_flags {
  26521. WMI_SAR_MOD_CCK = 0,
  26522. WMI_SAR_MOD_OFDM
  26523. };
  26524. /**
  26525. * This message is sent from FW to WLAN host to inform the host of the
  26526. * updated Specific Absorption Rate (SAR) limits currently in use.
  26527. */
  26528. typedef struct {
  26529. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limits_event_param */
  26530. A_UINT32 tlv_header;
  26531. /** when set to WMI_SAR_FEATURE_ON_*, SAR feature is enabled
  26532. * with BDF (SET_0 to 4) or WMI
  26533. * if set to WMI_SAR_FEATURE_OFF, feature is disabled;
  26534. */
  26535. A_UINT32 sar_enable;
  26536. /**
  26537. * number of items in sar_limits[].
  26538. * used when sar_enable == WMI_SAR_FEATURE_ON_USER_DEFINED.
  26539. * Should be zero if any of the BDF sets is activated.
  26540. */
  26541. A_UINT32 num_limit_rows;
  26542. /**
  26543. * TLV (tag length value) parameters follow the sar_get_limit_event_row
  26544. * structure. The TLV's are:
  26545. * wmi_sar_get_limit_event_row sar_limits[num_limit_rows];
  26546. */
  26547. } wmi_sar_get_limits_event_fixed_param;
  26548. typedef struct {
  26549. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limit_event_row */
  26550. /** Current values: WMI_SAR_2G_ID, WMI_SAR_5G_ID. Can be extended by adding
  26551. * new band_id values .
  26552. */
  26553. A_UINT32 band_id;
  26554. A_UINT32 chain_id;
  26555. /** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */
  26556. A_UINT32 mod_id;
  26557. /** actual power limit value, in steps of 0.5 dBm */
  26558. A_UINT32 limit_value;
  26559. } wmi_sar_get_limit_event_row;
  26560. #define WMI_SAR_BAND_ID_VALID_MASK (0x1)
  26561. #define WMI_SAR_CHAIN_ID_VALID_MASK (0x2)
  26562. #define WMI_SAR_MOD_ID_VALID_MASK (0x4)
  26563. #define WMI_SET_SAR_BAND_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_BAND_ID_VALID_MASK)
  26564. #define WMI_SET_SAR_CHAIN_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_CHAIN_ID_VALID_MASK)
  26565. #define WMI_SET_SAR_MOD_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_MOD_ID_VALID_MASK)
  26566. #define WMI_IS_SAR_BAND_ID_VALID(bitmap) ((bitmap) & WMI_SAR_BAND_ID_VALID_MASK)
  26567. #define WMI_IS_SAR_CHAIN_ID_VALID(bitmap) ((bitmap) & WMI_SAR_CHAIN_ID_VALID_MASK)
  26568. #define WMI_IS_SAR_MOD_ID_VALID(bitmap) ((bitmap) & WMI_SAR_MOD_ID_VALID_MASK)
  26569. /**
  26570. * This command is sent from WLAN host driver to firmware to
  26571. * get current Specific Absorption Rate (SAR) limits status from firmware.
  26572. * The command does not require any parameters as of now.
  26573. */
  26574. typedef struct {
  26575. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limits_cmd_param */
  26576. A_UINT32 tlv_header;
  26577. /** currently no parameters are required. Reserved bit field for future use added */
  26578. /* All bits need to be set to 0 while it is a reserved field. */
  26579. A_UINT32 reserved;
  26580. } wmi_sar_get_limits_cmd_fixed_param;
  26581. #define WMI_ROAM_AUTH_STATUS_CONNECTED 0x1 /** connected, but not authenticated */
  26582. #define WMI_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 /** connected and authenticated */
  26583. /** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic
  26584. generated whenever firmware roamed to new AP silently and
  26585. (a) If the host is awake, FW sends the event to the host immediately .
  26586. (b) If host is in sleep then either
  26587. (1) FW waits until host sends WMI_PDEV_RESUME_CMDID or WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID
  26588. command to FW (part of host wake up sequence from low power mode) before sending the event host.
  26589. (2) data/mgmt frame is received from roamed AP, which needs to return to host
  26590. */
  26591. #define GTK_OFFLOAD_KCK_EXTENDED_BYTES 32
  26592. typedef struct {
  26593. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material */
  26594. A_UINT32 tlv_header;
  26595. A_UINT8 kck[GTK_OFFLOAD_KCK_BYTES]; /* EAPOL-Key Key Confirmation Key (KCK) */
  26596. A_UINT8 kek[GTK_OFFLOAD_KEK_BYTES]; /* EAPOL-Key Key Encryption Key (KEK) */
  26597. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES];
  26598. } wmi_key_material;
  26599. typedef struct {
  26600. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material_ext */
  26601. A_UINT32 tlv_header;
  26602. /*
  26603. * key_buffer contains kck,kck2,kek,kek2,replay counter, in order.
  26604. * If both the below kck_len and kek_len fields are 0x0, the split
  26605. * between kck vs. kek should be inferred based on akmp.
  26606. */
  26607. A_UINT8 key_buffer[GTK_OFFLOAD_KEK_EXTENDED_BYTES+GTK_OFFLOAD_KCK_EXTENDED_BYTES+GTK_REPLAY_COUNTER_BYTES];
  26608. /* length of kck in key_buffer */
  26609. A_UINT32 kck_len;
  26610. /* length of kek in key_buffer */
  26611. A_UINT32 kek_len;
  26612. } wmi_key_material_ext;
  26613. typedef struct {
  26614. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param */
  26615. /** Unique id identifying the VDEV on which roaming is done by firmware */
  26616. A_UINT32 vdev_id;
  26617. /** auth_status: connected or authorized */
  26618. A_UINT32 auth_status;
  26619. /** roam_reason:
  26620. * bits 0-3 roam trigger reason LSbs - see WMI_ROAM_TRIGGER_REASON_XXX
  26621. * bits 4-5 subnet status - see WMI_ROAM_SUBNET_CHANGE_STATUS_XXX.
  26622. * bit 6 HW mode status, set 1 to indicate host to schedule
  26623. * HW mode change, see WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE.
  26624. * bit 7 0x1 to show bits 8-15 are valid
  26625. * bits 8-15 full WMI_ROAM_TRIGGER_REASON_ID/WMI_ROAM_TRIGGER_EXT_REASON_ID
  26626. * since 4 bits are not enough.
  26627. */
  26628. A_UINT32 roam_reason;
  26629. /** associated AP's RSSI calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */
  26630. A_UINT32 rssi;
  26631. /** MAC address of roamed AP */
  26632. wmi_mac_addr bssid; /* BSSID */
  26633. /** whether the frame is beacon or probe rsp */
  26634. A_UINT32 is_beacon;
  26635. /** the length of beacon/probe rsp */
  26636. A_UINT32 bcn_probe_rsp_len;
  26637. /** the length of reassoc rsp */
  26638. A_UINT32 reassoc_rsp_len;
  26639. /** the length of reassoc req */
  26640. A_UINT32 reassoc_req_len;
  26641. /**
  26642. * maximum allowed Tx power (in dBm) for this connection.
  26643. * max_allowed_tx_power = 0 dBm means value is not specified.
  26644. */
  26645. A_INT32 max_allowed_tx_power;
  26646. /** unique id to identify mac's TSF register */
  26647. A_UINT32 mac_tsf_id;
  26648. /** ignore mac_tsf_id unless mac_tsf_id_valid is set */
  26649. A_UINT32 mac_tsf_id_valid;
  26650. /**
  26651. * TLV (tag length value) parameters follows roam_synch_event
  26652. * The TLV's are:
  26653. * A_UINT8 bcn_probe_rsp_frame[bcn_probe_resp_len];
  26654. * A_UINT8 reassoc_rsp_frame[reassoc_rsp_len];
  26655. * wmi_channel chan;
  26656. * wmi_key_material key[];
  26657. * A_UINT32 status[]; subnet changed status not being used currently.
  26658. * Will pass the information using roam_status.
  26659. * A_UINT8 reassoc_req_frame[reassoc_req_len];
  26660. * wmi_pdev_hw_mode_transition_event_fixed_param
  26661. * hw_mode_transition_fixed_param[];
  26662. * wmi_pdev_set_hw_mode_response_vdev_mac_entry
  26663. * wmi_pdev_set_hw_mode_response_vdev_mac_mapping[];
  26664. * wmi_roam_fils_synch_tlv_param roam_fils_synch_info[];
  26665. * wmi_key_material_ext key_ext[];
  26666. * wmi_roam_pmk_cache_synch_tlv_param roam_pmk_cache_synch_info[];
  26667. * wmi_pdev_band_to_mac mac_freq_mapping[];
  26668. */
  26669. } wmi_roam_synch_event_fixed_param;
  26670. /**
  26671. * The WMI_ROAM_SYNCH_FRAME_EVENTID message is used in conjunction with the
  26672. * WMI_ROAM_SYNCH_EVENTID message. The former will be sent 1st followed by
  26673. * the latter for cases where the WMI_ROAM_SYNCH_EVENTID message size would
  26674. * exceed 2K. The more_frag field in the WMI_ROAM_SYNCH_FRAME_EVENTID informs
  26675. * the host whether more WMI_ROAM_SYNCH_FRAME_EVENTID messages would follow;
  26676. * after the WMI_ROAM_SYNCH_FRAME_EVENTID messages the target sends the
  26677. * WMI_ROAM_SYNCH_EVENTID with bcn_probe_rsp_len, reassoc_rsp_len, and
  26678. * reassoc_rsp_len set to 0.
  26679. */
  26680. typedef struct {
  26681. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_frame_event_fixed_param */
  26682. /** Unique id identifying the VDEV on which roaming is done by firmware */
  26683. A_UINT32 vdev_id;
  26684. /** More frags to follow? */
  26685. A_UINT32 more_frag;
  26686. /** whether the frame is beacon or probe rsp */
  26687. A_UINT32 is_beacon;
  26688. /** the length of beacon/probe rsp */
  26689. A_UINT32 bcn_probe_rsp_len;
  26690. /** the length of reassoc rsp */
  26691. A_UINT32 reassoc_rsp_len;
  26692. /** the length of reassoc req */
  26693. A_UINT32 reassoc_req_len;
  26694. A_INT32 bcn_probe_resp_rssi; /* RSSI units dBm */
  26695. /**
  26696. * TLV (tag length value) parameters follows roam_synch_event
  26697. * The TLV's are:
  26698. * A_UINT8 bcn_probe_rsp_frame[bcn_probe_rsp_len];
  26699. * A_UINT8 reassoc_rsp_frame[reassoc_rsp_len];
  26700. * A_UINT8 reassoc_req_frame[reassoc_req_len];
  26701. */
  26702. } wmi_roam_synch_frame_event_fixed_param;
  26703. typedef struct {
  26704. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_frame_event_fixed_param */
  26705. /** Unique id identifying the VDEV on which roaming is done by firmware */
  26706. A_UINT32 vdev_id;
  26707. /* Exact frame length without considering 4 byte alignment */
  26708. A_UINT32 frame_length;
  26709. A_INT32 rssi; /* Units in dBm */
  26710. /* The frequency on which to transmit. */
  26711. A_UINT32 primary_channel_freq; /* MHz units */
  26712. /**
  26713. * TLV (tag length value) parameters follows roam_frame_event
  26714. * The TLV's are:
  26715. * A_UINT8 frame[frame_length];
  26716. */
  26717. } wmi_roam_frame_event_fixed_param;
  26718. #define WMI_PEER_ESTIMATED_LINKSPEED_INVALID 0xFFFFFFFF
  26719. typedef struct {
  26720. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_get_estimated_linkspeed_cmd_fixed_param */
  26721. A_UINT32 tlv_header;
  26722. /** MAC address of the peer for which the estimated link speed is required. */
  26723. wmi_mac_addr peer_macaddr;
  26724. /* Set to 1 only if vdev_id field is valid */
  26725. A_UINT32 valid_vdev_id;
  26726. /* VDEV to which the peer belongs to */
  26727. A_UINT32 vdev_id;
  26728. } wmi_peer_get_estimated_linkspeed_cmd_fixed_param;
  26729. typedef struct {
  26730. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_estimated_linkspeed_event_fixed_param */
  26731. A_UINT32 tlv_header;
  26732. /** MAC address of the peer for which the estimated link speed is required.
  26733. */
  26734. wmi_mac_addr peer_macaddr;
  26735. /* Estimated link speed in kbps.
  26736. * When est_linkspeed_kbps is not valid, the value is set to WMI_PEER_ESTIMATED_LINKSPEED_INVALID.
  26737. */
  26738. A_UINT32 est_linkspeed_kbps;
  26739. /* Set to 1 only if vdev_id field is valid */
  26740. A_UINT32 valid_vdev_id;
  26741. /* VDEV to which the peer belongs to */
  26742. A_UINT32 vdev_id;
  26743. } wmi_peer_estimated_linkspeed_event_fixed_param;
  26744. typedef struct {
  26745. A_UINT32 tlv_header; /* TLV tag and len; tag equals */
  26746. /* vdev ID */
  26747. A_UINT32 vdev_id;
  26748. A_UINT32 data_len; /** length in byte of data[]. */
  26749. /* This structure is used to send REQ binary blobs
  26750. * from application/service to firmware where Host drv is pass through .
  26751. * Following this structure is the TLV:
  26752. * A_UINT8 data[]; <-- length in byte given by field data_len.
  26753. * A_UINT32 vdev_id_bitmap[];
  26754. * This array is present and non-zero length in MLO case, stats should
  26755. * only be provided from the vdev_id_bitmap in the bitmap when it is
  26756. * present.
  26757. */
  26758. } wmi_req_stats_ext_cmd_fixed_param;
  26759. typedef struct {
  26760. /** TLV tag and len; tag equals
  26761. * WMITLV_TAG_STRUC_wmi_partner_link_stats */
  26762. A_UINT32 tlv_header;
  26763. A_UINT32 vdev_id;
  26764. A_UINT32 data_length; /* length of the stats for this vdev */
  26765. A_UINT32 offset; /* offset of the stats from partner_link_data for this vdev */
  26766. } wmi_partner_link_stats;
  26767. typedef struct {
  26768. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats1_event_fix_param */
  26769. A_UINT32 vdev_id; /** vdev ID */
  26770. A_UINT32 data_len; /** length in byte of data[]. */
  26771. /* This structure is used to send REQ binary blobs
  26772. * from firmware to application/service where Host drv is pass through .
  26773. * Following this structure is the TLV:
  26774. * A_UINT8 data[]; <-- length in byte given by field data_len.
  26775. */
  26776. /* This structure is used to send information of partner links.
  26777. * Following this structure is the TLV:
  26778. * wmi_partner_link_stats partner_link_stats[];
  26779. */
  26780. /* This structure is used to send REQ binary blobs of stats of partner
  26781. * links from firmware to application/service where Host drv is pass
  26782. * through.
  26783. * Following this structure is the TLV partner_link_stats:
  26784. * A_UINT8 partner_link_stats_data[]; <-- length and offset in byte
  26785. * units given by TLV
  26786. * wmi_partner_link_stats.
  26787. */
  26788. } wmi_stats_ext_event_fixed_param;
  26789. typedef enum {
  26790. /** Default: no replay required. */
  26791. WMI_PEER_DELETE_NO_REPLAY = 0,
  26792. /**
  26793. * Replay requested due to UMAC hang during Peer delete.
  26794. * Replay done by Host SW after MLO UMAC SSR recovered the UMAC.
  26795. */
  26796. WMI_PEER_DELETE_REPLAY_FOR_UMAC,
  26797. } WMI_PEER_DELETE_REPLAY_T;
  26798. typedef struct {
  26799. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_resp_event_fixed_param */
  26800. /** unique id identifying the VDEV, generated by the caller */
  26801. A_UINT32 vdev_id;
  26802. /** peer MAC address */
  26803. wmi_mac_addr peer_macaddr;
  26804. /** WMI_PEER_DELETE_REPLAY_T */
  26805. A_UINT32 replay_type;
  26806. } wmi_peer_delete_resp_event_fixed_param;
  26807. typedef struct {
  26808. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_all_peer_resp_event_fixed_param */
  26809. /** unique id identifying the VDEV, generated by the caller */
  26810. A_UINT32 vdev_id;
  26811. /* Status of peer delete all command */
  26812. /*
  26813. * Values for Status:
  26814. * 0 - OK; command successful
  26815. * 1 - EINVAL; Requested invalid vdev_id
  26816. * 2 - EFAILED; Delete all peer failed
  26817. */
  26818. A_UINT32 status;
  26819. /** WMI_PEER_DELETE_REPLAY_T */
  26820. A_UINT32 replay_type;
  26821. } wmi_vdev_delete_all_peer_resp_event_fixed_param;
  26822. typedef struct {
  26823. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */
  26824. A_UINT32 tlv_header;
  26825. A_UINT32 vdev_id; /* vdev ID */
  26826. /* MAC address of the peer for which the estimated link speed is required.*/
  26827. wmi_mac_addr peer_macaddr;
  26828. A_UINT32 state; /* peer state */
  26829. } wmi_peer_state_event_fixed_param;
  26830. typedef struct {
  26831. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param */
  26832. A_UINT32 tlv_header;
  26833. /* unique id identifying the VDEV, generated by the caller */
  26834. A_UINT32 vdev_id;
  26835. /* peer MAC address */
  26836. wmi_mac_addr peer_macaddr;
  26837. /* status
  26838. * 0: ok
  26839. * 1: fail - peer not present
  26840. */
  26841. A_UINT32 status;
  26842. } wmi_peer_assoc_conf_event_fixed_param;
  26843. typedef struct {
  26844. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_conf_event_fixed_param */
  26845. A_UINT32 tlv_header;
  26846. /* unique id identifying the VDEV, generated by the caller */
  26847. A_UINT32 vdev_id;
  26848. /* peer MAC address */
  26849. wmi_mac_addr peer_macaddr;
  26850. /* 0: OK.
  26851. * 1: FAIL - same bss peer exist already. */
  26852. A_UINT32 status;
  26853. } wmi_peer_create_conf_event_fixed_param;
  26854. enum {
  26855. WMI_2G4_HT40_OBSS_SCAN_PASSIVE = 0, /** scan_type: passive */
  26856. WMI_2G4_HT40_OBSS_SCAN_ACTIVE, /** scan_type: active */
  26857. };
  26858. typedef struct {
  26859. /**
  26860. * TLV tag and len;
  26861. * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_enable_cmd_fixed_param
  26862. */
  26863. A_UINT32 tlv_header;
  26864. A_UINT32 vdev_id;
  26865. /**
  26866. * active or passive. if active all the channels are actively scanned.
  26867. * if passive then all the channels are passively scanned
  26868. */
  26869. A_UINT32 scan_type;
  26870. /**
  26871. * FW can perform multiple scans with in a OBSS scan interval.
  26872. * For each scan,
  26873. * if the scan is passive then obss_scan_passive_dwell is minimum dwell to be used for each channel ,
  26874. * if the scan is active then obss_scan_active_dwell is minimum dwell to be used for each channel .
  26875. * The unit for these 2 parameters is TUs.
  26876. */
  26877. A_UINT32 obss_scan_passive_dwell;
  26878. A_UINT32 obss_scan_active_dwell;
  26879. /**
  26880. * OBSS scan interval . FW needs to perform one or more OBSS scans within this interval and fulfill the
  26881. * both min and total per channel dwell time requirement
  26882. */
  26883. A_UINT32 bss_channel_width_trigger_scan_interval;
  26884. /**
  26885. * FW can perform multiple scans with in a OBSS scan interval.
  26886. * For each scan,
  26887. * the total per channel dwell time across all scans with in OBSS scan interval should be
  26888. * atleast obss_scan_passive_total_per channel for passive scas and obss_scan_active_total_per channel
  26889. * for active scans and ,
  26890. * The unit for these 2 parameters is TUs.
  26891. */
  26892. A_UINT32 obss_scan_passive_total_per_channel;
  26893. A_UINT32 obss_scan_active_total_per_channel;
  26894. A_UINT32 bss_width_channel_transition_delay_factor; /** parameter to check exemption from scan */
  26895. A_UINT32 obss_scan_activity_threshold; /** parameter to check exemption from scan */
  26896. /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */
  26897. A_UINT32 forty_mhz_intolerant; /** STA 40M bandwidth intolerant capability */
  26898. A_UINT32 current_operating_class; /** STA current operating class */
  26899. /** length of 2.4GHz channel list to scan at, channel number list in tlv->channels[] */
  26900. A_UINT32 channel_len;
  26901. /** length of optional ie data to append to probe request when active scan, ie data in tlv->ie_field[] */
  26902. A_UINT32 ie_len;
  26903. /**
  26904. * TLV (tag length value) parameters following the fixed param structure
  26905. * A_UINT8 channels[channel_len]; // channel numbers
  26906. * A_UINT8 ie_field[ie_len];
  26907. * A_UINT32 chan_freqs[channel_len] // in MHz
  26908. */
  26909. } wmi_obss_scan_enable_cmd_fixed_param;
  26910. typedef struct {
  26911. /**
  26912. * TLV tag and len;
  26913. * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_disalbe_cmd_fixed_param
  26914. */
  26915. A_UINT32 tlv_header;
  26916. A_UINT32 vdev_id;
  26917. } wmi_obss_scan_disable_cmd_fixed_param;
  26918. typedef struct {
  26919. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_prb_rsp_tx_status_event_fixed_param */
  26920. A_UINT32 tlv_header;
  26921. /** unique id identifying the VDEV */
  26922. A_UINT32 vdev_id;
  26923. /** prb rsp tx status, values defined in enum WMI_FRAME_TX_STATUS */
  26924. A_UINT32 tx_status;
  26925. } wmi_offload_prb_rsp_tx_status_event_fixed_param;
  26926. typedef enum {
  26927. WMI_FRAME_TX_OK, /* frame tx ok */
  26928. WMI_FRAME_TX_XRETRY, /* excessivley retried */
  26929. WMI_FRAME_TX_DROP, /* frame dropped by FW due to resources */
  26930. WMI_FRAME_TX_FILTERED, /* frame filtered by hardware */
  26931. } WMI_FRAME_TX_STATUS;
  26932. /**
  26933. * This command is sent from WLAN host driver to firmware to
  26934. * request firmware to send the latest channel avoidance range
  26935. * to host.
  26936. *
  26937. * This command is only applicable for APQ platform which has
  26938. * modem on the platform. If firmware doesn't support MWS Coex,
  26939. * this command can be dropped by firmware.
  26940. *
  26941. * Host would send this command to firmware to request a channel
  26942. * avoidance information update.
  26943. */
  26944. typedef struct {
  26945. /** TLV tag and len; tag equals
  26946. * WMITLV_TAG_STRUC_wmi_chan_avoid_update_cmd_param */
  26947. A_UINT32 tlv_header;
  26948. } wmi_chan_avoid_update_cmd_param;
  26949. /* ExtScan operation mode */
  26950. typedef enum {
  26951. WMI_EXTSCAN_MODE_NONE = 0x0000,
  26952. WMI_EXTSCAN_MODE_START = 0x0001, /* ExtScan/TableMonitoring operation started */
  26953. WMI_EXTSCAN_MODE_STOP = 0x0002, /* ExtScan/TableMonitoring operation stopped */
  26954. WMI_EXTSCAN_MODE_IGNORED = 0x0003, /* ExtScan command ignored due to error */
  26955. } wmi_extscan_operation_mode;
  26956. /* Channel Mask */
  26957. typedef enum {
  26958. WMI_CHANNEL_BAND_UNSPECIFIED = 0x0000,
  26959. WMI_CHANNEL_BAND_24 = 0x0001, /* 2.4 channel */
  26960. WMI_CHANNEL_BAND_5_NON_DFS = 0x0002, /* 5G Channels (No DFS channels) */
  26961. WMI_CHANNEL_BAND_DFS = 0x0004, /* DFS channels */
  26962. } wmi_channel_band_mask;
  26963. typedef enum {
  26964. WMI_EXTSCAN_CYCLE_STARTED_EVENT = 0x0001,
  26965. WMI_EXTSCAN_CYCLE_COMPLETED_EVENT = 0x0002,
  26966. WMI_EXTSCAN_BUCKET_STARTED_EVENT = 0x0004,
  26967. WMI_EXTSCAN_BUCKET_COMPLETED_EVENT = 0x0008,
  26968. WMI_EXTSCAN_BUCKET_FAILED_EVENT = 0x0010,
  26969. WMI_EXTSCAN_BUCKET_OVERRUN_EVENT = 0x0020,
  26970. WMI_EXTSCAN_THRESHOLD_NUM_SCANS = 0x0040,
  26971. WMI_EXTSCAN_THRESHOLD_PERCENT = 0x0080,
  26972. WMI_EXTSCAN_EVENT_MAX = 0x8000
  26973. } wmi_extscan_event_type;
  26974. #define WMI_EXTSCAN_CYCLE_EVENTS_MASK (WMI_EXTSCAN_CYCLE_STARTED_EVENT | \
  26975. WMI_EXTSCAN_CYCLE_COMPLETED_EVENT)
  26976. #define WMI_EXTSCAN_BUCKET_EVENTS_MASK (WMI_EXTSCAN_BUCKET_STARTED_EVENT | \
  26977. WMI_EXTSCAN_BUCKET_COMPLETED_EVENT | \
  26978. WMI_EXTSCAN_BUCKET_FAILED_EVENT | \
  26979. WMI_EXTSCAN_BUCKET_OVERRUN_EVENT)
  26980. typedef enum {
  26981. WMI_EXTSCAN_NO_FORWARDING = 0x0000,
  26982. WMI_EXTSCAN_FORWARD_FRAME_TO_HOST = 0x0001
  26983. } wmi_extscan_forwarding_flags;
  26984. typedef enum {
  26985. WMI_EXTSCAN_USE_MSD = 0x0001, /* Use Motion Sensor Detection */
  26986. WMI_EXTSCAN_EXTENDED_BATCHING_EN = 0x0002, /* Extscan LPASS extended batching feature is supported and enabled */
  26987. } wmi_extscan_configuration_flags;
  26988. typedef enum {
  26989. WMI_EXTSCAN_BUCKET_CACHE_RESULTS = 0x0001, /* Cache the results of bucket whose configuration flags has this bit set */
  26990. WMI_EXTSCAN_REPORT_EVENT_CONTEXT_HUB = 0x0002, /* Report ext scan results to context hub or not. */
  26991. } wmi_extscan_bucket_configuration_flags;
  26992. typedef enum {
  26993. WMI_EXTSCAN_STATUS_OK = 0,
  26994. WMI_EXTSCAN_STATUS_ERROR = 0x80000000,
  26995. WMI_EXTSCAN_STATUS_INVALID_PARAMETERS,
  26996. WMI_EXTSCAN_STATUS_INTERNAL_ERROR
  26997. } wmi_extscan_start_stop_status;
  26998. typedef struct {
  26999. /** Request ID - to identify command. Cannot be 0 */
  27000. A_UINT32 request_id;
  27001. /** Requestor ID - client requesting ExtScan */
  27002. A_UINT32 requestor_id;
  27003. /** VDEV id(interface) that is requesting scan */
  27004. A_UINT32 vdev_id;
  27005. } wmi_extscan_command_id;
  27006. typedef struct {
  27007. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27008. /** channel in MHz */
  27009. A_UINT32 channel;
  27010. /** dwell time in msec - use defaults if 0 */
  27011. A_UINT32 min_dwell_time;
  27012. A_UINT32 max_dwell_time;
  27013. /** passive/active channel and other flags */
  27014. A_UINT32 control_flags; /* 0 => active, 1 => passive scan; ignored for DFS */
  27015. } wmi_extscan_bucket_channel;
  27016. /* Scan Bucket specification */
  27017. typedef struct {
  27018. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27019. /** Bucket ID - 0-based */
  27020. A_UINT32 bucket_id;
  27021. /** ExtScan events subscription - events to be reported to client (see wmi_extscan_event_type) */
  27022. A_UINT32 notify_extscan_events;
  27023. /** Options to forward scan results - see wmi_extscan_forwarding_flags */
  27024. A_UINT32 forwarding_flags;
  27025. /** ExtScan configuration flags - wmi_extscan_bucket_configuration_flags */
  27026. A_UINT32 configuration_flags;
  27027. /** DEPRECATED member: multiplier to be applied to the periodic scan's base period */
  27028. A_UINT32 base_period_multiplier;
  27029. /** dwell time in msec on active channels - use defaults if 0 */
  27030. A_UINT32 min_dwell_time_active;
  27031. A_UINT32 max_dwell_time_active;
  27032. /** dwell time in msec on passive channels - use defaults if 0 */
  27033. A_UINT32 min_dwell_time_passive;
  27034. A_UINT32 max_dwell_time_passive;
  27035. /** see wmi_channel_band_mask; when equal to WMI_CHANNEL_UNSPECIFIED, use channel list */
  27036. A_UINT32 channel_band;
  27037. /** number of channels (if channel_band is WMI_CHANNEL_UNSPECIFIED) */
  27038. A_UINT32 num_channels;
  27039. /** scan period upon start or restart of the bucket - periodicity of the bucket to begin with */
  27040. A_UINT32 min_period;
  27041. /** period above which exponent is not applied anymore */
  27042. A_UINT32 max_period;
  27043. /** back off value to be applied to bucket's periodicity after exp_max_step_count scan cycles
  27044. * new_bucket_period = last_bucket_period + last_exponent_period * exp_backoff
  27045. */
  27046. A_UINT32 exp_backoff;
  27047. /** number of scans performed at a given periodicity after which exponential back off value is
  27048. * applied to current periodicity to obtain a newer one
  27049. */
  27050. A_UINT32 exp_max_step_count;
  27051. /** Followed by the variable length TLV chan_list:
  27052. * wmi_extscan_bucket_channel chan_list[] */
  27053. } wmi_extscan_bucket;
  27054. typedef struct {
  27055. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param */
  27056. /** Request ID - to identify command. Cannot be 0 */
  27057. A_UINT32 request_id;
  27058. /** Requestor ID - client requesting ExtScan */
  27059. A_UINT32 requestor_id;
  27060. /** VDEV id(interface) that is requesting scan */
  27061. A_UINT32 vdev_id;
  27062. /** table ID - to allow support for multiple simultaneous requests */
  27063. A_UINT32 table_id;
  27064. /** Base period (milliseconds) used by scan buckets to define periodicity of the scans */
  27065. A_UINT32 base_period;
  27066. /** Maximum number of iterations to run - one iteration is the scanning of the least frequent bucket */
  27067. A_UINT32 max_iterations;
  27068. /** Options to forward scan results - see wmi_extscan_forwarding_flags */
  27069. A_UINT32 forwarding_flags;
  27070. /** ExtScan configuration flags - wmi_extscan_configuration_flags */
  27071. A_UINT32 configuration_flags;
  27072. /** ExtScan events subscription - bitmask indicating which events should be send to client (see wmi_extscan_event_type) */
  27073. A_UINT32 notify_extscan_events;
  27074. /** Scan Priority, input to scan scheduler */
  27075. A_UINT32 scan_priority;
  27076. /** Maximum number of BSSIDs to cache on each scan cycle */
  27077. A_UINT32 max_bssids_per_scan_cycle;
  27078. /** Minimum RSSI value to report */
  27079. A_UINT32 min_rssi;
  27080. /** Maximum table usage in percentage */
  27081. A_UINT32 max_table_usage;
  27082. /** default dwell time in msec on active channels */
  27083. A_UINT32 min_dwell_time_active;
  27084. A_UINT32 max_dwell_time_active;
  27085. /** default dwell time in msec on passive channels */
  27086. A_UINT32 min_dwell_time_passive;
  27087. A_UINT32 max_dwell_time_passive;
  27088. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  27089. A_UINT32 min_rest_time;
  27090. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  27091. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  27092. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  27093. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  27094. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  27095. * irrespective of activity. activity is determined by the idle_time parameter.
  27096. */
  27097. A_UINT32 max_rest_time;
  27098. /** time before sending next set of probe requests.
  27099. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  27100. * The number of probe requests specified depends on the ssid_list and bssid_list
  27101. */
  27102. /** Max number of probes to be sent */
  27103. A_UINT32 n_probes;
  27104. /** time in msec between 2 sets of probe requests. */
  27105. A_UINT32 repeat_probe_time;
  27106. /** time in msec between 2 consecutive probe requests with in a set. */
  27107. A_UINT32 probe_spacing_time;
  27108. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  27109. A_UINT32 idle_time;
  27110. /** maximum time in msec allowed for scan */
  27111. A_UINT32 max_scan_time;
  27112. /** delay in msec before sending first probe request after switching to a channel */
  27113. A_UINT32 probe_delay;
  27114. /** Scan control flags */
  27115. A_UINT32 scan_ctrl_flags;
  27116. /** Burst duration time in msec*/
  27117. A_UINT32 burst_duration;
  27118. /** number of bssids in the TLV bssid_list[] */
  27119. A_UINT32 num_bssid;
  27120. /** number of ssid in the TLV ssid_list[] */
  27121. A_UINT32 num_ssids;
  27122. /** number of bytes in TLV ie_data[] */
  27123. A_UINT32 ie_len;
  27124. /** number of buckets in the TLV bucket_list[] */
  27125. A_UINT32 num_buckets;
  27126. /** in number of scans, send notifications to host after these many scans */
  27127. A_UINT32 report_threshold_num_scans;
  27128. /** number of channels in channel_list[] determined by the
  27129. sum of wmi_extscan_bucket.num_channels in array */
  27130. /**
  27131. * TLV (tag length value) parameters follow the extscan_cmd
  27132. * structure. The TLV's are:
  27133. * wmi_ssid ssid_list[];
  27134. * wmi_mac_addr bssid_list[];
  27135. * A_UINT8 ie_data[];
  27136. * wmi_extscan_bucket bucket_list[];
  27137. * wmi_extscan_bucket_channel channel_list[];
  27138. */
  27139. } wmi_extscan_start_cmd_fixed_param;
  27140. typedef struct {
  27141. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_stop_cmd_fixed_param */
  27142. /** Request ID - to match running command. 0 matches any request */
  27143. A_UINT32 request_id;
  27144. /** Requestor ID - client requesting stop */
  27145. A_UINT32 requestor_id;
  27146. /** VDEV id(interface) that is requesting scan */
  27147. A_UINT32 vdev_id;
  27148. /** table ID - to allow support for multiple simultaneous requests */
  27149. A_UINT32 table_id;
  27150. } wmi_extscan_stop_cmd_fixed_param;
  27151. enum wmi_extscan_get_cached_results_flags {
  27152. WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_NONE = 0x0000,
  27153. WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_FLUSH_TABLE = 0x0001
  27154. };
  27155. typedef struct {
  27156. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_cached_results_cmd_fixed_param */
  27157. /** request ID - used to correlate command with events */
  27158. A_UINT32 request_id;
  27159. /** Requestor ID - client that requested results */
  27160. A_UINT32 requestor_id;
  27161. /** VDEV id(interface) that is requesting scan */
  27162. A_UINT32 vdev_id;
  27163. /** table ID - to allow support for multiple simultaneous requests */
  27164. A_UINT32 table_id;
  27165. /** maximum number of results to be returned */
  27166. A_UINT32 max_results;
  27167. /** flush BSSID list - wmi_extscan_get_cached_results_flags */
  27168. A_UINT32 control_flags; /* enum wmi_extscan_get_cached_results_flags */
  27169. } wmi_extscan_get_cached_results_cmd_fixed_param;
  27170. typedef struct {
  27171. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_wlan_change_results_cmd_fixed_param */
  27172. /** request ID - used to correlate command with events */
  27173. A_UINT32 request_id;
  27174. /** Requestor ID - client that requested results */
  27175. A_UINT32 requestor_id;
  27176. /** VDEV id(interface) that is requesting scan */
  27177. A_UINT32 vdev_id;
  27178. /** table ID - to allow support for multiple simultaneous requests */
  27179. A_UINT32 table_id;
  27180. } wmi_extscan_get_wlan_change_results_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. /** channel in MHz */
  27186. A_UINT32 channel;
  27187. /** upper RSSI limit */
  27188. A_UINT32 upper_rssi_limit;
  27189. /** lower RSSI limit */
  27190. A_UINT32 lower_rssi_limit;
  27191. } wmi_extscan_wlan_change_bssid_param;
  27192. typedef struct {
  27193. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param */
  27194. /** Request ID - to identify command. Cannot be 0 */
  27195. A_UINT32 request_id;
  27196. /** Requestor ID - client requesting wlan change 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. /** number of RSSI samples to store */
  27205. A_UINT32 max_rssi_samples;
  27206. /** number of samples to use to calculate RSSI average */
  27207. A_UINT32 rssi_averaging_samples;
  27208. /** number of scans to confirm loss of contact with RSSI */
  27209. A_UINT32 lost_ap_scan_count;
  27210. /** number of out-of-range BSSIDs necessary to send event */
  27211. A_UINT32 max_out_of_range_count;
  27212. /** total number of bssid signal descriptors (in all pages) */
  27213. A_UINT32 total_entries;
  27214. /** index of the first bssid entry found in the TLV wlan_change_descriptor_list*/
  27215. A_UINT32 first_entry_index;
  27216. /** number of bssid signal descriptors in this page */
  27217. A_UINT32 num_entries_in_page;
  27218. /* Following this structure is the TLV:
  27219. * wmi_extscan_wlan_change_bssid_param wlan_change_descriptor_list[];
  27220. * (number of elements given by field num_page_entries)
  27221. */
  27222. } wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param;
  27223. typedef struct {
  27224. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27225. /** bssid */
  27226. wmi_mac_addr bssid;
  27227. /** RSSI min threshold for reporting */
  27228. A_UINT32 min_rssi;
  27229. /** Deprecated entry - channel in MHz */
  27230. A_UINT32 channel;
  27231. /** RSSI max threshold for reporting */
  27232. A_UINT32 max_rssi;
  27233. } wmi_extscan_hotlist_entry;
  27234. typedef struct {
  27235. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_monitor_cmd_fixed_param */
  27236. /** Request ID - to identify command. Cannot be 0 */
  27237. A_UINT32 request_id;
  27238. /** Requestor ID - client requesting hotlist monitoring */
  27239. A_UINT32 requestor_id;
  27240. /** VDEV id(interface) that is requesting scan */
  27241. A_UINT32 vdev_id;
  27242. /** table ID - to allow support for multiple simultaneous tables */
  27243. A_UINT32 table_id;
  27244. /** operation mode: start/stop */
  27245. A_UINT32 mode; /* wmi_extscan_operation_mode */
  27246. /** total number of bssids (in all pages) */
  27247. A_UINT32 total_entries;
  27248. /** index of the first bssid entry found in the TLV wmi_extscan_hotlist_entry */
  27249. A_UINT32 first_entry_index;
  27250. /** number of bssids in this page */
  27251. A_UINT32 num_entries_in_page;
  27252. /** number of consecutive scans to confirm loss of contact with AP */
  27253. A_UINT32 lost_ap_scan_count;
  27254. /* Following this structure is the TLV:
  27255. * wmi_extscan_hotlist_entry hotlist[]; <-- number of elements given by field num_page_entries.
  27256. */
  27257. } wmi_extscan_configure_hotlist_monitor_cmd_fixed_param;
  27258. typedef struct {
  27259. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27260. /**ssid */
  27261. wmi_ssid ssid;
  27262. /**band */
  27263. A_UINT32 band;
  27264. /**RSSI threshold for reporting */
  27265. A_UINT32 min_rssi;
  27266. A_UINT32 max_rssi;
  27267. } wmi_extscan_hotlist_ssid_entry;
  27268. typedef struct {
  27269. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param */
  27270. /** Request ID - to identify command. Cannot be 0 */
  27271. A_UINT32 request_id;
  27272. /** Requestor ID - client requesting hotlist ssid monitoring */
  27273. A_UINT32 requestor_id;
  27274. /** VDEV id(interface) that is requesting scan */
  27275. A_UINT32 vdev_id;
  27276. /** table ID - to allow support for multiple simultaneous tables */
  27277. A_UINT32 table_id;
  27278. /** operation mode: start/stop */
  27279. A_UINT32 mode; /* wmi_extscan_operation_mode */
  27280. /**total number of ssids (in all pages) */
  27281. A_UINT32 total_entries;
  27282. /**index of the first ssid entry found in the TLV wmi_extscan_hotlist_ssid_entry*/
  27283. A_UINT32 first_entry_index;
  27284. /**number of ssids in this page */
  27285. A_UINT32 num_entries_in_page;
  27286. /** number of consecutive scans to confirm loss of an ssid **/
  27287. A_UINT32 lost_ap_scan_count;
  27288. /* Following this structure is the TLV:
  27289. * wmi_extscan_hotlist_ssid_entry hotlist_ssid[]; <-- number of elements given by field num_page_entries.
  27290. */
  27291. } wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param;
  27292. typedef struct {
  27293. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27294. /** table ID - to allow support for multiple simultaneous tables */
  27295. A_UINT32 table_id;
  27296. /** size in bytes of scan cache entry */
  27297. A_UINT32 scan_cache_entry_size;
  27298. /** maximum number of scan cache entries */
  27299. A_UINT32 max_scan_cache_entries;
  27300. /** maximum number of buckets per extscan request */
  27301. A_UINT32 max_buckets;
  27302. /** maximum number of BSSIDs that will be stored in each scan (best n/w as per RSSI) */
  27303. A_UINT32 max_bssid_per_scan;
  27304. /** table usage level at which indication must be sent to host */
  27305. A_UINT32 max_table_usage_threshold;
  27306. } wmi_extscan_cache_capabilities;
  27307. typedef struct {
  27308. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27309. /** table ID - to allow support for multiple simultaneous tables */
  27310. A_UINT32 table_id;
  27311. /** size in bytes of wlan change entry */
  27312. A_UINT32 wlan_change_entry_size;
  27313. /** maximum number of entries in wlan change table */
  27314. A_UINT32 max_wlan_change_entries;
  27315. /** number of RSSI samples used for averaging RSSI */
  27316. A_UINT32 max_rssi_averaging_samples;
  27317. /** number of BSSID/RSSI entries (BSSID pointer, RSSI, timestamp) that device can hold */
  27318. A_UINT32 max_rssi_history_entries;
  27319. } wmi_extscan_wlan_change_monitor_capabilities;
  27320. typedef struct {
  27321. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27322. /** table ID - to allow support for multiple simultaneous tables */
  27323. A_UINT32 table_id;
  27324. /** size in bytes of hotlist entry */
  27325. A_UINT32 wlan_hotlist_entry_size;
  27326. /** maximum number of entries in wlan change table */
  27327. A_UINT32 max_hotlist_entries;
  27328. } wmi_extscan_hotlist_monitor_capabilities;
  27329. typedef struct {
  27330. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_set_capabilities_cmd_fixed_param */
  27331. /** Request ID - matches request ID used to start hot list monitoring */
  27332. A_UINT32 request_id;
  27333. /** Requestor ID - client requesting stop */
  27334. A_UINT32 requestor_id;
  27335. /** number of extscan caches */
  27336. A_UINT32 num_extscan_cache_tables;
  27337. /** number of wlan change lists */
  27338. A_UINT32 num_wlan_change_monitor_tables;
  27339. /** number of hotlists */
  27340. A_UINT32 num_hotlist_monitor_tables;
  27341. /** if one sided rtt data collection is supported */
  27342. A_UINT32 rtt_one_sided_supported;
  27343. /** if 11v data collection is supported */
  27344. A_UINT32 rtt_11v_supported;
  27345. /** if 11mc data collection is supported */
  27346. A_UINT32 rtt_ftm_supported;
  27347. /** number of extscan cache capabilities (one per table) */
  27348. A_UINT32 num_extscan_cache_capabilities;
  27349. /** number of wlan change capabilities (one per table) */
  27350. A_UINT32 num_extscan_wlan_change_capabilities;
  27351. /** number of extscan hotlist capabilities (one per table) */
  27352. A_UINT32 num_extscan_hotlist_capabilities;
  27353. /* Following this structure is the TLV:
  27354. * wmi_extscan_cache_capabilities extscan_cache_capabilities; <-- number of capabilities given by num_extscan_caches
  27355. * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities; <-- number of capabilities given by num_wlan_change_monitor_tables
  27356. * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities; <-- number of capabilities given by num_hotlist_monitor_tables
  27357. */
  27358. } wmi_extscan_set_capabilities_cmd_fixed_param;
  27359. typedef struct {
  27360. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_capabilities_cmd_fixed_param */
  27361. /** Request ID - matches request ID used to start hot list monitoring */
  27362. A_UINT32 request_id;
  27363. /** Requestor ID - client requesting capabilities */
  27364. A_UINT32 requestor_id;
  27365. } wmi_extscan_get_capabilities_cmd_fixed_param;
  27366. typedef struct {
  27367. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param */
  27368. /** Request ID of the operation that was started/stopped */
  27369. A_UINT32 request_id;
  27370. /** Requestor ID of the operation that was started/stopped */
  27371. A_UINT32 requestor_id;
  27372. /** VDEV id(interface) of the operation that was started/stopped */
  27373. A_UINT32 vdev_id;
  27374. /** extscan WMI command */
  27375. A_UINT32 command;
  27376. /** operation mode: start/stop */
  27377. A_UINT32 mode; /* wmi_extscan_operation_mode */
  27378. /**success/failure */
  27379. A_UINT32 status; /* enum wmi_extscan_start_stop_status */
  27380. /** table ID - to allow support for multiple simultaneous requests */
  27381. A_UINT32 table_id;
  27382. } wmi_extscan_start_stop_event_fixed_param;
  27383. typedef struct {
  27384. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param */
  27385. /** Request ID of the extscan operation that is currently running */
  27386. A_UINT32 request_id;
  27387. /** Requestor ID of the extscan operation that is currently running */
  27388. A_UINT32 requestor_id;
  27389. /** VDEV id(interface) of the extscan operation that is currently running */
  27390. A_UINT32 vdev_id;
  27391. /** scan event (wmi_scan_event_type) */
  27392. A_UINT32 event; /* wmi_extscan_event_type */
  27393. /** table ID - to allow support for multiple simultaneous requests */
  27394. A_UINT32 table_id;
  27395. /**number of buckets */
  27396. A_UINT32 num_buckets;
  27397. /* Following this structure is the TLV:
  27398. * A_UINT32 bucket_id[]; <-- number of elements given by field num_buckets.
  27399. */
  27400. } wmi_extscan_operation_event_fixed_param;
  27401. /* Types of extscan tables */
  27402. typedef enum {
  27403. EXTSCAN_TABLE_NONE = 0,
  27404. EXTSCAN_TABLE_BSSID = 1,
  27405. EXTSCAN_TABLE_RSSI = 2,
  27406. } wmi_extscan_table_type;
  27407. typedef struct {
  27408. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param */
  27409. /** Request ID of the extscan operation that is currently running */
  27410. A_UINT32 request_id;
  27411. /** Requestor ID of the extscan operation that is currently running */
  27412. A_UINT32 requestor_id;
  27413. /** VDEV id(interface) of the extscan operation that is currently running */
  27414. A_UINT32 vdev_id;
  27415. /** table ID - to allow support for multiple simultaneous tables */
  27416. A_UINT32 table_id;
  27417. /**see wmi_extscan_table_type for table reporting usage */
  27418. A_UINT32 table_type;
  27419. /**number of entries in use */
  27420. A_UINT32 entries_in_use;
  27421. /**maximum number of entries in table */
  27422. A_UINT32 maximum_entries;
  27423. } wmi_extscan_table_usage_event_fixed_param;
  27424. typedef enum {
  27425. WMI_SCAN_STATUS_INTERRUPTED = 1 /* Indicates scan got interrupted i.e. aborted or pre-empted for a long time (> 1sec)
  27426. this can be used to discard scan results */
  27427. } wmi_scan_status_flags;
  27428. typedef struct {
  27429. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27430. /** RSSI */
  27431. A_UINT32 rssi;
  27432. /** time stamp in milliseconds */
  27433. A_UINT32 tstamp;
  27434. /** Extscan cycle during which this entry was scanned */
  27435. A_UINT32 scan_cycle_id;
  27436. /** flag to indicate if the given result was obtained as part of interrupted (aborted/large time gap preempted) scan */
  27437. A_UINT32 flags;
  27438. /** Bitmask of buckets (i.e. sets of channels) scanned */
  27439. A_UINT32 buckets_scanned;
  27440. } wmi_extscan_rssi_info;
  27441. typedef struct {
  27442. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27443. /** bssid */
  27444. wmi_mac_addr bssid;
  27445. /** ssid */
  27446. wmi_ssid ssid;
  27447. /** channel in MHz */
  27448. A_UINT32 channel;
  27449. /** capabilities */
  27450. A_UINT32 capabilities;
  27451. /** beacon interval in TUs */
  27452. A_UINT32 beacon_interval;
  27453. /** time stamp in milliseconds - time last seen */
  27454. A_UINT32 tstamp;
  27455. /** flags - _tExtScanEntryFlags */
  27456. A_UINT32 flags;
  27457. /** RTT in ns */
  27458. A_UINT32 rtt;
  27459. /** RTT standard deviation */
  27460. A_UINT32 rtt_sd;
  27461. /** RSSI information */
  27462. A_UINT32 number_rssi_samples;
  27463. /** IE length */
  27464. A_UINT32 ie_length; /* length of IE data */
  27465. } wmi_extscan_wlan_descriptor;
  27466. typedef struct {
  27467. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param */
  27468. /** Request ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  27469. A_UINT32 request_id;
  27470. /** Requestor ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  27471. A_UINT32 requestor_id;
  27472. /** VDEV id(interface) of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  27473. A_UINT32 vdev_id;
  27474. /** Request ID of the extscan operation that is currently running */
  27475. A_UINT32 extscan_request_id;
  27476. /** Requestor ID of the extscan operation that is currently running */
  27477. A_UINT32 extscan_requestor_id;
  27478. /** VDEV id(interface) of the extscan operation that is currently running */
  27479. A_UINT32 extscan_vdev_id;
  27480. /** table ID - to allow support for multiple simultaneous tables */
  27481. A_UINT32 table_id;
  27482. /**current time stamp in seconds. Used to provide a baseline for the relative timestamps returned for each block and entry */
  27483. A_UINT32 current_tstamp;
  27484. /**total number of bssids (in all pages) */
  27485. A_UINT32 total_entries;
  27486. /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  27487. A_UINT32 first_entry_index;
  27488. /**number of bssids in this page */
  27489. A_UINT32 num_entries_in_page;
  27490. /** number of buckets scanned**/
  27491. A_UINT32 buckets_scanned;
  27492. /* Followed by the variable length TLVs
  27493. * wmi_extscan_wlan_descriptor bssid_list[]
  27494. * wmi_extscan_rssi_info rssi_list[]
  27495. * A_UINT8 ie_list[]
  27496. */
  27497. } wmi_extscan_cached_results_event_fixed_param;
  27498. typedef enum {
  27499. EXTSCAN_WLAN_CHANGE_FLAG_NONE = 0x00,
  27500. EXTSCAN_WLAN_CHANGE_FLAG_OUT_OF_RANGE = 0x01,
  27501. EXTSCAN_WLAN_CHANGE_FLAG_AP_LOST = 0x02,
  27502. } wmi_extscan_wlan_change_flags;
  27503. typedef struct {
  27504. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27505. /** bssid */
  27506. wmi_mac_addr bssid;
  27507. /** time stamp in milliseconds */
  27508. A_UINT32 tstamp;
  27509. /** upper RSSI limit */
  27510. A_UINT32 upper_rssi_limit;
  27511. /** lower RSSI limit */
  27512. A_UINT32 lower_rssi_limit;
  27513. /** channel */
  27514. A_UINT32 channel; /* in MHz */
  27515. /** current RSSI average */
  27516. A_UINT32 rssi_average;
  27517. /** flags - wmi_extscan_wlan_change_flags */
  27518. A_UINT32 flags;
  27519. /** length of RSSI history to follow (number of values) */
  27520. A_UINT32 num_rssi_samples;
  27521. } wmi_extscan_wlan_change_result_bssid;
  27522. typedef struct {
  27523. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param */
  27524. /** Request ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  27525. A_UINT32 request_id;
  27526. /** Requestor ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  27527. A_UINT32 requestor_id;
  27528. /** VDEV id(interface) of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  27529. A_UINT32 vdev_id;
  27530. /** Request ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  27531. A_UINT32 config_request_id;
  27532. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  27533. A_UINT32 config_requestor_id;
  27534. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  27535. A_UINT32 config_vdev_id;
  27536. /** table ID - to allow support for multiple simultaneous tables */
  27537. A_UINT32 table_id;
  27538. /**number of entries with RSSI out of range or BSSID not detected */
  27539. A_UINT32 change_count;
  27540. /**total number of bssid signal descriptors (in all pages) */
  27541. A_UINT32 total_entries;
  27542. /**index of the first bssid signal descriptor entry found in the TLV wmi_extscan_wlan_descriptor*/
  27543. A_UINT32 first_entry_index;
  27544. /**number of bssids signal descriptors in this page */
  27545. A_UINT32 num_entries_in_page;
  27546. /* Following this structure is the TLV:
  27547. * wmi_extscan_wlan_change_result_bssid bssid_signal_descriptor_list[];
  27548. * (number of descriptors given by field num_entries_in_page)
  27549. * Following this structure is the list of RSSI values (each is an A_UINT8):
  27550. * A_UINT8 rssi_list[]; <-- last N RSSI values.
  27551. */
  27552. } wmi_extscan_wlan_change_results_event_fixed_param;
  27553. enum _tExtScanEntryFlags
  27554. {
  27555. WMI_HOTLIST_FLAG_NONE = 0x00,
  27556. WMI_HOTLIST_FLAG_PRESENCE = 0x01,
  27557. WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80,
  27558. };
  27559. typedef struct {
  27560. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
  27561. /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  27562. A_UINT32 config_request_id;
  27563. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  27564. A_UINT32 config_requestor_id;
  27565. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  27566. A_UINT32 config_vdev_id;
  27567. /** table ID - to allow support for multiple simultaneous tables */
  27568. A_UINT32 table_id;
  27569. /**total number of bssids (in all pages) */
  27570. A_UINT32 total_entries;
  27571. /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  27572. A_UINT32 first_entry_index;
  27573. /**number of bssids in this page */
  27574. A_UINT32 num_entries_in_page;
  27575. /* Following this structure is the TLV:
  27576. * wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
  27577. */
  27578. } wmi_extscan_hotlist_match_event_fixed_param;
  27579. typedef struct {
  27580. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
  27581. /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  27582. A_UINT32 config_request_id;
  27583. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  27584. A_UINT32 config_requestor_id;
  27585. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  27586. A_UINT32 config_vdev_id;
  27587. /** table ID - to allow support for multiple simultaneous tables */
  27588. A_UINT32 table_id;
  27589. /**total number of ssids (in all pages) */
  27590. A_UINT32 total_entries;
  27591. /**index of the first ssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  27592. A_UINT32 first_entry_index;
  27593. /**number of ssids in this page */
  27594. A_UINT32 num_entries_in_page;
  27595. /* Following this structure is the TLV:
  27596. * wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
  27597. */
  27598. } wmi_extscan_hotlist_ssid_match_event_fixed_param;
  27599. typedef struct {
  27600. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param */
  27601. /** Request ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  27602. A_UINT32 request_id;
  27603. /** Requestor ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  27604. A_UINT32 requestor_id;
  27605. /** VDEV id(interface) of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  27606. A_UINT32 vdev_id;
  27607. /** number of extscan caches */
  27608. A_UINT32 num_extscan_cache_tables;
  27609. /** number of wlan change lists */
  27610. A_UINT32 num_wlan_change_monitor_tables;
  27611. /** number of hotlists */
  27612. A_UINT32 num_hotlist_monitor_tables;
  27613. /** if one sided rtt data collection is supported */
  27614. A_UINT32 rtt_one_sided_supported;
  27615. /** if 11v data collection is supported */
  27616. A_UINT32 rtt_11v_supported;
  27617. /** if 11mc data collection is supported */
  27618. A_UINT32 rtt_ftm_supported;
  27619. /** number of extscan cache capabilities (one per table) */
  27620. A_UINT32 num_extscan_cache_capabilities;
  27621. /** number of wlan change capabilities (one per table) */
  27622. A_UINT32 num_extscan_wlan_change_capabilities;
  27623. /** number of extscan hotlist capabilities (one per table) */
  27624. A_UINT32 num_extscan_hotlist_capabilities;
  27625. /* max number of roaming ssid whitelist firmware can support */
  27626. A_UINT32 num_roam_ssid_whitelist;
  27627. /* max number of blacklist bssid firmware can support */
  27628. A_UINT32 num_roam_bssid_blacklist;
  27629. /* max number of preferred list firmware can support */
  27630. A_UINT32 num_roam_bssid_preferred_list;
  27631. /* max number of hotlist ssids firmware can support */
  27632. A_UINT32 num_extscan_hotlist_ssid;
  27633. /* max number of epno networks firmware can support */
  27634. A_UINT32 num_epno_networks;
  27635. /* Following this structure are the TLVs describing the capabilities of of the various types of lists. The FW theoretically
  27636. * supports multiple lists of each type.
  27637. *
  27638. * wmi_extscan_cache_capabilities extscan_cache_capabilities[] <-- capabilities of extscan cache (BSSID/RSSI lists)
  27639. * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities[] <-- capabilities of wlan_change_monitor_tables
  27640. * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities[] <-- capabilities of hotlist_monitor_tables
  27641. */
  27642. } wmi_extscan_capabilities_event_fixed_param;
  27643. /* WMI_D0_WOW_DISABLE_ACK_EVENTID */
  27644. typedef struct {
  27645. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param */
  27646. A_UINT32 reserved0; /* for future need */
  27647. } wmi_d0_wow_disable_ack_event_fixed_param;
  27648. /** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */
  27649. typedef struct {
  27650. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param */
  27651. /** pdev_id for identifying the MAC
  27652. * See macros starting with WMI_PDEV_ID_ for values.
  27653. */
  27654. A_UINT32 pdev_id;
  27655. } wmi_pdev_resume_event_fixed_param;
  27656. /** value representing all modules */
  27657. #define WMI_DEBUG_LOG_MODULE_ALL 0xffff
  27658. /* param definitions */
  27659. /**
  27660. * Log level for a given module. Value contains both module id and log level.
  27661. * here is the bitmap definition for value.
  27662. * module Id : 16
  27663. * Flags : reserved
  27664. * Level : 8
  27665. * if odule Id is WMI_DEBUG_LOG_MODULE_ALL then log level is applied to all modules (global).
  27666. * WMI_DEBUG_LOG_MIDULE_ALL will overwrites per module level setting.
  27667. */
  27668. #define WMI_DEBUG_LOG_PARAM_LOG_LEVEL 0x1
  27669. #define WMI_DBGLOG_SET_LOG_LEVEL(val,lvl) do { \
  27670. (val) |= (lvl & 0xff); \
  27671. } while (0)
  27672. #define WMI_DBGLOG_GET_LOG_LEVEL(val) ((val) & 0xff)
  27673. #define WMI_DBGLOG_SET_MODULE_ID(val,mid) do { \
  27674. (val) |= ((mid & 0xffff) << 16); \
  27675. } while (0)
  27676. #define WMI_DBGLOG_GET_MODULE_ID(val) (((val) >> 16) & 0xffff)
  27677. /**
  27678. * Enable the debug log for a given vdev. Value is vdev id
  27679. */
  27680. #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE 0x2
  27681. /**
  27682. * Disable the debug log for a given vdev. Value is vdev id
  27683. * All the log level for a given VDEV is disabled except the ERROR log messages
  27684. */
  27685. #define WMI_DEBUG_LOG_PARAM_VDEV_DISABLE 0x3
  27686. /**
  27687. * set vdev enable bitmap. value is the vden enable bitmap
  27688. */
  27689. #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP 0x4
  27690. /**
  27691. * set a given log level to all the modules specified in the module bitmap.
  27692. * and set the log level for all other modules to DBGLOG_ERR.
  27693. * value: log levelt to be set.
  27694. * module_id_bitmap : identifies the modules for which the log level should be set and
  27695. * modules for which the log level should be reset to DBGLOG_ERR.
  27696. */
  27697. #define WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP 0x5
  27698. /**
  27699. * Wow mode specific logging enablement
  27700. * Wow mode module_id_bitmap : identifies the modules for which the log level
  27701. * should be set in WOW and modules for which the log level
  27702. * should be reset to DBGLOG_MAX_LVL.
  27703. */
  27704. #define WMI_DEBUG_LOG_PARAM_WOW_MOD_ENABLE_BITMAP 0x6
  27705. #define NUM_MODULES_PER_ENTRY ((sizeof(A_UINT32)) << 3)
  27706. #define WMI_MODULE_ENABLE(pmid_bitmap,mod_id) \
  27707. ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] |= \
  27708. (1 << ((mod_id)%NUM_MODULES_PER_ENTRY)))
  27709. #define WMI_MODULE_DISABLE(pmid_bitmap,mod_id) \
  27710. ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &= \
  27711. (~(1 << ((mod_id)%NUM_MODULES_PER_ENTRY))))
  27712. #define WMI_MODULE_IS_ENABLED(pmid_bitmap,mod_id) \
  27713. (((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] & \
  27714. (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) != 0)
  27715. #define MAX_MODULE_ID_BITMAP_WORDS 16 /* 16*32=512 module ids. should be more than sufficient */
  27716. typedef struct {
  27717. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_log_config_cmd_fixed_param */
  27718. A_UINT32 dbg_log_param; /** param types are defined above */
  27719. A_UINT32 value;
  27720. /* The below array will follow this tlv ->fixed length module_id_bitmap[]
  27721. A_UINT32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS];
  27722. */
  27723. } wmi_debug_log_config_cmd_fixed_param;
  27724. typedef struct {
  27725. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param */
  27726. A_UINT32 param; /* Reserved for future use */
  27727. /** pdev_id for identifying the MAC
  27728. * See macros starting with WMI_PDEV_ID_ for values.
  27729. */
  27730. A_UINT32 pdev_id;
  27731. } wmi_pdev_get_temperature_cmd_fixed_param;
  27732. typedef struct {
  27733. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_temperature_event_fixed_param */
  27734. A_INT32 value; /* temperature value in Celcius degree */
  27735. /** pdev_id for identifying the MAC
  27736. * See macros starting with WMI_PDEV_ID_ for values.
  27737. */
  27738. A_UINT32 pdev_id;
  27739. } wmi_pdev_temperature_event_fixed_param;
  27740. typedef enum {
  27741. ANTDIV_HW_CFG_STATUS,
  27742. ANTDIV_SW_CFG_STATUS,
  27743. ANTDIV_MAX_STATUS_TYPE_NUM
  27744. } ANTDIV_STATUS_TYPE;
  27745. typedef struct {
  27746. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_antdiv_status_cmd_fixed_param */
  27747. A_UINT32 status_event_id; /* Status event ID - see ANTDIV_STATUS_TYPE */
  27748. /** pdev_id for identifying the MAC
  27749. * See macros starting with WMI_PDEV_ID_ for values.
  27750. */
  27751. A_UINT32 pdev_id;
  27752. } wmi_pdev_get_antdiv_status_cmd_fixed_param;
  27753. typedef struct {
  27754. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_antdiv_status_event_fixed_param */
  27755. A_UINT32 support; /* ANT DIV feature enabled or not */
  27756. A_UINT32 chain_num; /* how many chain supported */
  27757. A_UINT32 ant_num; /* how many ANT supported, 32 max */
  27758. /*
  27759. * Each entry is for a tx/rx chain, and contains a bitmap identifying
  27760. * the antennas attached to that tx/rx chain.
  27761. */
  27762. A_UINT32 selectable_ant_mask[8];
  27763. /** pdev_id for identifying the MAC
  27764. * See macros starting with WMI_PDEV_ID_ for values.
  27765. */
  27766. A_UINT32 pdev_id;
  27767. } wmi_pdev_antdiv_status_event_fixed_param;
  27768. typedef struct {
  27769. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param */
  27770. A_UINT32 vdev_id;
  27771. A_UINT32 enable;
  27772. A_UINT32 srv_ipv4; /* server IP */
  27773. A_UINT32 start_lsb; /* starting address assigned to client */
  27774. A_UINT32 num_client; /* number of clients we support */
  27775. } wmi_set_dhcp_server_offload_cmd_fixed_param;
  27776. typedef enum {
  27777. AP_RX_DATA_OFFLOAD = 0x00,
  27778. STA_RX_DATA_OFFLOAD = 0x01,
  27779. } wmi_ipa_offload_types;
  27780. /**
  27781. * This command is sent from WLAN host driver to firmware for
  27782. * enabling/disabling IPA data-path offload features.
  27783. *
  27784. *
  27785. * Enabling data path offload to IPA(based on host INI configuration), example:
  27786. * when STA interface comes up,
  27787. * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
  27788. * (enable = 1, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
  27789. *
  27790. * Disabling data path offload to IPA, example:
  27791. * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
  27792. * (enable = 0, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
  27793. *
  27794. *
  27795. * This command is applicable only on the PCIE LL systems
  27796. *
  27797. */
  27798. typedef struct {
  27799. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_offload_enable_disable_cmd_fixed_param */
  27800. A_UINT32 offload_type; /* wmi_ipa_offload_types enum values */
  27801. A_UINT32 vdev_id;
  27802. A_UINT32 enable; /* 1 == enable, 0 == disable */
  27803. } wmi_ipa_offload_enable_disable_cmd_fixed_param;
  27804. typedef enum {
  27805. WMI_LED_FLASHING_PATTERN_NOT_CONNECTED = 0,
  27806. WMI_LED_FLASHING_PATTERN_CONNECTED = 1,
  27807. WMI_LED_FLASHING_PATTERN_RESERVED = 2,
  27808. } wmi_set_led_flashing_type;
  27809. /**
  27810. 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.
  27811. Each 32 bit value consists of 4 bytes, where each byte defines the number of 50ms intervals that the GPIO will
  27812. remain at a predetermined state. The 64 bit value provides 8 unique GPIO timing intervals. The pattern starts
  27813. 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
  27814. pattern returns to the MSB of X_0 and repeats. The GPIO state for each timing interval alternates from Low to
  27815. High and the first interval of the pattern represents the time when the GPIO is Low. When a timing interval of
  27816. Zero is reached, it is skipped and moves on to the next interval.
  27817. */
  27818. typedef struct {
  27819. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_led_flashing_cmd_fixed_param */
  27820. A_UINT32 pattern_id; /* pattern identifier */
  27821. A_UINT32 led_x0; /* led flashing parameter0 */
  27822. A_UINT32 led_x1; /* led flashing parameter1 */
  27823. A_UINT32 gpio_num; /* GPIO number */
  27824. } wmi_set_led_flashing_cmd_fixed_param;
  27825. /**
  27826. * The purpose of the multicast Domain Name System (mDNS) is to resolve host names to IP addresses
  27827. * within small networks that do not include a local name server.
  27828. * It utilizes essentially the same programming interfaces, packet formats and operating semantics
  27829. * as the unicast DNS, and the advantage is zero configuration service while no need for central or
  27830. * global server.
  27831. * Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover a named list of services
  27832. * by type in a specified domain using standard DNS queries.
  27833. * Here, we provide the ability to advertise the available services by responding to mDNS queries.
  27834. */
  27835. typedef struct {
  27836. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_offload_cmd_fixed_param */
  27837. A_UINT32 vdev_id;
  27838. A_UINT32 enable;
  27839. } wmi_mdns_offload_cmd_fixed_param;
  27840. #define WMI_MAX_MDNS_FQDN_LEN 64
  27841. #define WMI_MAX_MDNS_RESP_LEN 512
  27842. #define WMI_MDNS_FQDN_TYPE_GENERAL 0
  27843. #define WMI_MDNS_FQDN_TYPE_UNIQUE 1
  27844. typedef struct {
  27845. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_fqdn_cmd_fixed_param */
  27846. A_UINT32 vdev_id;
  27847. /** type of fqdn, general or unique */
  27848. A_UINT32 type;
  27849. /** length of fqdn */
  27850. A_UINT32 fqdn_len;
  27851. /* Following this structure is the TLV byte stream of fqdn data of length fqdn_len
  27852. * A_UINT8 fqdn_data[]; <-- fully-qualified domain name to check if match with the received queries
  27853. */
  27854. } wmi_mdns_set_fqdn_cmd_fixed_param;
  27855. typedef struct {
  27856. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param */
  27857. A_UINT32 vdev_id;
  27858. /** Answer Resource Record count */
  27859. A_UINT32 AR_count;
  27860. /** length of response */
  27861. A_UINT32 resp_len;
  27862. /* Following this structure is the TLV byte stream of resp data of length resp_len
  27863. * A_UINT8 resp_data[]; <-- responses consisits of Resource Records
  27864. */
  27865. } wmi_mdns_set_resp_cmd_fixed_param;
  27866. typedef struct {
  27867. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_staIP_cmd_fixed_param */
  27868. A_UINT32 vdev_id;
  27869. A_UINT32 staIP; /* IPv4 address for STA mode */
  27870. } wmi_mdns_set_staIP_cmd_fixed_param;
  27871. typedef struct {
  27872. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param */
  27873. A_UINT32 vdev_id;
  27874. } wmi_mdns_get_stats_cmd_fixed_param;
  27875. typedef struct {
  27876. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param */
  27877. A_UINT32 vdev_id;
  27878. /** curTimestamp in milliseconds */
  27879. A_UINT32 curTimestamp;
  27880. /** last received Query in milliseconds */
  27881. A_UINT32 lastQueryTimestamp;
  27882. /** last sent Response in milliseconds */
  27883. A_UINT32 lastResponseTimestamp;
  27884. /** stats of received queries */
  27885. A_UINT32 totalQueries;
  27886. /** stats of macth queries */
  27887. A_UINT32 totalMatches;
  27888. /** stats of responses */
  27889. A_UINT32 totalResponses;
  27890. /** indicate the current status of mDNS offload */
  27891. A_UINT32 status;
  27892. } wmi_mdns_stats_event_fixed_param;
  27893. /**
  27894. * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process
  27895. * down to the firmware. When this feature is enabled, firmware can process the association/disassociation
  27896. * request and create/remove connection even host is suspended.
  27897. * 3 major components are offloaded:
  27898. * 1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response.
  27899. * 2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4.
  27900. * 3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK.
  27901. * Current implementation only supports WPA2 CCMP.
  27902. */
  27903. typedef struct {
  27904. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */
  27905. /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */
  27906. A_UINT32 vdev_id;
  27907. /** enable/disable sap auth offload */
  27908. A_UINT32 enable;
  27909. /** sap ssid */
  27910. wmi_ssid ap_ssid;
  27911. /** authentication mode (defined above) */
  27912. A_UINT32 rsn_authmode;
  27913. /** unicast cipher set */
  27914. A_UINT32 rsn_ucastcipherset;
  27915. /** mcast/group cipher set */
  27916. A_UINT32 rsn_mcastcipherset;
  27917. /** mcast/group management frames cipher set */
  27918. A_UINT32 rsn_mcastmgmtcipherset;
  27919. /** sap channel */
  27920. A_UINT32 channel;
  27921. /** length of psk */
  27922. A_UINT32 psk_len;
  27923. /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len
  27924. * A_UINT8 psk[];
  27925. */
  27926. } wmi_sap_ofl_enable_cmd_fixed_param;
  27927. typedef struct {
  27928. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */
  27929. /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */
  27930. A_UINT32 vdev_id;
  27931. /** aid (association id) of this station */
  27932. A_UINT32 assoc_id;
  27933. /** peer station's mac addr */
  27934. wmi_mac_addr peer_macaddr;
  27935. /** length of association request frame */
  27936. A_UINT32 data_len;
  27937. /* Following this structure is the TLV byte stream of a whole association request frame of length data_len
  27938. * A_UINT8 bufp[];
  27939. */
  27940. } wmi_sap_ofl_add_sta_event_fixed_param;
  27941. typedef enum {
  27942. SAP_OFL_DEL_STA_FLAG_NONE = 0x00,
  27943. SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01,
  27944. } wmi_sap_ofl_del_sta_flags;
  27945. typedef struct {
  27946. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */
  27947. /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */
  27948. A_UINT32 vdev_id;
  27949. /** aid (association id) of this station */
  27950. A_UINT32 assoc_id;
  27951. /** peer station's mac addr */
  27952. wmi_mac_addr peer_macaddr;
  27953. /** disassociation reason */
  27954. A_UINT32 reason;
  27955. /** flags - wmi_sap_ofl_del_sta_flags */
  27956. A_UINT32 flags;
  27957. } wmi_sap_ofl_del_sta_event_fixed_param;
  27958. typedef struct {
  27959. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_set_blacklist_param_cmd_fixed_param */
  27960. A_UINT32 vdev_id;
  27961. /* Number of client failure connection attempt */
  27962. A_UINT32 num_retry;
  27963. /* Time in milliseconds to record the client's failure connection attempts */
  27964. A_UINT32 retry_allow_time_ms;
  27965. /* Time in milliseconds to drop the connection request if client is blacklisted */
  27966. A_UINT32 blackout_time_ms;
  27967. } wmi_sap_set_blacklist_param_cmd_fixed_param;
  27968. typedef struct {
  27969. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */
  27970. A_UINT32 data_len; /** length in byte of data[]. */
  27971. /** This structure is used to send REQ binary blobs
  27972. * from application/service to firmware where Host drv is pass through .
  27973. * Following this structure is the TLV:
  27974. * A_UINT8 data[]; <-- length in byte given by field data_len.
  27975. */
  27976. } wmi_apfind_cmd_param;
  27977. typedef enum apfind_event_type_e {
  27978. APFIND_MATCH_EVENT = 0,
  27979. APFIND_WAKEUP_EVENT,
  27980. } APFIND_EVENT_TYPE;
  27981. typedef struct {
  27982. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */
  27983. A_UINT32 event_type; /** APFIND_EVENT_TYPE */
  27984. A_UINT32 data_len; /** length in byte of data[]. */
  27985. /** This structure is used to send event binary blobs
  27986. * from firmware to application/service and Host drv.
  27987. * Following this structure is the TLV:
  27988. * A_UINT8 data[]; <-- length in byte given by field data_len.
  27989. */
  27990. } wmi_apfind_event_hdr;
  27991. /* SAP obss detection offload types */
  27992. typedef enum {
  27993. WMI_SAP_OBSS_DETECTION_MODE_DISABLED = 0, /* fw to disable the detection */
  27994. WMI_SAP_OBSS_DETECTION_MODE_PRESENT_NOTIFY = 1, /* if the matching beacon is present, notify host immediately */
  27995. WMI_SAP_OBSS_DETECTION_MODE_ABSENT_TIMEOUT_NOTIFY = 2,/* if the matching beacon is absent for the timeout period, notify host */
  27996. } WMI_SAP_OBSS_DETECTION_MODE;
  27997. typedef struct wmi_sap_obss_detection_cfg_cmd_s {
  27998. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_sap_obss_detection_cfg_cmd_fixed_param */
  27999. A_UINT32 vdev_id;
  28000. A_UINT32 detect_period_ms;
  28001. /* detect whether there is 11b ap/ibss */
  28002. A_UINT32 b_ap_detect_mode; /* refer WMI_SAP_OBSS_DETECTION_MODE */
  28003. /* detect whether there is 11b sta connected with other APs */
  28004. A_UINT32 b_sta_detect_mode;
  28005. /* detect whether there is 11g AP */
  28006. A_UINT32 g_ap_detect_mode;
  28007. /* detect whether there is legacy 11a traffic */
  28008. A_UINT32 a_detect_mode;
  28009. /* detect whether there is ap which is ht legacy mode */
  28010. A_UINT32 ht_legacy_detect_mode;
  28011. /* detect whether there is ap which is ht mixed mode : has 11b/11g sta */
  28012. A_UINT32 ht_mixed_detect_mode;
  28013. /* detect whether there is ap which has 20M only station */
  28014. A_UINT32 ht_20mhz_detect_mode;
  28015. } wmi_sap_obss_detection_cfg_cmd_fixed_param;
  28016. typedef enum {
  28017. WMI_SAP_OBSS_DETECTION_EVENT_REASON_NOT_SUPPORT = 0,
  28018. WMI_SAP_OBSS_DETECTION_EVENT_REASON_PRESENT_NOTIFY,
  28019. WMI_SAP_OBSS_DETECTION_EVENT_REASON_ABSENT_TIMEOUT,
  28020. } WMI_SAP_OBSS_DETECTION_EVENT_REASON;
  28021. /* WMI_SAP_OBSS_DETECTION_MATCH_MASK is one or more of the following shift bits */
  28022. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11B_AP_S 0
  28023. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11B_STA_S 1
  28024. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11G_AP_S 2
  28025. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11A_S 3
  28026. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_LEGACY_S 4
  28027. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_MIXED_S 5
  28028. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_20MHZ_S 6
  28029. typedef struct wmi_sap_obss_detection_info_evt_s {
  28030. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_sap_obss_detection_info_evt_fixed_param */
  28031. A_UINT32 vdev_id;
  28032. A_UINT32 reason; /* refer WMI_SAP_OBSS_DETECTION_EVENT_REASON */
  28033. A_UINT32 matched_detection_masks; /* bit(s) from WMI_SAP_OBSS_DETECTION_MATCH_MASK */
  28034. wmi_mac_addr matched_bssid_addr; /* valid when reason is WMI_SAP_OBSS_DETECTION_EVENT_REASON_PRESENT_NOTIFY */
  28035. } wmi_sap_obss_detection_info_evt_fixed_param;
  28036. /** WMI command to enable STA FW handle bss color change notification from AP */
  28037. typedef struct {
  28038. A_UINT32 tlv_header; /* tag equals WMITLV_TAG_STRUC_wmi_bss_color_change_enable_fixed_param */
  28039. A_UINT32 vdev_id;
  28040. A_UINT32 enable;
  28041. } wmi_bss_color_change_enable_fixed_param;
  28042. typedef enum {
  28043. WMI_BSS_COLOR_COLLISION_DISABLE = 0,
  28044. WMI_BSS_COLOR_COLLISION_DETECTION,
  28045. WMI_BSS_COLOR_FREE_SLOT_TIMER_EXPIRY,
  28046. WMI_BSS_COLOR_FREE_SLOT_AVAILABLE,
  28047. } WMI_BSS_COLOR_COLLISION_EVT_TYPE;
  28048. /** Command to enable OBSS Color collision detection for both STA and AP mode */
  28049. typedef struct {
  28050. A_UINT32 tlv_header; /* tag equals WMITLV_TAG_STRUC_wmi_obss_color_collision_det_config_fixed_param */
  28051. A_UINT32 vdev_id;
  28052. A_UINT32 flags; /* proposed for future use cases */
  28053. A_UINT32 evt_type; /* WMI_BSS_COLOR_COLLISION_EVT_TYPE */
  28054. A_UINT32 current_bss_color;
  28055. A_UINT32 detection_period_ms; /* scan interval for both AP and STA mode */
  28056. A_UINT32 scan_period_ms; /* scan period for passive scan to detect collision */
  28057. A_UINT32 free_slot_expiry_time_ms; /* FW to notify host at timer expiry after which Host disables bss color */
  28058. } wmi_obss_color_collision_det_config_fixed_param;
  28059. /** WMI event to notify host on OBSS Color collision detection, free slot available for AP mode */
  28060. typedef struct {
  28061. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_obss_color_collision_evt_fixed_param */
  28062. A_UINT32 vdev_id;
  28063. A_UINT32 evt_type; /* WMI_BSS_COLOR_COLLISION_EVT_TYPE */
  28064. A_UINT32 bss_color_bitmap_bit0to31; /* Bit set indicating BSS color present */
  28065. A_UINT32 bss_color_bitmap_bit32to63; /* Bit set indicating BSS color present */
  28066. } wmi_obss_color_collision_evt_fixed_param;
  28067. /*
  28068. * WMI event to notify host if latency_flags/latency_level got changed
  28069. * or if latency got enabled/disabled.
  28070. * When latency disable is received in the beacon vendor IE and wlm
  28071. * parameters are restored, latency_enable will be zero.
  28072. * latency level and latency flags will be those of wlm params.
  28073. * Lay out of latency flags is as follows. The field is same as flags
  28074. * in wmi_wlm_config_cmd_fixed_param.
  28075. *
  28076. * |31 19| 18 | 17|16 14| 13 | 12| 11 | 10 | 9 | 8 |7 6|5 4|3 2| 1 | 0 |
  28077. * +-----+-----+---+-----+----+---+----+----+-----+----+----+----+----+---+---+
  28078. * | RSVD|SRATE|RTS| NSS |EDCA|TRY|SSLP|CSLP|DBMPS|RSVD|Roam|RSVD|DWLT|DFS|SUP|
  28079. * +------------------------------+---------------+---------+-----------------+
  28080. * | WAL | PS | Roam | Scan |
  28081. */
  28082. typedef struct {
  28083. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_bcn_latency_fixed_param */
  28084. A_UINT32 vdev_id;
  28085. A_UINT32 latency_enable;
  28086. A_UINT32 latency_level;
  28087. A_UINT32 latency_flags;
  28088. } wmi_vdev_bcn_latency_fixed_param;
  28089. /**
  28090. * OCB DCC types and structures.
  28091. */
  28092. /**
  28093. * DCC types as described in ETSI TS 102 687
  28094. * Type Format stepSize referenceValue numBits
  28095. * -------------------------------------------------------------------------
  28096. * ndlType_acPrio INTEGER (0...7) 1 number 3
  28097. * ndlType_controlLoop INTEGER (0...7) 1 0 3
  28098. * ndlType_arrivalRate INTEGER (0..8191) 0.01 /s 0 13
  28099. * ndlType_channelLoad INTEGER (0..1000) 0.1 % 0 % 10
  28100. * ndlType_channelUse INTEGER (0..8000) 0.0125 % 0 % 13
  28101. * ndlType_datarate INTEGER (0..7) Table 8 3
  28102. * ndlType_distance INTEGER (0..4095) 1 m 0 12
  28103. * ndlType_numberElements INTEGER (0..63) number 6
  28104. * ndlType_packetDuration INTEGER (0..2047) TSYM 0 11
  28105. * ndlType_packetInterval INTEGER (0..1023) 10 ms 0 10
  28106. * ndlType_pathloss INTEGER (0..31) 0.1 1.0 5
  28107. * ndlType_rxPower INTEGER (0..127) -0.5 dB -40 dBm 7
  28108. * ndlType_snr INTEGER (0..127) 0.5 dB -10 dB 7
  28109. * ndlType_timing INTEGER (0..4095) 10 ms 0 12
  28110. * ndlType_txPower INTEGER (0..127) 0.5 dB -20 dBm 7
  28111. * ndlType_ratio INTEGER (0..100) 1 % 0 % 7
  28112. * ndlType_exponent INTEGER (0..100) 0.1 0 7
  28113. * ndlType_queueStatus Enumeration Table A.2 1
  28114. * ndlType_dccMechanism Bitset Table A.2 6
  28115. *
  28116. * NOTE: All of following size macros (SIZE_NDLTYPE_ACPRIO through SIZE_BYTE)
  28117. * cannot be changed without breaking WMI compatibility.
  28118. *
  28119. * NOTE: For each of the types, one additional bit is allocated. This
  28120. * leftmost bit is used to indicate that the value is invalid. */
  28121. #define SIZE_NDLTYPE_ACPRIO (1 + 3)
  28122. #define SIZE_NDLTYPE_CONTROLLOOP (1 + 3)
  28123. #define SIZE_NDLTYPE_ARRIVALRATE (1 + 13)
  28124. #define SIZE_NDLTYPE_CHANNELLOAD (1 + 10)
  28125. #define SIZE_NDLTYPE_CHANNELUSE (1 + 13)
  28126. #define SIZE_NDLTYPE_DATARATE (1 + 3)
  28127. #define SIZE_NDLTYPE_DISTANCE (1 + 12)
  28128. #define SIZE_NDLTYPE_NUMBERELEMENTS (1 + 6)
  28129. #define SIZE_NDLTYPE_PACKETDURATION (1 + 11)
  28130. #define SIZE_NDLTYPE_PACKETINTERVAL (1 + 10)
  28131. #define SIZE_NDLTYPE_PATHLOSS (1 + 5)
  28132. #define SIZE_NDLTYPE_RXPOWER (1 + 7)
  28133. #define SIZE_NDLTYPE_SNR (1 + 7)
  28134. #define SIZE_NDLTYPE_TIMING (1 + 12)
  28135. #define SIZE_NDLTYPE_TXPOWER (1 + 7)
  28136. #define SIZE_NDLTYPE_RATIO (1 + 7)
  28137. #define SIZE_NDLTYPE_EXPONENT (1 + 7)
  28138. #define SIZE_NDLTYPE_QUEUESTATUS (1 + 1)
  28139. #define SIZE_NDLTYPE_DCCMECHANISM (1 + 6)
  28140. #define SIZE_BYTE (8)
  28141. #define INVALID_ACPRIO ((1 << SIZE_NDLTYPE_ACPRIO) - 1)
  28142. #define INVALID_CONTROLLOOP ((1 << SIZE_NDLTYPE_CONTROLLOOP) - 1)
  28143. #define INVALID_ARRIVALRATE ((1 << SIZE_NDLTYPE_ARRIVALRATE) - 1)
  28144. #define INVALID_CHANNELLOAD ((1 << SIZE_NDLTYPE_CHANNELLOAD) - 1)
  28145. #define INVALID_CHANNELUSE ((1 << SIZE_NDLTYPE_CHANNELUSE) - 1)
  28146. #define INVALID_DATARATE ((1 << SIZE_NDLTYPE_DATARATE) - 1)
  28147. #define INVALID_DISTANCE ((1 << SIZE_NDLTYPE_DISTANCE) - 1)
  28148. #define INVALID_NUMBERELEMENTS ((1 << SIZE_NDLTYPE_NUMBERELEMENTS) - 1)
  28149. #define INVALID_PACKETDURATION ((1 << SIZE_NDLTYPE_PACKETDURATION) - 1)
  28150. #define INVALID_PACKETINTERVAL ((1 << SIZE_NDLTYPE_PACKETINTERVAL) - 1)
  28151. #define INVALID_PATHLOSS ((1 << SIZE_NDLTYPE_PATHLOSS) - 1)
  28152. #define INVALID_RXPOWER ((1 << SIZE_NDLTYPE_RXPOWER) - 1)
  28153. #define INVALID_SNR ((1 << SIZE_NDLTYPE_SNR) - 1)
  28154. #define INVALID_TIMING ((1 << SIZE_NDLTYPE_TIMING) - 1)
  28155. #define INVALID_TXPOWER ((1 << SIZE_NDLTYPE_TXPOWER) - 1)
  28156. #define INVALID_RATIO ((1 << SIZE_NDLTYPE_RATIO) - 1)
  28157. #define INVALID_EXPONENT ((1 << SIZE_NDLTYPE_EXPONENT) - 1)
  28158. #define INVALID_QUEUESTATS ((1 << SIZE_NDLTYPE_QUEUESTATUS) - 1)
  28159. #define INVALID_DCCMECHANISM ((1 << SIZE_NDLTYPE_DCCMECHANISM) - 1)
  28160. /** The MCS_COUNT macro cannot be modified without breaking
  28161. * WMI compatibility. */
  28162. #define MCS_COUNT (8)
  28163. /** Flags for ndlType_dccMechanism. */
  28164. typedef enum {
  28165. DCC_MECHANISM_TPC = 1,
  28166. DCC_MECHANISM_TRC = 2,
  28167. DCC_MECHANISM_TDC = 4,
  28168. DCC_MECHANISM_DSC = 8,
  28169. DCC_MECHANISM_TAC = 16,
  28170. DCC_MECHANISM_RESERVED = 32,
  28171. DCC_MECHANISM_ALL = 0x3f,
  28172. } wmi_dcc_ndl_type_dcc_mechanism;
  28173. /** Values for ndlType_queueStatus. */
  28174. typedef enum {
  28175. DCC_QUEUE_CLOSED = 0,
  28176. DCC_QUEUE_OPEN = 1,
  28177. } wmi_dcc_ndl_type_queue_status;
  28178. /** For ndlType_acPrio, use the values in wmi_traffic_ac. */
  28179. /** Values for ndlType_datarate */
  28180. typedef enum {
  28181. DCC_DATARATE_3_MBPS = 0,
  28182. DCC_DATARATE_4_5_MBPS = 1,
  28183. DCC_DATARATE_6_MBPS = 2,
  28184. DCC_DATARATE_9_MBPS = 3,
  28185. DCC_DATARATE_12_MBPS = 4,
  28186. DCC_DATARATE_18_MBPS = 5,
  28187. DCC_DATARATE_24_MBPS = 6,
  28188. DCC_DATARATE_27_MBPS = 7,
  28189. } wmi_dcc_ndl_type_datarate;
  28190. /** Data structure for active state configuration. */
  28191. typedef struct {
  28192. /** TLV tag and len; tag equals
  28193. * WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config */
  28194. A_UINT32 tlv_header;
  28195. /**
  28196. * NDL_asStateId, ndlType_numberElements, 1+6 bits.
  28197. * NDL_asChanLoad, ndlType_channelLoad, 1+10 bits.
  28198. */
  28199. A_UINT32 state_info;
  28200. /**
  28201. * NDL_asDcc(AC_BK), ndlType_dccMechanism, 1+6 bits.
  28202. * NDL_asDcc(AC_BE), ndlType_dccMechanism, 1+6 bits.
  28203. * NDL_asDcc(AC_VI), ndlType_dccMechanism, 1+6 bits.
  28204. * NDL_asDcc(AC_VO), ndlType_dccMechanism, 1+6 bits.
  28205. */
  28206. A_UINT32 as_dcc[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DCCMECHANISM)];
  28207. /**
  28208. * NDL_asTxPower(AC_BK), ndlType_txPower, 1+7 bits.
  28209. * NDL_asTxPower(AC_BE), ndlType_txPower, 1+7 bits.
  28210. * NDL_asTxPower(AC_VI), ndlType_txPower, 1+7 bits.
  28211. * NDL_asTxPower(AC_VO), ndlType_txPower, 1+7 bits.
  28212. */
  28213. A_UINT32 as_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  28214. /**
  28215. * NDL_asPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
  28216. * NDL_asPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
  28217. * NDL_asPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
  28218. * NDL_asPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
  28219. */
  28220. A_UINT32 as_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
  28221. /**
  28222. * NDL_asDatarate(AC_BK), ndlType_datarate, 1+3 bits.
  28223. * NDL_asDatarate(AC_BE), ndlType_datarate, 1+3 bits.
  28224. * NDL_asDatarate(AC_VI), ndlType_datarate, 1+3 bits.
  28225. * NDL_asDatarate(AC_VO), ndlType_datarate, 1+3 bits.
  28226. */
  28227. A_UINT32 as_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
  28228. /**
  28229. * NDL_asCarrierSense(AC_BK), ndlType_rxPower, 1+7 bits.
  28230. * NDL_asCarrierSense(AC_BE), ndlType_rxPower, 1+7 bits.
  28231. * NDL_asCarrierSense(AC_VI), ndlType_rxPower, 1+7 bits.
  28232. * NDL_asCarrierSense(AC_VO), ndlType_rxPower, 1+7 bits.
  28233. */
  28234. A_UINT32 as_carrier_sense_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_RXPOWER)];
  28235. } wmi_dcc_ndl_active_state_config;
  28236. #define WMI_NDL_AS_STATE_ID_GET(ptr) WMI_GET_BITS((ptr)->state_info, 0, 7)
  28237. #define WMI_NDL_AS_STATE_ID_SET(ptr,val) WMI_SET_BITS((ptr)->state_info, 0, 7, val)
  28238. #define WMI_NDL_AS_CHAN_LOAD_GET(ptr) WMI_GET_BITS((ptr)->state_info, 7, 11)
  28239. #define WMI_NDL_AS_CHAN_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->state_info, 7, 11, val)
  28240. #define WMI_NDL_AS_DCC_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM)
  28241. #define WMI_NDL_AS_DCC_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM, val)
  28242. #define WMI_NDL_AS_TX_POWER_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  28243. #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)
  28244. #define WMI_NDL_AS_PACKET_INTERVAL_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
  28245. #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)
  28246. #define WMI_NDL_AS_DATARATE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
  28247. #define WMI_NDL_AS_DATARATE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
  28248. #define WMI_NDL_AS_CARRIER_SENSE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER)
  28249. #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)
  28250. /** Data structure for EDCA/QOS parameters. */
  28251. typedef struct
  28252. {
  28253. /** TLV tag and len; tag equals
  28254. * WMITLV_TAG_STRUC_wmi_qos_parameter */
  28255. A_UINT32 tlv_header;
  28256. /** Arbitration Inter-Frame Spacing. Range: 2-15 */
  28257. A_UINT32 aifsn;
  28258. /** Contention Window minimum. Range: 1 - 10 */
  28259. A_UINT32 cwmin;
  28260. /** Contention Window maximum. Range: 1 - 10 */
  28261. A_UINT32 cwmax;
  28262. } wmi_qos_parameter;
  28263. /** Data structure for information specific to a channel. */
  28264. typedef struct {
  28265. /** TLV tag and len; tag equals
  28266. * WMITLV_TAG_STRUC_wmi_ocb_channel */
  28267. A_UINT32 tlv_header;
  28268. A_UINT32 bandwidth; /* MHz units */
  28269. wmi_mac_addr mac_address;
  28270. } wmi_ocb_channel;
  28271. /** Data structure for an element of the schedule array. */
  28272. typedef struct {
  28273. /** TLV tag and len; tag equals
  28274. * WMITLV_TAG_STRUC_wmi_ocb_schedule_element */
  28275. A_UINT32 tlv_header;
  28276. A_UINT32 channel_freq; /* MHz units */
  28277. A_UINT32 total_duration; /* ms units */
  28278. A_UINT32 guard_interval; /* ms units */
  28279. } wmi_ocb_schedule_element;
  28280. /** Data structure for OCB configuration. */
  28281. typedef struct {
  28282. /** TLV tag and len; tag equals
  28283. * WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param */
  28284. A_UINT32 tlv_header;
  28285. /** VDEV id(interface) that is being configured */
  28286. A_UINT32 vdev_id;
  28287. A_UINT32 channel_count;
  28288. A_UINT32 schedule_size;
  28289. A_UINT32 flags;
  28290. A_UINT32 ta_max_duration; /* Max duration of continuing multichannel operation without receiving a TA frame (units = seconds) */
  28291. /** This is followed by a TLV array of wmi_channel. */
  28292. /** This is followed by a TLV array of wmi_ocb_channel. */
  28293. /** This is followed by a TLV array of wmi_qos_parameter. */
  28294. /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
  28295. /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
  28296. /** This is followed by a TLV array of wmi_ocb_schedule_element. */
  28297. } wmi_ocb_set_config_cmd_fixed_param;
  28298. /** WMI Generic hash to be used by any 6 byte or 8 byte hash
  28299. * Used for 6 byte USD Service ID
  28300. */
  28301. typedef struct _wmi_generic_hash {
  28302. /** upper 4 bytes of hash */
  28303. A_UINT32 generic_hash31to0;
  28304. /** lower 4 bytes of hash */
  28305. A_UINT32 generic_hash47to32;
  28306. } wmi_generic_hash;
  28307. typedef struct {
  28308. /** TLV tag and len; tag equals
  28309. * WMITLV_TAG_STRUC_wmi_usd_add_delete_update_service_cmd_fixed_param */
  28310. A_UINT32 tlv_header;
  28311. A_UINT32 vdev_id;
  28312. /* picks service type from WMI_USD_MODE */
  28313. A_UINT32 usd_mode;
  28314. /* element_container_attribute struct:
  28315. * A_UINT8 element_container_attr_data[element_container_attr_len] */
  28316. A_UINT32 element_container_attr_data_len;
  28317. /* 6 bytes of service id hash */
  28318. wmi_generic_hash service_id;
  28319. /* Instance ID of the service */
  28320. A_UINT32 instance_id;
  28321. /* Default frequency in MHz */
  28322. A_UINT32 default_freq;
  28323. /* length of the Service Specific Info */
  28324. A_UINT32 service_specific_info_len;
  28325. /* Time to live in seconds */
  28326. A_UINT32 time_to_live;
  28327. /* picks protocol type from WMI_USD_SERVICE_PROTOCOL_TYPE */
  28328. A_UINT32 protocol_type;
  28329. wmi_mac_addr device_mac_addr;
  28330. } wmi_usd_service_cmd_fixed_param;
  28331. typedef struct {
  28332. A_UINT32 tlv_header;
  28333. A_UINT32 vdev_id;
  28334. /* picks values from WMI_USD_MODE_STATUS */
  28335. A_UINT32 usd_mode_status;
  28336. /* Instance ID of the service */
  28337. A_UINT32 instance_id;
  28338. } wmi_usd_service_event_fixed_param;
  28339. typedef enum {
  28340. WMI_USD_MODE_FLUSH,
  28341. WMI_USD_MODE_PUBLISH,
  28342. WMI_USD_MODE_SUBSCRIBE,
  28343. WMI_USD_MODE_UPDATE_PUBLISH,
  28344. WMI_USD_MODE_CANCEL_PUBLISH,
  28345. WMI_USD_MODE_CANCEL_SUBSCRIBE,
  28346. } WMI_USD_MODE;
  28347. typedef enum {
  28348. WMI_USD_MODE_FLUSH_SUCCESS,
  28349. WMI_USD_MODE_FLUSH_FAIL,
  28350. WMI_USD_MODE_PUBLISH_SUCCESS,
  28351. WMI_USD_MODE_PUBLISH_FAIL,
  28352. WMI_USD_MODE_SUBSCRIBE_SUCCESS,
  28353. WMI_USD_MODE_SUBSCRIBE_FAIL,
  28354. WMI_USD_MODE_UPDATE_PUBLISH_SUCCESS,
  28355. WMI_USD_MODE_UPDATE_PUBLISH_FAIL,
  28356. WMI_USD_MODE_CANCEL_PUBLISH_SUCCESS,
  28357. WMI_USD_MODE_CANCEL_PUBLISH_FAIL,
  28358. WMI_USD_MODE_CANCEL_SUBSCRIBE_SUCCESS,
  28359. WMI_USD_MODE_CANCEL_SUBSCRIBE_FAIL,
  28360. } WMI_USD_MODE_STATUS;
  28361. typedef enum {
  28362. WMI_USD_SERVICE_PROTOCOL_TYPE_BONJOUR = 1,
  28363. WMI_USD_SERVICE_PROTOCOL_TYPE_GENERIC = 2,
  28364. WMI_USD_SERVICE_PROTOCOL_TYPE_CSA_MATTER = 3,
  28365. } WMI_USD_SERVICE_PROTOCOL_TYPE;
  28366. #define EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET 0
  28367. #define EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK 1
  28368. #define WMI_OCB_EXPIRY_TIME_IN_TSF(ptr) (((ptr)->flags & EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK) >> EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET)
  28369. /** Data structure for the response to the WMI_OCB_SET_CONFIG_CMDID command. */
  28370. typedef struct {
  28371. /** TLV tag and len; tag equals
  28372. * WMITLV_TAG_STRUC_wmi_ocb_set_config_resp_event_fixed_param */
  28373. A_UINT32 tlv_header;
  28374. /* VDEV identifier */
  28375. A_UINT32 vdev_id;
  28376. A_UINT32 status;
  28377. } wmi_ocb_set_config_resp_event_fixed_param;
  28378. /* SIZE_UTC_TIME and SIZE_UTC_TIME_ERROR cannot be modified without breaking
  28379. WMI compatibility. */
  28380. #define SIZE_UTC_TIME (10) /* The size of the utc time in bytes. */
  28381. #define SIZE_UTC_TIME_ERROR (5) /* The size of the utc time error in bytes. */
  28382. /** Data structure to set the UTC time. */
  28383. typedef struct {
  28384. /** TLV tag and len; tag equals
  28385. * WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param */
  28386. A_UINT32 tlv_header;
  28387. /* VDEV identifier */
  28388. A_UINT32 vdev_id;
  28389. /** 10 bytes of the utc time. */
  28390. A_UINT32 utc_time[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME,SIZE_BYTE)];
  28391. /** 5 bytes of the time error. */
  28392. A_UINT32 time_error[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME_ERROR,SIZE_BYTE)];
  28393. } wmi_ocb_set_utc_time_cmd_fixed_param;
  28394. #define WMI_UTC_TIME_GET(ptr,byte_index) wmi_packed_arr_get_bits((ptr)->utc_time, byte_index, SIZE_BYTE)
  28395. #define WMI_UTC_TIME_SET(ptr,byte_index,val) wmi_packed_arr_set_bits((ptr)->utc_time, byte_index, SIZE_BYTE, val)
  28396. #define WMI_TIME_ERROR_GET(ptr,byte_index) wmi_packed_arr_get_bits((ptr)->time_error, byte_index, SIZE_BYTE)
  28397. #define WMI_TIME_ERROR_SET(ptr,byte_index,val) wmi_packed_arr_set_bits((ptr)->time_error, byte_index, SIZE_BYTE, val)
  28398. /** Data structure start the timing advertisement. The template for the
  28399. * timing advertisement frame follows this structure in the WMI command.
  28400. */
  28401. typedef struct {
  28402. /** TLV tag and len; tag equals
  28403. * WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param */
  28404. A_UINT32 tlv_header;
  28405. /* VDEV identifier */
  28406. A_UINT32 vdev_id;
  28407. /** Number of times the TA is sent every 5 seconds. */
  28408. A_UINT32 repeat_rate;
  28409. /** The frequency on which to transmit. */
  28410. A_UINT32 channel_freq; /* MHz units */
  28411. /** The offset into the template of the timestamp. */
  28412. A_UINT32 timestamp_offset;
  28413. /** The offset into the template of the time value. */
  28414. A_UINT32 time_value_offset;
  28415. /** The length of the timing advertisement template. The
  28416. * template is in the TLV data. */
  28417. A_UINT32 timing_advert_template_length;
  28418. /** This is followed by a binary array containing the TA template. */
  28419. } wmi_ocb_start_timing_advert_cmd_fixed_param;
  28420. /** Data structure to stop the timing advertisement. */
  28421. typedef struct {
  28422. /** TLV tag and len; tag equals
  28423. * WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param */
  28424. A_UINT32 tlv_header;
  28425. /* VDEV identifier */
  28426. A_UINT32 vdev_id;
  28427. A_UINT32 channel_freq; /* MHz units */
  28428. } wmi_ocb_stop_timing_advert_cmd_fixed_param;
  28429. /** Data structure for the request for WMI_OCB_GET_TSF_TIMER_CMDID. */
  28430. typedef struct {
  28431. /** TLV tag and len; tag equals
  28432. * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param */
  28433. A_UINT32 tlv_header;
  28434. /* VDEV identifier */
  28435. A_UINT32 vdev_id;
  28436. A_UINT32 reserved;
  28437. } wmi_ocb_get_tsf_timer_cmd_fixed_param;
  28438. /** Data structure for the response to WMI_OCB_GET_TSF_TIMER_CMDID. */
  28439. typedef struct {
  28440. /** TLV tag and len; tag equals
  28441. * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_resp_event_fixed_param */
  28442. A_UINT32 tlv_header;
  28443. /* VDEV identifier */
  28444. A_UINT32 vdev_id;
  28445. A_UINT32 tsf_timer_high;
  28446. A_UINT32 tsf_timer_low;
  28447. } wmi_ocb_get_tsf_timer_resp_event_fixed_param;
  28448. /** Data structure for DCC stats configuration per channel. */
  28449. typedef struct {
  28450. /** TLV tag and len; tag equals
  28451. * WMITLV_TAG_STRUC_wmi_dcc_ndl_stats_per_channel */
  28452. A_UINT32 tlv_header;
  28453. /** The channel for which this applies, 16 bits. */
  28454. /** The dcc_stats_bitmap, 8 bits. */
  28455. A_UINT32 chan_info;
  28456. /** Demodulation model parameters. */
  28457. /**
  28458. * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
  28459. * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
  28460. * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
  28461. * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
  28462. * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
  28463. * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
  28464. * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
  28465. * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
  28466. */
  28467. A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
  28468. /** Communication ranges. */
  28469. /**
  28470. * tx_power, ndlType_txPower, 1+7 bits.
  28471. * datarate, ndlType_datarate, 1+3 bits.
  28472. */
  28473. A_UINT32 tx_power_datarate;
  28474. /**
  28475. * NDL_carrierSenseRange, ndlType_distance, 1+12 bits.
  28476. * NDL_estCommRange, ndlType_distance, 1+12 bits.
  28477. */
  28478. A_UINT32 carrier_sense_est_comm_range;
  28479. /** Channel load measures. */
  28480. /**
  28481. * dccSensitivity, ndlType_rxPower, 1+7 bits.
  28482. * carrierSense, ndlType_rxPower, 1+7 bits.
  28483. * NDL_channelLoad, ndlType_channelLoad, 1+10 bits.
  28484. */
  28485. A_UINT32 dcc_stats;
  28486. /**
  28487. * NDL_packetArrivalRate, ndlType_arrivalRate, 1+13 bits.
  28488. * NDL_packetAvgDuration, ndlType_packetDuration, 1+11 bits.
  28489. */
  28490. A_UINT32 packet_stats;
  28491. /**
  28492. * NDL_channelBusyTime, ndlType_channelLoad, 1+10 bits.
  28493. */
  28494. A_UINT32 channel_busy_time;
  28495. /** Transmit packet statistics. */
  28496. /**
  28497. * NDL_txPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
  28498. * NDL_txPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
  28499. * NDL_txPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
  28500. * NDL_txPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
  28501. */
  28502. A_UINT32 tx_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_ARRIVALRATE)];
  28503. /**
  28504. * NDL_txPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  28505. * NDL_txPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  28506. * NDL_txPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  28507. * NDL_txPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  28508. */
  28509. A_UINT32 tx_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
  28510. /**
  28511. * NDL_txChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
  28512. * NDL_txChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
  28513. * NDL_txChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
  28514. * NDL_txChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
  28515. */
  28516. A_UINT32 tx_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_CHANNELUSE)];
  28517. /**
  28518. * NDL_txSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
  28519. * NDL_txSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
  28520. * NDL_txSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
  28521. * NDL_txSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
  28522. */
  28523. A_UINT32 tx_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
  28524. } wmi_dcc_ndl_stats_per_channel;
  28525. #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  28526. #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  28527. #define WMI_NDL_STATS_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
  28528. #define WMI_NDL_STATS_CHAN_FREQ_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
  28529. #define WMI_NDL_STATS_DCC_STATS_BITMAP_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 8)
  28530. #define WMI_NDL_STATS_DCC_STATS_BITMAP_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 16, 8, val)
  28531. #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  28532. #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  28533. #define WMI_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 8)
  28534. #define WMI_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 8, val)
  28535. #define WMI_TX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 4)
  28536. #define WMI_TX_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 4, val)
  28537. #define WMI_NDL_CARRIER_SENSE_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13)
  28538. #define WMI_NDL_CARRIER_SENSE_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13, val)
  28539. #define WMI_NDL_EST_COMM_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13)
  28540. #define WMI_NDL_EST_COMM_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13, val)
  28541. #define WMI_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 0, 8)
  28542. #define WMI_DCC_SENSITIVITY_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 0, 8, val)
  28543. #define WMI_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 8, 8)
  28544. #define WMI_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 8, 8, val)
  28545. #define WMI_NDL_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 16, 11)
  28546. #define WMI_NDL_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 16, 11, val)
  28547. #define WMI_NDL_PACKET_ARRIVAL_RATE_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 0, 14)
  28548. #define WMI_NDL_PACKET_ARRIVAL_RATE_SET(ptr,val) WMI_SET_BITS((ptr)->packet_stats, 0, 14, val)
  28549. #define WMI_NDL_PACKET_AVG_DURATION_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 14, 12)
  28550. #define WMI_NDL_PACKET_AVG_DURATION_SET(ptr,val) WMI_SET_BITS((ptr)->packet_stats, 14, 12, val)
  28551. #define WMI_NDL_CHANNEL_BUSY_TIME_GET(ptr) WMI_GET_BITS((ptr)->channel_busy_time, 0, 11)
  28552. #define WMI_NDL_CHANNEL_BUSY_TIME_SET(ptr,val) WMI_SET_BITS((ptr)->channel_busy_time, 0, 11, val)
  28553. #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)
  28554. #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)
  28555. #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)
  28556. #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)
  28557. #define WMI_NDL_TX_CHANNEL_USE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
  28558. #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)
  28559. #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)
  28560. #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)
  28561. /** Bitmap for DCC stats. */
  28562. typedef enum {
  28563. DCC_STATS_DEMODULATION_MODEL = 1,
  28564. DCC_STATS_COMMUNICATION_RANGES = 2,
  28565. DCC_STATS_CHANNEL_LOAD_MEASURES = 4,
  28566. DCC_STATS_TRANSMIT_PACKET_STATS = 8,
  28567. DCC_STATS_TRANSMIT_MODEL_PARAMETER = 16,
  28568. DCC_STATS_ALL = 0xff,
  28569. } wmi_dcc_stats_bitmap;
  28570. /** Data structure for getting the DCC stats. */
  28571. typedef struct {
  28572. /** TLV tag and len; tag equals
  28573. * WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param */
  28574. A_UINT32 tlv_header;
  28575. /* VDEV identifier */
  28576. A_UINT32 vdev_id;
  28577. /** The number of channels for which stats are being requested. */
  28578. A_UINT32 num_channels;
  28579. /** This is followed by a TLV array of wmi_dcc_channel_stats_request. */
  28580. } wmi_dcc_get_stats_cmd_fixed_param;
  28581. typedef struct {
  28582. /** TLV tag and len; tag equals
  28583. * WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request */
  28584. A_UINT32 tlv_header;
  28585. /** The channel for which this applies. */
  28586. A_UINT32 chan_freq; /* MHz units */
  28587. /** The DCC stats being requested. */
  28588. A_UINT32 dcc_stats_bitmap;
  28589. } wmi_dcc_channel_stats_request;
  28590. /** Data structure for the response with the DCC stats. */
  28591. typedef struct {
  28592. /** TLV tag and len; tag equals
  28593. * WMITLV_TAG_STRUC_wmi_dcc_get_stats_resp_event_fixed_param */
  28594. A_UINT32 tlv_header;
  28595. /* VDEV identifier */
  28596. A_UINT32 vdev_id;
  28597. /** Number of channels in the response. */
  28598. A_UINT32 num_channels;
  28599. /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
  28600. } wmi_dcc_get_stats_resp_event_fixed_param;
  28601. /** Data structure for clearing the DCC stats. */
  28602. typedef struct {
  28603. /** TLV tag and len; tag equals
  28604. * WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param */
  28605. A_UINT32 tlv_header;
  28606. /* VDEV identifier */
  28607. A_UINT32 vdev_id;
  28608. A_UINT32 dcc_stats_bitmap;
  28609. } wmi_dcc_clear_stats_cmd_fixed_param;
  28610. /** Data structure for the pushed DCC stats */
  28611. typedef struct {
  28612. /** TLV tag and len; tag equals
  28613. * WMITLV_TAG_STRUC_wmi_dcc_stats_event_fixed_param */
  28614. A_UINT32 tlv_header;
  28615. /* VDEV identifier */
  28616. A_UINT32 vdev_id;
  28617. /** The number of channels in the response. */
  28618. A_UINT32 num_channels;
  28619. /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
  28620. } wmi_dcc_stats_event_fixed_param;
  28621. /** Data structure for updating NDL per channel. */
  28622. typedef struct {
  28623. /** TLV tag and len; tag equals
  28624. * WMITLV_TAG_STRUC_wmi_dcc_ndl_chan */
  28625. A_UINT32 tlv_header;
  28626. /**
  28627. * Channel frequency, 16 bits
  28628. * NDL_numActiveState, ndlType_numberElements, 1+6 bits
  28629. */
  28630. A_UINT32 chan_info;
  28631. /**
  28632. * NDL_minDccSampling, 10 bits.
  28633. * Maximum time interval between subsequent checks of the DCC rules.
  28634. */
  28635. A_UINT32 ndl_min_dcc_sampling;
  28636. /**
  28637. * dcc_enable, 1 bit.
  28638. * dcc_stats_enable, 1 bit.
  28639. * dcc_stats_interval, 16 bits.
  28640. */
  28641. A_UINT32 dcc_flags;
  28642. /** General DCC configuration. */
  28643. /**
  28644. * NDL_timeUp, ndlType_timing, 1+12 bits.
  28645. * NDL_timeDown, ndlType_timing, 1+12 bits.
  28646. */
  28647. A_UINT32 general_config;
  28648. /** Transmit power thresholds. */
  28649. /**
  28650. * NDL_minTxPower, ndlType_txPower, 1+7 bits.
  28651. * NDL_maxTxPower, ndlType_txPower, 1+7 bits.
  28652. */
  28653. A_UINT32 min_max_tx_power; /* see "ETSI TS 102 687" table above for units */
  28654. /**
  28655. * NDL_defTxPower(AC_BK), ndlType_txPower, 1+7 bits.
  28656. * NDL_defTxPower(AC_BE), ndlType_txPower, 1+7 bits.
  28657. * NDL_defTxPower(AC_VI), ndlType_txPower, 1+7 bits.
  28658. * NDL_defTxPower(AC_VO), ndlType_txPower, 1+7 bits.
  28659. */
  28660. /* see "ETSI TS 102 687" table above for units */
  28661. A_UINT32 def_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
  28662. /** Packet timing thresholds. */
  28663. /**
  28664. * NDL_maxPacketDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  28665. * NDL_maxPacketDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  28666. * NDL_maxPacketDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  28667. * NDL_maxPacketDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  28668. */
  28669. A_UINT32 max_packet_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
  28670. /**
  28671. * NDL_minPacketInterval, ndlType_packetInterval, 1+10 bits.
  28672. * NDL_maxPacketInterval, ndlType_packetInterval, 1+10 bits.
  28673. */
  28674. A_UINT32 min_max_packet_interval;
  28675. /**
  28676. * NDL_defPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
  28677. * NDL_defPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
  28678. * NDL_defPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
  28679. * NDL_defPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
  28680. */
  28681. A_UINT32 def_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETINTERVAL)];
  28682. /** Packet datarate thresholds. */
  28683. /**
  28684. * NDL_minDatarate, ndlType_datarate, 1+3 bits.
  28685. * NDL_maxDatarate, ndlType_datarate, 1+3 bits.
  28686. */
  28687. A_UINT32 min_max_datarate;
  28688. /**
  28689. * NDL_defDatarate(AC_BK), ndlType_datarate, 1+3 bits.
  28690. * NDL_defDatarate(AC_BE), ndlType_datarate, 1+3 bits.
  28691. * NDL_defDatarate(AC_VI), ndlType_datarate, 1+3 bits.
  28692. * NDL_defDatarate(AC_VO), ndlType_datarate, 1+3 bits.
  28693. */
  28694. A_UINT32 def_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_DATARATE)];
  28695. /** Receive signal thresholds. */
  28696. /**
  28697. * NDL_minCarrierSense, ndlType_rxPower, 1+7 bits.
  28698. * NDL_maxCarrierSense, ndlType_rxPower, 1+7 bits.
  28699. * NDL_defCarrierSense, ndlType_rxPower, 1+7 bits.
  28700. */
  28701. A_UINT32 min_max_def_carrier_sense;
  28702. /** Receive model parameter. */
  28703. /**
  28704. * NDL_defDccSensitivity, ndlType_rxPower, 1+7 bits.
  28705. * NDL_maxCsRange, ndlType_distance, 1+12 bits.
  28706. * NDL_refPathLoss, ndlType_pathloss, 1+5 bits.
  28707. */
  28708. A_UINT32 receive_model_parameter;
  28709. /**
  28710. * NDL_minSNR, ndlType_snr, 1+7 bits.
  28711. */
  28712. A_UINT32 receive_model_parameter_2;
  28713. /** Demodulation model parameters. */
  28714. /**
  28715. * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
  28716. * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
  28717. * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
  28718. * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
  28719. * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
  28720. * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
  28721. * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
  28722. * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
  28723. */
  28724. A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
  28725. /** Transmit model parameters. */
  28726. /**
  28727. * NDL_tmPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
  28728. * NDL_tmPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
  28729. * NDL_tmPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
  28730. * NDL_tmPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
  28731. */
  28732. A_UINT32 tm_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
  28733. /**
  28734. * NDL_tmPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  28735. * NDL_tmPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  28736. * NDL_tmPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  28737. * NDL_tmPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  28738. */
  28739. A_UINT32 tm_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
  28740. /**
  28741. * NDL_tmSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
  28742. * NDL_tmSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
  28743. * NDL_tmSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
  28744. * NDL_tmSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
  28745. */
  28746. A_UINT32 tm_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  28747. /**
  28748. * NDL_tmMaxChannelUse, ndlType_channelUse, 1+13 bits.
  28749. */
  28750. A_UINT32 tm_max_channel_use;
  28751. /**
  28752. * NDL_tmChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
  28753. * NDL_tmChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
  28754. * NDL_tmChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
  28755. * NDL_tmChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
  28756. */
  28757. A_UINT32 tm_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
  28758. /** Channel load thresholds. */
  28759. /**
  28760. * NDL_minChannelLoad, ndlType_channelLoad, 1+10 bits.
  28761. * NDL_maxChannelLoad, ndlType_channelLoad, 1+10 bits.
  28762. */
  28763. A_UINT32 min_max_channel_load;
  28764. /** Transmit queue parameters. */
  28765. /**
  28766. * NDL_numQueue, ndlType_acPrio, 1+3 bits.
  28767. * NDL_refQueueStatus(AC_BK), ndlType_queueStatus, 1+1 bit.
  28768. * NDL_refQueueStatus(AC_BE), ndlType_queueStatus, 1+1 bit.
  28769. * NDL_refQueueStatus(AC_VI), ndlType_queueStatus, 1+1 bit.
  28770. * NDL_refQueueStatus(AC_VO), ndlType_queueStatus, 1+1 bit.
  28771. */
  28772. A_UINT32 transmit_queue_parameters;
  28773. /**
  28774. * NDL_refQueueLen(AC_BK), ndlType_numberElements, 1+6 bits.
  28775. * NDL_refQueueLen(AC_BE), ndlType_numberElements, 1+6 bits.
  28776. * NDL_refQueueLen(AC_VI), ndlType_numberElements, 1+6 bits.
  28777. * NDL_refQueueLen(AC_VO), ndlType_numberElements, 1+6 bits.
  28778. */
  28779. A_UINT32 numberElements[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_NUMBERELEMENTS)];
  28780. } wmi_dcc_ndl_chan;
  28781. #define WMI_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
  28782. #define WMI_CHAN_FREQ_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
  28783. #define WMI_NDL_NUM_ACTIVE_STATE_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 7)
  28784. #define WMI_NDL_NUM_ACTIVE_STATE_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 16, 7, val)
  28785. #define WMI_NDL_MIN_DCC_SAMPLING_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10)
  28786. #define WMI_NDL_MIN_DCC_SAMPLING_SET(ptr,val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10, val)
  28787. #define WMI_NDL_MEASURE_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16)
  28788. #define WMI_NDL_MEASURE_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16, val)
  28789. #define WMI_NDL_DCC_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 0, 1)
  28790. #define WMI_NDL_DCC_ENABLE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 0, 1, val)
  28791. #define WMI_NDL_DCC_STATS_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 1, 1)
  28792. #define WMI_NDL_DCC_STATS_ENABLE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 1, 1, val)
  28793. #define WMI_NDL_DCC_STATS_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 2, 16)
  28794. #define WMI_NDL_DCC_STATS_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 2, 16, val)
  28795. #define WMI_NDL_TIME_UP_GET(ptr) WMI_GET_BITS((ptr)->general_config, 0, 13)
  28796. #define WMI_NDL_TIME_UP_SET(ptr,val) WMI_SET_BITS((ptr)->general_config, 0, 13, val)
  28797. #define WMI_NDL_TIME_DOWN_GET(ptr) WMI_GET_BITS((ptr)->general_config, 13, 13)
  28798. #define WMI_NDL_TIME_DOWN_SET(ptr,val) WMI_SET_BITS((ptr)->general_config, 13, 13, val)
  28799. #define WMI_NDL_MIN_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 0, 8)
  28800. #define WMI_NDL_MIN_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_tx_power, 0, 8, val)
  28801. #define WMI_NDL_MAX_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 8, 8)
  28802. #define WMI_NDL_MAX_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_tx_power, 8, 8, val)
  28803. #define WMI_NDL_DEF_TX_POWER_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  28804. #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)
  28805. #define WMI_NDL_MAX_PACKET_DURATION_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
  28806. #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)
  28807. #define WMI_NDL_MIN_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 0, 11)
  28808. #define WMI_NDL_MIN_PACKET_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_packet_interval, 0, 11, val)
  28809. #define WMI_NDL_MAX_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 11, 11)
  28810. #define WMI_NDL_MAX_PACKET_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_packet_interval, 11, 11, val)
  28811. #define WMI_NDL_DEF_PACKET_INTERVAL_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
  28812. #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)
  28813. #define WMI_NDL_MIN_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 0, 4)
  28814. #define WMI_NDL_MIN_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_datarate, 0, 4, val)
  28815. #define WMI_NDL_MAX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 4, 4)
  28816. #define WMI_NDL_MAX_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_datarate, 4, 4, val)
  28817. #define WMI_NDL_DEF_DATARATE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
  28818. #define WMI_NDL_DEF_DATARATE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
  28819. #define WMI_NDL_MIN_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 0, 8)
  28820. #define WMI_NDL_MIN_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 0, 8, val)
  28821. #define WMI_NDL_MAX_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 8, 8)
  28822. #define WMI_NDL_MAX_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 8, 8, val)
  28823. #define WMI_NDL_DEF_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 16, 8)
  28824. #define WMI_NDL_DEF_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 16, 8, val)
  28825. #define WMI_NDL_DEF_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 0, 8)
  28826. #define WMI_NDL_DEF_DCC_SENSITIVITY_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 0, 8, val)
  28827. #define WMI_NDL_MAX_CS_RANGE_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 8, 13)
  28828. #define WMI_NDL_MAX_CS_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 8, 13, val)
  28829. #define WMI_NDL_REF_PATH_LOSS_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 21, 6)
  28830. #define WMI_NDL_REF_PATH_LOSS_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 21, 6, val)
  28831. #define WMI_NDL_MIN_SNR_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter_2, 0, 8)
  28832. #define WMI_NDL_MIN_SNR_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter_2, 0, 8, val)
  28833. #define WMI_NDL_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  28834. #define WMI_NDL_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  28835. #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)
  28836. #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)
  28837. #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)
  28838. #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)
  28839. #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)
  28840. #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)
  28841. #define WMI_NDL_TM_MAX_CHANNEL_USE_GET(ptr) WMI_GET_BITS((ptr)->tm_max_channel_use, 0, 14)
  28842. #define WMI_NDL_TM_MAX_CHANNEL_USE_SET(ptr,val) WMI_SET_BITS((ptr)->tm_max_channel_use, 0, 14, val)
  28843. #define WMI_NDL_TM_CHANNEL_USE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
  28844. #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)
  28845. #define WMI_NDL_MIN_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 0, 11)
  28846. #define WMI_NDL_MIN_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_channel_load, 0, 11, val)
  28847. #define WMI_NDL_MAX_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 11, 11)
  28848. #define WMI_NDL_MAX_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_channel_load, 11, 11, val)
  28849. #define WMI_NDL_NUM_QUEUE_GET(ptr) WMI_GET_BITS((ptr)->transmit_queue_parameters, 0, 4)
  28850. #define WMI_NDL_NUM_QUEUE_SET(ptr,val) WMI_SET_BITS((ptr)->transmit_queue_parameters, 0, 4, val)
  28851. #define WMI_NDL_REF_QUEUE_STATUS_GET(ptr,acprio) WMI_GET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2)
  28852. #define WMI_NDL_REF_QUEUE_STATUS_SET(ptr,acprio,val) WMI_SET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2, val)
  28853. #define WMI_NDL_REF_QUEUE_LEN_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS)
  28854. #define WMI_NDL_REF_QUEUE_LEN_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS, val)
  28855. /** Data structure for updating the NDL. */
  28856. typedef struct {
  28857. /** TLV tag and len; tag equals
  28858. * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param */
  28859. A_UINT32 tlv_header;
  28860. /* VDEV identifier */
  28861. A_UINT32 vdev_id;
  28862. /** The number of channels in the request. */
  28863. A_UINT32 num_channel;
  28864. /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
  28865. /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
  28866. } wmi_dcc_update_ndl_cmd_fixed_param;
  28867. typedef struct {
  28868. /** TLV tag and len; tag equals
  28869. * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_resp_event_fixed_param */
  28870. A_UINT32 tlv_header;
  28871. /* VDEV identifier */
  28872. A_UINT32 vdev_id;
  28873. A_UINT32 status;
  28874. } wmi_dcc_update_ndl_resp_event_fixed_param;
  28875. /* Actions for TSF timestamp */
  28876. typedef enum {
  28877. TSF_TSTAMP_CAPTURE_REQ = 1,
  28878. TSF_TSTAMP_CAPTURE_RESET = 2,
  28879. TSF_TSTAMP_READ_VALUE = 3,
  28880. TSF_TSTAMP_QTIMER_CAPTURE_REQ = 4,
  28881. TSF_TSTAMP_AUTO_REPORT_ENABLE = 5,
  28882. TSF_TSTAMP_AUTO_REPORT_DISABLE = 6,
  28883. TSF_TSTAMP_PERIODIC_REPORT_REQ = 5,
  28884. } wmi_tsf_tstamp_action;
  28885. typedef enum {
  28886. TSF_TSTAMP_REPORT_TTIMER = 0x1, /* bit 0: TSF Timer */
  28887. TSF_TSTAMP_REPORT_QTIMER = 0x2, /* bit 1: H/T common Timer */
  28888. } wmi_tsf_tstamp_report_flags;
  28889. #define TSF_TSTAMP_REPORT_PERIOD_MIN 1000 /* ms units */
  28890. typedef struct {
  28891. /** TLV tag and len; tag equals
  28892. * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */
  28893. A_UINT32 tlv_header;
  28894. /** unique id identifying the VDEV, generated by the caller */
  28895. A_UINT32 vdev_id;
  28896. /* action type, refer to wmi_tsf_tstamp_action */
  28897. A_UINT32 tsf_action;
  28898. /*
  28899. * The below fields are valid only when tsf_action is
  28900. * TSF_TSTAMP_PERIODIC_REPORT_REQ.
  28901. */
  28902. A_UINT32 period; /* the period of report timestamp, ms units */
  28903. A_UINT32 flags; /* wmi_tsf_tstamp_report_flags */
  28904. } wmi_vdev_tsf_tstamp_action_cmd_fixed_param;
  28905. typedef struct {
  28906. /* TLV tag and len; tag equals
  28907. * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */
  28908. A_UINT32 tlv_header;
  28909. /* VDEV identifier */
  28910. A_UINT32 vdev_id;
  28911. /* low 32bit of tsf */
  28912. A_UINT32 tsf_low;
  28913. /* high 32 bit of tsf */
  28914. A_UINT32 tsf_high;
  28915. /* low 32 bits of qtimer */
  28916. A_UINT32 qtimer_low;
  28917. /* high 32 bits of qtimer */
  28918. A_UINT32 qtimer_high;
  28919. /*
  28920. * tsf_id: TSF ID for the current vdev
  28921. * This field should be ignored unless the tsf_id_valid flag is set.
  28922. */
  28923. A_UINT32 tsf_id;
  28924. /*
  28925. * The mac_id and tsf_id fields should be ignored unless the
  28926. * tsf_id_valid flag is set.
  28927. */
  28928. A_UINT32 tsf_id_valid;
  28929. /*
  28930. * mac_id: MAC identifier
  28931. * This field should be ignored unless the tsf_id_valid flag is set.
  28932. */
  28933. A_UINT32 mac_id;
  28934. /*
  28935. * The original mac_id_valid field that was originally used to specify
  28936. * whether the mac_id field is valid has been repurposed to instead
  28937. * specify whether this message is a TSF report or a UL delay report.
  28938. */
  28939. union {
  28940. A_UINT32 mac_id_valid; /* original name */
  28941. /* ul_delay_or_tsf_report:
  28942. * New name for the field, reflecting its new purpose.
  28943. * ul_delay_or_tsf_report = 1 -> UL delay
  28944. * ul_delay_or_tsf_report = 0 -> TSF report
  28945. */
  28946. A_UINT32 ul_delay_or_tsf_report;
  28947. };
  28948. /* low 32 bits of wlan global tsf */
  28949. A_UINT32 wlan_global_tsf_low;
  28950. /* high 32 bits of wlan global tsf */
  28951. A_UINT32 wlan_global_tsf_high;
  28952. /* low 32 bits of tqm timer */
  28953. A_UINT32 tqm_timer_low;
  28954. /* high 32 bits of tqm timer */
  28955. A_UINT32 tqm_timer_high;
  28956. /* use tqm timer flag */
  28957. A_UINT32 use_tqm_timer;
  28958. } wmi_vdev_tsf_report_event_fixed_param;
  28959. /* ie_id values:
  28960. * 0 to 255 are used for individual IEEE802.11 Information Element types
  28961. */
  28962. #define WMI_SET_VDEV_IE_ID_SCAN_SET_DEFAULT_IE 256
  28963. /* source values: */
  28964. #define WMI_SET_VDEV_IE_SOURCE_HOST 0x0
  28965. /* band values: */
  28966. typedef enum {
  28967. WMI_SET_VDEV_IE_BAND_ALL = 0,
  28968. WMI_SET_VDEV_IE_BAND_2_4GHZ,
  28969. WMI_SET_VDEV_IE_BAND_5GHZ,
  28970. } wmi_set_vdev_ie_band;
  28971. typedef struct {
  28972. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */
  28973. A_UINT32 tlv_header;
  28974. /** unique id identifying the VDEV, generated by the caller */
  28975. A_UINT32 vdev_id;
  28976. /** unique id to identify the ie_data as defined by ieee 802.11 spec */
  28977. A_UINT32 ie_id;
  28978. /** ie_len corresponds to num of bytes in ie_data[] */
  28979. A_UINT32 ie_len;
  28980. /** source of this command */
  28981. A_UINT32 ie_source; /* see WMI_SET_VDEV_IE_SOURCE_ defs */
  28982. /** band for this IE - se wmi_set_vdev_ie_band enum */
  28983. A_UINT32 band;
  28984. /**
  28985. * Following this structure is the TLV byte stream of ie data of length ie_buf_len:
  28986. * A_UINT8 ie_data[];
  28987. *
  28988. */
  28989. } wmi_vdev_set_ie_cmd_fixed_param;
  28990. /* DISA feature related data structures */
  28991. #define MAX_MAC_HEADER_LEN 32
  28992. typedef enum {
  28993. WMI_ENCRYPT_DECRYPT_FLAG_INVALID,
  28994. WMI_ENCRYPT = 1,
  28995. WMI_DECRYPT = 2,
  28996. } WMI_ENCRYPT_DECRYPT_FLAG;
  28997. typedef struct {
  28998. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param */
  28999. /** unique id identifying the VDEV, generated by the caller */
  29000. A_UINT32 vdev_id;
  29001. A_UINT32 key_flag; /* WMI_ENCRYPT_DECRYPT_FLAG */
  29002. A_UINT32 key_idx;
  29003. A_UINT32 key_cipher;
  29004. A_UINT32 key_len; /* units = bytes */
  29005. A_UINT32 key_txmic_len; /* units = bytes */
  29006. A_UINT32 key_rxmic_len; /* units = bytes */
  29007. /** Key: This array needs to be provided in little-endian order */
  29008. A_UINT8 key_data[WMI_MAX_KEY_LEN];
  29009. /** Packet number: This array needs to be provided in little-endian order.
  29010. * If the PN is less than 8 bytes, the PN data shall be placed into this
  29011. * pn[] array starting at byte 0, leaving the MSBs empty.
  29012. */
  29013. A_UINT8 pn[8];
  29014. /** 802.11 MAC header to be typecast to struct ieee80211_qosframe_addr4
  29015. * This array needs to be provided in little-endian order.
  29016. */
  29017. A_UINT8 mac_hdr[MAX_MAC_HEADER_LEN];
  29018. A_UINT32 data_len; /** Payload length, units = bytes */
  29019. /*
  29020. * Following this struct are this TLV:
  29021. * A_UINT8 data[]; <-- actual data to be encrypted,
  29022. * needs to be provided in little-endian order
  29023. */
  29024. } wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param;
  29025. /* This event is generated in response to WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from HOST.
  29026. * On receiving WMI command WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from
  29027. * HOST with DISA test vectors, DISA frame will prepared and submitted to HW,
  29028. * then on receiving the tx completion for the DISA frame this WMI event
  29029. * will be delivered to HOST with the encrypted frame.
  29030. */
  29031. typedef struct {
  29032. /** TLV tag and len; tag equals
  29033. * WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param */
  29034. A_UINT32 tlv_header;
  29035. /* VDEV identifier */
  29036. A_UINT32 vdev_id;
  29037. A_INT32 status; /* 0: success, -1: Failure, */
  29038. /* 802.11 header length + encrypted payload length (units = bytes) */
  29039. A_UINT32 data_length;
  29040. /*
  29041. * Following this struct is this TLV:
  29042. * A_UINT8 enc80211_frame[]; <-- Encrypted 802.11 frame;
  29043. * 802.11 header + encrypted payload,
  29044. * provided in little-endian order
  29045. */
  29046. } wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param;
  29047. /* DEPRECATED - use wmi_pdev_set_pcl_cmd_fixed_param instead */
  29048. typedef struct {
  29049. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param */
  29050. /** Set Preferred Channel List **/
  29051. /** # of channels to scan */
  29052. A_UINT32 num_chan;
  29053. /**
  29054. * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
  29055. * structure. The TLV's are:
  29056. * A_UINT32 channel_list[];
  29057. **/
  29058. } wmi_soc_set_pcl_cmd_fixed_param;
  29059. /* Values for channel_weight */
  29060. typedef enum {
  29061. WMI_PCL_WEIGHT_DISALLOW = 0,
  29062. WMI_PCL_WEIGHT_LOW = 1,
  29063. WMI_PCL_WEIGHT_MEDIUM = 2,
  29064. WMI_PCL_WEIGHT_HIGH = 3,
  29065. WMI_PCL_WEIGHT_VERY_HIGH = 4,
  29066. } wmi_pcl_chan_weight;
  29067. typedef struct {
  29068. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_pcl_cmd_fixed_param */
  29069. /** Set Preferred Channel List **/
  29070. /** pdev_id for identifying the MAC
  29071. * See macros starting with WMI_PDEV_ID_ for values.
  29072. */
  29073. A_UINT32 pdev_id;
  29074. /** # of channels to scan */
  29075. A_UINT32 num_chan;
  29076. /**
  29077. * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
  29078. * structure. The TLV's are:
  29079. * A_UINT32 channel_weight[]; channel order & size will be as per the list provided in WMI_SCAN_CHAN_LIST_CMDID
  29080. **/
  29081. } wmi_pdev_set_pcl_cmd_fixed_param;
  29082. /* DEPRECATED - use wmi_pdev_set_hw_mode_cmd_fixed_param instead */
  29083. typedef struct {
  29084. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param */
  29085. /** Set Hardware Mode **/
  29086. /* Hardware Mode Index */
  29087. A_UINT32 hw_mode_index;
  29088. } wmi_soc_set_hw_mode_cmd_fixed_param;
  29089. typedef struct {
  29090. A_UINT32 tlv_header; /* TLV tag and len tag equals WMITLV_TAG_STRUC_wmi_pdev_band_to_mac */
  29091. /** pdev_id for identifying the MAC
  29092. * See macros starting with WMI_PDEV_ID_ for values.
  29093. */
  29094. A_UINT32 pdev_id;
  29095. /* start frequency in MHz */
  29096. A_UINT32 start_freq;
  29097. /* end frequency in MHz */
  29098. A_UINT32 end_freq;
  29099. } wmi_pdev_band_to_mac;
  29100. typedef struct {
  29101. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_cmd_fixed_param */
  29102. /** Set Hardware Mode **/
  29103. /** pdev_id for identifying the MAC
  29104. * See macros starting with WMI_PDEV_ID_ for values.
  29105. */
  29106. A_UINT32 pdev_id;
  29107. /* Hardware Mode Index */
  29108. A_UINT32 hw_mode_index;
  29109. /* Number of band to mac TLVs */
  29110. A_UINT32 num_band_to_mac;
  29111. /* Followed by TLVs of type
  29112. * num_band_to_mac * wmi_pdev_band_to_mac.
  29113. */
  29114. } wmi_pdev_set_hw_mode_cmd_fixed_param;
  29115. /* DEPRECATED - use wmi_pdev_set_dual_mac_config_cmd_fixed_param instead */
  29116. typedef struct {
  29117. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_cmd_fixed_param */
  29118. /** Set Dual MAC Firmware Configuration **/
  29119. /* Concurrent scan configuration bits */
  29120. A_UINT32 concurrent_scan_config_bits;
  29121. /* Firmware mode configuration bits */
  29122. A_UINT32 fw_mode_config_bits;
  29123. } wmi_soc_set_dual_mac_config_cmd_fixed_param;
  29124. typedef struct {
  29125. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_cmd_fixed_param */
  29126. /** Set Dual MAC Firmware Configuration **/
  29127. /** pdev_id for identifying the MAC
  29128. * See macros starting with WMI_PDEV_ID_ for values.
  29129. */
  29130. A_UINT32 pdev_id;
  29131. /* Concurrent scan configuration bits */
  29132. A_UINT32 concurrent_scan_config_bits;
  29133. /* Firmware mode configuration bits */
  29134. A_UINT32 fw_mode_config_bits;
  29135. } wmi_pdev_set_mac_config_cmd_fixed_param;
  29136. typedef struct { /* DEPRECATED */
  29137. A_UINT32 num_tx_chains;
  29138. A_UINT32 num_rx_chains;
  29139. A_UINT32 reserved[2];
  29140. } soc_num_tx_rx_chains;
  29141. typedef struct {
  29142. A_UINT32 num_tx_chains_2g;
  29143. A_UINT32 num_rx_chains_2g;
  29144. A_UINT32 num_tx_chains_5g;
  29145. A_UINT32 num_rx_chains_5g;
  29146. } band_num_tx_rx_chains;
  29147. typedef union { /* DEPRECATED */
  29148. soc_num_tx_rx_chains soc_txrx_chain_setting;
  29149. band_num_tx_rx_chains band_txrx_chain_setting;
  29150. } antenna_num_tx_rx_chains;
  29151. typedef enum {
  29152. ANTENNA_MODE_DISABLED = 0x0,
  29153. ANTENNA_MODE_LOW_POWER_LOCATION_SCAN = 0x01,
  29154. /* reserved */
  29155. } antenna_mode_reason;
  29156. /* DEPRECATED - use wmi_pdev_set_antenna_mode_cmd_fixed_param instead */
  29157. typedef struct {
  29158. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_antenna_mode_cmd_fixed_param */
  29159. /* the reason for setting antenna mode, refer antenna_mode_reason */
  29160. A_UINT32 reason;
  29161. /*
  29162. * The above reason parameter will select whether the following union
  29163. * is soc_num_tx_rx_chains or band_num_tx_rx_chains.
  29164. */
  29165. antenna_num_tx_rx_chains num_txrx_chains_setting;
  29166. } wmi_soc_set_antenna_mode_cmd_fixed_param;
  29167. typedef struct {
  29168. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_mode_cmd_fixed_param */
  29169. /** pdev_id for identifying the MAC
  29170. * See macros starting with WMI_PDEV_ID_ for values.
  29171. */
  29172. A_UINT32 pdev_id;
  29173. /* Bits 0-15 is the number of RX chains and 16-31 is the number of TX chains */
  29174. A_UINT32 num_txrx_chains;
  29175. } wmi_pdev_set_antenna_mode_cmd_fixed_param;
  29176. /** Data structure for information specific to a VDEV to MAC mapping. */
  29177. /* DEPRECATED - use wmi_pdev_set_hw_mode_response_vdev_mac_entry instead */
  29178. typedef struct {
  29179. /** TLV tag and len; tag equals
  29180. * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */
  29181. A_UINT32 tlv_header;
  29182. A_UINT32 vdev_id; /* VDEV ID */
  29183. A_UINT32 mac_id; /* MAC ID */
  29184. } wmi_soc_set_hw_mode_response_vdev_mac_entry;
  29185. /** Data structure for information specific to a VDEV to MAC mapping. */
  29186. typedef struct {
  29187. /** TLV tag and len; tag equals
  29188. * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_vdev_mac_entry */
  29189. A_UINT32 tlv_header;
  29190. /** pdev_id for identifying the MAC
  29191. * See macros starting with WMI_PDEV_ID_ for values.
  29192. */
  29193. A_UINT32 pdev_id;
  29194. A_UINT32 vdev_id;
  29195. } wmi_pdev_set_hw_mode_response_vdev_mac_entry;
  29196. /* DEPRECATED - use wmi_pdev_set_hw_mode_response_event_fixed_param instead */
  29197. typedef struct {
  29198. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param */
  29199. /** Set Hardware Mode Response Event **/
  29200. /* Status of set_hw_mode command */
  29201. /*
  29202. * Values for Status:
  29203. * 0 - OK; command successful
  29204. * 1 - EINVAL; Requested invalid hw_mode
  29205. * 2 - ECANCELED; HW mode change canceled
  29206. * 3 - ENOTSUP; HW mode not supported
  29207. * 4 - EHARDWARE; HW mode change prevented by hardware
  29208. * 5 - EPENDING; HW mode change is pending
  29209. * 6 - ECOEX; HW mode change conflict with Coex
  29210. */
  29211. A_UINT32 status;
  29212. /* Configured Hardware Mode */
  29213. A_UINT32 cfgd_hw_mode_index;
  29214. /* Number of Vdev to Mac entries */
  29215. A_UINT32 num_vdev_mac_entries;
  29216. /**
  29217. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  29218. * structure. The TLV's are:
  29219. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  29220. */
  29221. } wmi_soc_set_hw_mode_response_event_fixed_param;
  29222. typedef struct {
  29223. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_event_fixed_param */
  29224. /** Set Hardware Mode Response Event **/
  29225. /** pdev_id for identifying the MAC
  29226. * See macros starting with WMI_PDEV_ID_ for values.
  29227. */
  29228. A_UINT32 pdev_id;
  29229. /* Status of set_hw_mode command */
  29230. /*
  29231. * Values for Status:
  29232. * 0 - OK; command successful
  29233. * 1 - EINVAL; Requested invalid hw_mode
  29234. * 2 - ECANCELED; HW mode change canceled
  29235. * 3 - ENOTSUP; HW mode not supported
  29236. * 4 - EHARDWARE; HW mode change prevented by hardware
  29237. * 5 - EPENDING; HW mode change is pending
  29238. * 6 - ECOEX; HW mode change conflict with Coex
  29239. */
  29240. A_UINT32 status;
  29241. /* Configured Hardware Mode */
  29242. A_UINT32 cfgd_hw_mode_index;
  29243. /* Number of Vdev to Mac entries */
  29244. A_UINT32 num_vdev_mac_entries;
  29245. /**
  29246. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  29247. * structure. The TLV's are:
  29248. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  29249. */
  29250. } wmi_pdev_set_hw_mode_response_event_fixed_param;
  29251. /* DEPRECATED - use wmi_pdev_hw_mode_transition_event_fixed_param instead */
  29252. typedef struct {
  29253. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param */
  29254. /** Hardware Mode Transition Event **/
  29255. /* Original or old Hardware mode */
  29256. A_UINT32 old_hw_mode_index;
  29257. /* New Hardware Mode */
  29258. A_UINT32 new_hw_mode_index;
  29259. /* Number of Vdev to Mac entries */
  29260. A_UINT32 num_vdev_mac_entries;
  29261. /**
  29262. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  29263. * structure. The TLV's are:
  29264. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  29265. */
  29266. } wmi_soc_hw_mode_transition_event_fixed_param;
  29267. typedef struct {
  29268. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_hw_mode_transition_event_fixed_param */
  29269. /** Hardware Mode Transition Event **/
  29270. /** pdev_id for identifying the MAC
  29271. * See macros starting with WMI_PDEV_ID_ for values.
  29272. */
  29273. A_UINT32 pdev_id;
  29274. /* Original or old Hardware mode */
  29275. A_UINT32 old_hw_mode_index;
  29276. /* New Hardware Mode */
  29277. A_UINT32 new_hw_mode_index;
  29278. /* Number of Vdev to Mac entries */
  29279. A_UINT32 num_vdev_mac_entries;
  29280. /**
  29281. * TLV (tag length value) parameters follow the pdev_set_hw_mode_response_event
  29282. * structure. The TLV's are:
  29283. * wmi_pdev_set_hw_mode_response_vdev_mac_entry
  29284. * wmi_pdev_set_hw_mode_response_vdev_mac_mapping[];
  29285. * wmi_pdev_band_to_mac mac_freq_mapping[];
  29286. */
  29287. } wmi_pdev_hw_mode_transition_event_fixed_param;
  29288. /**
  29289. * This command is sent from WLAN host driver to firmware for
  29290. * plugging in reorder queue desc to lithium hw.
  29291. *
  29292. * Example: plug-in queue desc for TID 5
  29293. * host->target: WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
  29294. * (vdev_id = PEER vdev id,
  29295. * peer_macaddr = PEER mac addr,
  29296. * tid = 5,
  29297. * queue_ptr_lo = queue desc addr lower 32 bits,
  29298. * queue_ptr_hi = queue desc addr higher 32 bits,
  29299. * queue_no = 16-bit number assigned by host for queue,
  29300. * stored in bits 15:0 of queue_no field)
  29301. */
  29302. typedef struct {
  29303. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_setup_cmd_fixed_param */
  29304. A_UINT32 vdev_id;
  29305. wmi_mac_addr peer_macaddr; /* peer mac address */
  29306. A_UINT32 tid; /* 0 to 15 = QoS TIDs, 16 = non-qos TID */
  29307. A_UINT32 queue_ptr_lo; /* lower 32 bits of queue desc address */
  29308. A_UINT32 queue_ptr_hi; /* upper 32 bits of queue desc address */
  29309. A_UINT32 queue_no; /* 16-bit number assigned by host for queue,
  29310. stored in bits 15:0 of queue_no field */
  29311. A_UINT32 ba_window_size_valid; /* Is ba_window_size valid?
  29312. * 0 = Invalid, 1 = Valid */
  29313. A_UINT32 ba_window_size; /* Valid values: 0 to 256
  29314. * Host sends the message when BA session is
  29315. * established or terminated for the TID. */
  29316. } wmi_peer_reorder_queue_setup_cmd_fixed_param;
  29317. typedef struct {
  29318. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_per_reorder_q_setup_params_t */
  29319. A_UINT32 tid; /* 0 to 15 = QoS TIDs, 16 = non-qos TID */
  29320. A_UINT32 queue_ptr_lo; /* lower 32 bits of queue desc address */
  29321. A_UINT32 queue_ptr_hi; /* upper 32 bits of queue desc address */
  29322. A_UINT32 queue_no; /* 16-bit number assigned by host for queue,
  29323. * stored in bits 15:0 of queue_no field */
  29324. A_UINT32 ba_window_size_valid; /* Is ba_window_size valid?
  29325. * 0 = Invalid, 1 = Valid */
  29326. A_UINT32 ba_window_size; /* Valid values: 0 to 256
  29327. * Host sends the message when BA session is
  29328. * established or terminated for the TID. */
  29329. } wmi_peer_per_reorder_q_setup_params_t;
  29330. /**
  29331. * This command is sent from WLAN host driver to firmware for
  29332. * plugging in reorder queue desc to hw for multiple TIDs in one shot.
  29333. *
  29334. * Example: plug-in queue desc
  29335. * host->target: WMI_PEER_MULTIPLE_REORDER_QUEUE_SETUP_CMDID,
  29336. * (vdev_id = PEER vdev id,
  29337. * peer_macaddr = PEER mac addr)
  29338. */
  29339. typedef struct {
  29340. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_multiple_reorder_queue_setup_cmd_fixed_param */
  29341. A_UINT32 vdev_id;
  29342. wmi_mac_addr peer_macaddr; /* peer mac address */
  29343. /*
  29344. * This struct is followed by other TLVs:
  29345. * wmi_peer_per_reorder_q_setup_params_t q_setup_params[num_queues];
  29346. */
  29347. } wmi_peer_multiple_reorder_queue_setup_cmd_fixed_param;
  29348. /**
  29349. * This command is sent from WLAN host driver to firmware for
  29350. * removing one or more reorder queue desc to lithium hw.
  29351. *
  29352. * Example: remove queue desc for all TIDs
  29353. * host->target: WMI_PEER_REORDER_REMOVE_CMDID,
  29354. * (vdev_id = PEER vdev id,
  29355. * peer_macaddr = PEER mac addr,
  29356. * tid = 0x1FFFF,
  29357. */
  29358. typedef struct {
  29359. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_remove_cmd_fixed_param */
  29360. A_UINT32 vdev_id;
  29361. wmi_mac_addr peer_macaddr; /* peer mac address */
  29362. A_UINT32 tid_mask; /* bits 0 to 15 = QoS TIDs, bit 16 = non-qos TID */
  29363. } wmi_peer_reorder_queue_remove_cmd_fixed_param;
  29364. /* DEPRECATED - use wmi_pdev_set_mac_config_response_event_fixed_param instead */
  29365. typedef struct {
  29366. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param */
  29367. /** Set Dual MAC Config Response Event **/
  29368. /* Status for set_dual_mac_config command */
  29369. /*
  29370. * Values for Status:
  29371. * 0 - OK; command successful
  29372. * 1 - EINVAL; Requested invalid hw_mode
  29373. * 3 - ENOTSUP; HW mode not supported
  29374. * 4 - EHARDWARE; HW mode change prevented by hardware
  29375. * 6 - ECOEX; HW mode change conflict with Coex
  29376. */
  29377. A_UINT32 status;
  29378. } wmi_soc_set_dual_mac_config_response_event_fixed_param;
  29379. typedef struct {
  29380. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_response_event_fixed_param */
  29381. /** Set Dual MAC Config Response Event **/
  29382. /** pdev_id for identifying the MAC
  29383. * See macros starting with WMI_PDEV_ID_ for values.
  29384. */
  29385. A_UINT32 pdev_id;
  29386. /* Status for set_dual_mac_config command */
  29387. /*
  29388. * Values for Status:
  29389. * 0 - OK; command successful
  29390. * 1 - EINVAL; Requested invalid hw_mode
  29391. * 3 - ENOTSUP; HW mode not supported
  29392. * 4 - EHARDWARE; HW mode change prevented by hardware
  29393. * 6 - ECOEX; HW mode change conflict with Coex
  29394. */
  29395. A_UINT32 status;
  29396. } wmi_pdev_set_mac_config_response_event_fixed_param;
  29397. typedef enum {
  29398. MAWC_MOTION_STATE_UNKNOWN,
  29399. MAWC_MOTION_STATE_STATIONARY,
  29400. MAWC_MOTION_STATE_WALK,
  29401. MAWC_MOTION_STATE_TRANSIT,
  29402. } MAWC_MOTION_STATE;
  29403. typedef enum {
  29404. MAWC_SENSOR_STATUS_OK,
  29405. MAWC_SENSOR_STATUS_FAILED_TO_ENABLE,
  29406. MAWC_SENSOR_STATUS_SHUTDOWN,
  29407. } MAWC_SENSOR_STATUS;
  29408. typedef struct {
  29409. /* TLV tag and len; tag equals
  29410. * WMITLV_TAG_STRUC_wmi_mawc_sensor_report_ind_cmd_fixed_param */
  29411. A_UINT32 tlv_header;
  29412. /** new motion state, MAWC_MOTION_STATE */
  29413. A_UINT32 motion_state;
  29414. /** status code of sensor, MAWC_SENSOR_STATUS */
  29415. A_UINT32 sensor_status;
  29416. } wmi_mawc_sensor_report_ind_cmd_fixed_param;
  29417. /* MBO flag field definition */
  29418. /* Bit 0: 0 - Allow to connect to both MBO and non-MBO AP
  29419. * 1 - Allow to connect to MBO AP only
  29420. * Bit 1-31 : reserved.
  29421. */
  29422. #define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE (1<<0) /* DEPRECATED */
  29423. typedef struct {
  29424. /* TLV tag and len; tag equals
  29425. * WMITLV_TAG_STRUC_wmi_roam_set_mbo_fixed_param */
  29426. A_UINT32 tlv_header;
  29427. /** vdev id */
  29428. A_UINT32 vdev_id;
  29429. /** enable or disable MBO */
  29430. A_UINT32 enable;
  29431. /** MBO flags, refer to definition of MBO flags*/
  29432. A_UINT32 flags;
  29433. } wmi_roam_set_mbo_fixed_param; /* DEPRECATED */
  29434. typedef struct {
  29435. /* TLV tag and len; tag equals
  29436. * WMITLV_TAG_ARRAY_STRUC */
  29437. A_UINT32 tlv_header;
  29438. /** Current operating class number */
  29439. A_UINT32 cur_op_class;
  29440. /** Country string of current reg domain,
  29441. * the expected value should be same as country str defined
  29442. * in country IE.
  29443. * 3 octets (COUNTRY_STR) + 1 octet (always 0)
  29444. * The ordering of this array must be maintained,
  29445. * even when a big-endian host's WMI messages undergo
  29446. * automatic byte reordering for conversion to the
  29447. * little-endian ordering required by the target.
  29448. * On big-endian hosts, this array may need to be byte-swapped
  29449. * by the host, so the subsequent automatic byte-swap
  29450. * will result in the correct final byte order.
  29451. * global operating class: set country_str[0]=0
  29452. */
  29453. A_UINT8 country_str[4];
  29454. /** Supported operating class number in current regdomain */
  29455. A_UINT32 supp_op_class_num;
  29456. /* The TLVs will follow. */
  29457. /* A_UINT32 supp_op_class_list[] */
  29458. } wmi_supported_operating_class_param;
  29459. typedef struct {
  29460. /* TLV tag and len; tag equals
  29461. * WMITLV_TAG_ARRAY_STRUC */
  29462. A_UINT32 tlv_header;
  29463. /** non preferred channel attribute length */
  29464. A_UINT32 non_prefer_ch_attr_len;
  29465. /* The TLVs will follow. */
  29466. /** A_UINT8 non_prefer_ch_attr[];*/
  29467. } wmi_mbo_non_preferred_channel_report_param;
  29468. typedef struct {
  29469. /* TLV tag and len; tag equals
  29470. * WMITLV_TAG_STRUC_wmi_mawc_enable_sensor_event_fixed_param */
  29471. A_UINT32 tlv_header;
  29472. /* enable(1) or disable(0) */
  29473. A_UINT32 enable;
  29474. } wmi_mawc_enable_sensor_event_fixed_param;
  29475. typedef struct {
  29476. /* TLV tag and len; tag equals
  29477. * WMITLV_TAG_STRUC_wmi_extscan_configure_mawc_cmd_fixed_param */
  29478. A_UINT32 tlv_header;
  29479. /* Unique id identifying the VDEV */
  29480. A_UINT32 vdev_id;
  29481. /* enable(1) or disable(0) MAWC */
  29482. A_UINT32 enable;
  29483. /* ratio of skipping suppressing scan, skip one out of x */
  29484. A_UINT32 suppress_ratio;
  29485. } wmi_extscan_configure_mawc_cmd_fixed_param;
  29486. typedef struct {
  29487. /* TLV tag and len; tag equals
  29488. * WMITLV_TAG_STRUC_wmi_roam_per_config_fixed_param */
  29489. A_UINT32 tlv_header;
  29490. /* Unique id identifying the VDEV */
  29491. A_UINT32 vdev_id;
  29492. /* enable(1) or disable(0) packet error rate trigger for roaming */
  29493. A_UINT32 enable;
  29494. /* high_rate_thresh, low_rate_thresh, pkt_err_rate_thresh_pct:
  29495. * If PER monitoring as a trigger for roaming is enabled,
  29496. * it is controlled by high_rate_thresh, low_rate_thresh, and
  29497. * pkt_err_rate_thresh_pct.
  29498. * PER monitoring is performed only when the time-averaged throughput
  29499. * is less than high_rate_thresh.
  29500. * During PER monitoring, the target keeps track of the PHY rate for
  29501. * each of the first N PPDUs within a time window.
  29502. * If the number of PPDUs with PHY rate < low_rate_thresh exceeds
  29503. * N * pkt_err_rate_thresh_pct / 100, roaming will be triggered.
  29504. *
  29505. * This PER monitoring as a trigger for roaming is performed
  29506. * concurrently but independently for rx and tx.
  29507. */
  29508. A_UINT32 high_rate_thresh; /* units = Kbps */
  29509. A_UINT32 low_rate_thresh; /* units = Kbps */
  29510. A_UINT32 pkt_err_rate_thresh_pct;
  29511. /*
  29512. * rest time after associating to a new AP before
  29513. * starting to monitor PER as a roaming trigger,
  29514. * (units are seconds)
  29515. */
  29516. A_UINT32 per_rest_time;
  29517. /* This is the total time for which PER monitoring will be run.
  29518. * After completion of time windows, the average PER over the window
  29519. * will be computed.
  29520. * The parameter value stores specifications for both TX and RX
  29521. * monitor times.
  29522. * The two least-significant bytes (0 & 1) hold the RX monitor time;
  29523. * the two most-significant bytes (2 & 3) hold the TX monitor time.
  29524. */
  29525. A_UINT32 pkt_err_rate_mon_time; /* units = seconds */
  29526. /* Minimum roamable AP RSSI for candidate selection for PER based roam */
  29527. A_INT32 min_candidate_rssi; /* units = dBm */
  29528. } wmi_roam_per_config_fixed_param;
  29529. typedef struct {
  29530. /* TLV tag and len; tag equals
  29531. * WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param */
  29532. A_UINT32 tlv_header;
  29533. /* Unique id identifying the VDEV */
  29534. A_UINT32 vdev_id;
  29535. /* enable(1) or disable(0) MAWC */
  29536. A_UINT32 enable;
  29537. /* ratio of exponential backoff, next = current + current*ratio/100 */
  29538. A_UINT32 exp_backoff_ratio;
  29539. /* initial scan interval(msec) */
  29540. A_UINT32 init_scan_interval;
  29541. /* max scan interval(msec) */
  29542. A_UINT32 max_scan_interval;
  29543. } wmi_nlo_configure_mawc_cmd_fixed_param;
  29544. typedef struct {
  29545. /* TLV tag and len; tag equals
  29546. * WMITLV_TAG_STRUC_wmi_roam_configure_mawc_cmd_fixed_param */
  29547. A_UINT32 tlv_header;
  29548. /* Unique id identifying the VDEV */
  29549. A_UINT32 vdev_id;
  29550. /* enable(1) or disable(0) MAWC */
  29551. A_UINT32 enable;
  29552. /* data traffic load (kBps) to register CMC */
  29553. A_UINT32 traffic_load_threshold;
  29554. /* RSSI threshold (dBm) to scan for Best AP */
  29555. A_UINT32 best_ap_rssi_threshold;
  29556. /* high RSSI threshold adjustment in Stationary to suppress scan */
  29557. A_UINT32 rssi_stationary_high_adjust;
  29558. /* low RSSI threshold adjustment in Stationary to suppress scan */
  29559. A_UINT32 rssi_stationary_low_adjust;
  29560. } wmi_roam_configure_mawc_cmd_fixed_param;
  29561. #define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD 2
  29562. #define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER 5
  29563. typedef enum {
  29564. PACKET_FILTER_TYPE_INVALID = 0,
  29565. PACKET_FILTER_TYPE_FILTER_PKT,
  29566. PACKET_FILTER_TYPE_RESERVE_PKT, /* not used */
  29567. PACKET_FILTER_TYPE_MAX_ENUM_SIZE
  29568. } WMI_PACKET_FILTER_FILTER_TYPE;
  29569. typedef enum {
  29570. PACKET_FILTER_PROTO_TYPE_INVALID = 0,
  29571. /* L2 header */
  29572. PACKET_FILTER_PROTO_TYPE_MAC,
  29573. PACKET_FILTER_PROTO_TYPE_SNAP,
  29574. /* L3 header (EtherType) */
  29575. PACKET_FILTER_PROTO_TYPE_IPV4,
  29576. PACKET_FILTER_PROTO_TYPE_IPV6,
  29577. /* L4 header (IP protocol) */
  29578. PACKET_FILTER_PROTO_TYPE_UDP,
  29579. PACKET_FILTER_PROTO_TYPE_TCP,
  29580. PACKET_FILTER_PROTO_TYPE_ICMPV6,
  29581. PACKET_FILTER_PROTO_TYPE_MAX
  29582. } WMI_PACKET_FILTER_PROTO_TYPE;
  29583. typedef enum {
  29584. PACKET_FILTER_CMP_TYPE_INVALID = 0,
  29585. PACKET_FILTER_CMP_TYPE_EQUAL,
  29586. PACKET_FILTER_CMP_TYPE_MASK_EQUAL,
  29587. PACKET_FILTER_CMP_TYPE_NOT_EQUAL,
  29588. PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
  29589. PACKET_FILTER_CMP_TYPE_ADDRTYPE,
  29590. PACKET_FILTER_CMP_TYPE_MAX
  29591. } WMI_PACKET_FILTER_CMP_TYPE;
  29592. typedef enum {
  29593. PACKET_FILTER_SET_INACTIVE = 0,
  29594. PACKET_FILTER_SET_ACTIVE
  29595. } WMI_PACKET_FILTER_ACTION;
  29596. typedef enum {
  29597. PACKET_FILTER_SET_DISABLE = 0,
  29598. PACKET_FILTER_SET_ENABLE
  29599. } WMI_PACKET_FILTER_RUNTIME_ENABLE;
  29600. typedef struct {
  29601. A_UINT32 proto_type;
  29602. A_UINT32 cmp_type;
  29603. A_UINT32 data_length; /* Length of the data to compare (units = bytes) */
  29604. A_UINT32 data_offset; /* from start of the respective frame header (units = bytes) */
  29605. A_UINT32 compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Data to compare, little-endian order */
  29606. A_UINT32 dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Mask to be applied on rcvd packet data before compare, little-endian order */
  29607. } WMI_PACKET_FILTER_PARAMS_TYPE;
  29608. typedef struct {
  29609. A_UINT32 tlv_header;
  29610. A_UINT32 vdev_id;
  29611. A_UINT32 filter_id;
  29612. A_UINT32 filter_action; /* WMI_PACKET_FILTER_ACTION */
  29613. A_UINT32 filter_type;
  29614. A_UINT32 num_params; /* how many entries in paramsData are valid */
  29615. A_UINT32 coalesce_time; /* not currently used - fill with 0x0 */
  29616. WMI_PACKET_FILTER_PARAMS_TYPE paramsData[WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER];
  29617. /* deprecated0:
  29618. * This field simply provides filler space to retain the original message
  29619. * format while reducing WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER
  29620. * from 10 to 5.
  29621. */
  29622. WMI_PACKET_FILTER_PARAMS_TYPE deprecated0[5];
  29623. } WMI_PACKET_FILTER_CONFIG_CMD_fixed_param;
  29624. /* enable / disable all filters within the specified vdev */
  29625. typedef struct {
  29626. A_UINT32 tlv_header;
  29627. A_UINT32 vdev_id;
  29628. A_UINT32 enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */
  29629. } WMI_PACKET_FILTER_ENABLE_CMD_fixed_param;
  29630. #define WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS 0
  29631. #define WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS 9
  29632. #define WMI_LRO_INFO_TCP_FLAG_VALS_SET(tcp_flag_u32, tcp_flag_values) \
  29633. WMI_SET_BITS(tcp_flag_u32, \
  29634. WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
  29635. WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS, \
  29636. tcp_flag_values)
  29637. #define WMI_LRO_INFO_TCP_FLAG_VALS_GET(tcp_flag_u32) \
  29638. WMI_GET_BITS(tcp_flag_u32, \
  29639. WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
  29640. WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS)
  29641. #define WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS 9
  29642. #define WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS 9
  29643. #define WMI_LRO_INFO_TCP_FLAGS_MASK_SET(tcp_flag_u32, tcp_flags_mask) \
  29644. WMI_SET_BITS(tcp_flag_u32, \
  29645. WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
  29646. WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS, \
  29647. tcp_flags_mask)
  29648. #define WMI_LRO_INFO_TCP_FLAGS_MASK_GET(tcp_flag_u32) \
  29649. WMI_GET_BITS(tcp_flag_u32, \
  29650. WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
  29651. WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS)
  29652. typedef struct {
  29653. A_UINT32 tlv_header;
  29654. /**
  29655. * @brief lro_enable - indicates whether lro is enabled
  29656. * [0] LRO Enable
  29657. */
  29658. A_UINT32 lro_enable;
  29659. /**
  29660. * @brief tcp_flag_u32 - mask of which TCP flags to check and
  29661. * values to check for
  29662. * [8:0] TCP flag values - If the TCP flags from the packet do not match
  29663. * the values in this field after masking with TCP flags mask below,
  29664. * LRO eligible will not be set
  29665. * [17:9] TCP flags mask - Mask field for comparing the TCP values
  29666. * provided above with the TCP flags field in the received packet
  29667. * Use WMI_LRO_INFO_TCP_FLAG_VALS and WMI_LRO_INFO_TCP_FLAGS_MASK
  29668. * macros to isolate the mask field and values field that are packed
  29669. * into this u32 "word".
  29670. */
  29671. A_UINT32 tcp_flag_u32;
  29672. /**
  29673. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  29674. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  29675. * bytes 0 to 3
  29676. *
  29677. * In this and all the below toeplitz_hash fields, the bytes are
  29678. * specified in little-endian order. For example:
  29679. * toeplitz_hash_ipv4_0_3 bits 7:0 holds seed byte 0
  29680. * toeplitz_hash_ipv4_0_3 bits 15:8 holds seed byte 1
  29681. * toeplitz_hash_ipv4_0_3 bits 23:16 holds seed byte 2
  29682. * toeplitz_hash_ipv4_0_3 bits 31:24 holds seed byte 3
  29683. */
  29684. A_UINT32 toeplitz_hash_ipv4_0_3;
  29685. /**
  29686. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  29687. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  29688. * bytes 4 to 7
  29689. */
  29690. A_UINT32 toeplitz_hash_ipv4_4_7;
  29691. /**
  29692. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  29693. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  29694. * bytes 8 to 11
  29695. */
  29696. A_UINT32 toeplitz_hash_ipv4_8_11;
  29697. /**
  29698. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  29699. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  29700. * bytes 12 to 15
  29701. */
  29702. A_UINT32 toeplitz_hash_ipv4_12_15;
  29703. /**
  29704. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  29705. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  29706. * byte 16
  29707. */
  29708. A_UINT32 toeplitz_hash_ipv4_16;
  29709. /**
  29710. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29711. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29712. * bytes 0 to 3
  29713. */
  29714. A_UINT32 toeplitz_hash_ipv6_0_3;
  29715. /**
  29716. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29717. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29718. * bytes 4 to 7
  29719. */
  29720. A_UINT32 toeplitz_hash_ipv6_4_7;
  29721. /**
  29722. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29723. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29724. * bytes 8 to 11
  29725. */
  29726. A_UINT32 toeplitz_hash_ipv6_8_11;
  29727. /**
  29728. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29729. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29730. * bytes 12 to 15
  29731. */
  29732. A_UINT32 toeplitz_hash_ipv6_12_15;
  29733. /**
  29734. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29735. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29736. * bytes 16 to 19
  29737. */
  29738. A_UINT32 toeplitz_hash_ipv6_16_19;
  29739. /**
  29740. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29741. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29742. * bytes 20 to 22
  29743. */
  29744. A_UINT32 toeplitz_hash_ipv6_20_23;
  29745. /**
  29746. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29747. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29748. * bytes 24 to 27
  29749. */
  29750. A_UINT32 toeplitz_hash_ipv6_24_27;
  29751. /**
  29752. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29753. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29754. * bytes 28 to 31
  29755. */
  29756. A_UINT32 toeplitz_hash_ipv6_28_31;
  29757. /**
  29758. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29759. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29760. * bytes 32 to 35
  29761. */
  29762. A_UINT32 toeplitz_hash_ipv6_32_35;
  29763. /**
  29764. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29765. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29766. * bytes 36 to 39
  29767. */
  29768. A_UINT32 toeplitz_hash_ipv6_36_39;
  29769. /**
  29770. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29771. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29772. * byte 40
  29773. */
  29774. A_UINT32 toeplitz_hash_ipv6_40;
  29775. /**
  29776. * @brief pdev_id - identifies the MAC
  29777. * See macros starting with WMI_PDEV_ID_ for values.
  29778. */
  29779. A_UINT32 pdev_id;
  29780. } wmi_lro_info_cmd_fixed_param;
  29781. typedef struct {
  29782. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_cmd_fixed_param */
  29783. A_UINT32 offset; /* flash offset to write, starting from 0 */
  29784. A_UINT32 length; /* valid data length in buffer, unit: byte */
  29785. } wmi_transfer_data_to_flash_cmd_fixed_param;
  29786. typedef struct {
  29787. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_complete_event_fixed_param */
  29788. /** Return status. 0 for success, non-zero otherwise */
  29789. A_UINT32 status;
  29790. } wmi_transfer_data_to_flash_complete_event_fixed_param;
  29791. typedef struct {
  29792. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_cmd_fixed_param */
  29793. A_UINT32 offset; /* flash offset to read, starting from 0 */
  29794. A_UINT32 length; /* data length to read, unit: byte */
  29795. } wmi_read_data_from_flash_cmd_fixed_param;
  29796. typedef struct {
  29797. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_event_fixed_param */
  29798. A_UINT32 status; /* Return status. 0 for success, non-zero otherwise */
  29799. A_UINT32 offset; /* flash offset reading from, starting from 0 */
  29800. A_UINT32 length; /* length of data being reported, unit: byte */
  29801. } wmi_read_data_from_flash_event_fixed_param;
  29802. typedef enum {
  29803. ENHANCED_MCAST_FILTER_DISABLED,
  29804. ENHANCED_MCAST_FILTER_ENABLED
  29805. } ENHANCED_MCAST_FILTER_CONFIG;
  29806. /*
  29807. * Command to enable/disable filtering of multicast IP with unicast mac
  29808. */
  29809. typedef struct {
  29810. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_config_enhanced_mcast_filter_fixed_param */
  29811. /* Unique id identifying the VDEV */
  29812. A_UINT32 vdev_id;
  29813. /* 1 = enable 0 = disable (see ENHANCED_MCAST_FILTER_CONFIG) */
  29814. A_UINT32 enable;
  29815. } wmi_config_enhanced_mcast_filter_cmd_fixed_param;
  29816. typedef struct {
  29817. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_wisa_cmd_fixed_param */
  29818. A_UINT32 tlv_header;
  29819. /** unique id identifying the VDEV, generated by the caller */
  29820. A_UINT32 vdev_id;
  29821. /** WISA enable / disable mode */
  29822. A_UINT32 wisa_mode;
  29823. } wmi_vdev_wisa_cmd_fixed_param;
  29824. /*
  29825. * This structure is used to report SMPS force mode set complete to host.
  29826. */
  29827. typedef struct {
  29828. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_complete_event_fixed_param */
  29829. /* Unique id identifying the VDEV */
  29830. A_UINT32 vdev_id;
  29831. /* Return status. 0 for success, non-zero otherwise */
  29832. A_UINT32 status;
  29833. } wmi_sta_smps_force_mode_complete_event_fixed_param;
  29834. /*
  29835. * This structure is used to report SCPC calibrated data to host.
  29836. */
  29837. typedef struct {
  29838. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scpc_event_fixed_param */
  29839. /** number of BDF patches. Each patch contains offset, length and data */
  29840. A_UINT32 num_patch;
  29841. /* This TLV is followed by another TLV of array of bytes
  29842. * A_UINT8 data[];
  29843. * This data array contains, for example
  29844. * patch1 offset(byte3~0), patch1 data length(byte7~4), patch1 data(byte11~8)
  29845. * patch2 offset(byte15~12), patch2 data length(byte19~16), patch2 data(byte47~20)
  29846. *
  29847. */
  29848. } wmi_scpc_event_fixed_param;
  29849. typedef enum {
  29850. FW_ACTIVE_BPF_MODE_DISABLE = (1 << 1),
  29851. FW_ACTIVE_BPF_MODE_FORCE_ENABLE = (1 << 2),
  29852. FW_ACTIVE_BPF_MODE_ADAPTIVE_ENABLE = (1 << 3),
  29853. } FW_ACTIVE_BPF_MODE;
  29854. /* bpf interface structure */
  29855. typedef struct wmi_bpf_get_capability_cmd_s {
  29856. A_UINT32 tlv_header;
  29857. A_UINT32 reserved; /* reserved for future use - must be filled with 0x0 */
  29858. } wmi_bpf_get_capability_cmd_fixed_param;
  29859. typedef struct wmi_bpf_capability_info_evt_s {
  29860. A_UINT32 tlv_header;
  29861. A_UINT32 bpf_version; /* fw's implement version */
  29862. A_UINT32 max_bpf_filters; /* max filters that fw supports */
  29863. A_UINT32 max_bytes_for_bpf_inst; /* the maximum bytes that can be used as bpf instructions */
  29864. A_UINT32 fw_active_bpf_support_mcbc_modes; /* multicast/broadcast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
  29865. A_UINT32 fw_active_bpf_support_uc_modes; /* unicast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
  29866. } wmi_bpf_capability_info_evt_fixed_param;
  29867. /* bit 0 of flags: report counters */
  29868. #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_S 0
  29869. #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_M 0x1
  29870. typedef struct wmi_bpf_get_vdev_stats_cmd_s {
  29871. A_UINT32 tlv_header;
  29872. A_UINT32 flags;
  29873. A_UINT32 vdev_id;
  29874. } wmi_bpf_get_vdev_stats_cmd_fixed_param;
  29875. typedef struct wmi_bpf_vdev_stats_info_evt_s {
  29876. A_UINT32 tlv_header;
  29877. A_UINT32 vdev_id;
  29878. A_UINT32 num_filters;
  29879. A_UINT32 num_checked_pkts;
  29880. A_UINT32 num_dropped_pkts;
  29881. } wmi_bpf_vdev_stats_info_evt_fixed_param;
  29882. typedef struct wmi_bpf_set_vdev_instructions_cmd_s {
  29883. A_UINT32 tlv_header;
  29884. A_UINT32 vdev_id;
  29885. A_UINT32 filter_id;
  29886. A_UINT32 bpf_version; /* host bpf version */
  29887. A_UINT32 total_length;
  29888. A_UINT32 current_offset;
  29889. A_UINT32 current_length;
  29890. /*
  29891. * The TLV follows:
  29892. * A_UINT8 buf_inst[]; <-- Variable length buffer for the instuctions
  29893. */
  29894. } wmi_bpf_set_vdev_instructions_cmd_fixed_param;
  29895. #define BPF_FILTER_ID_ALL 0xFFFFFFFF
  29896. typedef struct wmi_bpf_del_vdev_instructions_cmd_s {
  29897. A_UINT32 tlv_header;
  29898. A_UINT32 vdev_id;
  29899. A_UINT32 filter_id; /* BPF_FILTER_ID_ALL means delete all */
  29900. } wmi_bpf_del_vdev_instructions_cmd_fixed_param;
  29901. typedef struct wmi_bpf_set_vdev_active_mode_cmd_s {
  29902. A_UINT32 tlv_header;
  29903. A_UINT32 vdev_id;
  29904. A_UINT32 mcbc_mode; /* refer to FW_ACTIVE_BPF_MODE */
  29905. A_UINT32 uc_mode; /* refer to FW_ACTIVE_BPF_MODE */
  29906. } wmi_bpf_set_vdev_active_mode_cmd_fixed_param;
  29907. typedef struct wmi_bpf_set_vdev_enable_cmd_s {
  29908. A_UINT32 tlv_header;
  29909. A_UINT32 vdev_id;
  29910. A_UINT32 is_enabled; /* fw assume host default enables */
  29911. } wmi_bpf_set_vdev_enable_cmd_fixed_param;
  29912. typedef struct wmi_bpf_set_vdev_work_memory_cmd_s {
  29913. A_UINT32 tlv_header;
  29914. A_UINT32 vdev_id;
  29915. A_UINT32 bpf_version; /* bpf instruction version */
  29916. A_UINT32 program_len; /* the program length may be changed by this command */
  29917. A_UINT32 addr_offset; /* start writing addr in the working memory */
  29918. A_UINT32 length; /* the writing size of this command (byte units) */
  29919. /*
  29920. * The TLV follows:
  29921. * A_UINT8 buf_inst[]; <-- Variable length buffer with the data to write
  29922. */
  29923. } wmi_bpf_set_vdev_work_memory_cmd_fixed_param;
  29924. typedef struct wmi_bpf_get_vdev_work_memory_cmd_s {
  29925. A_UINT32 tlv_header;
  29926. A_UINT32 vdev_id;
  29927. A_UINT32 addr_offset; /* start reading addr in the working memory */
  29928. A_UINT32 length; /* reading size from addr (byte units) */
  29929. } wmi_bpf_get_vdev_work_memory_cmd_fixed_param;
  29930. typedef struct wmi_bpf_get_vdev_work_memory_resp_evt_s {
  29931. A_UINT32 tlv_header;
  29932. A_UINT32 vdev_id;
  29933. A_UINT32 offset; /* read memory offset from start_addr */
  29934. A_UINT32 length; /* read memory length of this command */
  29935. A_UINT32 fragment; /* 1 means more data will come, 0 means last fragment */
  29936. /*
  29937. * The TLV follows:
  29938. * A_UINT8 buf_inst[]; <-- Variable length buffer containing the read data
  29939. */
  29940. } wmi_bpf_get_vdev_work_memory_resp_evt_fixed_param;
  29941. #define AES_BLOCK_LEN 16 /* in bytes */
  29942. #define FIPS_KEY_LENGTH_128 16 /* in bytes */
  29943. #define FIPS_KEY_LENGTH_256 32 /* in bytes */
  29944. #define FIPS_ENCRYPT_CMD 0
  29945. #define FIPS_DECRYPT_CMD 1
  29946. #define FIPS_ENGINE_AES_CTR 0
  29947. #define FIPS_ENGINE_AES_MIC 1
  29948. #define FIPS_ERROR_OPER_TIMEOUT 1
  29949. typedef enum {
  29950. WMI_FIPS_KEY_CIPHER_CCM,
  29951. WMI_FIPS_KEY_CIPHER_GCM
  29952. } wmi_fips_key_cipher;
  29953. typedef enum {
  29954. WMI_FIPS_DISABLE,
  29955. WMI_FIPS_ENABLE
  29956. } wmi_fips_mode_set;
  29957. /* WMI_PDEV_FIPS_CMDID */
  29958. typedef struct {
  29959. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_cmd_fixed_param */
  29960. union {
  29961. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  29962. /** pdev_id for identifying the MAC
  29963. * See macros starting with WMI_PDEV_ID_ for values.
  29964. */
  29965. A_UINT32 pdev_id;
  29966. };
  29967. A_UINT32 fips_cmd; /* FIPS_ENCRYPT or FIPS_DECRYPT */
  29968. A_UINT32 mode; /* FIPS_ENGINE_AES_CTR or FIPS_ENGINE_AES_MIC */
  29969. A_UINT32 key_len; /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256 (units = bytes) */
  29970. A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key */
  29971. A_UINT32 data_len; /* data length */
  29972. /*
  29973. * Following this structure is the TLV:
  29974. * A_UINT32 data[1]; <-- In Data (keep this in the end)
  29975. */
  29976. } wmi_pdev_fips_cmd_fixed_param;
  29977. #define MAX_IVNONCE_LEN_FIPS_EXTEND 16
  29978. typedef struct {
  29979. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_extend_cmd_init_params */
  29980. A_UINT32 fips_cmd; /* FIPS_ENCRYPT or FIPS_DECRYPT */
  29981. A_UINT32 key_cipher; /* CCM or GCM */
  29982. A_UINT32 key_len; /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256: 16/32 bytes */
  29983. 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). */
  29984. A_UINT32 nonce_iv_len;
  29985. 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).*/
  29986. A_UINT32 tag_len; /* 8 or 16 */
  29987. A_UINT32 aad_len;
  29988. A_UINT32 payload_len;/* Plaintext length */
  29989. } wmi_fips_extend_cmd_init_params;
  29990. typedef struct {
  29991. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_extend_cmd_fixed_param */
  29992. A_UINT32 pdev_id;
  29993. A_UINT32 fips_cookie; /* Cookie value to identify test vector */
  29994. A_UINT32 frag_idx; /* Fragment Number */
  29995. A_UINT32 more_bit; /* Set to 0 for last fragment number */
  29996. A_UINT32 data_len; /* data length ()*/
  29997. /*
  29998. * Following this structure are the TLVs:
  29999. * wmi_fips_extend_cmd_init_params cmd_params
  30000. * A_UINT32 data[1]; <-- In Data ((aad, payload in order))
  30001. */
  30002. } wmi_pdev_fips_extend_cmd_fixed_param;
  30003. typedef struct {
  30004. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_extend_cmd_fixed_param */
  30005. A_UINT32 pdev_id;
  30006. A_UINT32 fips_mode_set; /*FIPS_MODE_ENABLE -Enable, FIPS_MODE_DISABLE -disable */
  30007. } wmi_pdev_fips_mode_set_cmd_fixed_param;
  30008. typedef struct {
  30009. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_featureset_cmd_fixed_param */
  30010. /*
  30011. * Following this structure are the TLVs:
  30012. * A_UINT32 feature_set_bitmap[]; <-- Host supported feature info,
  30013. * array length is equal to
  30014. * WMI_FEATURE_SET_BITMAP_ARRAY_LEN32.
  30015. */
  30016. } wmi_pdev_featureset_cmd_fixed_param;
  30017. typedef struct {
  30018. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_enable_cmd_fixed_param */
  30019. union {
  30020. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  30021. /** pdev_id for identifying the MAC
  30022. * See macros starting with WMI_PDEV_ID_ for values.
  30023. */
  30024. A_UINT32 pdev_id;
  30025. };
  30026. A_UINT32 enable; /* 1:enable, 0:disable */
  30027. A_UINT32 mode; /* 1:GPIO parallel mode, 0:GPIO serial mode */
  30028. A_UINT32 rx_antenna; /* rx antenna */
  30029. A_UINT32 tx_default_antenna; /* tx default antenna */
  30030. /*
  30031. * Following this structure is the TLV:
  30032. * wmi_pdev_smart_ant_gpio_handle
  30033. */
  30034. } wmi_pdev_smart_ant_enable_cmd_fixed_param;
  30035. /** GPIO pins/function values to control antennas */
  30036. typedef struct {
  30037. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_gpio_handle */
  30038. A_UINT32 gpio_pin; /* For serial: index 0-strobe index 1-data, For Parallel: per stream */
  30039. A_UINT32 gpio_func; /* GPIO function values for Smart Antenna */
  30040. /** pdev_id for identifying the MAC
  30041. * See macros starting with WMI_PDEV_ID_ for values.
  30042. */
  30043. A_UINT32 pdev_id;
  30044. } wmi_pdev_smart_ant_gpio_handle;
  30045. typedef struct {
  30046. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param */
  30047. union {
  30048. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  30049. /** pdev_id for identifying the MAC
  30050. * See macros starting with WMI_PDEV_ID_ for values.
  30051. */
  30052. A_UINT32 pdev_id;
  30053. };
  30054. A_UINT32 rx_antenna;
  30055. } wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param;
  30056. typedef struct {
  30057. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param */
  30058. /** unique id identifying the vdev, generated by the caller */
  30059. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  30060. /** peer MAC address */
  30061. wmi_mac_addr peer_macaddr;
  30062. /*
  30063. * Following this structure is the TLV:
  30064. * wmi_peer_smart_ant_set_tx_antenna_series
  30065. */
  30066. } wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param;
  30067. typedef struct {
  30068. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_series */
  30069. /* antenna array */
  30070. A_UINT32 antenna_series;
  30071. } wmi_peer_smart_ant_set_tx_antenna_series;
  30072. #define WMI_PER_VALID_BIT_POS 0
  30073. #define WMI_PER_VALID_NUM_BITS 1
  30074. #define WMI_GET_PER_VALID(per_threshold) \
  30075. WMI_GET_BITS(per_threshold, WMI_PER_VALID_BIT_POS, WMI_PER_VALID_NUM_BITS)
  30076. #define WMI_PER_VALID_SET(per_threshold, value) \
  30077. WMI_SET_BITS(per_threshold, WMI_PER_VALID_BIT_POS, WMI_PER_VALID_NUM_BITS, value)
  30078. #define WMI_PER_THRESHOLD_BIT_POS 1
  30079. #define WMI_PER_THRESHOLD_NUM_BITS 8
  30080. #define WMI_GET_PER_THRESHOLD(per_threshold) \
  30081. WMI_GET_BITS(per_threshold, WMI_PER_THRESHOLD_BIT_POS, WMI_PER_THRESHOLD_NUM_BITS)
  30082. #define WMI_PER_THRESHOLD_SET(per_threshold, value) \
  30083. WMI_SET_BITS(per_threshold, WMI_PER_THRESHOLD_BIT_POS, WMI_PER_THRESHOLD_NUM_BITS, value)
  30084. #define WMI_PER_MIN_TX_PKTS_BIT_POS 9
  30085. #define WMI_PER_MIN_TX_PKTS_NUM_BITS 16
  30086. #define WMI_GET_PER_MIN_TX_PKTS(per_threshold) \
  30087. WMI_GET_BITS(per_threshold, WMI_PER_MIN_TX_PKTS_BIT_POS, WMI_PER_MIN_TX_PKTS_NUM_BITS)
  30088. #define WMI_PER_MIN_TX_PKTS_SET(per_threshold, value) \
  30089. WMI_SET_BITS(per_threshold, WMI_PER_MIN_TX_PKTS_BIT_POS, WMI_PER_MIN_TX_PKTS_NUM_BITS, value)
  30090. #define WMI_RATE_SERIES_320_BIT_POS 0
  30091. #define WMI_RATE_SERIES_320_NUM_BITS 16
  30092. #define WMI_GET_RATE_SERIES_320(train_rate_series_ext) \
  30093. WMI_GET_BITS(train_rate_series_ext, WMI_RATE_SERIES_320_BIT_POS, WMI_RATE_SERIES_320_NUM_BITS)
  30094. #define WMI_SET_RATE_SERIES_320(train_rate_series_ext) \
  30095. WMI_SET_BITS(train_rate_series_ext, WMI_RATE_SERIES_320_BIT_POS, WMI_RATE_SERIES_320_NUM_BITS, value)
  30096. typedef struct {
  30097. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_param */
  30098. /* rate array */
  30099. union {
  30100. /* train_rate_series:
  30101. * original name, used for 8-bit rate-code implementations
  30102. */
  30103. A_UINT32 train_rate_series;
  30104. /* train_rate_series_lo:
  30105. * Contains the lower 32 bits of rate array, for larger rate-code
  30106. * implementations. This field is paired with train_rate_series_hi.
  30107. */
  30108. A_UINT32 train_rate_series_lo;
  30109. };
  30110. /* antenna array */
  30111. A_UINT32 train_antenna_series;
  30112. /* Rate flags */
  30113. /* TODO: For future use? */
  30114. A_UINT32 rc_flags;
  30115. /* rate array -- continued */
  30116. A_UINT32 train_rate_series_hi; /* Higher 32 bits of rate array */
  30117. /* train_rate_series_ext:
  30118. * 15:0 - 320Mhz rate
  30119. * 31:16 - Reserved
  30120. */
  30121. A_UINT32 train_rate_series_ext; /* For 320Mhz and Reserved for other */
  30122. } wmi_peer_smart_ant_set_train_antenna_param;
  30123. typedef struct {
  30124. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param */
  30125. /** unique id identifying the VDEV, generated by the caller */
  30126. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  30127. /** peer MAC address */
  30128. wmi_mac_addr peer_macaddr;
  30129. /* num packets; 0-stop training */
  30130. A_UINT32 num_pkts;
  30131. /* per_threshold:
  30132. * bits | interpretation
  30133. * ------+--------------------------
  30134. * 0 | PER Threshold is valid
  30135. * 1:8 | Per Threshold
  30136. * 9:24 | min_tx_pkts Minimum number of pkts need to be checked
  30137. * 25:31 | Reserved
  30138. */
  30139. A_UINT32 per_threshold;
  30140. /*
  30141. * Following this structure is the TLV:
  30142. * wmi_peer_smart_ant_set_train_antenna_param
  30143. */
  30144. } wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param;
  30145. typedef struct {
  30146. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param */
  30147. /** unique id identifying the vdev, generated by the caller */
  30148. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  30149. /** peer MAC address */
  30150. wmi_mac_addr peer_macaddr;
  30151. /* command id*/
  30152. A_UINT32 cmd_id;
  30153. /* number of arguments passed */
  30154. A_UINT32 args_count;
  30155. /*
  30156. * Following this structure is the TLV:
  30157. * A_UINT32 args[]; <-- argument list
  30158. */
  30159. } wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param;
  30160. typedef struct {
  30161. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_ctrl_chain */
  30162. A_UINT32 antCtrlChain;
  30163. /** pdev_id for identifying the MAC
  30164. * See macros starting with WMI_PDEV_ID_ for values.
  30165. */
  30166. A_UINT32 pdev_id;
  30167. } wmi_pdev_set_ant_ctrl_chain;
  30168. typedef struct {
  30169. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_switch_tbl_cmd_fixed_param */
  30170. A_UINT32 mac_id; /* MAC ID */
  30171. A_UINT32 antCtrlCommon1;
  30172. A_UINT32 antCtrlCommon2;
  30173. /*
  30174. * Following this structure is the TLV:
  30175. * wmi_pdev_set_ant_ctrl_chain
  30176. */
  30177. } wmi_pdev_set_ant_switch_tbl_cmd_fixed_param;
  30178. typedef struct {
  30179. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ctl_table_cmd_fixed_param */
  30180. union {
  30181. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  30182. /** pdev_id for identifying the MAC
  30183. * See macros starting with WMI_PDEV_ID_ for values.
  30184. */
  30185. A_UINT32 pdev_id;
  30186. };
  30187. /** len of CTL info */
  30188. A_UINT32 ctl_len;
  30189. /* ctl array (len adjusted to number of words).
  30190. * Following this structure is the TLV:
  30191. * A_UINT32 ctl_info[1];
  30192. */
  30193. } wmi_pdev_set_ctl_table_cmd_fixed_param;
  30194. typedef struct {
  30195. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_bios_sar_cmd_fixed_param */
  30196. A_UINT32 pdev_id; /* pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  30197. A_UINT32 sar_len;
  30198. /* sar power array are stored in TLV, which follow this structure;
  30199. * sar_len is the number of valid bytes in the sar power array;
  30200. * sar power array contains 22 elements.
  30201. * Each element stores the maximum SAR power on certain band.
  30202. * Its type is A_UINT8 and its unit is 0.25 dBm.
  30203. * sar_power[0] for chain0 2g
  30204. * sar_power[1] for chain0 5g unii-1
  30205. * ...
  30206. * sar_power[4] for chain0 5g unii-4
  30207. * sar_power[5] for chain0 6g unii-5
  30208. * ...
  30209. * sar_power[10] for chain0 6g unii-10
  30210. * sar_power[11] for chain1 2g
  30211. * ...
  30212. * sar_power[21] for chain1 6g unii-10
  30213. */
  30214. A_UINT32 dbs_backoff_len;
  30215. /* dbs_backoff follow sar array, its type is A_UINT8;
  30216. * dbs_backoff[0] ~ dbs_backoff[5], these six elements are based on
  30217. * maximum SAR power, and make some offset adjustment in DBS mode.
  30218. * Their unit is 0.25 dB.
  30219. * dbs_backoff[0] for chain 0 2G
  30220. * dbs_backoff[1] for chain 0 5G
  30221. * dbs_backoff[2] for chain 0 6G
  30222. * dbs_backoff[3] for chain 1 2G
  30223. * dbs_backoff[4] for chain 1 5G
  30224. * dbs_backoff[5] for chain 1 6G
  30225. */
  30226. } wmi_pdev_set_bios_sar_table_cmd_fixed_param;
  30227. typedef struct {
  30228. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_bios_sar_cmd_fixed_param */
  30229. A_UINT32 pdev_id; /* pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  30230. A_UINT32 geo_len;
  30231. /* geo offset array is in TLV, followed this structure:
  30232. * A_UINT8 Geo_offset[];
  30233. * Geo_offset array has 18 elements. The meaning of each element is to
  30234. * adjust offset based on maximum SAR power according to different regions.
  30235. * Its unit is 0.25 dB.
  30236. * Geo_offset[0] chain 0 FCC_Offset on 2G
  30237. * Geo_offset[1] chain 0 FCC_Offset on 5G
  30238. * Geo_offset[2] chain 0 FCC_Offset on 6G
  30239. * Geo_offset[3] chain 0 CE_Offset on 2G
  30240. * Geo_offset[4] chain 0 CE_Offset on 5G
  30241. * Geo_offset[5] chain 0 CE_Offset on 6G
  30242. * Geo_offset[6] chain 0 ROW_Offset on 2G
  30243. * Geo_offset[7] chain 0 ROW_Offset on 5G
  30244. * Geo_offset[8] chain 0 ROW_Offset on 6G
  30245. * Geo_offset[9] chain 1 FCC_Offset on 2G
  30246. * ...
  30247. * Geo_offset[17] chain 1 ROW_Offset on 6G
  30248. * In actual use, FW will subtract an offset value according to the region;
  30249. */
  30250. } wmi_pdev_set_bios_geo_table_cmd_fixed_param;
  30251. typedef struct {
  30252. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_bios_interface_cmd_fixed_param */
  30253. A_UINT32 pdev_id; /* pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  30254. A_UINT32 param_type_id; /* BIOS parameters type, see bios_param_type_e */
  30255. /* length:
  30256. * Number of valid bytes in A_UINT8 TLV array that follows this
  30257. * fixed_param TLV.
  30258. * The number of bytes allocated in the A_UINT8 TLV array will be a
  30259. * multiple of 4. The "length" field indicates how many of these
  30260. * byte elements contain valid data; the remainder are only for
  30261. * alignment padding and should be ignored.
  30262. */
  30263. A_UINT32 length;
  30264. /* Following this structure is TLV, bios data array */
  30265. } wmi_pdev_set_bios_interface_cmd_fixed_param;
  30266. typedef enum {
  30267. BIOS_PARAM_CCA_THRESHOLD_TYPE,
  30268. /* CCA THR structure has 29 bytes, it includes control flag and
  30269. * CCA THR parameters;
  30270. *
  30271. * If CCA_THR_Control is set 0, FW will still use
  30272. * AGC_ENERGY_DETECT_THRESHOLD.agcEnergyDetThr in BDF, and detailed
  30273. * CCA threshold do not need to be transported.
  30274. * If CCA_THR_Control is set 1, FW needs to use CCA threshold parameters
  30275. * in BIOS, and CCA THR parameters are provided in the subsequent A_UINT8
  30276. * TLV array.
  30277. *
  30278. * In CCA THR parameters, ETSI / MKK / CHN use same CCA threshold,
  30279. * and FCC / KOR use same CCA threshold. Its unit is in 1db,
  30280. * which is relative to HW NF value.
  30281. *
  30282. * //control flag
  30283. * A_UINT8 CCA_THR_Control
  30284. *
  30285. * //5G
  30286. * A_UINT8 agcEnergyDetThr5G_thrCcaPri20dB_ETSI_MKK_CHN
  30287. * A_UINT8 agcEnergyDetThr5G_thrCcaExt20dB_ETSI_MKK_CHN
  30288. * A_UINT8 agcEnergyDetThr5G_thrCcaExt40dB_ETSI_MKK_CHN
  30289. * A_UINT8 agcEnergyDetThr5G_thrCcaExt80dB_ETSI_MKK_CHN
  30290. * A_UINT8 agcEnergyDetThr5G_thrCcaPri20dB_FCC_KOR
  30291. * A_UINT8 agcEnergyDetThr5G_thrCcaExt20dB_FCC_KOR
  30292. * A_UINT8 agcEnergyDetThr5G_thrCcaExt40dB_FCC_KOR
  30293. * A_UINT8 agcEnergyDetThr5G_thrCcaExt80dB_FCC_KOR
  30294. *
  30295. * //2G
  30296. * A_UINT8 agcEnergyDetThr2G_thrCcaPri20dB_ETSI_MKK_CHN
  30297. * A_UINT8 agcEnergyDetThr2G_thrCcaExt20dB_ETSI_MKK_CHN
  30298. * A_UINT8 agcEnergyDetThr2G_thrCcaExt40dB_ETSI_MKK_CHN
  30299. * A_UINT8 agcEnergyDetThr2G_thrCcaExt80dB_ETSI_MKK_CHN
  30300. * A_UINT8 agcEnergyDetThr2G_thrCcaPri20dB_FCC_KOR
  30301. * A_UINT8 agcEnergyDetThr2G_thrCcaExt20dB_FCC_KOR
  30302. * A_UINT8 agcEnergyDetThr2G_hrCcaExt40dB_FCC_KOR
  30303. * A_UINT8 agcEnergyDetThr2G_hrCcaExt80dB_FCC_KOR
  30304. *
  30305. * //6G
  30306. * A_UINT8 agcEnergyDetThr6G_thrCcaPri20dB_FCC_KOR
  30307. * A_UINT8 agcEnergyDetThr6G_thrCcaExt20dB_FCC_KOR
  30308. * A_UINT8 agcEnergyDetThr6G_thrCcaExt40dB_FCC_KOR
  30309. * A_UINT8 agcEnergyDetThr6G_thrCcaExt80dB_FCC_KOR
  30310. *
  30311. * //6G-LPI/VLP
  30312. * A_UINT8 agcEnergyDetThr6GLPI.thrCcaPri20dB_ETSI_MKK_CHN
  30313. * A_UINT8 agcEnergyDetThr6GLPI thrCcaExt20dB_ETSI_MKK_CHN
  30314. * A_UINT8 agcEnergyDetThr6GLPI thrCcaExt40dB_ETSI_MKK_CHN
  30315. * A_UINT8 agcEnergyDetThr6GLPI.thrCcaExt80dB_ETSI_MKK_CHN
  30316. * A_UINT8 agcEnergyDetThr6GVLP.thrCcaPri20dB_ETSI_MKK_CHN
  30317. * A_UINT8 agcEnergyDetThr6GVLP thrCcaExt20dB_ETSI_MKK_CHN
  30318. * A_UINT8 agcEnergyDetThr6GVLP thrCcaExt40dB_ETSI_MKK_CHN
  30319. * A_UINT8 agcEnergyDetThr6GVLP.thrCcaExt80dB_ETSI_MKK_CHN
  30320. */
  30321. BIOS_PARAM_TAS_CONFIG_TYPE,
  30322. /*
  30323. * BIOS_PARAM_TAS_CONFIG_TYPE Structure has 108 bytes. Please Note these fields of A_UINT32 or A_INT32.
  30324. * 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.
  30325. * PowerLimitIndicator points out which region(FCC OR ICNIRP) power limit value should be used.
  30326. * A bit of PowerLimitIndicator maps a country. bit value 0: ICNIRP 1: FCC
  30327. *
  30328. * A_UINT8 Version
  30329. * A_UINT8 TASIsPairWith3rdPartyWwan
  30330. * A_UINT8 SARAntennaGroupingExt[6] (6 Bytes)
  30331. * A_UINT32 TASPeakModeIndicator[8] (32 Bytes)
  30332. * A_UINT32 TAS_FCC_ICNIRP_Indicator[8] (32 Bytes)
  30333. * A_UINT32 PowerLimitIndicator[8] (32 Bytes)
  30334. * A_UINT8 reserveMarginDb (1 Bytes)
  30335. * A_UINT8 reserved[3] (3 Bytes)
  30336. */
  30337. BIOS_PARAM_TAS_DATA_TYPE,
  30338. /*
  30339. * BIOS_PARAM_TAS_DATA_TYPE Structure has 69 bytes as below, power limit value unit is 0.25 dBm.
  30340. * If Enable flag is 0, FW will not use power limit value of bios.
  30341. *
  30342. * A_UINT8 Version
  30343. * A_UINT8 Enable Flag
  30344. * A_UINT8 Power Table Index
  30345. * ====================FCC POWER LIMIT VALUE======================
  30346. * A_INT8 FCC 2 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm)
  30347. * A_INT8 FCC 2 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm)
  30348. * A_INT8 FCC 2 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm)
  30349. * A_INT8 FCC 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
  30350. * A_INT8 FCC 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
  30351. * A_INT8 FCC 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
  30352. * A_INT8 FCC 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
  30353. * A_INT8 FCC 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
  30354. * A_INT8 FCC 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
  30355. * A_INT8 FCC 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
  30356. * A_INT8 FCC 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
  30357. * A_INT8 FCC 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
  30358. * A_INT8 FCC 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
  30359. * A_INT8 FCC 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
  30360. * A_INT8 FCC 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
  30361. * A_INT8 FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
  30362. * A_INT8 FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
  30363. * A_INT8 FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
  30364. * A_INT8 FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
  30365. * A_INT8 FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
  30366. * A_INT8 FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
  30367. * A_INT8 FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
  30368. * A_INT8 FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
  30369. * A_INT8 FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
  30370. * A_INT8 FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30371. * A_INT8 FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30372. * A_INT8 FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30373. * A_INT8 FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30374. * A_INT8 FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30375. * A_INT8 FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30376. * A_INT8 FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
  30377. * A_INT8 FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
  30378. * A_INT8 FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
  30379. * ====================ICNIRP POWER LIMIT VALUE======================
  30380. * A_INT8 ICNIRP 2 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm)
  30381. * A_INT8 ICNIRP 2 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm)
  30382. * A_INT8 ICNIRP 2 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm)
  30383. * A_INT8 ICNIRP 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
  30384. * A_INT8 ICNIRP 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
  30385. * A_INT8 ICNIRP 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
  30386. * A_INT8 ICNIRP 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
  30387. * A_INT8 ICNIRP 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
  30388. * A_INT8 ICNIRP 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
  30389. * A_INT8 ICNIRP 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
  30390. * A_INT8 ICNIRP 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
  30391. * A_INT8 ICNIRP 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
  30392. * A_INT8 ICNIRP 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
  30393. * A_INT8 ICNIRP 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
  30394. * A_INT8 ICNIRP 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
  30395. * A_INT8 ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
  30396. * A_INT8 ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
  30397. * A_INT8 ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
  30398. * A_INT8 ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
  30399. * A_INT8 ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
  30400. * A_INT8 ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
  30401. * A_INT8 ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
  30402. * A_INT8 ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
  30403. * A_INT8 ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
  30404. * A_INT8 ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30405. * A_INT8 ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30406. * A_INT8 ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30407. * A_INT8 ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30408. * A_INT8 ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30409. * A_INT8 ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30410. * A_INT8 ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
  30411. * A_INT8 ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
  30412. * A_INT8 ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
  30413. */
  30414. BIOS_PARAM_TYPE_BANDEDGE_CTL_POWER,
  30415. /*
  30416. * BIOS_PARAM_TYPE_BANDEDGE_CTL_POWER Structure has 100 bytes as below, CTL limit power unit is 0.25 dBm.
  30417. * If Enable flag is 0, FW will not use power limit value of bios.
  30418. *
  30419. * A_UINT8 version
  30420. * A_UINT8 enableFlag (always 1)
  30421. * A_UINT8 reserved[2] for 4 byte alignment,
  30422. * ====================2G CTL POWER LIMIT ======================
  30423. * A_INT8 2G 20M Channel Center Freq 2412 CTL Limit Power SU
  30424. * A_INT8 2G 20M Channel Center Freq 2412 CTL Limit Power OFDMA
  30425. * A_INT8 2G 20M Channel Center Freq 2417 CTL Limit Power SU
  30426. * A_INT8 2G 20M Channel Center Freq 2417 CTL Limit Power OFDMA
  30427. * A_INT8 2G 20M Channel Center Freq 2462 CTL Limit Power SU
  30428. * A_INT8 2G 20M Channel Center Freq 2462 CTL Limit Power OFDMA
  30429. * A_INT8 2G 20M Channel Center Freq 2467 CTL Limit Power SU
  30430. * A_INT8 2G 20M Channel Center Freq 2467 CTL Limit Power OFDMA
  30431. * A_INT8 2G 20M Channel Center Freq 2472 CTL Limit Power SU
  30432. * A_INT8 2G 20M Channel Center Freq 2472 CTL Limit Power OFDMA
  30433. * A_INT8 2G 40M Channel Center Freq 2422 CTL Limit Power SU
  30434. * A_INT8 2G 40M Channel Center Freq 2422 CTL Limit Power OFDMA
  30435. * A_INT8 2G 40M Channel Center Freq 2427 CTL Limit Power SU
  30436. * A_INT8 2G 40M Channel Center Freq 2427 CTL Limit Power OFDMA
  30437. * A_INT8 2G 40M Channel Center Freq 2452 CTL Limit Power SU
  30438. * A_INT8 2G 40M Channel Center Freq 2452 CTL Limit Power OFDMA
  30439. * A_INT8 2G 40M Channel Center Freq 2457 CTL Limit Power SU
  30440. * A_INT8 2G 40M Channel Center Freq 2457 CTL Limit Power OFDMA
  30441. * A_INT8 2G 40M Channel Center Freq 2462 CTL Limit Power SU
  30442. * A_INT8 2G 40M Channel Center Freq 2462 CTL Limit Power OFDMA
  30443. * ====================5G CTL POWER LIMIT ======================
  30444. * A_INT8 5G 20M Channel Center Freq 5180 CTL Limit Power SU
  30445. * A_INT8 5G 20M Channel Center Freq 5180 CTL Limit Power OFDMA
  30446. * A_INT8 5G 20M Channel Center Freq 5320 CTL Limit Power SU
  30447. * A_INT8 5G 20M Channel Center Freq 5320 CTL Limit Power OFDMA
  30448. * A_INT8 5G 20M Channel Center Freq 5500 CTL Limit Power SU
  30449. * A_INT8 5G 20M Channel Center Freq 5500 CTL Limit Power OFDMA
  30450. * A_INT8 5G 20M Channel Center Freq 5700 CTL Limit Power SU
  30451. * A_INT8 5G 20M Channel Center Freq 5700 CTL Limit Power OFDMA
  30452. * A_INT8 5G 20M Channel Center Freq 5745 CTL Limit Power SU
  30453. * A_INT8 5G 20M Channel Center Freq 5745 CTL Limit Power OFDMA
  30454. * A_INT8 5G 20M Channel Center Freq 5825 CTL Limit Power SU
  30455. * A_INT8 5G 20M Channel Center Freq 5825 CTL Limit Power OFDMA
  30456. * A_INT8 5G 20M Channel Center Freq 5845 CTL Limit Power SU
  30457. * A_INT8 5G 20M Channel Center Freq 5845 CTL Limit Power OFDMA
  30458. * A_INT8 5G 20M Channel Center Freq 5885 CTL Limit Power SU
  30459. * A_INT8 5G 20M Channel Center Freq 5885 CTL Limit Power OFDMA
  30460. * A_INT8 5G 40M Channel Center Freq 5190 CTL Limit Power SU
  30461. * A_INT8 5G 40M Channel Center Freq 5190 CTL Limit Power OFDMA
  30462. * A_INT8 5G 40M Channel Center Freq 5310 CTL Limit Power SU
  30463. * A_INT8 5G 40M Channel Center Freq 5310 CTL Limit Power OFDMA
  30464. * A_INT8 5G 40M Channel Center Freq 5510 CTL Limit Power SU
  30465. * A_INT8 5G 40M Channel Center Freq 5510 CTL Limit Power OFDMA
  30466. * A_INT8 5G 40M Channel Center Freq 5670 CTL Limit Power SU
  30467. * A_INT8 5G 40M Channel Center Freq 5670 CTL Limit Power OFDMA
  30468. * A_INT8 5G 40M Channel Center Freq 5755 CTL Limit Power SU
  30469. * A_INT8 5G 40M Channel Center Freq 5755 CTL Limit Power OFDMA
  30470. * A_INT8 5G 40M Channel Center Freq 5795 CTL Limit Power SU
  30471. * A_INT8 5G 40M Channel Center Freq 5795 CTL Limit Power OFDMA
  30472. * A_INT8 5G 40M Channel Center Freq 5835 CTL Limit Power SU
  30473. * A_INT8 5G 40M Channel Center Freq 5835 CTL Limit Power OFDMA
  30474. * A_INT8 5G 40M Channel Center Freq 5875 CTL Limit Power SU
  30475. * A_INT8 5G 40M Channel Center Freq 5875 CTL Limit Power OFDMA
  30476. * A_INT8 5G 80M Channel Center Freq 5210 CTL Limit Power SU
  30477. * A_INT8 5G 80M Channel Center Freq 5210 CTL Limit Power OFDMA
  30478. * A_INT8 5G 80M Channel Center Freq 5290 CTL Limit Power SU
  30479. * A_INT8 5G 80M Channel Center Freq 5290 CTL Limit Power OFDMA
  30480. * A_INT8 5G 80M Channel Center Freq 5530 CTL Limit Power SU
  30481. * A_INT8 5G 80M Channel Center Freq 5530 CTL Limit Power OFDMA
  30482. * A_INT8 5G 80M Channel Center Freq 5610 CTL Limit Power SU
  30483. * A_INT8 5G 80M Channel Center Freq 5610 CTL Limit Power OFDMA
  30484. * A_INT8 5G 80M Channel Center Freq 5775 CTL Limit Power SU
  30485. * A_INT8 5G 80M Channel Center Freq 5775 CTL Limit Power OFDMA
  30486. * A_INT8 5G 80M Channel Center Freq 5855 CTL Limit Power SU
  30487. * A_INT8 5G 80M Channel Center Freq 5855 CTL Limit Power OFDMA
  30488. * A_INT8 5G 160M Channel Center Freq 5250 CTL Limit Power SU
  30489. * A_INT8 5G 160M Channel Center Freq 5250 CTL Limit Power OFDMA
  30490. * A_INT8 5G 160M Channel Center Freq 5570 CTL Limit Power SU
  30491. * A_INT8 5G 160M Channel Center Freq 5570 CTL Limit Power OFDMA
  30492. * A_INT8 5G 160M Channel Center Freq 5815 CTL Limit Power SU
  30493. * A_INT8 5G 160M Channel Center Freq 5815 CTL Limit Power OFDMA
  30494. * A_INT8 5G 320M Channel Center Freq 5650 CTL Limit Power SU (5650 Punctured 1111_1111_1111_0000)
  30495. * A_INT8 5G 320M Channel Center Freq 5650 CTL Limit Power OFDMA (5650 Punctured 1111_1111_1111_0000)
  30496. * ====================6G CTL POWER LIMIT ======================
  30497. * A_INT8 6G 20M Channel Center Freq 5935 CTL Limit Power SU
  30498. * A_INT8 6G 20M Channel Center Freq 5935 CTL Limit Power OFDMA
  30499. * A_INT8 6G 20M Channel Center Freq 5955 CTL Limit Power SU
  30500. * A_INT8 6G 20M Channel Center Freq 5955 CTL Limit Power OFDMA
  30501. * A_INT8 6G 20M Channel Center Freq 6415 CTL Limit Power SU
  30502. * A_INT8 6G 20M Channel Center Freq 6415 CTL Limit Power OFDMA
  30503. * A_INT8 6G 20M Channel Center Freq 7115 CTL Limit Power SU
  30504. * A_INT8 6G 20M Channel Center Freq 7115 CTL Limit Power OFDMA
  30505. * A_INT8 6G 40M Channel Center Freq 5965 CTL Limit Power SU
  30506. * A_INT8 6G 40M Channel Center Freq 5965 CTL Limit Power OFDMA
  30507. * A_INT8 6G 40M Channel Center Freq 6405 CTL Limit Power SU
  30508. * A_INT8 6G 40M Channel Center Freq 6405 CTL Limit Power OFDMA
  30509. * A_INT8 6G 80M Channel Center Freq 5985 CTL Limit Power SU
  30510. * A_INT8 6G 80M Channel Center Freq 5985 CTL Limit Power OFDMA
  30511. * A_INT8 6G 80M Channel Center Freq 6385 CTL Limit Power SU
  30512. * A_INT8 6G 80M Channel Center Freq 6385 CTL Limit Power OFDMA
  30513. * A_INT8 6G 160M Channel Center Freq 6025 CTL Limit Power SU
  30514. * A_INT8 6G 160M Channel Center Freq 6025 CTL Limit Power OFDMA
  30515. * A_INT8 6G 160M Channel Center Freq 6345 CTL Limit Power SU
  30516. * A_INT8 6G 160M Channel Center Freq 6345 CTL Limit Power OFDMA
  30517. * A_INT8 6G 320M Channel Center Freq 6105 CTL Limit Power SU
  30518. * A_INT8 6G 320M Channel Center Freq 6105 CTL Limit Power OFDMA
  30519. * A_INT8 6G 320M Channel Center Freq 6265 CTL Limit Power SU
  30520. * A_INT8 6G 320M Channel Center Freq 6265 CTL Limit Power OFDMA
  30521. */
  30522. BIOS_PARAM_TYPE_MAX,
  30523. } bios_param_type_e;
  30524. typedef struct {
  30525. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mimogain_table_cmd_fixed_param */
  30526. union {
  30527. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  30528. /** pdev_id for identifying the MAC
  30529. * See macros starting with WMI_PDEV_ID_ for values.
  30530. */
  30531. A_UINT32 pdev_id;
  30532. };
  30533. A_UINT32 mimogain_info; /* see WMI_MIMOGAIN macros */
  30534. /*
  30535. * Bit 7:0 len of array gain table
  30536. * Bit 8 bypass multi chain gain or not
  30537. */
  30538. /* array gain table(s) (len adjusted to number of words).
  30539. * Following this structure is the TLV:
  30540. * A_UINT32 arraygain_tbl[1];
  30541. */
  30542. } wmi_pdev_set_mimogain_table_cmd_fixed_param;
  30543. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_S 0
  30544. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN (0xff << WMI_MIMOGAIN_ARRAY_GAIN_LEN_S)
  30545. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
  30546. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
  30547. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S 8
  30548. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS (0x1 << WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S)
  30549. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
  30550. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
  30551. typedef struct {
  30552. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fwtest_set_param_cmd_fixed_param */
  30553. /** parameter id */
  30554. A_UINT32 param_id;
  30555. /** parameter value */
  30556. A_UINT32 param_value;
  30557. } wmi_fwtest_set_param_cmd_fixed_param;
  30558. #define WMI_ATF_DENOMINATION 1000 /* Expressed in 1 part in 1000 (permille) */
  30559. #define WMI_ATF_SSID_FAIR_SCHED 0 /** fair ATF scheduling for vdev */
  30560. #define WMI_ATF_SSID_STRICT_SCHED 1 /** strict ATF scheduling for vdev */
  30561. #define WMI_ATF_SSID_FAIR_SCHED_WITH_UB 2 /** fair ATF scheduling with upper bound for VDEV */
  30562. typedef struct {
  30563. /** TLV tag and len; tag equals
  30564. * WMITLV_TAG_STRUC_wmi_atf_peer_info */
  30565. A_UINT32 tlv_header;
  30566. wmi_mac_addr peer_macaddr;
  30567. A_UINT32 atf_units; /* Based on 1 part in 1000 (per mille) */
  30568. A_UINT32 atf_groupid; /* Group Id of the peers for ATF SSID grouping */
  30569. A_UINT32 atf_units_reserved; /* Peer congestion threshold for future use */
  30570. A_UINT32 vdev_id;
  30571. A_UINT32 pdev_id;
  30572. } wmi_atf_peer_info;
  30573. #define WMI_ATF_PEER_UNITS_BIT_POS 0
  30574. #define WMI_ATF_PEER_UNITS_NUM_BITS 16
  30575. #define WMI_ATF_GET_PEER_UNITS(atf_peer_info) \
  30576. WMI_GET_BITS(atf_peer_info,WMI_ATF_PEER_UNITS_BIT_POS,WMI_ATF_PEER_UNITS_NUM_BITS)
  30577. #define WMI_ATF_SET_PEER_UNITS(atf_peer_info,val) \
  30578. WMI_SET_BITS(atf_peer_info,WMI_ATF_PEER_UNITS_BIT_POS,WMI_ATF_PEER_UNITS_NUM_BITS, val)
  30579. #define WMI_ATF_GROUP_ID_BIT_POS 16
  30580. #define WMI_ATF_GROUP_ID_NUM_BITS 8
  30581. #define WMI_ATF_GET_GROUP_ID(atf_peer_info) \
  30582. WMI_GET_BITS(atf_peer_info,WMI_ATF_GROUP_ID_BIT_POS,WMI_ATF_GROUP_ID_NUM_BITS)
  30583. #define WMI_ATF_SET_GROUP_ID(atf_peer_info,val) \
  30584. WMI_SET_BITS(atf_peer_info,WMI_ATF_GROUP_ID_BIT_POS,WMI_ATF_GROUP_ID_NUM_BITS, val)
  30585. #define WMI_ATF_EXPLICIT_PEER_FLAG_BIT_POS 24
  30586. #define WMI_ATF_EXPLICIT_PEER_FLAG_NUM_BITS 1
  30587. #define WMI_ATF_GET_EXPLICIT_PEER_FLAG(atf_peer_info) \
  30588. WMI_GET_BITS(atf_peer_info,WMI_ATF_EXPLICIT_PEER_FLAG_BIT_POS,WMI_ATF_EXPLICIT_PEER_FLAG_NUM_BITS)
  30589. #define WMI_ATF_SET_EXPLICIT_PEER_FLAG(atf_peer_info,val) \
  30590. WMI_SET_BITS(atf_peer_info,WMI_ATF_EXPLICIT_PEER_FLAG_BIT_POS,WMI_ATF_EXPLICIT_PEER_FLAG_NUM_BITS, val)
  30591. typedef struct {
  30592. /* The new structure is an optimized version of wmi_atf_peer_info & wmi_atf_peer_ext_info combined */
  30593. A_UINT32 tlv_header;
  30594. wmi_mac_addr peer_macaddr;
  30595. /* atf_peer_info
  30596. * Bits 0-15 - atf_units (based on 1 part in 1000 (per mille))
  30597. * Bits 16-23 - atf_groupid
  30598. * Bit 24 - Configured Peer Indication (0/1), this bit would be set by
  30599. * host to indicate that the peer has airtime % configured
  30600. * explicitly by user
  30601. * Bits 25-31 - Reserved (Shall be zero)
  30602. */
  30603. A_UINT32 atf_peer_info;
  30604. } wmi_atf_peer_info_v2;
  30605. #define WMI_ATF_PEER_FULL_UPDATE_BIT_POS 0
  30606. #define WMI_ATF_PEER_FULL_UPDATE_NUM_BITS 1
  30607. #define WMI_ATF_GET_PEER_FULL_UPDATE(atf_flags) \
  30608. WMI_GET_BITS(atf_flags,WMI_ATF_PEER_FULL_UPDATE_BIT_POS,WMI_ATF_PEER_FULL_UPDATE_NUM_BITS)
  30609. #define WMI_ATF_SET_PEER_FULL_UPDATE(atf_flags,val) \
  30610. WMI_SET_BITS(atf_flags,WMI_ATF_PEER_FULL_UPDATE_BIT_POS,WMI_ATF_PEER_FULL_UPDATE_NUM_BITS,val)
  30611. #define WMI_ATF_PEER_PENDING_WMI_CMDS_BIT_POS 1
  30612. #define WMI_ATF_PEER_PENDING_WMI_CMDS_NUM_BITS 1
  30613. #define WMI_ATF_GET_PEER_PENDING_WMI_CMDS(atf_flags) \
  30614. WMI_GET_BITS(atf_flags,WMI_ATF_PEER_PENDING_WMI_CMDS_BIT_POS, WMI_ATF_PEER_PENDING_WMI_CMDS_NUM_BITS)
  30615. #define WMI_ATF_SET_PEER_PENDING_WMI_CMDS(atf_flags,val) \
  30616. WMI_SET_BITS(atf_flags,WMI_ATF_PEER_PENDING_WMI_CMDS_BIT_POS, WMI_ATF_PEER_PENDING_WMI_CMDS_NUM_BITS, val)
  30617. #define WMI_ATF_PEER_PDEV_ID_VALID_BIT_POS 2
  30618. #define WMI_ATF_PEER_PDEV_ID_VALID_NUM_BITS 1
  30619. #define WMI_ATF_GET_PEER_PDEV_ID_VALID(atf_flags) \
  30620. WMI_GET_BITS(atf_flags,WMI_ATF_PEER_PDEV_ID_VALID_BIT_POS, WMI_ATF_PEER_PDEV_ID_VALID_NUM_BITS)
  30621. #define WMI_ATF_SET_PEER_PDEV_ID_VALID(atf_flags,val) \
  30622. WMI_SET_BITS(atf_flags,WMI_ATF_PEER_PDEV_ID_VALID_BIT_POS, WMI_ATF_PEER_PDEV_ID_VALID_NUM_BITS, val)
  30623. typedef struct {
  30624. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param */
  30625. A_UINT32 num_peers;
  30626. A_UINT32 pdev_id;
  30627. /* atf_flags
  30628. * Bit 0 - full or partial update;
  30629. * full update -
  30630. * indicates that this is done for all the connected peers
  30631. * partial update -
  30632. * indicates update for only the newly connected peers
  30633. * (whenever some peers gets connected/disconnected)
  30634. * Bit 1 - indicates whether there are more iterations of WMI command
  30635. * incoming after the current set of cmds
  30636. * Example : If there are 500 peers present and tlv can accomodate
  30637. * only 50 peers at a time, then this will be set for all the
  30638. * instances of the WMI commands except the last one.
  30639. * Bit 2 - indicates if pdev_id is valid or not
  30640. * Bits 3-31 - Reserved (Shall be zero)
  30641. */
  30642. A_UINT32 atf_flags;
  30643. /*
  30644. * Following this structure is one of the following TLVs
  30645. * (only one of them will have valid data in a particular message)
  30646. * - struct wmi_atf_peer_info peer_info[num_peers];
  30647. * - struct wmi_atf_peer_info_v2 peer_info_v2[num_peers];
  30648. */
  30649. } wmi_peer_atf_request_fixed_param;
  30650. #define WMI_ATF_GROUP_SCHED_POLICY_BIT_POS 0
  30651. #define WMI_ATF_GROUP_SCHED_POLICY_NUM_BITS 4
  30652. #define WMI_ATF_GROUP_GET_GROUP_SCHED_POLICY(atf_group_flags) \
  30653. WMI_GET_BITS(atf_group_flags,WMI_ATF_GROUP_SCHED_POLICY_BIT_POS,WMI_ATF_GROUP_SCHED_POLICY_NUM_BITS)
  30654. #define WMI_ATF_GROUP_SET_GROUP_SCHED_POLICY(atf_group_flags,val) \
  30655. WMI_SET_BITS(atf_group_flags,WMI_ATF_GROUP_SCHED_POLICY_BIT_POS,WMI_ATF_GROUP_SCHED_POLICY_NUM_BITS,val)
  30656. typedef struct {
  30657. /** TLV tag and len; tag equals
  30658. * WMITLV_TAG_STRUC_wmi_atf_group_info */
  30659. A_UINT32 tlv_header;
  30660. A_UINT32 atf_group_id; /* ID of the Air Time Management group */
  30661. /* atf_group_units
  30662. * Fraction of air time allowed for the group, in per mille units
  30663. * (from 0-1000).
  30664. * For example, to indicate that the group can use 12.3% of the air time,
  30665. * the atf_group_units setting would be 123.
  30666. */
  30667. A_UINT32 atf_group_units;
  30668. /* atf_group_flags
  30669. * Bits 4-31 - Reserved (Shall be zero)
  30670. * Bits 0-3 - Group Schedule Policy (Fair/Strict/Fair with upper bound)
  30671. * Refer to WMI_ATF_SSID_ definitions
  30672. */
  30673. A_UINT32 atf_group_flags;
  30674. } wmi_atf_group_info;
  30675. #define WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_BIT_POS 0
  30676. #define WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_NUM_BITS 16
  30677. #define WMI_ATF_GROUP_GET_NUM_EXPLICIT_PEERS(atf_total_num_peers) \
  30678. WMI_GET_BITS(atf_total_num_peers, WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_BIT_POS, WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_NUM_BITS)
  30679. #define WMI_ATF_GROUP_SET_NUM_EXPLICIT_PEERS(atf_total_num_peers, val) \
  30680. WMI_SET_BITS(atf_total_num_peers, WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_BIT_POS, WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_NUM_BITS, val)
  30681. #define WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_BIT_POS 16
  30682. #define WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_NUM_BITS 16
  30683. #define WMI_ATF_GROUP_GET_NUM_IMPLICIT_PEERS(atf_total_num_peers) \
  30684. WMI_GET_BITS(atf_total_num_peers, WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_BIT_POS, WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_NUM_BITS)
  30685. #define WMI_ATF_GROUP_SET_NUM_IMPLICIT_PEERS(atf_total_num_peers, val) \
  30686. WMI_SET_BITS(atf_total_num_peers, WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_BIT_POS, WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_NUM_BITS, val)
  30687. typedef struct {
  30688. /** TLV tag and len; tag equals
  30689. * WMITLV_TAG_STRUC_wmi_atf_group_info_v2 */
  30690. A_UINT32 tlv_header;
  30691. A_UINT32 atf_group_id; /* ID of the Air Time Management group */
  30692. /* atf_group_units
  30693. * Fraction of air time allowed for the group, in per mille units
  30694. * (from 0-1000).
  30695. * For example, to indicate that the group can use 12.3% of the air time,
  30696. * the atf_group_units setting would be 123.
  30697. */
  30698. A_UINT32 atf_group_units;
  30699. /* atf_group_flags
  30700. * Bits 0-3 - Group Schedule Policy (Fair/Strict/Fair with upper bound)
  30701. * Refer to WMI_ATF_SSID_ definitions
  30702. * Bit 4-31 - Reserved (Shall be zero)
  30703. */
  30704. A_UINT32 atf_group_flags;
  30705. /* atf_total_num_peers
  30706. *
  30707. * Bits 0-15 - total number of explicit peers
  30708. * Bits 16-31 - total number of implicit peers
  30709. * An explicit peer has an ATF % configured by the user.
  30710. * An implicit peer has an ATF % =
  30711. * (Group_ATF_percent - Total_Explicit_Peers_ATF_Percent) /
  30712. * number of implicit peers
  30713. * This computation can be done in FW based on atf_total_num_peers.
  30714. */
  30715. A_UINT32 atf_total_num_peers;
  30716. /* atf_total_implicit_peer_units
  30717. *
  30718. * Air time allocated for all the implicit peers
  30719. * (from 0-1000, in per mille units)
  30720. */
  30721. A_UINT32 atf_total_implicit_peer_units;
  30722. } wmi_atf_group_info_v2;
  30723. typedef struct {
  30724. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_atf_ssid_grp_request_fixed_param */
  30725. A_UINT32 pdev_id;
  30726. /*
  30727. * Following this structure is the one of the following TLVs
  30728. * (only one of them will have valid data in a particular message)
  30729. * - struct wmi_atf_group_info group_info[];
  30730. * - struct wmi_atf_group_info_v2 group_info[];
  30731. */
  30732. } wmi_atf_ssid_grp_request_fixed_param;
  30733. /* ATF Configurations for WMM ACs of a group, value for each AC shall be in
  30734. * percentage (0-100).
  30735. * This perecentage is relative to the residual airtime (derived by FW)
  30736. * configured for the group.
  30737. * When WMM ATF is not configured for a peer all values shall be 0.
  30738. */
  30739. typedef struct {
  30740. /** TLV tag and len; tag equals
  30741. * WMITLV_TAG_STRUC_wmi_atf_group_wmm_ac_info
  30742. */
  30743. A_UINT32 tlv_header;
  30744. A_UINT32 atf_group_id; /* ID of the Air Time Management group */
  30745. A_UINT32 atf_units_be;
  30746. A_UINT32 atf_units_bk;
  30747. A_UINT32 atf_units_vi;
  30748. A_UINT32 atf_units_vo;
  30749. } wmi_atf_group_wmm_ac_info;
  30750. typedef struct {
  30751. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_atf_grp_wmm_ac_cfg_request_fixed_param */
  30752. A_UINT32 pdev_id;
  30753. /*
  30754. * Following this structure is the TLV:
  30755. * struct wmi_atf_group_wmm_ac_info group_info[];
  30756. */
  30757. } wmi_atf_grp_wmm_ac_cfg_request_fixed_param;
  30758. #define WMI_VDEV_LATENCY_TIDNUM_BIT_POS 0
  30759. #define WMI_VDEV_LATENCY_TIDNUM_NUM_BITS 8
  30760. #define WMI_VDEV_LATENCY_GET_TIDNUM(vdev_latency_info) \
  30761. WMI_GET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_TIDNUM_BIT_POS, WMI_VDEV_LATENCY_TIDNUM_NUM_BITS)
  30762. #define WMI_VDEV_LATENCY_SET_TIDNUM(vdev_latency_info,val) \
  30763. WMI_SET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_TIDNUM_BIT_POS, WMI_VDEV_LATENCY_TIDNUM_NUM_BITS, val)
  30764. #define WMI_VDEV_LATENCY_AC_BIT_POS 8
  30765. #define WMI_VDEV_LATENCY_AC_NUM_BITS 2
  30766. #define WMI_VDEV_LATENCY_GET_AC(vdev_latency_info) \
  30767. WMI_GET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_AC_BIT_POS, WMI_VDEV_LATENCY_AC_NUM_BITS)
  30768. #define WMI_VDEV_LATENCY_SET_AC(vdev_latency_info,val) \
  30769. WMI_SET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_AC_BIT_POS, WMI_VDEV_LATENCY_AC_NUM_BITS, val)
  30770. #define WMI_VDEV_LATENCY_DL_VALID_BIT_POS 10
  30771. #define WMI_VDEV_LATENCY_DL_VALID_NUM_BITS 1
  30772. #define WMI_VDEV_LATENCY_GET_DL_VALID(vdev_latency_info) \
  30773. WMI_GET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_DL_VALID_BIT_POS, WMI_VDEV_LATENCY_DL_VALID_NUM_BITS)
  30774. #define WMI_VDEV_LATENCY_SET_DL_VALID(vdev_latency_info,val) \
  30775. WMI_SET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_DL_VALID_BIT_POS, WMI_VDEV_LATENCY_DL_VALID_NUM_BITS, val)
  30776. #define WMI_VDEV_LATENCY_UL_VALID_BIT_POS 11
  30777. #define WMI_VDEV_LATENCY_UL_VALID_NUM_BITS 1
  30778. #define WMI_VDEV_LATENCY_GET_UL_VALID(vdev_latency_info) \
  30779. WMI_GET_BITS(vdev_latency_info,WMI_VDEV_LATENCY_UL_VALID_BIT_POS, WMI_VDEV_LATENCY_UL_VALID_NUM_BITS)
  30780. #define WMI_VDEV_LATENCY_SET_UL_VALID(vdev_latency_info,val) \
  30781. WMI_SET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_UL_VALID_BIT_POS, WMI_VDEV_LATENCY_UL_VALID_NUM_BITS, val)
  30782. typedef struct {
  30783. /** TLV tag and len; tag equals
  30784. * WMITLV_TAG_STRUC_wmi_vdev_latency_info
  30785. */
  30786. A_UINT32 tlv_header;
  30787. /*
  30788. * Maximum expected average delay between 2 schedules in milliseconds
  30789. * of given TID type when it has active traffic.
  30790. * 0x0 is considered as invalid service interval.
  30791. */
  30792. A_UINT32 service_interval;
  30793. /* burst_size:
  30794. * The number of bytes transmitted (in DL TIDs) / received (in UL ACs)
  30795. * in service interval.
  30796. */
  30797. A_UINT32 burst_size;
  30798. /* max_latency:
  30799. * The maximum end to end latency expectation, in milliseconds.
  30800. * If this value is 0x0, it shall be ignored.
  30801. */
  30802. A_UINT32 max_latency;
  30803. /* max_per:
  30804. * The maximum PER (as a percent) for the peer-TID, in range 1 - 100.
  30805. * If this value is 0x0, it shall be ignored.
  30806. */
  30807. A_UINT32 max_per;
  30808. /* min_tput:
  30809. * The minimum guaranteed throughput to the peer-TID, in Kbps.
  30810. * If this value is 0x0, it shall be ignored.
  30811. */
  30812. A_UINT32 min_tput;
  30813. /* vdev_latency_info
  30814. * Bits 12 - 31 - Reserved (Shall be zero)
  30815. * Bit 11 - UL latency config indication.
  30816. * If this bit is set then this latency info will
  30817. * be used when triggering UL traffic. Until the
  30818. * AC specified in bits 8-9 has transferred at least
  30819. * burst_size amount of UL data within the service
  30820. * period, the AP will continue sending UL triggers
  30821. * when the STA has data of the specified access
  30822. * category ready to transmit.
  30823. * Note that the TID specified in bits 0-7 does not
  30824. * apply to UL; the TID-to-AC mapping applied to DL
  30825. * data that can be adjusted by the TID specified
  30826. * in bits 0-7 and the AC specified in bits 8-9 is
  30827. * distinct from the TID-to-AC mapping applied to
  30828. * UL data.
  30829. * Bit 10 - DL latency config indication. If the bit is set
  30830. * then DL TID will use this latency config.
  30831. * Bits 8 - 9 - This bit has info on the custom AC of DL TID.
  30832. * Also if bit 11 is set, the AP will apply some
  30833. * of these latency specs (in particular, burst_size)
  30834. * to UL traffic for this AC, by sending UL triggers
  30835. * until the desired amount of data has been received
  30836. * within the service period.
  30837. * Bits 0 - 7 - Specifies the TID of interest that corresponds
  30838. * to the AC specified in bits 8-9. This can be
  30839. * used to adjust the TID-to-AC mapping applied to
  30840. * DL data (if bit 10 is set).
  30841. */
  30842. A_UINT32 vdev_latency_info;
  30843. } wmi_vdev_latency_info;
  30844. /*
  30845. * Currently wmi_vdev_tid_latency_config_fixed_param will be sent per
  30846. * data tid to map the AC.
  30847. * Also to configure VDEV level latency config to be used by all TIDs
  30848. * based on the mapping.
  30849. * VDEV restart is expected during this command
  30850. */
  30851. typedef struct {
  30852. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_tid_latency_config_fixed_param */
  30853. A_UINT32 pdev_id;
  30854. A_UINT32 vdev_id;
  30855. /*
  30856. * Following this structure is the TLV:
  30857. * struct wmi_vdev_latency_info vdev_latency_info[];
  30858. */
  30859. } wmi_vdev_tid_latency_config_fixed_param;
  30860. #define WMI_TID_LATENCY_TIDNUM_BIT_POS 0
  30861. #define WMI_TID_LATENCY_TIDNUM_NUM_BITS 8
  30862. #define WMI_TID_LATENCY_GET_TIDNUM(latency_tid_info) \
  30863. WMI_GET_BITS(latency_tid_info, WMI_TID_LATENCY_TIDNUM_BIT_POS, WMI_TID_LATENCY_TIDNUM_NUM_BITS)
  30864. #define WMI_TID_LATENCY_SET_TIDNUM(latency_tid_info,val) \
  30865. WMI_SET_BITS(latency_tid_info, WMI_TID_LATENCY_TIDNUM_BIT_POS, WMI_TID_LATENCY_TIDNUM_NUM_BITS, val)
  30866. #define WMI_TID_LATENCY_AC_BIT_POS 8
  30867. #define WMI_TID_LATENCY_AC_NUM_BITS 2
  30868. #define WMI_TID_LATENCY_GET_AC(latency_tid_info) \
  30869. WMI_GET_BITS(latency_tid_info, WMI_TID_LATENCY_AC_BIT_POS , WMI_TID_LATENCY_AC_NUM_BITS)
  30870. #define WMI_TID_LATENCY_SET_AC(latency_tid_info,val) \
  30871. WMI_SET_BITS(latency_tid_info, WMI_TID_LATENCY_AC_BIT_POS , WMI_TID_LATENCY_AC_NUM_BITS, val)
  30872. #define WMI_TID_LATENCY_DL_ENABLE_BIT_POS 10
  30873. #define WMI_TID_LATENCY_DL_ENABLE_NUM_BITS 1
  30874. #define WMI_TID_LATENCY_GET_DL_ENABLE(latency_tid_info) \
  30875. WMI_GET_BITS(latency_tid_info,WMI_TID_LATENCY_DL_ENABLE_BIT_POS, WMI_TID_LATENCY_DL_ENABLE_NUM_BITS)
  30876. #define WMI_TID_LATENCY_SET_DL_ENABLE(latency_tid_info,val) \
  30877. WMI_SET_BITS(latency_tid_info,WMI_TID_LATENCY_DL_ENABLE_BIT_POS, WMI_TID_LATENCY_DL_ENABLE_NUM_BITS, val)
  30878. #define WMI_TID_LATENCY_UL_ENABLE_BIT_POS 11
  30879. #define WMI_TID_LATENCY_UL_ENABLE_NUM_BITS 1
  30880. #define WMI_TID_LATENCY_GET_UL_ENABLE(latency_tid_info) \
  30881. WMI_GET_BITS(latency_tid_info,WMI_TID_LATENCY_UL_ENABLE_BIT_POS, WMI_TID_LATENCY_UL_ENABLE_NUM_BITS)
  30882. #define WMI_TID_LATENCY_SET_UL_ENABLE(latency_tid_info,val) \
  30883. WMI_SET_BITS(latency_tid_info,WMI_TID_LATENCY_UL_ENABLE_BIT_POS, WMI_TID_LATENCY_UL_ENABLE_NUM_BITS, val)
  30884. #define WMI_LATENCY_BURST_SIZE_SUM_BIT_POS 12
  30885. #define WMI_LATENCY_BURST_SIZE_SUM_NUM_BITS 2
  30886. #define WMI_LATENCY_GET_BURST_SIZE_SUM(latency_tid_info) \
  30887. WMI_GET_BITS(latency_tid_info, WMI_LATENCY_BURST_SIZE_SUM_BIT_POS, WMI_LATENCY_BURST_SIZE_SUM_NUM_BITS)
  30888. #define WMI_LATENCY_SET_BURST_SIZE_SUM(latency_tid_info,val) \
  30889. WMI_SET_BITS(latency_tid_info, WMI_LATENCY_BURST_SIZE_SUM_BIT_POS, WMI_LATENCY_BURST_SIZE_SUM_NUM_BITS, val)
  30890. #define WMI_LATENCY_MSDUQ_ID_BIT_POS 14
  30891. #define WMI_LATENCY_MSDUQ_ID_NUM_BITS 4
  30892. #define WMI_LATENCY_GET_MSDUQ_ID(latency_tid_info) \
  30893. WMI_GET_BITS(latency_tid_info, WMI_LATENCY_MSDUQ_ID_BIT_POS, WMI_LATENCY_MSDUQ_ID_NUM_BITS)
  30894. #define WMI_LATENCY_SET_MSDUQ_ID(latency_tid_info,val) \
  30895. WMI_SET_BITS(latency_tid_info, WMI_LATENCY_MSDUQ_ID_BIT_POS, WMI_LATENCY_MSDUQ_ID_NUM_BITS, val)
  30896. #define WMI_LATENCY_DISABLE_UL_OFDMA_BIT_POS 18
  30897. #define WMI_LATENCY_DISABLE_UL_OFDMA_NUM_BITS 1
  30898. #define WMI_LATENCY_GET_DISABLE_UL_OFDMA(latency_tid_info) \
  30899. WMI_GET_BITS(latency_tid_info, WMI_LATENCY_DISABLE_UL_OFDMA_BIT_POS, WMI_LATENCY_DISABLE_UL_OFDMA_NUM_BITS)
  30900. #define WMI_LATENCY_SET_DISABLE_UL_OFDMA(latency_tid_info,val) \
  30901. WMI_SET_BITS(latency_tid_info, WMI_LATENCY_DISABLE_UL_OFDMA_BIT_POS, WMI_LATENCY_DISABLE_UL_OFDMA_NUM_BITS, val)
  30902. #define WMI_LATENCY_DISABLE_UL_MU_MIMO_BIT_POS 19
  30903. #define WMI_LATENCY_DISABLE_UL_MU_MIMO_NUM_BITS 1
  30904. #define WMI_LATENCY_GET_DISABLE_UL_MU_MIMO(latency_tid_info) \
  30905. WMI_GET_BITS(latency_tid_info, WMI_LATENCY_DISABLE_UL_MU_MIMO_BIT_POS, WMI_LATENCY_DISABLE_UL_MU_MIMO_NUM_BITS)
  30906. #define WMI_LATENCY_SET_DISABLE_UL_MU_MIMO(latency_tid_info,val) \
  30907. WMI_SET_BITS(latency_tid_info, WMI_LATENCY_DISABLE_UL_MU_MIMO_BIT_POS, WMI_LATENCY_DISABLE_UL_MU_MIMO_NUM_BITS, val)
  30908. #define WMI_LATENCY_SAWF_UL_PARAMS_FLAG_POS 20
  30909. #define WMI_LATENCY_SAWF_UL_PARAMS_FLAG_NUM_BITS 1
  30910. #define WMI_LATENCY_GET_SAWF_UL_PARAMS_BIT(latency_tid_info) \
  30911. WMI_GET_BITS(latency_tid_info, WMI_LATENCY_SAWF_UL_PARAMS_FLAG_POS, WMI_LATENCY_SAWF_UL_PARAMS_FLAG_NUM_BITS)
  30912. #define WMI_LATENCY_SET_SAWF_UL_PARAMS_BIT(latency_tid_info, val) \
  30913. WMI_SET_BITS(latency_tid_info, WMI_LATENCY_SAWF_UL_PARAMS_FLAG_POS, WMI_LATENCY_SAWF_UL_PARAMS_FLAG_NUM_BITS, val)
  30914. typedef struct {
  30915. /** TLV tag and len; tag equals
  30916. * WMITLV_TAG_STRUC_wmi_tid_latency_info
  30917. */
  30918. A_UINT32 tlv_header;
  30919. wmi_mac_addr dest_macaddr; /* Mac address of end client */
  30920. /*
  30921. * Maximum expected average delay between 2 schedules in milliseconds
  30922. * of given TID type when it has active traffic.
  30923. * 0x0 is considered as invalid service interval.
  30924. */
  30925. A_UINT32 service_interval;
  30926. /*
  30927. * Cumulative number of bytes are expected to be transmitted or
  30928. * received in the service interval when this specific Peer-TID
  30929. * has active traffic.
  30930. * If cumulative number of bytes is 0x0, it is considered as
  30931. * invalid burst size. In that case, firmware would try to transmit
  30932. * and receive as many bytes as it can for this specific Peer-TID.
  30933. * This burst size will be added or subtracted from vdev burst size
  30934. * based on burst size sum bit in latency tid info.
  30935. * The VDEV burst size will be considered to be 0 when no VDEV latency
  30936. * command is received.
  30937. * If host needs to set burst size for a peer then they can use the
  30938. * peer cmd and set burst size sum bit to 1.
  30939. */
  30940. A_UINT32 burst_size_diff;
  30941. /* max_latency:
  30942. * The maximum end to end latency expectation, in milliseconds.
  30943. * If this value is 0x0, it shall be ignored.
  30944. */
  30945. A_UINT32 max_latency;
  30946. /* max_per:
  30947. * The maximum PER (as a percent) for the peer-TID, in range 1 - 100
  30948. * If this value is 0x0, it shall be ignored.
  30949. */
  30950. A_UINT32 max_per;
  30951. /* min_tput:
  30952. * The minimum guaranteed throughput to the peer-TID, in Kbps.
  30953. * If this value is 0x0, it shall be ignored.
  30954. */
  30955. A_UINT32 min_tput;
  30956. /* latency_tid_info
  30957. * Bits 21-31 - Reserved (Shall be zero)
  30958. * Bit 20 - Flag to indicate SAWF UL params (and not mesh latency)
  30959. * Bit 19 - Disable UL MU-MIMO. If set, UL MU-MIMO is disabled
  30960. * for the specified AC. Note that TID level control is
  30961. * not possible for UL MU-MIMO (the granularity is AC).
  30962. * Bit 18 - Disable UL OFDMA. If set, UL OFDMA is disabled for
  30963. * the specified AC. Note that TID level control is not
  30964. * possible for UL OFDMA (the granularity is AC).
  30965. * Bits 14-17 - MSDU queue flow id within the TID for configuring
  30966. * latency info per MSDU flow queue
  30967. * Bit 12-13 - burst size sum. Bit to indicate whether to add or
  30968. * subtract burst_size_diff from vdev cmd burst size:
  30969. * 1 -> addition
  30970. * 2 -> subtraction
  30971. * Bit 11 - UL latency config indication.
  30972. * If this bit is set then this latency info will
  30973. * be used when triggering UL traffic. Until the
  30974. * AC specified in bits 8-9 has transferred at least
  30975. * burst_size amount of UL data within the service
  30976. * period, the AP will continue sending UL triggers
  30977. * when the STA has data of the specified access
  30978. * category ready to transmit.
  30979. * Note that the TID specified in bits 0-7 does not
  30980. * apply to UL; the TID-to-AC mapping applied to DL
  30981. * data that can be adjusted by the TID specified
  30982. * in bits 0-7 and the AC specified in bits 8-9 is
  30983. * distinct from the TID-to-AC mapping applied to
  30984. * UL data.
  30985. * Bit 10 - DL latency config indication. If the bit is set
  30986. * then DL TID will use this latency config.
  30987. * Bits 8 - 9 - This bit has info on the custom AC of DL TID.
  30988. * Also if bit 11 is set, the AP will apply some
  30989. * of these latency specs (in particular, burst_size)
  30990. * to UL traffic for this AC, by sending UL triggers
  30991. * until the desired amount of data has been received
  30992. * within the service period.
  30993. * Bits 0 - 7 - Specifies the TID of interest that corresponds
  30994. * to the AC specified in bits 8-9. This can be
  30995. * used to adjust the TID-to-AC mapping applied to
  30996. * DL data (if bit 10 is set).
  30997. */
  30998. A_UINT32 latency_tid_info;
  30999. } wmi_tid_latency_info;
  31000. /*
  31001. * Currently wmi_peer_tid_set_latency_request_fixed_param will be sent
  31002. * per TID per latency configured client.
  31003. * In future this command might come for multiple latency configured
  31004. * clients together.
  31005. * The clients are expected to be associated while receiving this command.
  31006. */
  31007. typedef struct {
  31008. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_latency_config_fixed_param */
  31009. A_UINT32 pdev_id;
  31010. /*
  31011. * Following this structure is the TLV:
  31012. * struct wmi_tid_latency_info latency_info[];
  31013. */
  31014. } wmi_peer_tid_latency_config_fixed_param;
  31015. #define WMI_ATF_GROUP_CFG_PEER_BIT_POS 0
  31016. #define WMI_ATF_GROUP_CFG_PEER_NUM_BITS 1
  31017. #define WMI_ATF_GROUP_GET_CFG_PEER_BIT(atf_peer_flags) \
  31018. WMI_GET_BITS(atf_peer_flags,WMI_ATF_GROUP_CFG_PEER_BIT_POS,WMI_ATF_GROUP_CFG_PEER_NUM_BITS)
  31019. #define WMI_ATF_GROUP_SET_CFG_PEER_BIT(atf_peer_flags,val) \
  31020. WMI_SET_BITS(atf_peer_flags,WMI_ATF_GROUP_CFG_PEER_BIT_POS,WMI_ATF_GROUP_CFG_PEER_NUM_BITS,val)
  31021. typedef struct {
  31022. /** TLV tag and len; tag equals
  31023. * WMITLV_TAG_STRUC_wmi_peer_atf_ext_info */
  31024. A_UINT32 tlv_header;
  31025. wmi_mac_addr peer_macaddr;
  31026. A_UINT32 atf_group_id; /* Group Id of the peers for ATF SSID grouping */
  31027. /* atf_peer_flags
  31028. * Bits 1-31 - Reserved (Shall be zero)
  31029. * Bit 0 - Configured Peer Indication (0/1), this bit would be set by
  31030. * host to indicate that the peer has airtime % configured
  31031. * explicitly by user.
  31032. */
  31033. A_UINT32 atf_peer_flags;
  31034. } wmi_peer_atf_ext_info;
  31035. typedef struct {
  31036. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_atf_ext_request_fixed_param */
  31037. A_UINT32 pdev_id;
  31038. /*
  31039. * Following this structure is the TLV:
  31040. * struct wmi_peer_atf_ext_info peer_ext_info[];
  31041. */
  31042. } wmi_peer_atf_ext_request_fixed_param;
  31043. /* Structure for Bandwidth Fairness peer information */
  31044. typedef struct {
  31045. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bwf_peer_info */
  31046. A_UINT32 tlv_header;
  31047. wmi_mac_addr peer_macaddr;
  31048. A_UINT32 bwf_guaranteed_bandwidth; /* BWF guaranteed_bandwidth for the peers in mbps */
  31049. A_UINT32 bwf_max_airtime; /* BWF Maximum airtime percentage that can be allocated to the peer to meet the guaranteed_bandwidth */
  31050. A_UINT32 bwf_peer_priority; /* BWF priority of the peer to allocate the tokens dynamically */
  31051. A_UINT32 vdev_id;
  31052. A_UINT32 pdev_id;
  31053. } wmi_bwf_peer_info;
  31054. /* Structure for Bandwidth Fairness peer request */
  31055. typedef struct {
  31056. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_bwf_request_fixed_param */
  31057. A_UINT32 num_peers;
  31058. /*
  31059. * Following this structure is the TLV:
  31060. * struct wmi_bwf_peer_info peer_info[num_peers];
  31061. */
  31062. } wmi_peer_bwf_request_fixed_param;
  31063. /* Equal distribution of ATF air time within an VDEV. */
  31064. typedef struct {
  31065. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_atf_request_fixed_param */
  31066. A_UINT32 vdev_id;
  31067. A_UINT32 peer_atf_units; /* Per peer ATF units (per mille). */
  31068. A_UINT32 pdev_id;
  31069. } wmi_vdev_atf_request_fixed_param;
  31070. typedef struct {
  31071. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_cck_config_cmd_fixed_param */
  31072. /** pdev_id for identifying the MAC
  31073. * See macros starting with WMI_PDEV_ID_ for values.
  31074. */
  31075. A_UINT32 pdev_id;
  31076. /** parameter */
  31077. A_UINT32 param;
  31078. } wmi_pdev_get_ani_cck_config_cmd_fixed_param;
  31079. typedef struct {
  31080. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_ofdm_config_cmd_fixed_param */
  31081. /** pdev_id for identifying the MAC
  31082. * See macros starting with WMI_PDEV_ID_ for values.
  31083. */
  31084. A_UINT32 pdev_id;
  31085. /** parameter */
  31086. A_UINT32 param;
  31087. } wmi_pdev_get_ani_ofdm_config_cmd_fixed_param;
  31088. typedef struct {
  31089. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_QBOOST_CFG_CMD_fixed_param */
  31090. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  31091. A_UINT32 qb_enable;
  31092. wmi_mac_addr peer_macaddr;
  31093. } WMI_QBOOST_CFG_CMD_fixed_param;
  31094. #define WMI_INST_STATS_INVALID_RSSI 0
  31095. typedef struct {
  31096. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param */
  31097. A_UINT32 iRSSI; /* dB above the noise floor */
  31098. /* peer MAC address */
  31099. wmi_mac_addr peer_macaddr;
  31100. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  31101. } wmi_inst_rssi_stats_resp_fixed_param;
  31102. typedef struct {
  31103. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_cck_ofdm_rate_info */
  31104. A_UINT32 ratecode_legacy; /* Rate code for CCK OFDM */
  31105. } wmi_peer_cck_ofdm_rate_info;
  31106. typedef struct {
  31107. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcs_rate_info */
  31108. A_UINT32 ratecode_20; /* Rate code for 20MHz BW */
  31109. A_UINT32 ratecode_40; /* Rate code for 40MHz BW */
  31110. A_UINT32 ratecode_80; /* Rate code for 80MHz BW */
  31111. A_UINT32 ratecode_160; /* Rate code for 160MHz BW */
  31112. A_UINT32 ratecode_320; /* Rate code for 320MHz BW */
  31113. } wmi_peer_mcs_rate_info;
  31114. typedef struct {
  31115. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ratecode_list_event_fixed_param */
  31116. wmi_mac_addr peer_macaddr;
  31117. A_UINT32 ratecount; /* Max Rate count for each mode */
  31118. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  31119. A_UINT32 pdev_id; /* ID of the pdev this peer belongs to */
  31120. A_UINT32 ratecount_ext; /* Max Rate count for 160, 320MHz */
  31121. /*
  31122. * Following this structure are the TLV:
  31123. * struct wmi_peer_cck_ofdm_rate_info;
  31124. * struct wmi_peer_mcs_rate_info;
  31125. */
  31126. } wmi_peer_ratecode_list_event_fixed_param;
  31127. typedef struct wmi_wds_addr_event {
  31128. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wds_addr_event_fixed_param */
  31129. A_UINT32 event_type[4];
  31130. wmi_mac_addr peer_mac;
  31131. wmi_mac_addr dest_mac;
  31132. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  31133. } wmi_wds_addr_event_fixed_param;
  31134. /*
  31135. * Enum values for WMI_PEER_PS_SUPPORTED_BITMAP field,
  31136. * in wmi_peer_sta_ps_statechange_event structure.
  31137. */
  31138. typedef enum {
  31139. /* Used to indicate that peer_ps_valid is valid */
  31140. WMI_PEER_PS_VALID_SUPPORTED = 0x00000001,
  31141. /* Used to indicate that peer_ps_timestamp field is valid */
  31142. WMI_PEER_PS_TIMESTAMP_SUPPORTED = 0x00000002,
  31143. } WMI_PEER_PS_SUPPORTED_BITMAP;
  31144. typedef struct {
  31145. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_ps_statechange_event_fixed_param */
  31146. wmi_mac_addr peer_macaddr;
  31147. A_UINT32 peer_ps_state;
  31148. /* Start of extended structure */
  31149. /* Bitmap to indicate which fields in the extended structure are valid.
  31150. * Bitmap values correspond to enum WMI_PEER_PS_SUPPORTED_BITMAP
  31151. */
  31152. A_UINT32 peer_ps_supported_bitmap;
  31153. /* This field is used to indicate host of a valid PS state change.
  31154. * 1 - indicates a valid PS state change.
  31155. * 0 - indicates an invalid PS state change.
  31156. * Host to ignore the power save duration calculation when peer_ps_valid = 0
  31157. */
  31158. A_UINT32 peer_ps_valid;
  31159. /* This field indicates the time since target boot-up in MilliSeconds. */
  31160. A_UINT32 peer_ps_timestamp;
  31161. /* Indicates the vdev id for MLO case */
  31162. wmi_vdev_id_info vdev_id_info;
  31163. } wmi_peer_sta_ps_statechange_event_fixed_param;
  31164. /* WMI_PDEV_FIPS_EVENTID */
  31165. typedef struct {
  31166. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param */
  31167. union {
  31168. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  31169. /** pdev_id for identifying the MAC
  31170. * See macros starting with WMI_PDEV_ID_ for values.
  31171. */
  31172. A_UINT32 pdev_id;
  31173. };
  31174. A_UINT32 error_status; /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
  31175. A_UINT32 data_len; /* Data length */
  31176. /*
  31177. * Following this structure is the TLV:
  31178. * A_UINT32 data[1]; <-- Out Data (keep this in the end)
  31179. */
  31180. } wmi_pdev_fips_event_fixed_param;
  31181. typedef struct {
  31182. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param */
  31183. A_UINT32 pdev_id;
  31184. A_UINT32 fips_cookie; /* Cookie value to identify test vector */
  31185. A_UINT32 cmd_frag_idx; /* Fragment Number */
  31186. A_UINT32 more_bit;
  31187. A_UINT32 error_status; /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
  31188. A_UINT32 data_len; /* Data length CTlen+ TAGlen*/
  31189. /*
  31190. * Following this structure is the TLV:
  31191. * A_UINT32 data[1]; <-- Out Data (ciphertext+tag)
  31192. */
  31193. } wmi_pdev_fips_extend_event_fixed_param;
  31194. typedef struct {
  31195. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_channel_hopping_event_fixed_param */
  31196. union {
  31197. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  31198. /** pdev_id for identifying the MAC
  31199. * See macros starting with WMI_PDEV_ID_ for values.
  31200. */
  31201. A_UINT32 pdev_id;
  31202. };
  31203. /* Noise threshold iterations with high values */
  31204. A_UINT32 noise_floor_report_iter;
  31205. /* Total noise threshold iterations */
  31206. A_UINT32 noise_floor_total_iter;
  31207. } wmi_pdev_channel_hopping_event_fixed_param;
  31208. enum {
  31209. WMI_PDEV_RESERVE_AST_ENTRY_OK,
  31210. WMI_PDEV_RESERVE_AST_ENTRY_HASH_COLLISION,
  31211. WMI_PDEV_RESERVE_AST_ENTRY_CROSSING_AXI_BOUNDARY,
  31212. };
  31213. typedef struct {
  31214. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_cmd_fixed_param */
  31215. union {
  31216. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  31217. /** pdev_id for identifying the MAC
  31218. * See macros starting with WMI_PDEV_ID_ for values.
  31219. */
  31220. A_UINT32 pdev_id;
  31221. };
  31222. A_UINT32 rate_flags;
  31223. /**
  31224. * FLAG_ONE_CHAIN 0x00000001 - one chain mask
  31225. * FLAG_TWO_CHAIN 0x00000003 - two chain mask
  31226. * FLAG_THREE_CHAIN 0x00000007 - three chain mask
  31227. * FLAG_FOUR_CHAIN 0x0000000F - four chain mask
  31228. * FLAG_FIVE_CHAIN 0x0000001F - five chain mask
  31229. * FLAG_SIX_CHAIN 0x0000003F - six chain mask
  31230. * FLAG_SEVEN_CHAIN 0x0000007F - seven chain mask
  31231. * FLAG_EIGHT_CHAIN 0x000000FF - eight chain mask
  31232. * FLAG_STBC 0x00000100 - STBC is set
  31233. * FLAG_40MHZ 0x00000200 - bits 9-10 used for BW:
  31234. * FLAG_80MHZ 0x00000400 (bw >> 9) & 3 will give
  31235. * FLAG_160MHZ 0x00000600 1 -> 40 MHz, 2 -> 80 MHz, 3 -> 160 MHz
  31236. * FLAG_TXBF 0x00000800 - Tx Bf enabled
  31237. * FLAG_RTSENA 0x00001000 - RTS enabled
  31238. * FLAG_CTSENA 0x00002000 - CTS enabled
  31239. * FLAG_LDPC 0x00004000 - LDPC set
  31240. * FLAG_SGI 0x00008000 - Short guard interval
  31241. * (0x00010000-0x00080000 unused)
  31242. *------------------
  31243. * 0x00100000-0x00700000 used for SU/MU/OFDMA tx mode
  31244. * FLAG_SU 0x00100000 - SU Data
  31245. * FLAG_DL_MU_MIMO_AC 0x00200000 - DL AC MU data
  31246. * FLAG_DL_MU_MIMO_AX 0x00300000 - DL AX MU data
  31247. * FLAG_DL_OFDMA 0x00400000 - DL OFDMA data
  31248. * FLAG_UL_OFDMA 0x00500000 - UL OFDMA data
  31249. * FLAG_UL_MU_MIMO 0x00600000 - UL MU data
  31250. *------------------
  31251. * */
  31252. A_UINT32 nss;
  31253. /**
  31254. * NSS 0x0 - 0x7
  31255. * */
  31256. A_UINT32 preamble;
  31257. /**
  31258. * PREAM_OFDM - 0x0
  31259. * PREAM_CCK - 0x1
  31260. * PREAM_HT - 0x2
  31261. * PREAM_VHT - 0x3
  31262. * PREAM_HE - 0x4
  31263. * */
  31264. A_UINT32 hw_rate;
  31265. /**
  31266. * *** HW_OFDM_RATE ***
  31267. * OFDM_48_MBPS - 0x0
  31268. * OFDM_24_MBPS - 0x1
  31269. * OFDM_12_MBPS - 0x2
  31270. * OFDM_6_MBPS - 0x3
  31271. * OFDM_54_MBPS - 0x4
  31272. * OFDM_36_MBPS - 0x5
  31273. * OFDM_18_MBPS - 0x6
  31274. * OFDM_9_MBPS - 0x7
  31275. *
  31276. * *** HW_CCK_RATE ***
  31277. * CCK_11_LONG_MBPS - 0x0
  31278. * CCK_5_5_LONG_MBPS - 0x1
  31279. * CCK_2_LONG_MBPS - 0x2
  31280. * CCK_1_LONG_MBPS - 0x3
  31281. * CCK_11_SHORT_MBPS - 0x4
  31282. * CCK_5_5_SHORT_MBPS - 0x5
  31283. * CCK_2_SHORT_MBPS - 0x6
  31284. *
  31285. * *** HW_HT / VHT_RATE ***
  31286. * MCS 0x0 - 0xb
  31287. * */
  31288. } wmi_pdev_get_tpc_cmd_fixed_param;
  31289. typedef struct {
  31290. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_chip_power_stats_cmd_fixed_param */
  31291. /** pdev_id for identifying the MAC
  31292. * See macros starting with WMI_PDEV_ID_ for values.
  31293. */
  31294. A_UINT32 pdev_id;
  31295. } wmi_pdev_get_chip_power_stats_cmd_fixed_param;
  31296. typedef struct {
  31297. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_bcn_recv_stats_cmd_fixed_param */
  31298. /** VDEV identifier */
  31299. A_UINT32 vdev_id;
  31300. } wmi_vdev_get_bcn_recv_stats_cmd_fixed_param;
  31301. typedef struct {
  31302. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_xgap_enable_cmd_fixed_param */
  31303. A_UINT32 beacon_interval; /* in TU */
  31304. A_UINT32 sap_lp_flag; /* bit 0 : set/unset for enter/exit XGAP */
  31305. A_UINT32 dialog_token;
  31306. A_UINT32 duration; /* in us : sap LP enter/exit duration, 0 for permanent exit */
  31307. } wmi_xgap_enable_cmd_fixed_param;
  31308. typedef struct {
  31309. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_xgap_enable_complete_event_fixed_param */
  31310. A_UINT32 dialog_token;
  31311. A_UINT32 next_tsf_low32;
  31312. A_UINT32 next_tsf_high32;
  31313. } wmi_xgap_enable_complete_event_fixed_param;
  31314. /*
  31315. * wmi mws-coex command IDs
  31316. */
  31317. typedef enum {
  31318. WMI_MWS_COEX_STATE = 0x01,
  31319. WMI_MWS_COEX_DPWB_STATE,
  31320. WMI_MWS_COEX_TDM_STATE,
  31321. WMI_MWS_COEX_IDRX_STATE,
  31322. WMI_MWS_COEX_ANTENNA_SHARING_STATE,
  31323. } wmi_mws_coex_cmd_id;
  31324. typedef struct {
  31325. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_cmd_fixed_param */
  31326. /** VDEV identifier */
  31327. A_UINT32 vdev_id;
  31328. /** Command ID (type: wmi_mws_coex_cmd_id) */
  31329. A_UINT32 cmd_id;
  31330. } wmi_vdev_get_mws_coex_info_cmd_fixed_param;
  31331. typedef struct {
  31332. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param */
  31333. /** pdev_id for identifying the MAC
  31334. * See macros starting with WMI_PDEV_ID_ for values.
  31335. */
  31336. A_UINT32 pdev_id;
  31337. /*
  31338. * Following this structure is the TLV:
  31339. * A_UINT32 tpc[2];
  31340. * tpc[0] - maximum power per rate
  31341. * tpc[1] - minimum power per rate
  31342. * Currently this event only provides max and min power limits
  31343. * for a single rate. In the future this event may be expanded
  31344. * to provide the information for multiple rates.
  31345. * At that time, the format of the data will be provided.
  31346. */
  31347. } wmi_pdev_tpc_event_fixed_param;
  31348. typedef struct {
  31349. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_event_fixed_param */
  31350. union {
  31351. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  31352. /** pdev_id for identifying the MAC
  31353. * See macros starting with WMI_PDEV_ID_ for values.
  31354. */
  31355. A_UINT32 pdev_id;
  31356. };
  31357. A_UINT32 nfdBr_len;
  31358. A_UINT32 nfdBm_len;
  31359. A_UINT32 freqNum_len;
  31360. /*
  31361. * Following this structure is the TLV:
  31362. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr;
  31363. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm;
  31364. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum;
  31365. */
  31366. } wmi_pdev_nfcal_power_all_channels_event_fixed_param;
  31367. typedef struct {
  31368. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr */
  31369. A_UINT32 nfdBr;
  31370. } wmi_pdev_nfcal_power_all_channels_nfdBr;
  31371. typedef struct {
  31372. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm */
  31373. A_UINT32 nfdBm;
  31374. } wmi_pdev_nfcal_power_all_channels_nfdBm;
  31375. typedef struct {
  31376. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum */
  31377. A_UINT32 freqNum;
  31378. } wmi_pdev_nfcal_power_all_channels_freqNum;
  31379. /* Bit set/unset definitions for valid_bitmap field in ani_cck_event */
  31380. #define WMI_ANI_CCK_EVENT_PDEV_ID_SET(bitmap, val) \
  31381. WMI_SET_BITS(bitmap, 0, 8, val)
  31382. #define WMI_ANI_CCK_EVENT_PDEV_ID_GET(bitmap) \
  31383. WMI_GET_BITS(bitmap, 0, 8)
  31384. #define WMI_ANI_CCK_EVENT_PDEV_ID_VALID_BIT_SET(bitmap, val) \
  31385. WMI_SET_BITS(bitmap, 31, 1, val)
  31386. #define WMI_ANI_CCK_EVENT_PDEV_ID_VALID_BIT_GET(bitmap) \
  31387. WMI_GET_BITS(bitmap, 31, 1)
  31388. typedef struct {
  31389. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_cck_event_fixed_param */
  31390. A_UINT32 cck_level;
  31391. union {
  31392. A_UINT32 pdev_id_valid__pdev_id__word;
  31393. struct {
  31394. /**
  31395. * word containng the pdev_id for identifying the MAC
  31396. * Contents:
  31397. * bits 7:0 - pdev ID
  31398. * bits 30:8 - reserved
  31399. * bit 31 - pdev ID valid flag
  31400. * See macros starting with WMI_ANI_CCK_EVENT_PDEV_ID_ for values.
  31401. * pdev_id is valid when pdev_id_valid is set.
  31402. */
  31403. A_UINT32 pdev_id: 8,
  31404. reserved: 23,
  31405. pdev_id_valid: 1;
  31406. };
  31407. };
  31408. } wmi_ani_cck_event_fixed_param;
  31409. typedef enum wmi_power_debug_reg_fmt_type {
  31410. /* WMI_POWER_DEBUG_REG_FMT_TYPE_ROME -> Dumps following 12 Registers
  31411. * SOC_SYSTEM_SLEEP
  31412. * WLAN_SYSTEM_SLEEP
  31413. * RTC_SYNC_FORCE_WAKE
  31414. * MAC_DMA_ISR
  31415. * MAC_DMA_TXRX_ISR
  31416. * MAC_DMA_ISR_S1
  31417. * MAC_DMA_ISR_S2
  31418. * MAC_DMA_ISR_S3
  31419. * MAC_DMA_ISR_S4
  31420. * MAC_DMA_ISR_S5
  31421. * MAC_DMA_ISR_S6
  31422. * MAC_DMA_ISR_S7
  31423. */
  31424. WMI_POWER_DEBUG_REG_FMT_TYPE_ROME,
  31425. WMI_POWER_DEBUG_REG_FMT_TYPE_MAX = 0xf,
  31426. } WMI_POWER_DEBUG_REG_FMT_TYPE;
  31427. typedef struct {
  31428. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chip_power_stats_event_fixed_param */
  31429. A_UINT32 cumulative_sleep_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
  31430. A_UINT32 cumulative_total_on_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
  31431. A_UINT32 deep_sleep_enter_counter; /* count of number of times chip enterred deep sleep */
  31432. A_UINT32 last_deep_sleep_enter_tstamp_ms; /* Last Timestamp when Chip went to deep sleep */
  31433. A_UINT32 debug_register_fmt; /* WMI_POWER_DEBUG_REG_FMT_TYPE enum, describes debug registers being dumped as part of the event */
  31434. A_UINT32 num_debug_register; /* number of debug registers being sent to host */
  31435. /*
  31436. * Following this structure is the TLV:
  31437. * A_UINT32 debug_registers[num_debug_registers];
  31438. */
  31439. } wmi_pdev_chip_power_stats_event_fixed_param;
  31440. typedef struct {
  31441. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_bcn_recv_stats_fixed_param */
  31442. A_UINT32 vdev_id;
  31443. /* total_bcn_cnt
  31444. * total beacon count (tbtt instances)
  31445. * After this value reaches 255 it saturates and stays at 255.
  31446. * This field is used to determine which of the 256 bits in the
  31447. * bmiss_bitmap field are valid.
  31448. */
  31449. A_UINT32 total_bcn_cnt;
  31450. /* total_bmiss_cnt
  31451. * Total beacon miss count in last 255 beacons, max value is 255.
  31452. * This value is the number of bits set within bmiss_bitmap.
  31453. */
  31454. A_UINT32 total_bmiss_cnt;
  31455. /* bmiss_bitmap
  31456. * This bitmap indicates the status of the last 255 beacons.
  31457. * If a bit is set, that means the corresponding beacon was missed.
  31458. * Bit 0 of bmiss_bitmap[0] represents the most recent beacon.
  31459. * The total_bcn_cnt field indicates how many bits within bmiss_bitmap
  31460. * are valid.
  31461. */
  31462. A_UINT32 bmiss_bitmap[8];
  31463. } wmi_vdev_bcn_recv_stats_fixed_param;
  31464. typedef struct {
  31465. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_fixed_param */
  31466. A_UINT32 vdev_id;
  31467. /* LTE-WLAN coexistence scheme bitmap
  31468. * Indicates the final schemes applied for the current Coex scenario.
  31469. * Bit 0 - TDM policy
  31470. * Bit 1 - Forced TDM policy
  31471. * Bit 2 - Dynamic Power Back-off policy
  31472. * Bit 3 - Channel Avoidance policy
  31473. * Bit 4 - Static Power Back-off policy
  31474. */
  31475. A_UINT32 coex_scheme_bitmap;
  31476. /* Active conflict count
  31477. * Indicates the number of Active conflicts for the current WLAN and LTE frequency combinations.
  31478. */
  31479. A_UINT32 active_conflict_count;
  31480. /* Potential conflict count
  31481. * Indicates the number of Potential conflicts for the current WLAN and LTE frequency combinations.
  31482. */
  31483. A_UINT32 potential_conflict_count;
  31484. /* Bitmap of the group-0 WLAN channels to be avoided during LTE-WLAN coex operation.
  31485. * Indicates the WLAN channels to be avoided in b/w WLAN CH-1 and WLAN CH-14.
  31486. */
  31487. A_UINT32 chavd_group0_bitmap;
  31488. /* Bitmap of the group-1 WLAN channels to be avoided during LTE-WLAN coex operation.
  31489. * Indicates the WLAN channels to be avoided in b/w WLAN CH-36 and WLAN CH-64.
  31490. */
  31491. A_UINT32 chavd_group1_bitmap;
  31492. /* Bitmap of the group-2 WLAN channels to be avoided during LTE-WLAN coex operation.
  31493. * Indicates the WLAN channels to be avoided in b/w WLAN CH-100 and WLAN CH-140.
  31494. */
  31495. A_UINT32 chavd_group2_bitmap;
  31496. /* Bitmap of the group-3 WLAN channels to be avoided during LTE-WLAN coex operation.
  31497. * Indicates the WLAN channels to be avoided in b/w WLAN CH-149 and WLAN CH-165.
  31498. */
  31499. A_UINT32 chavd_group3_bitmap;
  31500. } wmi_vdev_get_mws_coex_state_fixed_param;
  31501. typedef struct {
  31502. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_dpwb_state_fixed_param */
  31503. A_UINT32 vdev_id;
  31504. /* Current state of the Dynamic Power Back-off state machine
  31505. * MWSCOEX_PWB_UNINIT_STATE = 0, PWB state machine is in un-intialized state.
  31506. * MWSCOEX_PWB_WLAN_ON_SINR_START_STATE = 1, SINR measurement starts when WLAN is on
  31507. * MWSCOEX_PWB_WLAN_ON_WAIT_RESP_STATE = 2, Waiting for SINR response when WLAN is on
  31508. * MWSCOEX_PWB_WLAN_OFF_AWAIT_STATE = 3, WLAN off state for buffer between SINR on/off measurement.
  31509. * MWSCOEX_PWB_WLAN_OFF_SINR_START_STATE = 4, SINR measurement starts when WLAN is off
  31510. * MWSCOEX_PWB_WLAN_OFF_WAIT_RESP_STATE = 5, Waiting for SINR response when WLAN is off
  31511. * MWSCOEX_PWB_WLAN_OFF_SINR_STOP_STATE = 6, SINR measurement stops when WLAN is off
  31512. * MWSCOEX_PWB_FORCED_TDM_STATE = 7, Entered Forced TDM state.
  31513. * MWSCOEX_PWB_HALTED_STATE = 8, Power back-off algorithm halted.
  31514. * MWSCOEX_PWB_WLAN_ALWAYS_ON_SINR_START_STATE = 9, SINR measurement starts in WLAN always on state.
  31515. * MWSCOEX_PWB_WLAN_ALWAYS_ON_SINR_STOP_STATE = 10, SINR measurement stops in WLAN always on state.
  31516. */
  31517. A_UINT32 current_dpwb_state;
  31518. /* P(N+1) value in dBm i.e. Tx power to be applied in the next Dynamic Power Back-off cycle,
  31519. * where P(N) is the power applied during current cycle.
  31520. * ranges from 3dBm to 21 dBM
  31521. */
  31522. A_INT32 pnp1_value;
  31523. /* Indicates the duty cycle of current LTE frame.
  31524. * Duty cycle: Number of UL slots with uplink data and allocated RBs.
  31525. */
  31526. A_UINT32 lte_dutycycle;
  31527. /* LTE SINR value in dB, when WLAN is ON. */
  31528. A_INT32 sinr_wlan_on;
  31529. /* LTE SINR value in dB, when WLAN is OFF. */
  31530. A_INT32 sinr_wlan_off;
  31531. /* LTE blocks with error for the current bler report.
  31532. * Number of LTE blocks with error for a given number (block_count) of LTE blocks.
  31533. */
  31534. A_UINT32 bler_count;
  31535. /* Number of LTE blocks considered for bler count report.
  31536. * Bler repot will be generated after the reception of every "block_count" number of blocks.
  31537. */
  31538. A_UINT32 block_count;
  31539. /* WLAN RSSI level
  31540. * WLAN RSSI is divided in to 3 levels i.e. Good/Moderate/Low (configurable inside f/w)
  31541. * 0-Good, 1-Moderate, 2-Low
  31542. */
  31543. A_UINT32 wlan_rssi_level;
  31544. /* WLAN RSSI value in dBm considered in Dynamic Power back-off algorithm
  31545. * Dynamic power back-off algorithm considers either Rx data frame RSSI/Beacon RSSI based on some constraints.
  31546. */
  31547. A_INT32 wlan_rssi;
  31548. /* Indicates whether any TDM policy triggered from Dynamic power back-off policy.
  31549. * 1 - TDM triggered.
  31550. * 0 - TDM not triggered.
  31551. */
  31552. A_UINT32 is_tdm_running;
  31553. } wmi_vdev_get_mws_coex_dpwb_state_fixed_param;
  31554. typedef struct {
  31555. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_tdm_state_fixed_param */
  31556. A_UINT32 vdev_id;
  31557. /* Time Division Multiplexing (TDM) LTE-Coex Policy type.
  31558. * There are totally 4 types of TDM policies(1-SINR TDM, 2-RSSI TDM, 3-LOW RX RATE TDM, 4-STICKY TDM)
  31559. * Bit 0 - SINR TDM policy.
  31560. * Bit 1 - RSSI TDM policy.
  31561. * Bit 2 - Low Rx rate TDM policy
  31562. * Bit 3 - Sticky TDM policy
  31563. */
  31564. A_UINT32 tdm_policy_bitmap;
  31565. /* TDM LTE/WLAN sub-frame bitmap
  31566. * Indicates the bitmap of LTE/WLAN sub-frames.
  31567. * value 0: WLAN slot.
  31568. * value 1: LTE slot.
  31569. */
  31570. A_UINT32 tdm_sf_bitmap;
  31571. } wmi_vdev_get_mws_coex_tdm_state_fixed_param;
  31572. typedef struct {
  31573. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_idrx_state_fixed_param */
  31574. A_UINT32 vdev_id;
  31575. /* SUB0 LTE-coex tech.
  31576. *------------------------
  31577. * TECH TECH_ID
  31578. *------------------------
  31579. * LTE 0
  31580. * TDSCDMA 1
  31581. * GSM1 2
  31582. * ONEX 3
  31583. * HDR 4
  31584. * WCDMA 5
  31585. * GSM2 6
  31586. * GSM3 7
  31587. * WCDMA2 8
  31588. * LTE2 9
  31589. * Indicates the type of WWAN technology used as SUB0 i.e. SIM slot 1
  31590. */
  31591. A_UINT32 sub0_techid;
  31592. /* SUB0 mitigation policy.
  31593. * Indicates the mitigation policy used to coexist with WLAN.
  31594. * 1 - Tx blanking
  31595. * 2 - Static power back-off
  31596. */
  31597. A_UINT32 sub0_policy;
  31598. /* Set if SUB0 is in link critical state.
  31599. * Link critical will be set, if continuous page miss happens or RSSI is below -100 dBm at LTE side.
  31600. */
  31601. A_UINT32 sub0_is_link_critical;
  31602. /* LTE SUB0 imposed static power applied to WLAN due to LTE-WLAN coex.
  31603. * Value of static power applied during LTE page cycle ranges from 3-21 dBm.
  31604. */
  31605. A_INT32 sub0_static_power;
  31606. /* LTE SUB0 RSSI value in dBm */
  31607. A_INT32 sub0_rssi;
  31608. /* SUB1 LTE-coex tech.
  31609. *------------------------
  31610. * TECH TECH_ID
  31611. *------------------------
  31612. * LTE 0
  31613. * TDSCDMA 1
  31614. * GSM1 2
  31615. * ONEX 3
  31616. * HDR 4
  31617. * WCDMA 5
  31618. * GSM2 6
  31619. * GSM3 7
  31620. * WCDMA2 8
  31621. * LTE2 9
  31622. * Indicates the type of WWAN technology used as SUB1 i.e. SIM slot 2
  31623. */
  31624. A_UINT32 sub1_techid;
  31625. /* SUB1 mitigation policy.
  31626. * Indicates the mitigation policy used to coexist with WLAN.
  31627. * 1 - Tx blanking
  31628. * 2 - Static power back-off
  31629. */
  31630. A_UINT32 sub1_policy;
  31631. /* Set if SUB1 is in link critical state.
  31632. * Link critical will be set, if continuous page miss happens or RSSI is below -100 dBm at LTE side.
  31633. */
  31634. A_UINT32 sub1_is_link_critical;
  31635. /* LTE SUB1 imposed static power applied to WLAN due to LTE-WLAN coex.
  31636. * Value of static power applied during LTE page cycle ranges from 3-21 dBm.
  31637. */
  31638. A_INT32 sub1_static_power;
  31639. /* LTE SUB1 RSSI value in dBm */
  31640. A_INT32 sub1_rssi;
  31641. } wmi_vdev_get_mws_coex_idrx_state_fixed_param;
  31642. typedef struct {
  31643. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param */
  31644. A_UINT32 vdev_id;
  31645. /* BDF values of Coex flags.
  31646. * coexflag 0x1 = MWS Coex enabled
  31647. * coexflag 0x3 = MWS Coex enabled + Antenna sharing enabled for WLAN operating in 2.4GHz band.
  31648. */
  31649. A_UINT32 coex_flags;
  31650. /* BDF values of Coex Antenna sharing config
  31651. * coex_config 0x0 = no Antenna sharing
  31652. * coexconfig 0x1 = switched based Antenna sharing
  31653. * coexconfig 0x2 = splitter based Antenna sharing
  31654. */
  31655. A_UINT32 coex_config;
  31656. /* Tx Chain mask value
  31657. * Bit 0: Tx chain-0
  31658. * Bit 1: Tx Chain-1
  31659. * value: 0x1 - Operating in 1X1
  31660. * value: 0x3 - Operating in 2X2
  31661. */
  31662. A_UINT32 tx_chain_mask;
  31663. /* Rx Chain mask value
  31664. * Bit 0: Rx chain-0
  31665. * Bit 1: Rx Chain-1
  31666. * value: 0x1 - Operating in 1X1
  31667. * value: 0x3 - Operating in 2X2
  31668. */
  31669. A_UINT32 rx_chain_mask;
  31670. /* Currently active Rx Spatial streams
  31671. * Bit 0: Rx Spatial Stream-0
  31672. * Bit 1: Rx Spatial Stream-1
  31673. */
  31674. A_UINT32 rx_nss;
  31675. /* Forced MRC policy type
  31676. * BTC_FORCED (0x01)
  31677. * RSSI_FORCED (0x02)
  31678. * MODEM_ACQ_FORCED (0x04)
  31679. */
  31680. A_UINT32 force_mrc;
  31681. /* RSSI value considered for MRC
  31682. * 1: Data RSSI
  31683. * 2: Beacon RSSI
  31684. */
  31685. A_UINT32 rssi_type;
  31686. /* RSSI value measured at Chain-0 in dBm */
  31687. A_INT32 chain0_rssi;
  31688. /* RSSI value measured at Chain-1 in dBm */
  31689. A_INT32 chain1_rssi;
  31690. /* RSSI value of two chains combined in dBm */
  31691. A_INT32 combined_rssi;
  31692. /* Absolute imbalance between two Rx chains in dB */
  31693. A_UINT32 imbalance;
  31694. /* RSSI threshold defined for the above imbalance value in dBm.
  31695. * Based on the degree of imbalance between the rx chains, different
  31696. * RSSI thresholds are used to determine whether MRC (Maximum-Ratio
  31697. * Combining) use of multiple rx chains is suitable.
  31698. * This field shows the RSSI threshold below which MRC is used.
  31699. */
  31700. A_INT32 mrc_threshold;
  31701. /* Antenna grant duration to WLAN, in milliseconds */
  31702. A_UINT32 grant_duration;
  31703. } wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param;
  31704. typedef enum wmi_chip_power_save_failure_reason_code_type {
  31705. WMI_PROTOCOL_POWER_SAVE_FAILURE_REASON,
  31706. WMI_HW_POWER_SAVE_FAILURE_REASON,
  31707. WMI_CSS_LOCKED_POWER_FAILURE_REASON,
  31708. WMI_MAC0_LOCKED_POWER_FAILURE_REASON,
  31709. WMI_MAC1_LOCKED_POWER_FAILURE_REASON,
  31710. WMI_POWER_SAVE_FAILURE_REASON_MAX = 0xf,
  31711. } WMI_POWER_SAVE_FAILURE_REASON_TYPE;
  31712. typedef struct {
  31713. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chip_power_save_failure_detected_fixed_param */
  31714. A_UINT32 power_save_failure_reason_code; /* Chip power save failuire reason as defined in WMI_POWER_SAVE_FAILURE_REASON_TYPE */
  31715. A_UINT32 protocol_wake_lock_bitmap[4]; /* bitmap with bits set for modules (from WLAN_MODULE_ID enum) voting against sleep for prolonged duration */
  31716. } wmi_chip_power_save_failure_detected_fixed_param;
  31717. /* Bit set/unset definitions for valid_bitmap field in ani_ofdm_event */
  31718. #define WMI_ANI_OFDM_EVENT_PDEV_ID_BIT_SET(bitmap, val) \
  31719. WMI_SET_BITS(bitmap, 0, 8, val)
  31720. #define WMI_ANI_OFDM_EVENT_PDEV_ID_BIT_GET(bitmap) \
  31721. WMI_GET_BITS(bitmap, 0, 8)
  31722. #define WMI_ANI_OFDM_EVENT_PDEV_ID_VALID_BIT_SET(bitmap, val) \
  31723. WMI_SET_BITS(bitmap, 31, 1, val)
  31724. #define WMI_ANI_OFDM_EVENT_PDEV_ID_VALID_BIT_GET(bitmap) \
  31725. WMI_GET_BITS(bitmap, 31, 1)
  31726. typedef struct {
  31727. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param */
  31728. A_UINT32 ofdm_level;
  31729. union {
  31730. A_UINT32 pdev_id_valid__pdev_id__word;
  31731. struct {
  31732. /**
  31733. * word containng the pdev_id for identifying the MAC
  31734. * Contents:
  31735. * bits 7:0 - pdev ID
  31736. * bits 30:8 - reserved
  31737. * bit 31 - pdev ID valid flag
  31738. * See macros starting with WMI_ANI_OFDM_EVENT_PDEV_ID_ for values.
  31739. * pdev_id is valid when pdev_id_valid is set.
  31740. */
  31741. A_UINT32 pdev_id: 8,
  31742. reserved: 23,
  31743. pdev_id_valid: 1;
  31744. };
  31745. };
  31746. } wmi_ani_ofdm_event_fixed_param;
  31747. /* When a bit is set it specifies the particular WLAN traffic type is high priority.
  31748. * BT low priority traffic has higher priority than WLAN low priority traffic and has
  31749. * lower priority when compared to WLAN high priority traffic.
  31750. * BT high priority traffic has higher priority than WLAN low/high priority traffic.
  31751. */
  31752. #define WMI_PDEV_BE_PRIORITY_BIT (1<<0)
  31753. #define WMI_PDEV_BK_PRIORITY_BIT (1<<1)
  31754. #define WMI_PDEV_VI_PRIORITY_BIT (1<<2)
  31755. #define WMI_PDEV_VO_PRIORITY_BIT (1<<3)
  31756. #define WMI_PDEV_BEACON_PRIORITY_BIT (1<<4)
  31757. #define WMI_PDEV_MGMT_PRIORITY_BIT (1<<5)
  31758. #define WMI_PDEV_IS_BE_PRIORITY_SET(val) ((val) & WMI_PDEV_BE_PRIORITY_BIT)
  31759. #define WMI_PDEV_IS_BK_PRIORITY_SET(val) ((val) & WMI_PDEV_BK_PRIORITY_BIT)
  31760. #define WMI_PDEV_IS_VI_PRIORITY_SET(val) ((val) & WMI_PDEV_VI_PRIORITY_BIT)
  31761. #define WMI_PDEV_IS_VO_PRIORITY_SET(val) ((val) & WMI_PDEV_VO_PRIORITY_BIT)
  31762. #define WMI_PDEV_IS_BEACON_PRIORITY_SET(val) ((val) & WMI_PDEV_BEACON_PRIORITY_BIT)
  31763. #define WMI_PDEV_IS_MGMT_PRIORITY_SET(val) ((val) & WMI_PDEV_MGMT_PRIORITY_BIT)
  31764. /*
  31765. * For Maple 3-way coex, The interface will have following configurable
  31766. * priority bits to set relative priorities of WLAN/BT/3-radio PTA.
  31767. * To send below config host will use WMI_COEX_CONFIG_CMD command with
  31768. * config type WMI_COEX_CONFIG_THREE_WAY_COEX_START
  31769. * WMI_COEX_CONFIG_THREE_WAY_COEX_RESET
  31770. *
  31771. ** Bits 0 to 7 corresponds to Wifi
  31772. * Bit - 0: QCA_WIFI_BE
  31773. * Bit - 1: QCA_WIFI_BK
  31774. * Bit - 2: QCA_WIFI_VI
  31775. * Bit - 3: QCA_WIFI_VO
  31776. * Bit - 4: QCA_WIFI_BEACON
  31777. * Bit - 5: QCA_WIFI_MGMT
  31778. * Bits 6 - 7: Reserved
  31779. *
  31780. ** Bits 8 to 15 corresponds to BT
  31781. * Bit - 8: QCA_BT_ADVERTISER
  31782. * Bit - 9: QCA_BT_SCANNER
  31783. * Bit - 10: QCA_BT_BLE_CONNECTION
  31784. * Bits 11 to 15: Reserved
  31785. *
  31786. ** Bits 16 to 24 corresponds to 3-radio PTA,
  31787. * It can be anything BT/ZigBee connected to 802.15.4 radio
  31788. * Bit - 16: QCA_PTA_THIRD_RADIO_LOW
  31789. * Bit - 17: QCA_PTA_THIRD_RADIO_HIGH
  31790. * Bits 18 to 24: Reserved
  31791. *
  31792. ** Bits 25 to 31 Reserved for future use
  31793. */
  31794. #define WMI_PDEV_BT_ADVERTISER_PRIORITY_BIT (1 << 8)
  31795. #define WMI_PDEV_BT_SCANNER_PRIORITY_BIT (1 << 9)
  31796. #define WMI_PDEV_BT_BLE_CONNECTION_PRIORITY_BIT (1 << 10)
  31797. #define WMI_PDEV_IS_BT_ADVERTISER_PRIORITY_SET(val) \
  31798. ((val) & WMI_PDEV_BT_ADVERTISER_PRIORITY_BIT)
  31799. #define WMI_PDEV_IS_BT_SCANNER_PRIORITY_SET(val) \
  31800. ((val) & WMI_PDEV_BT_SCANNER_PRIORITY_BIT)
  31801. #define WMI_PDEV_IS_BT_BLE_CONNECTION_PRIORITY_SET(val) \
  31802. ((val) & WMI_PDEV_BT_BLE_CONNECTION_PRIORITY_BIT)
  31803. #define WMI_PDEV_PTA_THIRD_RADIO_LOW_PRIORITY_BIT (1 << 16)
  31804. #define WMI_PDEV_PTA_THIRD_RADIO_HIGH_PRIORITY_BIT (1 << 17)
  31805. #define WMI_PDEV_IS_PTA_THIRD_RADIO_LOW_PRIORITY_SET(val) \
  31806. ((val) & WMI_PDEV_PTA_THIRD_RADIO_LOW_PRIORITY_BIT)
  31807. #define WMI_PDEV_IS_PTA_THIRD_RADIO_HIGH_PRIORITY_SET(val) \
  31808. ((val) & WMI_PDEV_PTA_THIRD_RADIO_HIGH_PRIORITY_BIT)
  31809. typedef enum wmi_coex_algo_type {
  31810. WMI_COEX_ALGO_UNCONS_FREERUN = 0,
  31811. WMI_COEX_ALGO_FREERUN = 1,
  31812. WMI_COEX_ALGO_OCS = 2,
  31813. } WMI_COEX_ALGO_TYPE;
  31814. typedef enum wmi_coex_config_type {
  31815. WMI_COEX_CONFIG_PAGE_P2P_TDM = 1, /* config interval (arg1 BT, arg2 WLAN) for P2P + PAGE */
  31816. WMI_COEX_CONFIG_PAGE_STA_TDM = 2, /* config interval (arg1 BT, arg2 WLAN) for STA + PAGE */
  31817. WMI_COEX_CONFIG_PAGE_SAP_TDM = 3, /* config interval (arg1 BT, arg2 WLAN) for SAP + PAGE */
  31818. WMI_COEX_CONFIG_DURING_WLAN_CONN = 4, /* config during WLAN connection */
  31819. WMI_COEX_CONFIG_BTC_ENABLE = 5, /* config to enable/disable BTC */
  31820. WMI_COEX_CONFIG_COEX_DBG = 6, /* config of COEX debug setting */
  31821. WMI_COEX_CONFIG_PAGE_P2P_STA_TDM = 7, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + STA + PAGE */
  31822. WMI_COEX_CONFIG_INQUIRY_P2P_TDM = 8, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + INQUIRY */
  31823. WMI_COEX_CONFIG_INQUIRY_STA_TDM = 9, /* config interval (ms units) (arg1 BT, arg2 WLAN) for STA + INQUIRY */
  31824. WMI_COEX_CONFIG_INQUIRY_SAP_TDM = 10, /* config interval (ms units) (arg1 BT, arg2 WLAN) for SAP + INQUIRY */
  31825. WMI_COEX_CONFIG_INQUIRY_P2P_STA_TDM = 11, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + STA + INQUIRY */
  31826. 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) */
  31827. 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) */
  31828. WMI_COEX_CONFIG_AP_TDM = 14, /* config interval (arg1 duty cycle in ms, arg2 WLAN duration in ms) for AP */
  31829. WMI_COEX_CONFIG_WLAN_SCAN_PRIORITY = 15, /* config to set WLAN priority during Off Channel Scan */
  31830. WMI_COEX_CONFIG_WLAN_PKT_PRIORITY = 16, /* config to set WLAN priority for BE/BK/VO/VI/Beacon/Management frame */
  31831. WMI_COEX_CONFIG_PTA_INTERFACE = 17, /* config PTA interface,
  31832. arg1 PTA num,
  31833. arg2 mode (2-wire/3-wire/PTA),
  31834. arg3 first slot time in microsec,
  31835. arg4 BT priority time in microsec,
  31836. arg5 PTA algorithm (WMI_COEX_ALGO_TYPE),
  31837. arg6 PTA priority */
  31838. WMI_COEX_CONFIG_BTC_DUTYCYCLE = 18, /* config interval (ms units) (arg1 WLAN pause duration, arg2 WLAN unpause duration) for WLAN UL + BT Rx */
  31839. WMI_COEX_CONFIG_HANDOVER_RSSI = 19, /* config to set WLAN RSSI (dBm units) at which device switches from Hybrid to TDD coex mode */
  31840. WMI_COEX_CONFIG_PTA_BT_INFO = 20, /* get BT information,
  31841. arg1 BT info type: WMI_COEX_PTA_BT_INFO_TYPE_T, scan/advertise/connection info,
  31842. arg2-arg5: BT information parameters */
  31843. WMI_COEX_CONFIG_SINK_WLAN_TDM = 21, /* config interval (ms units) (arg1 BT, arg2 WLAN) for A2DP SINK + WLAN */
  31844. WMI_COEX_CONFIG_COEX_ENABLE_MCC_TDM = 22, /* config disable/enable COEX TDM for MCC */
  31845. WMI_COEX_CONFIG_LOWRSSI_A2DPOPP_TDM = 23, /* config interval (ms units) (arg1 BT, arg2 WLAN) for STA + A2dp + OPP + LOWRSSI */
  31846. WMI_COEX_CONFIG_BTC_MODE = 24, /* config BTC mode, arg1 mode: 0 TDD/1 FDD/2 Hybrid*/
  31847. WMI_COEX_CONFIG_ANTENNA_ISOLATION = 25, /* config isolation between BT and WLAN chains
  31848. * The arguments are interpreted differently
  31849. * depending on whether the target supports
  31850. * WMI_SERVICE_COEX_SUPPORT_UNEQUAL_ISOLATION
  31851. * If (not COEX_SUPPORT_UNEQUAL_ISOLATION) or arg2 == 0:
  31852. * arg1 => isolation between BT and WLAN chains,
  31853. * dB units,
  31854. * same isolation for all chains
  31855. * Else:
  31856. * arg1 bits 7:0 - chain 0 isolation, in dB
  31857. * arg1 bits 15:8 - chain 1 isolation, in dB
  31858. * arg1 bits 23:16 - chain 2 isolation, in dB
  31859. * arg1 bits 31:24 - chain 3 isolation, in dB
  31860. * arg2 - 0 => Equal isolation b/w BT and each WLAN chain (default)
  31861. * 1 => Different isolation b/w BT and each WLAN chain
  31862. */
  31863. WMI_COEX_CONFIG_BT_LOW_RSSI_THRESHOLD = 26, /* config BT low RSSI threshold (dBm units) */
  31864. WMI_COEX_CONFIG_BT_INTERFERENCE_LEVEL = 27, /* config BT interference level (dBm units)
  31865. arg1 low - lower limit
  31866. arg2 low - upper limit
  31867. arg3 medium - lower limit
  31868. arg4 medium - upper limit
  31869. arg5 high - lower limit
  31870. arg6 high - upper limit */
  31871. WMI_COEX_CONFIG_WLAN_OVER_ZBLOW = 28, /* config to boost WiFi traffic over 15.4 Low prio traffic */
  31872. 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 */
  31873. WMI_COEX_CONFIG_WLAN_CONN_OVER_LE = 30, /* config to elevate Wifi priority over BLE during WLAN association */
  31874. WMI_COEX_CONFIG_LE_OVER_WLAN_TRAFFIC = 31, /* config to elevate BLE traffic over WiFi traffic */
  31875. WMI_COEX_CONFIG_THREE_WAY_COEX_RESET = 32, /* config to reset the weights to default */
  31876. /* WMI_COEX_CONFIG_THREE_WAY_DELAY_PARA
  31877. * config to T_PRIO T_DELAY parameter for each case
  31878. * arg1 - wlan/bt state
  31879. * 0: beacon tx
  31880. * 1: wlan connecting
  31881. * 2: wlan in dhcp
  31882. * 3: a2dp critical
  31883. * 4: eSCO
  31884. * arg2 - t_prio for low priority traffic (microsecond units)
  31885. * arg3 - t_delay for low priority traffic (microsecond units)
  31886. * arg4 - t_prio for high priority traffic (microsecond units)
  31887. * arg5 - t_delay for high priority traffic (microsecond units)
  31888. */
  31889. WMI_COEX_CONFIG_THREE_WAY_DELAY_PARA = 33,
  31890. /* WMI_COEX_CONFIG_THREE_WAY_COEX_START
  31891. * config to set coex parameters from WLAN host to adjust priorities
  31892. * among wlan/bt/zb
  31893. * arg1 - priority level 1, the serialized coex scenorio ID will be put here
  31894. * arg2 - priority level 2, same parameters rules as arg1
  31895. * arg3 - priority level 3, same parameters rules as arg1
  31896. * arg4 - priority level 4, same parameters rules as arg1
  31897. */
  31898. WMI_COEX_CONFIG_THREE_WAY_COEX_START = 34,
  31899. /* WMI_COEX_CONFIG_MPTA_HELPER_ENABLE
  31900. * config to enable(1)/disable(0) mpta-helper function
  31901. */
  31902. WMI_COEX_CONFIG_MPTA_HELPER_ENABLE = 35,
  31903. /* WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_STATE
  31904. * config zigbee state
  31905. * arg1: zigbee state
  31906. * (idle form-network wait-join join-network network-up HMI)
  31907. */
  31908. WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_STATE = 36,
  31909. /* WMI_COEX_CONFIG_MPTA_HELPER_INT_OCS_PARAMS
  31910. * config ocs wlan/nonwlan params after MPTA interrupt fired
  31911. * arg1: wlan duration (ms units) in Shape-OCS
  31912. * arg2: nonwlan duration (ms units) in Shape-OCS
  31913. */
  31914. WMI_COEX_CONFIG_MPTA_HELPER_INT_OCS_PARAMS = 37,
  31915. /* WMI_COEX_CONFIG_MPTA_HELPER_MON_OCS_PARAMS
  31916. * config ocs wlan/nonwlan params during monitor period after
  31917. * interrupt period finished
  31918. * arg1: wlan duration (ms units) in Shape-OCS
  31919. * arg2: nonwlan duration (ms units) in Shape-OCS
  31920. */
  31921. WMI_COEX_CONFIG_MPTA_HELPER_MON_OCS_PARAMS = 38,
  31922. /* WMI_COEX_CONFIG_MPTA_HELPER_INT_MON_DURATION
  31923. * config ocs duration in interrupt period and monitor period
  31924. * arg1: duration (ms units) in interrupt period
  31925. * arg2: duration (ms units) in monitor period
  31926. */
  31927. WMI_COEX_CONFIG_MPTA_HELPER_INT_MON_DURATION = 39,
  31928. /* WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_CHANNEL
  31929. * config zigbee channel 11 - 26
  31930. */
  31931. WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_CHANNEL = 40,
  31932. /* WMI_COEX_CONFIG_MPTA_HELPER_WLAN_MUTE_DURATION
  31933. * config msw mute duration (ms units) after MPTA interrupt fired
  31934. */
  31935. WMI_COEX_CONFIG_MPTA_HELPER_WLAN_MUTE_DURATION = 41,
  31936. /* WMI_COEX_CONFIG_BT_SCO_ALLOW_WLAN_2G_SCAN
  31937. * allow WLAN scan on 2.4G channel when BT SCO connectivity is alive
  31938. */
  31939. WMI_COEX_CONFIG_BT_SCO_ALLOW_WLAN_2G_SCAN = 42,
  31940. /* WMI_COEX_CONFIG_ENABLE_2ND_HARMONIC_WAR
  31941. * config to enable(1)/disable(0) WAR of BT 2nd harmonic issue function
  31942. */
  31943. WMI_COEX_CONFIG_ENABLE_2ND_HARMONIC_WAR = 43,
  31944. /* WMI_COEX_CONFIG_BTCOEX_SEPARATE_CHAIN_MODE
  31945. * config BTC separate chain mode or shared mode
  31946. */
  31947. WMI_COEX_CONFIG_BTCOEX_SEPARATE_CHAIN_MODE = 44,
  31948. /* WMI_COEX_CONFIG_ENABLE_TPUT_SHAPING
  31949. * enable WLAN throughput shaping while BT scanning
  31950. */
  31951. WMI_COEX_CONFIG_ENABLE_TPUT_SHAPING = 45,
  31952. /* WMI_COEX_CONFIG_ENABLE_TXBF
  31953. * enable WLAN tx beamforming during coex case
  31954. */
  31955. WMI_COEX_CONFIG_ENABLE_TXBF = 46,
  31956. /* WMI_COEX_CONFIG_FORCED_ALGO
  31957. * config to select coex algorithm
  31958. * arg1: select fixed coex algorithm
  31959. */
  31960. WMI_COEX_CONFIG_FORCED_ALGO = 47,
  31961. /* WMI_COEX_CONFIG_LE_SCAN_POLICY
  31962. * BLE scan Coex policy hint
  31963. * 0 to place more emphasis on BLE Scan results
  31964. * 1 to place more emphasis on WLAN performance
  31965. */
  31966. WMI_COEX_CONFIG_LE_SCAN_POLICY = 48,
  31967. /* WMI_COEX_CONFIG_BT_RX_PER_THRESHOLD
  31968. * config BT RX PER threshold
  31969. */
  31970. WMI_COEX_CONFIG_BT_RX_PER_THRESHOLD = 49,
  31971. /* WMI_COEX_SET_TRAFFIC_SHAPING_MODE
  31972. * arg1: 0 (WMI_COEX_TRAFFIC_SHAPING_MODE_DISABLED)
  31973. * Disable coex policies and set fixed arbitration config.
  31974. * 1 (WMI_COEX_TRAFFIC_SHAPING_MODE_ENABLED)
  31975. * Enable all coex policies.
  31976. */
  31977. WMI_COEX_SET_TRAFFIC_SHAPING_MODE = 50,
  31978. /* WMI_COEX_CONFIG_ENABLE_CONT_INFO
  31979. * enable contention info log
  31980. * arg1:
  31981. * 0: disable both cont/sched log
  31982. * 1: enable cont log
  31983. * 2: enable sched log
  31984. * 3: enable both cont and sched log
  31985. */
  31986. WMI_COEX_CONFIG_ENABLE_CONT_INFO = 51,
  31987. } WMI_COEX_CONFIG_TYPE;
  31988. typedef struct {
  31989. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_COEX_CONFIG_CMD_fixed_param */
  31990. A_UINT32 vdev_id;
  31991. A_UINT32 config_type; /* wmi_coex_config_type enum */
  31992. A_UINT32 config_arg1;
  31993. A_UINT32 config_arg2;
  31994. A_UINT32 config_arg3;
  31995. A_UINT32 config_arg4;
  31996. A_UINT32 config_arg5;
  31997. A_UINT32 config_arg6;
  31998. } WMI_COEX_CONFIG_CMD_fixed_param;
  31999. typedef struct {
  32000. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_coex_multiple_config_cmd_fixed_param */
  32001. /*
  32002. * This struct is followed by other TLVs:
  32003. * WMI_COEX_CONFIG_CMD_fixed_param config_list[num_config];
  32004. */
  32005. } wmi_coex_multiple_config_cmd_fixed_param;
  32006. typedef enum wmi_coex_dbam_mode_type {
  32007. WMI_COEX_DBAM_DISABLE = 0,
  32008. WMI_COEX_DBAM_ENABLE = 1,
  32009. WMI_COEX_DBAM_FORCED = 2,
  32010. } WMI_COEX_DBAM_MODE_TYPE;
  32011. typedef enum {
  32012. WMI_COEX_TRAFFIC_SHAPING_MODE_DISABLED = 0,
  32013. WMI_COEX_TRAFFIC_SHAPING_MODE_ENABLED = 1,
  32014. } WMI_COEX_TRAFFIC_SHAPING_MODE;
  32015. typedef struct {
  32016. A_UINT32 tlv_header;
  32017. A_UINT32 vdev_id;
  32018. A_UINT32 dbam_mode; /* wmi_coex_dbam_mode_type enum */
  32019. } wmi_coex_dbam_cmd_fixed_param;
  32020. /**
  32021. * Host get current TAS buffer from FW or set last TAS buffer to FW
  32022. */
  32023. typedef enum wmi_tas_power_history_cmd_type {
  32024. WMI_TAS_POWER_HISTORY_CMD_GET = 0, /* before WLAN off, host trigger this cmd to get power history */
  32025. WMI_TAS_POWER_HISTORY_CMD_SET = 1, /* after WLAN reboot, host trigger this cmd to set power history of last life cycle */
  32026. } WMI_TAS_POWER_HISTORY_CMD_TYPE;
  32027. typedef struct {
  32028. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tas_power_history_cmd_fixed_param */
  32029. A_UINT32 sub_type; /* refer to WMI_TAS_POWER_HISTORY_TYPE */
  32030. A_UINT32 time_diff; /* time of wlan on - time of wlan off after wlan reboot. unit: millisecond*/
  32031. } wmi_tas_power_history_cmd_fixed_param;
  32032. /**
  32033. * This command is sent from WLAN host driver to firmware to
  32034. * request firmware to enable/disable channel avoidance report
  32035. * to host.
  32036. *
  32037. */
  32038. enum {
  32039. WMI_MWSCOEX_CHAN_AVD_RPT_DISALLOW = 0,
  32040. WMI_MWSCOEX_CHAN_AVD_RPT_ALLOW = 1
  32041. };
  32042. typedef struct {
  32043. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param */
  32044. /** Allow/disallow flag - see WMI_MWSCOEX_CHAN_AVD_RPT enum */
  32045. A_UINT32 rpt_allow;
  32046. } WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param;
  32047. /*
  32048. * Periodic channel stats WMI command structure
  32049. * WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID
  32050. */
  32051. typedef struct {
  32052. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_periodic_channel_stats_config_fixed_param */
  32053. /** 1 = enable, 0 = disable */
  32054. A_UINT32 enable;
  32055. /** periodic stats duration (units are milliseconds) */
  32056. A_UINT32 stats_period;
  32057. /** pdev_id for identifying the MAC
  32058. * See macros starting with WMI_PDEV_ID_ for values.
  32059. */
  32060. A_UINT32 pdev_id;
  32061. } wmi_set_periodic_channel_stats_config_fixed_param;
  32062. typedef struct {
  32063. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_wal_power_debug_cmd_fixed_param */
  32064. /** pdev_id for identifying the MAC
  32065. * See macros starting with WMI_PDEV_ID_ for values.
  32066. */
  32067. A_UINT32 pdev_id;
  32068. /* Identify the wlan module */
  32069. A_UINT32 module_id;
  32070. /* Num of elements in the following args[] array */
  32071. A_UINT32 num_args;
  32072. /**
  32073. * Following this structure are the TLVs:
  32074. * A_UINT32 args[];
  32075. **/
  32076. } wmi_pdev_wal_power_debug_cmd_fixed_param;
  32077. typedef struct {
  32078. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_reorder_timeout_val_cmd_fixed_param */
  32079. /**
  32080. * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
  32081. * @details
  32082. * Each WMM access category (voice, video, best-effort, background)
  32083. * will have its own timeout value to dictate how long to wait for
  32084. * missing rx MPDUs to arrive before releasing subsequent MPDUs that
  32085. * have already been received.
  32086. * This parameter specifies the timeout in milliseconds for each
  32087. * access category.
  32088. * The array elements are indexed by the WMI_AC enum to identify
  32089. * which array element corresponds to which AC / traffic type.
  32090. */
  32091. A_UINT32 rx_timeout_pri[WMI_AC_MAX];
  32092. } wmi_pdev_set_reorder_timeout_val_cmd_fixed_param;
  32093. /**
  32094. * wlan stats shall be understood as per period.
  32095. * Generally, it is reported periodically based on the period specified by host.
  32096. * But if the variation of one stats of compared to the
  32097. * previous notification exceeds a threshold,
  32098. * FW will report the wlan stats immediately.
  32099. * The values of the stats becomes the new reference to compute variations.
  32100. * This threshold can be a global setting or per category.
  32101. * Host can enable/disable the mechanism for any stats per bitmap.
  32102. * TX/RX thresholds (percentage value) are shared across ACs,
  32103. * and TX/RX stats comprisons are processed per AC of each peer.
  32104. * For example, if bit 0 (stand for tx_mpdus) of tx_thresh_bitmap is set to 1,
  32105. * and the detailed tx_mpdus threshold value is set to 10%,
  32106. * suppose tx_mpdus value of BE of peer 0 is 100 in first period,
  32107. * and it reaches 110 during the second period,
  32108. * FW will generate and send out a wlan stats event immediately.
  32109. */
  32110. typedef struct {
  32111. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_stats_threshold_cmd_fixed_param */
  32112. /** Indicate if threshold mechanism is enabled or disabled.
  32113. * It is disabled by default.
  32114. * Host can enable and disable it dynamically.
  32115. */
  32116. A_UINT32 enable_thresh;
  32117. /** use_thresh_bitmap equals 0 means gbl_thresh is used.
  32118. * when use_thresh_bitmap equals 1, ignore gbl_thresh and use stats bitmap indicated thresholds.
  32119. */
  32120. A_UINT32 use_thresh_bitmap;
  32121. /** global threshold, valid when use_thresh_bitmap equals 0.
  32122. * It takes effect for all counters.
  32123. * If use_thresh_bitmap ==0 && gbl_thresh == 0, disable threshold mechanism.
  32124. */
  32125. A_UINT32 gbl_thresh;
  32126. /** Enable/disable bitmap for threshold mechanism of CCA stats */
  32127. A_UINT32 cca_thresh_enable_bitmap;
  32128. /** Enable/disable bitmap for threshold mechanism of signal stats */
  32129. A_UINT32 signal_thresh_enable_bitmap;
  32130. /** Enable/disable bitmap for threshold mechanism of TX stats */
  32131. A_UINT32 tx_thresh_enable_bitmap;
  32132. /** Enable/disable bitmap for threshold mechanism of RX stats */
  32133. A_UINT32 rx_thresh_enable_bitmap;
  32134. /* This TLV is followed by TLVs below:
  32135. * wmi_chan_cca_stats_thresh cca_thresh;
  32136. * wmi_peer_signal_stats_thresh signal_thresh;
  32137. * wmi_tx_stats_thresh tx_thresh;
  32138. * wmi_rx_stats_thresh rx_thresh;
  32139. */
  32140. } wmi_pdev_set_stats_threshold_cmd_fixed_param;
  32141. typedef enum {
  32142. WMI_REQUEST_WLAN_TX_STAT = 0x01,
  32143. WMI_REQUEST_WLAN_RX_STAT = 0x02,
  32144. WMI_REQUEST_WLAN_CCA_STAT = 0x04,
  32145. WMI_REQUEST_WLAN_SIGNAL_STAT = 0x08,
  32146. } wmi_wlan_stats_id;
  32147. typedef struct {
  32148. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlan_stats_cmd_fixed_param */
  32149. wmi_wlan_stats_id stats_id;
  32150. } wmi_request_wlan_stats_cmd_fixed_param;
  32151. typedef enum {
  32152. WMI_REQUEST_ONE_PEER_STATS_INFO = 0x01, /* request stats of one specified peer */
  32153. WMI_REQUEST_VDEV_ALL_PEER_STATS_INFO = 0x02, /* request stats of all peers belong to specified VDEV */
  32154. } wmi_peer_stats_info_request_type;
  32155. /** It is required to issue WMI_PDEV_PARAM_PEER_STATS_INFO_ENABLE
  32156. * (with a non-zero value) before issuing the first REQUEST_PEER_STATS_INFO.
  32157. */
  32158. typedef struct {
  32159. /** TLV tag and len; tag equals
  32160. * WMITLV_TAG_STRUC_wmi_request_peer_stats_info_cmd_fixed_param */
  32161. A_UINT32 tlv_header;
  32162. /** request_type to indicate if only stats of
  32163. * one peer or all peers of the VDEV are requested,
  32164. * see wmi_peer_stats_info_request_type.
  32165. */
  32166. A_UINT32 request_type;
  32167. /** VDEV identifier */
  32168. A_UINT32 vdev_id;
  32169. /** this peer_macaddr is only used if request_type == ONE_PEER_STATS_INFO */
  32170. wmi_mac_addr peer_macaddr;
  32171. /** flag to indicate if FW needs to reset requested peers stats */
  32172. A_UINT32 reset_after_request;
  32173. } wmi_request_peer_stats_info_cmd_fixed_param;
  32174. typedef enum {
  32175. /*
  32176. * Multiple stats type can be requested together, so each value
  32177. * within this enum represents a bit position within a stats bitmap.
  32178. */
  32179. /* bit 0 is currently unused / reserved */
  32180. WMI_REQUEST_CTRL_PATH_PDEV_TX_STAT = 1,
  32181. WMI_REQUEST_CTRL_PATH_VDEV_EXTD_STAT = 2,
  32182. WMI_REQUEST_CTRL_PATH_MEM_STAT = 3,
  32183. WMI_REQUEST_CTRL_PATH_TWT_STAT = 4,
  32184. WMI_REQUEST_CTRL_PATH_CALIBRATION_STAT = 5,
  32185. WMI_REQUEST_CTRL_PATH_DFS_CHANNEL_STAT = 6,
  32186. WMI_REQUEST_CTRL_PATH_AWGN_STAT = 7,
  32187. WMI_REQUEST_CTRL_PATH_BTCOEX_STAT = 8,
  32188. WMI_REQUEST_CTRL_PATH_BMISS_STAT = 9,
  32189. WMI_REQUEST_CTRL_PATH_ODD_ADDR_READ = 10,
  32190. WMI_REQUEST_CTRL_PATH_AFC_STAT = 11,
  32191. WMI_REQUEST_CTRL_PATH_PMLO_STAT = 12,
  32192. WMI_REQUEST_CTRL_PATH_CFR_STAT = 13,
  32193. WMI_REQUEST_CTRL_PATH_T2LM_STAT = 14,
  32194. WMI_REQUEST_CTRL_PATH_BLANKING_STAT = 15,
  32195. WMI_REQUEST_CTRL_PATH_PEER_STAT = 16,
  32196. WMI_REQUEST_CTRL_PATH_VDEV_DEBUG_STAT = 17,
  32197. WMI_REQUEST_CTRL_STA_RRM_STAT = 18,
  32198. WMI_REQUEST_CTRL_PATH_VDEV_BCN_TX_STAT = 19,
  32199. WMI_REQUEST_CTRL_PATH_PDEV_BCN_TX_STAT = 20,
  32200. } wmi_ctrl_path_stats_id;
  32201. typedef enum {
  32202. /* bit 0 is currently unused / reserved */
  32203. WMI_HALPHY_CTRL_PATH_PDEV_TX_STAT = 1,
  32204. } wmi_halphy_ctrl_path_stats_id;
  32205. typedef enum {
  32206. /*
  32207. * The following stats actions are mutually exclusive.
  32208. * A single stats request message can only specify one action.
  32209. */
  32210. WMI_REQUEST_CTRL_PATH_STAT_GET = 1,
  32211. WMI_REQUEST_CTRL_PATH_STAT_RESET = 2,
  32212. WMI_REQUEST_CTRL_PATH_STAT_START = 3,
  32213. WMI_REQUEST_CTRL_PATH_STAT_STOP = 4,
  32214. WMI_REQUEST_CTRL_PATH_STAT_PERIODIC_PUBLISH = 5,
  32215. } wmi_ctrl_path_stats_action;
  32216. typedef enum {
  32217. WMI_HALPHY_CTRL_PATH_SU_STATS = 0,
  32218. WMI_HALPHY_CTRL_PATH_SUTXBF_STATS,
  32219. WMI_HALPHY_CTRL_PATH_MU_STATS,
  32220. WMI_HALPHY_CTRL_PATH_MUTXBF_STATS,
  32221. } wmi_halphy_ctrl_path_subid;
  32222. typedef struct {
  32223. /** TLV tag and len; tag equals
  32224. * WMITLV_TAG_STRUC_wmi_request_ctrl_path_stats_cmd_fixed_param */
  32225. A_UINT32 tlv_header;
  32226. /** Bitmask showing which of stats IDs 0-31 have been requested.
  32227. * These stats ids are defined in enum wmi_ctrl_path_stats_id.
  32228. */
  32229. A_UINT32 stats_id_mask;
  32230. /** request ID to store the cookies in wifistats */
  32231. A_UINT32 request_id;
  32232. /** action
  32233. * get/reset/start/stop based on stats id
  32234. * defined as a part of wmi_ctrl_path_stats_action
  32235. **/
  32236. A_UINT32 action; /* refer to wmi_ctrl_path_stats_action */
  32237. /**
  32238. * The stat_periodicity field is relevant only when action is set to
  32239. * WMI_REQUEST_CTRL_PATH_STAT_PERIODIC_PUBLISH.
  32240. * The units of this periodicity are milliseconds.
  32241. * Periodically send WMI ctrl-path stats event with the specified stats
  32242. * periodicity for the stats whose IDs are set in stats_id_mask.
  32243. * Periodic WMI ctrl-path stats events are enabled by setting value > 0,
  32244. * Previously onngoing periodic WMI ctrl-path stats events become
  32245. * disabled when action is WMI_REQUEST_CTRL_PATH_STAT_PERIODIC_PUBLISH
  32246. * and stat_periodicity = 0.
  32247. */
  32248. A_UINT32 stat_periodicity;
  32249. /** The below TLV arrays optionally follow this fixed_param TLV structure:
  32250. * 1. A_UINT32 pdev_ids[];
  32251. * If this array is present and non-zero length, stats should only
  32252. * be provided from the pdevs identified in the array.
  32253. * 2. A_UINT32 vdev_ids[];
  32254. * If this array is present and non-zero length, stats should only
  32255. * be provided from the vdevs identified in the array.
  32256. * 3. wmi_mac_addr peer_macaddr[];
  32257. * If this array is present and non-zero length, stats should only
  32258. * be provided from the peers with the MAC addresses specified
  32259. * in the array.
  32260. */
  32261. } wmi_request_ctrl_path_stats_cmd_fixed_param;
  32262. typedef struct {
  32263. /** TLV tag and len; tag equals
  32264. * WMITLV_TAG_STRUC_wmi_request_halphy_ctrl_path_stats_cmd_fixed_param */
  32265. A_UINT32 tlv_header;
  32266. /** Bitmask showing which of stats IDs 0-31 have been requested.
  32267. * These stats ids are defined in enum wmi_halphy_ctrl_path_stats_id.
  32268. */
  32269. A_UINT32 stats_id_mask;
  32270. /** process id requested */
  32271. A_UINT32 request_id;
  32272. /** action
  32273. * get/reset based on stats id
  32274. * defined as a part of wmi_ctrl_path_stats_action
  32275. **/
  32276. A_UINT32 action; /* refer to wmi_ctrl_path_stats_action */
  32277. /** Request Halphy subid stats
  32278. * According to the requested stats_id_mask this halphy_subid varies
  32279. * For stats_id = 1, the possible values could be enum
  32280. * wmi_halphy_ctrl_path_halphyid
  32281. */
  32282. A_UINT32 halphy_subid;
  32283. /** The below TLV arrays optionally follow this fixed_param TLV structure:
  32284. * 1. A_UINT32 pdev_ids[];
  32285. * If this array is present and non-zero length, stats should only
  32286. * be provided from the pdevs identified in the array.
  32287. * 2. A_UINT32 vdev_ids[];
  32288. * If this array is present and non-zero length, stats should only
  32289. * be provided from the vdevs identified in the array.
  32290. * 3. wmi_mac_addr peer_macaddr[];
  32291. * If this array is present and non-zero length, stats should only
  32292. * be provided from the peers with the MAC addresses specified
  32293. * in the array.
  32294. */
  32295. } wmi_request_halphy_ctrl_path_stats_cmd_fixed_param;
  32296. typedef enum {
  32297. WMI_REQUEST_ONE_RADIO_CHAN_STATS = 0x01, /* request stats of one specified channel */
  32298. WMI_REQUEST_ALL_RADIO_CHAN_STATS = 0x02, /* request stats of all channels */
  32299. } wmi_radio_chan_stats_request_type;
  32300. /** It is required to issue WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE
  32301. * (with a non-zero value) before issuing the first REQUEST_RADIO_CHAN_STATS.
  32302. */
  32303. typedef struct {
  32304. /** TLV tag and len; tag equals
  32305. * WMITLV_TAG_STRUC_wmi_request_radio_chan_stats_cmd_fixed_param */
  32306. A_UINT32 tlv_header;
  32307. /** request_type to indicate if only stats of
  32308. * one channel or all channels are requested,
  32309. * see wmi_radio_chan_stats_request_type.
  32310. */
  32311. A_UINT32 request_type;
  32312. /** Frequency of channel whose stats is requested,
  32313. * only used when request_type == WMI_REQUEST_ONE_RADIO_CHAN_STATS
  32314. */
  32315. A_UINT32 chan_mhz;
  32316. /** flag to indicate if FW needs to reset requested stats of specified channel/channels */
  32317. A_UINT32 reset_after_request;
  32318. } wmi_request_radio_chan_stats_cmd_fixed_param;
  32319. typedef struct {
  32320. /** TLV tag and len; tag equals
  32321. * WMITLV_TAG_STRUC_wmi_rmc_set_leader_cmd_fixed_param */
  32322. A_UINT32 tlv_header;
  32323. /* VDEV identifier */
  32324. A_UINT32 vdev_id;
  32325. /* Leader's mac address */
  32326. wmi_mac_addr leader_mac_addr;
  32327. } wmi_rmc_set_leader_cmd_fixed_param;
  32328. typedef struct {
  32329. /** TLV tag and len; tag equals
  32330. * WMITLV_TAG_STRUC_wmi_rmc_manual_leader_event_fixed_param */
  32331. A_UINT32 tlv_header;
  32332. /* VDEV identifier */
  32333. A_UINT32 vdev_id;
  32334. /* 0: success
  32335. * 1: selected leader not found in network, able to find using auto selection
  32336. * -1: error
  32337. * non zero value should be return to userspace in case of failure */
  32338. A_INT32 status;
  32339. /* bssid of new leader */
  32340. wmi_mac_addr leader_mac_addr;
  32341. } wmi_rmc_manual_leader_event_fixed_param;
  32342. typedef struct {
  32343. /** TLV tag and len; tag equals
  32344. * WMITLV_TAG_STRUC_wmi_audio_sync_start_event_fixed_param
  32345. */
  32346. A_UINT32 tlv_header;
  32347. /* VDEV identifier */
  32348. A_UINT32 vdev_id;
  32349. /* periodicity:
  32350. * How frequently (in msec) FW wants host to capture the Q_TIMER.
  32351. * periodicity = 0 indicates to the host to stop capturing the QTIMERs.
  32352. */
  32353. A_UINT32 periodicity;
  32354. /* No of Qtimer captures FW wants */
  32355. A_UINT32 reads_needed;
  32356. /* Lower 32 bits of the mac timer. Value is valid only if periodicity = 0 */
  32357. A_UINT32 mac_timer_l32;
  32358. /* Upper 32 bits of the mac timer. Value is valid only if periodicity = 0 */
  32359. A_UINT32 mac_timer_u32;
  32360. /* Lower 32 bits of the Qtimer. Value is valid only if periodicity = 0 */
  32361. A_UINT32 qtimer_l32;
  32362. /* Upper 32 bits of the Qtimer. Value is valid only if periodicity = 0 */
  32363. A_UINT32 qtimer_u32;
  32364. } wmi_audio_sync_start_stop_event_fixed_param;
  32365. typedef struct {
  32366. /** TLV tag and len; tag equals
  32367. * WMITLV_TAG_STRUC_wmi_audio_sync_q_mac_relation_event_fixed_param */
  32368. A_UINT32 tlv_header;
  32369. /* VDEV identifier */
  32370. A_UINT32 vdev_id;
  32371. /* Lower 32 bits of the offset between Qmaster and Qslave */
  32372. A_UINT32 offset_l32;
  32373. /* Upper 32 bits of the offset between Qmaster and Qslave */
  32374. A_UINT32 offset_u32;
  32375. } wmi_audio_sync_q_master_slave_offset_event_fixed_param;
  32376. typedef struct {
  32377. /** TLV tag and len; tag equals
  32378. * WMITLV_TAG_STRUC_wmi_audio_sync_q_mac_relation_event_fixed_param */
  32379. A_UINT32 tlv_header;
  32380. /* Lower 32 bits of the Qtimer of master */
  32381. A_UINT32 qmaster_l32;
  32382. /* Upper 32 bits of the Qtimer of master */
  32383. A_UINT32 qmaster_u32;
  32384. /* Lower 32 bits of the Qtimer of slave*/
  32385. A_UINT32 qslave_l32;
  32386. /* Upper 32 bits of the Qtimer of slave*/
  32387. A_UINT32 qslave_u32;
  32388. } wmi_audio_sync_q_master_slave_times;
  32389. /** Set Preferred Channel List **/
  32390. typedef struct {
  32391. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_pcl_cmd_fixed_param */
  32392. /** vdev_id */
  32393. A_UINT32 vdev_id;
  32394. /**
  32395. * TLV (tag length value) parameters follow the wmi_vdev_set_pcl_cmd
  32396. * structure. The TLV's are:
  32397. *
  32398. * A_UINT32 channel_weight[];
  32399. * values defined by enum 'wmi_pcl_chan_weight'
  32400. * channel order & size will be as per the list provided in WMI_SCAN_CHAN_LIST_CMDID
  32401. **/
  32402. } wmi_vdev_set_pcl_cmd_fixed_param;
  32403. /** command type for WMI_PDEV_TBTT_OFFSET_SYNC_CMDID */
  32404. enum pdev_tbtt_offset_cmd_type
  32405. {
  32406. WMI_PDEV_GET_TBTT_OFFSET,
  32407. WMI_PDEV_SET_TBTT_OFFSET,
  32408. };
  32409. /** Per neighbour TBTT offset information */
  32410. typedef struct
  32411. {
  32412. /** TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_pdev_tbtt_offset_info */
  32413. A_UINT32 tlv_header;
  32414. /* neighbour bss mac address */
  32415. wmi_mac_addr bss_mac;
  32416. /* neighbour bss beacon interval in TU */
  32417. A_UINT32 beacon_intval;
  32418. /* neighbour bss operating class as defined in Annex E, IEEE80211 standard */
  32419. A_UINT32 opclass;
  32420. /* neighbour bss operating channel index */
  32421. A_UINT32 chan_idx;
  32422. /* neighbour bss next QTIME TBTT high 32 bit value */
  32423. A_UINT32 next_qtime_tbtt_high;
  32424. /* neighbour bss next QTIME TBTT low 32 bit value */
  32425. A_UINT32 next_qtime_tbtt_low;
  32426. } wmi_pdev_rnr_bss_tbtt_info;
  32427. typedef struct {
  32428. /** TLV tag and len; tag equals
  32429. * WMITLV_TAG_STRUC_wmi_pdev_tbtt_offset_sync_cmd_fixed_param */
  32430. A_UINT32 tlv_header;
  32431. /*
  32432. * PDEV identifier. Value WMI_PDEV_ID_SOC implies applicable to all pdevs
  32433. * on SoC else applicable only to specified pdev
  32434. */
  32435. A_UINT32 pdev_id;
  32436. /* command_type from enum pdev_tbtt_offset_cmd_type */
  32437. A_UINT32 cmd_type;
  32438. /*
  32439. * Following this structure is the TLV:
  32440. * struct wmi_pdev_rnr_bss_tbtt_info rnr_tbtt_info[num_rnr_tbtt_info];
  32441. */
  32442. } wmi_pdev_tbtt_offset_sync_cmd_fixed_param;
  32443. typedef enum {
  32444. WLAN_2G_CAPABILITY = 0x1,
  32445. WLAN_5G_CAPABILITY = 0x2,
  32446. } WLAN_BAND_CAPABILITY;
  32447. typedef enum wmi_hw_mode_config_type {
  32448. WMI_HW_MODE_SINGLE = 0, /* Only one PHY is active. */
  32449. WMI_HW_MODE_DBS = 1, /* Both PHYs are active in different bands, PHYB in 2G and PHYA in 5G. */
  32450. WMI_HW_MODE_SBS_PASSIVE = 2, /* Both PHYs are in passive mode (only rx) in same band; no tx allowed. */
  32451. WMI_HW_MODE_SBS = 3, /* Both PHYs are active in the same band.
  32452. * Support for both PHYs within one band is planned for 5G only
  32453. * (as indicated in WMI_MAC_PHY_CAPABILITIES),
  32454. * but could be extended to other bands in the future.
  32455. * The separation of the band between the two PHYs needs to be communicated separately.
  32456. */
  32457. WMI_HW_MODE_DBS_SBS = 4, /* 3 PHYs, with 2 on the same band doing SBS
  32458. * as in WMI_HW_MODE_SBS, and 3rd on the other band
  32459. */
  32460. WMI_HW_MODE_DBS_OR_SBS = 5, /* One PHY is on 5G and the other PHY can be in 2G or 5G. */
  32461. WMI_HW_MODE_DBS_2G_5G = 6, /* Both PHYs are active in different bands. PhyA 2G and PhyB 5G */
  32462. WMI_HW_MODE_2G_PHYB = 7, /* Only PhyB 2G active */
  32463. WMI_HW_MODE_EMLSR = 8, /* Both PHYs are active in listen mode in 1x1
  32464. * and Tx/Rx trigger on any PHY will switch
  32465. * from 1x1 to 2x2 on that Phy
  32466. */
  32467. WMI_HW_MODE_AUX_EMLSR_SINGLE = 9, /* PHYA0 and AUX are active in listen mode
  32468. * in 1x1 and Tx/Rx trigger on any.
  32469. * PHY will switch from 1x1 to 2x2
  32470. * on that Phy.
  32471. */
  32472. WMI_HW_MODE_AUX_EMLSR_SPLIT = 10, /* PHYA1 and AUX are active in listen mode
  32473. * in 1x1 and Tx/Rx trigger on any.
  32474. * PHY will switch from 1x1 to 2x2
  32475. * on that Phy.
  32476. */
  32477. } WMI_HW_MODE_CONFIG_TYPE;
  32478. /*
  32479. * Per HW mode MLO capability flags
  32480. * use bits 31:27 of A_UINT32 hw_mode_config_type for Per HW mode MLO
  32481. * capability flags...
  32482. * WMI_MLO_CAP_FLAG_NONE: Do not support MLO for the specific HW mode
  32483. * WMI_MLO_CAP_FLAG_NON_STR_IN_DBS: Support STR MLO when DBS for the specific
  32484. * HW mode
  32485. * WMI_MLO_CAP_FLAG_STR_IN_DBS: Support Non-STR MLO when DBS for the
  32486. * specific HW mode
  32487. * WMI_MLO_CAP_FLAG_NON_STR_IN_SBS: Support STR MLO when SBS for the specific
  32488. * HW mode
  32489. * WMI_MLO_CAP_FLAG_STR_IN_SBS: Support Non-STR MLO when SBS for the
  32490. * specific HW mode
  32491. * WMI_MLO_CAP_FLAG_STR: Support STR for the specific HW mode.
  32492. *
  32493. * WMI_MLO_CAP_FLAG_EMLSR: Support eMLSR mode.
  32494. */
  32495. #define WMI_MLO_CAP_FLAG_NONE 0x00
  32496. #define WMI_MLO_CAP_FLAG_NON_STR_IN_DBS 0x01
  32497. #define WMI_MLO_CAP_FLAG_STR_IN_DBS 0x02
  32498. #define WMI_MLO_CAP_FLAG_NON_STR_IN_SBS 0x04
  32499. #define WMI_MLO_CAP_FLAG_STR_IN_SBS 0x08
  32500. #define WMI_MLO_CAP_FLAG_STR 0x10
  32501. #define WMI_MLO_CAP_FLAG_EMLSR 0x20
  32502. /*
  32503. * hw_mode_config_type sub-fields for chips that support 802.11BE/MLO:
  32504. * bits 26:0 - hw_mode_config
  32505. * bits 31:27 - per HW mode MLO capability flags
  32506. */
  32507. #define WMI_BECAP_PHY_GET_HW_MODE_CFG(hw_mode_config_type) WMI_GET_BITS(hw_mode_config_type, 0, 27)
  32508. #define WMI_BECAP_PHY_SET_HW_MODE_CFG(hw_mode_config_type, value) WMI_SET_BITS(hw_mode_config_type, 0, 27, value)
  32509. #define WMI_BECAP_PHY_GET_MLO_CAP(hw_mode_config_type) WMI_GET_BITS(hw_mode_config_type, 27, 5)
  32510. #define WMI_BECAP_PHY_SET_MLO_CAP(hw_mode_config_type, value) WMI_SET_BITS(hw_mode_config_type, 27, 5, value)
  32511. /*
  32512. * pdev_id sub-fields for chips that support 802.11BE/MLO
  32513. * as part of WMI_MAC_PHY_CAPABILITIES and WMI_MAC_PHY_CAPABILITIES_EXT:
  32514. * bits 16:0 - pdev_id
  32515. * bits 32:16 - Unique link id across SOCs, got as part of QMI handshake.
  32516. */
  32517. #define WMI_PHY_GET_PDEV_ID(pdev_id) WMI_GET_BITS(pdev_id, 0, 16)
  32518. #define WMI_PHY_SET_PDEV_ID(pdev_id, value) WMI_SET_BITS(pdev_id, 0, 16, value)
  32519. #define WMI_PHY_GET_HW_LINK_ID(pdev_id) WMI_GET_BITS(pdev_id, 16, 16)
  32520. #define WMI_PHY_SET_HW_LINK_ID(pdev_id, value) WMI_SET_BITS(pdev_id, 16, 16, value)
  32521. #define WMI_SUPPORT_11B_GET(flags) WMI_GET_BITS(flags, 0, 1)
  32522. #define WMI_SUPPORT_11B_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
  32523. #define WMI_SUPPORT_11G_GET(flags) WMI_GET_BITS(flags, 1, 1)
  32524. #define WMI_SUPPORT_11G_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
  32525. #define WMI_SUPPORT_11A_GET(flags) WMI_GET_BITS(flags, 2, 1)
  32526. #define WMI_SUPPORT_11A_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
  32527. #define WMI_SUPPORT_11N_GET(flags) WMI_GET_BITS(flags, 3, 1)
  32528. #define WMI_SUPPORT_11N_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
  32529. #define WMI_SUPPORT_11AC_GET(flags) WMI_GET_BITS(flags, 4, 1)
  32530. #define WMI_SUPPORT_11AC_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
  32531. #define WMI_SUPPORT_11AX_GET(flags) WMI_GET_BITS(flags, 5, 1)
  32532. #define WMI_SUPPORT_11AX_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
  32533. #define WMI_SUPPORT_11BE_GET(flags) WMI_GET_BITS(flags, 6, 1)
  32534. #define WMI_SUPPORT_11BE_SET(flags, value) WMI_SET_BITS(flags, 6, 1, value)
  32535. #define WMI_MAX_MUBFEE_GET(flags) WMI_GET_BITS(flags, 28, 4)
  32536. #define WMI_MAX_MUBFEE_SET(flags, value) WMI_SET_BITS(flags, 28, 4, value)
  32537. /*
  32538. * +-----------------------------+------------------------------------+
  32539. * | Transmitted VHT Capabilities| NSS Support of STA |
  32540. * | Information Field | transmitted VHT Capabilites |
  32541. * +---------------+-------------+------+------+------+------+--------+
  32542. * | Supported | Extended | | | | | |
  32543. * | Channel | NSS BW | | | | | |
  32544. * | WidthSet | Support |20 Mhz|40 Mhz|80 Mhz|160Mhz|80+80Mhz|
  32545. * +---------------+-------------+------+------+------+------+--------+
  32546. * | 0 | 0 | 1 | 1 | 1 | | |
  32547. * +---------------+-------------+------+------+------+------+--------+
  32548. * | 0 | 1 | 1 | 1 | 1 | 1/2 | |
  32549. * +---------------+-------------+------+------+------+------+--------+
  32550. * | 0 | 2 | 1 | 1 | 1 | 1/2 | 1/2 |
  32551. * +---------------+-------------+------+------+------+------+--------+
  32552. * | 0 | 3 | 1 | 1 | 1 | 3/4 | 3/4 |
  32553. * +---------------+-------------+------+------+------+------+--------+
  32554. * | 1 | 0 | 1 | 1 | 1 | 1 | |
  32555. * +---------------+-------------+------+------+------+------+--------+
  32556. * | 1 | 1 | 1 | 1 | 1 | 1 | 1/2 |
  32557. * +---------------+-------------+------+------+------+------+--------+
  32558. * | 1 | 2 | 1 | 1 | 1 | 1 | 3/4 |
  32559. * +---------------+-------------+------+------+------+------+--------+
  32560. * | 1 | 3 | 2 | 2 | 2 | 2 | 1 |
  32561. * +---------------+-------------+------+------+------+------+--------+
  32562. * | 2 | 0 | 1 | 1 | 1 | 1 | 1 |
  32563. * +---------------+-------------+------+------+------+------+--------+
  32564. * | 2 | 3 | 2 | 2 | 2 | 1 | 1 |
  32565. * +---------------+-------------+------+------+------+------+--------+
  32566. */
  32567. /*
  32568. * [0] : WMI_NSS_RATIO_ENABLE_DISABLE_BITPOS
  32569. * [4:1] : WMI_NSS_RATIO_INFO_BITPOS
  32570. */
  32571. #define WMI_NSS_RATIO_ENABLE_DISABLE_BITPOS 0x0
  32572. #define WMI_NSS_RATIO_INFO_BITPOS 0x1
  32573. /*
  32574. * WMI_NSS_RATIO_ENABLE_DISABLE values:
  32575. * [0] : 0 - WMI_NSS_RATIO_DISABLE
  32576. * [0] : 1 - WMI_NSS_RATIO_ENABLE
  32577. */
  32578. #define WMI_NSS_RATIO_DISABLE 0x0
  32579. #define WMI_NSS_RATIO_ENABLE 0x1
  32580. /*
  32581. * WMI_NSS_RATIO_INFO values:
  32582. * [4:1] : 0000 - WMI_NSS_RATIO_1BY2_NSS
  32583. * [4:1] : 0001 - WMI_NSS_RATIO_3BY4_NSS
  32584. * [4:1] : 0010 - WMI_NSS_RATIO_1_NSS
  32585. * [4:1] : 0011 - WMI_NSS_RATIO_2_NSS
  32586. */
  32587. #define WMI_NSS_RATIO_1BY2_NSS 0x0
  32588. #define WMI_NSS_RATIO_3BY4_NSS 0x1
  32589. #define WMI_NSS_RATIO_1_NSS 0x2
  32590. #define WMI_NSS_RATIO_2_NSS 0x3
  32591. #define WMI_NSS_RATIO_ENABLE_DISABLE_SET(param, value) \
  32592. WMI_SET_BITS(param, WMI_NSS_RATIO_ENABLE_DISABLE_BITPOS, 1, value)
  32593. #define WMI_NSS_RATIO_ENABLE_DISABLE_GET(dword) \
  32594. WMI_GET_BITS(dword, WMI_NSS_RATIO_ENABLE_DISABLE_BITPOS, 1)
  32595. #define WMI_NSS_RATIO_INFO_SET(param, value) \
  32596. WMI_SET_BITS(param, WMI_NSS_RATIO_INFO_BITPOS, 4, value)
  32597. #define WMI_NSS_RATIO_INFO_GET(dword) \
  32598. WMI_GET_BITS(dword, WMI_NSS_RATIO_INFO_BITPOS, 4)
  32599. /*
  32600. * 11BE EML Capability Set and Get macros
  32601. */
  32602. #define WMI_SUPPORT_EMLSR_GET(eml_capability) WMI_GET_BITS(eml_capability, 0, 1)
  32603. #define WMI_SUPPORT_EMLSR_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 0, 1, value)
  32604. #define WMI_EMLSR_PADDING_DELAY_GET(eml_capability) WMI_GET_BITS(eml_capability, 1, 3)
  32605. #define WMI_EMLSR_PADDING_DELAY_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 1, 3, value)
  32606. #define WMI_EMLSR_TRANSITION_DELAY_GET(eml_capability) WMI_GET_BITS(eml_capability, 4, 3)
  32607. #define WMI_EMLSR_TRANSITION_DELAY_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 4, 3, value)
  32608. #define WMI_SUPPORT_EMLMR_GET(eml_capability) WMI_GET_BITS(eml_capability, 7, 1)
  32609. #define WMI_SUPPORT_EMLMR_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 7, 1, value)
  32610. #define WMI_EMLMR_DELAY_GET(eml_capability) WMI_GET_BITS(eml_capability, 8, 3)
  32611. #define WMI_EMLMR_DELAY_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 8, 3, value)
  32612. #define WMI_TRANSITION_TIMEOUT_GET(eml_capability) WMI_GET_BITS(eml_capability, 11, 4)
  32613. #define WMI_TRANSITION_TIMEOUT_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 11, 4, value)
  32614. /*
  32615. * 11BE MLD Capability Set and Get macros
  32616. */
  32617. #define WMI_MAX_NUM_SIMULTANEOUS_LINKS_GET(mld_capability) WMI_GET_BITS(mld_capability, 0, 4)
  32618. #define WMI_MAX_NUM_SIMULTANEOUS_LINKS_SET(mld_capability, value) WMI_SET_BITS(mld_capability, 0, 4, value)
  32619. #define WMI_SUPPORT_SRS_GET(mld_capability) WMI_GET_BITS(mld_capability, 4, 1)
  32620. #define WMI_SUPPORT_SRS_SET(mld_capability, value) WMI_SET_BITS(mld_capability, 4, 1, value)
  32621. #define WMI_TID_TO_LINK_NEGOTIATION_GET(mld_capability) WMI_GET_BITS(mld_capability, 5, 2)
  32622. #define WMI_TID_TO_LINK_NEGOTIATION_SET(mld_capability, value) WMI_SET_BITS(mld_capability, 5, 2, value)
  32623. #define WMI_FREQ_SEPERATION_STR_GET(mld_capability) WMI_GET_BITS(mld_capability, 7, 5)
  32624. #define WMI_FREQ_SEPERATION_STR_SET(mld_capability, value) WMI_SET_BITS(mld_capability, 7, 5, value)
  32625. #define WMI_SUPPORT_AAR_GET(mld_capability) WMI_GET_BITS(mld_capability, 12, 1)
  32626. #define WMI_SUPPORT_AAR_SET(mld_capability, value) WMI_SET_BITS(mld_capability, 12, 1, value)
  32627. /*
  32628. * 11BE Ext MLD Capability Set and Get macros
  32629. */
  32630. #define WMI_EXT_MLD_OPERATION_PARAMETER_UPDATE_SUPP_GET(ext_mld_capability) WMI_GET_BITS(ext_mld_capability, 0, 1)
  32631. #define WMI_EXT_MLD_OPERATION_PARAMETER_UPDATE_SUPP_SET(ext_mld_capability, value) WMI_SET_BITS(ext_mld_capability, 0, 1, value)
  32632. /*
  32633. * 11BE MSD Capability Set and Get macros
  32634. */
  32635. #define WMI_MEDIUM_SYNC_DURATION_GET(msd_capability) WMI_GET_BITS(msd_capability, 0, 8)
  32636. #define WMI_MEDIUM_SYNC_DURATION_SET(msd_capability,value) WMI_SET_BITS(msd_capability, 0, 8, value)
  32637. #define WMI_MEDIUM_SYNC_OFDM_ED_THRESHOLD_GET(msd_capability) WMI_GET_BITS(msd_capability, 8, 4)
  32638. #define WMI_MEDIUM_SYNC_OFDM_ED_THRESHOLD_SET(msd_capability, value) WMI_SET_BITS(msd_capability, 8, 4, value)
  32639. #define WMI_MEDIUM_SYNC_MAX_NO_TXOPS_GET(msd_capability) WMI_GET_BITS(msd_capability, 12, 4)
  32640. #define WMI_MEDIUM_SYNC_MAX_NO_TXOPS_SET(msd_capability, value) WMI_SET_BITS(msd_capability, 12, 4, value)
  32641. typedef struct {
  32642. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES */
  32643. /* hw_mode_id - identify a particular set of HW characteristics, as specified
  32644. * by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element must be mapped
  32645. * to its parent WMI_HW_MODE_CAPABILITIES element using hw_mode_id.
  32646. * No particular ordering of WMI_MAC_PHY_CAPABILITIES elements should be assumed,
  32647. * though in practice the elements may always be ordered by hw_mode_id */
  32648. A_UINT32 hw_mode_id;
  32649. /*
  32650. * pdev_id starts with 1. pdev_id 1 => phy_id 0, pdev_id 2 => phy_id 1
  32651. * hw_link_id: Unique link id across SOCs, got as part of QMI handshake.
  32652. * For legacy chips which do not support MLO, these top bits will always
  32653. * be set to 0, so it won't impact the legacy chips which treat pdev_id
  32654. * as 32 bits.
  32655. */
  32656. union {
  32657. struct {
  32658. A_UINT32 pdev_id:16,
  32659. hw_link_id:16;
  32660. } wmi_pdev_to_link_map;
  32661. A_UINT32 pdev_id;
  32662. };
  32663. /* phy id. Starts with 0 */
  32664. A_UINT32 phy_id;
  32665. /* supported modulations and number of MU beamformees */
  32666. union {
  32667. struct {
  32668. A_UINT32 supports_11b:1,
  32669. supports_11g:1,
  32670. supports_11a:1,
  32671. supports_11n:1,
  32672. supports_11ac:1,
  32673. supports_11ax:1,
  32674. supports_11be:1,
  32675. unused: 21,
  32676. max_mubfee: 4; /* max MU beamformees supported per MAC */
  32677. };
  32678. A_UINT32 supported_flags;
  32679. };
  32680. /* supported bands, enum WLAN_BAND_CAPABILITY */
  32681. A_UINT32 supported_bands;
  32682. /* ampdu density 0 for no restriction, 1 for 1/4 us, 2 for 1/2 us,
  32683. * 3 for 1 us,4 for 2 us, 5 for 4 us, 6 for 8 us,7 for 16 us */
  32684. A_UINT32 ampdu_density;
  32685. /* max bw supported 2G, enum wmi_channel_width */
  32686. A_UINT32 max_bw_supported_2G;
  32687. /* WMI HT Capability, WMI_HT_CAP defines */
  32688. A_UINT32 ht_cap_info_2G;
  32689. /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
  32690. A_UINT32 vht_cap_info_2G;
  32691. /* VHT Supported MCS Set field Rx/Tx same
  32692. * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  32693. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  32694. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  32695. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  32696. * - 3 indicates that n spatial streams is not supported
  32697. * - bit [15:0] Each NSS takes 2 bit.
  32698. * - bit [23:16] Indicates support for VHT-MCS 10 and 11 for
  32699. * n spatial streams
  32700. * - bit 16 - for NSS 1
  32701. * - bit 17 - for NSS 2
  32702. * - .
  32703. * - .
  32704. * - bit 23 - for NSS 8
  32705. * - bit 24 - indicate whether the VHT-MCS 10-11 specs in bits 23:16
  32706. * are valid
  32707. * Refer to the WMI_VHT_MAX_MCS_EXT_SS_GET/SET macros.
  32708. */
  32709. A_UINT32 vht_supp_mcs_2G;
  32710. /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
  32711. A_UINT32 he_cap_info_2G;
  32712. /* HE Supported MCS Set field Rx/Tx same
  32713. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  32714. * bit 2-0 indicating max HE MCS of NSS1
  32715. * bit 5-3 indicating max HE MCS of NSS2 and so on
  32716. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  32717. * HE BW less than or equal to 80MHZ is encoded as follows
  32718. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  32719. * - 1 indicates support for VHT-MCS 0-9 for n spatial streams
  32720. * - 2 indicates support for VHT-MCS 0-11 for n spatial streams
  32721. * - 3 indicates that n spatial streams is not supported
  32722. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  32723. */
  32724. A_UINT32 he_supp_mcs_2G;
  32725. /* Valid Transmit chain mask */
  32726. A_UINT32 tx_chain_mask_2G;
  32727. /* Valid Receive chain mask */
  32728. A_UINT32 rx_chain_mask_2G;
  32729. /* max bw supported 5G, enum wmi_channel_width */
  32730. A_UINT32 max_bw_supported_5G;
  32731. /* WMI HT Capability, WMI_HT_CAP defines */
  32732. A_UINT32 ht_cap_info_5G;
  32733. /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
  32734. A_UINT32 vht_cap_info_5G;
  32735. /* VHT Supported MCS Set field Rx/Tx same
  32736. * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  32737. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  32738. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  32739. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  32740. * - 3 indicates that n spatial streams is not supported
  32741. * - bit [15:0] Each NSS takes 2 bit.
  32742. * - bit [23:16] Indicates support for VHT-MCS 10 and 11 for
  32743. * n spatial streams
  32744. * - bit 16 - for NSS 1
  32745. * - bit 17 - for NSS 2
  32746. * - .
  32747. * - .
  32748. * - bit 23 - for NSS 8
  32749. * - bit 24 - indicate whether the VHT-MCS 10-11 specs in bits 23:16
  32750. * are valid
  32751. * Refer to the WMI_VHT_MAX_MCS_EXT_SS_GET/SET macros.
  32752. */
  32753. A_UINT32 vht_supp_mcs_5G;
  32754. /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
  32755. A_UINT32 he_cap_info_5G;
  32756. /* HE Supported MCS Set field Rx/Tx same
  32757. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  32758. * bit 2-0 indicating max HE MCS of NSS1
  32759. * bit 5-3 indicating max HE MCS of NSS2 and so on
  32760. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  32761. * HE BW less than or equal to 80MHZ is encoded as follows
  32762. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  32763. * - 1 indicates support for VHT-MCS 0-9 for n spatial streams
  32764. * - 2 indicates support for VHT-MCS 0-11 for n spatial streams
  32765. * - 3 indicates that n spatial streams is not supported
  32766. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  32767. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  32768. * HE BW equal to 80+80 or 160 MHZ encoding is same as above just the
  32769. * lower 16 bits are used for lower 80MHz NSS-MCS supported combo and
  32770. * upper 16 bits are used for upper 80MHz NSS-MCS supported combo
  32771. */
  32772. A_UINT32 he_supp_mcs_5G;
  32773. /* Valid Transmit chain mask */
  32774. A_UINT32 tx_chain_mask_5G;
  32775. /* Valid Receive chain mask */
  32776. A_UINT32 rx_chain_mask_5G;
  32777. /* HE capability phy field of 802.11ax, WMI_HE_CAP defines */
  32778. A_UINT32 he_cap_phy_info_2G[WMI_MAX_HECAP_PHY_SIZE];
  32779. A_UINT32 he_cap_phy_info_5G[WMI_MAX_HECAP_PHY_SIZE];
  32780. wmi_ppe_threshold he_ppet2G;
  32781. wmi_ppe_threshold he_ppet5G;
  32782. /* chainmask table to be used for the MAC */
  32783. A_UINT32 chainmask_table_id;
  32784. /* PDEV ID to LMAC ID mapping */
  32785. A_UINT32 lmac_id;
  32786. /* 2nd DWORD of HE capability info field of 802.11ax, support Draft 3+ */
  32787. A_UINT32 he_cap_info_2G_ext;
  32788. A_UINT32 he_cap_info_5G_ext;
  32789. /*
  32790. * bit 0 : Indicated support for RX 1xLTF + 0.4us
  32791. * bit 1 : Indicates support for RX 2xLTF + 0.4us
  32792. * bit 2 : Indicates support for 2xLTF in 160/80+80 MHz HE PPDU
  32793. * bit[31:3] : Reserved
  32794. * Refer to WMI_HE_CAP_xx_LTF_xxx_SUPPORT_GET/SET macros
  32795. */
  32796. A_UINT32 he_cap_info_internal;
  32797. A_UINT32 wireless_modes; /* REGDMN MODE, see REGDMN_MODE_ enum */
  32798. A_UINT32 low_2ghz_chan_freq; /* units = MHz */
  32799. A_UINT32 high_2ghz_chan_freq; /* units = MHz */
  32800. A_UINT32 low_5ghz_chan_freq; /* units = MHz */
  32801. A_UINT32 high_5ghz_chan_freq; /* units = MHz */
  32802. /*
  32803. * NSS ratio to be sent to Host during boot-up capabilities negotiation
  32804. *
  32805. * Bit 0 - refer to WMI_NSS_RATIO_ENABLE_DISABLE_ definitions
  32806. * [0] : 0 - WMI_NSS_RATIO_DISABLE
  32807. * [0] : 1 - WMI_NSS_RATIO_ENABLE
  32808. *
  32809. * Bits 4:1 - refer to WMI_NSS_RATIO_INFO_ definitions
  32810. * [4:1] : 0000 - WMI_NSS_RATIO_1BY2_NSS
  32811. * [4:1] : 0001 - WMI_NSS_RATIO_3BY4_NSS
  32812. * [4:1] : 0010 - WMI_NSS_RATIO_1_NSS
  32813. * [4:1] : 0011 - WMI_NSS_RATIO_2_NSS
  32814. *
  32815. * [31:5] : Reserved
  32816. */
  32817. A_UINT32 nss_ratio;
  32818. /**************************************************************************
  32819. * DON'T ADD ANY FURTHER FIELDS HERE -
  32820. * It would cause the size of the READY_EXT message within some targets
  32821. * to exceed the size of the buffer used for the message.
  32822. **************************************************************************/
  32823. } WMI_MAC_PHY_CAPABILITIES;
  32824. typedef struct {
  32825. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES_EXT */
  32826. /* hw_mode_id - identify a particular set of HW characteristics, as specified
  32827. * by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element must be mapped
  32828. * to its parent WMI_HW_MODE_CAPABILITIES element using hw_mode_id.
  32829. * No particular ordering of WMI_MAC_PHY_CAPABILITIES elements should be assumed,
  32830. * though in practice the elements may always be ordered by hw_mode_id */
  32831. A_UINT32 hw_mode_id;
  32832. /*
  32833. * pdev_id starts with 1. pdev_id 1 => phy_id 0, pdev_id 2 => phy_id 1
  32834. * hw_link_id: Unique link id across SOCs, got as part of QMI handshake.
  32835. * For legacy chips which do not support MLO, these top bits will always
  32836. * be set to 0, so it won't impact the legacy chips which treat pdev_id
  32837. * as 32 bits.
  32838. */
  32839. union {
  32840. struct {
  32841. A_UINT32 pdev_id:16,
  32842. hw_link_id:16;
  32843. } wmi_pdev_to_link_map;
  32844. A_UINT32 pdev_id;
  32845. };
  32846. /* phy id. Starts with 0 */
  32847. A_UINT32 phy_id;
  32848. A_UINT32 wireless_modes_ext; /* REGDMN MODE EXT, see REGDMN_MODE_ enum */
  32849. /**************************************************************************
  32850. * following new params for 802.11be, but under development
  32851. **************************************************************************/
  32852. /* EHT capability mac info field of 802.11be */
  32853. A_UINT32 eht_cap_mac_info_2G[WMI_MAX_EHTCAP_MAC_SIZE];
  32854. A_UINT32 eht_cap_mac_info_5G[WMI_MAX_EHTCAP_MAC_SIZE];
  32855. A_UINT32 eht_supp_mcs_2G; /* deprecated (c.f. eht_supp_mcs_ext_2G) */
  32856. A_UINT32 eht_supp_mcs_5G; /* deprecated (c.f. eht_supp_mcs_ext_5G) */
  32857. /* EHT capability phy field of 802.11be, WMI_EHT_CAP defines */
  32858. A_UINT32 eht_cap_phy_info_2G[WMI_MAX_EHTCAP_PHY_SIZE];
  32859. A_UINT32 eht_cap_phy_info_5G[WMI_MAX_EHTCAP_PHY_SIZE];
  32860. wmi_ppe_threshold eht_ppet2G;
  32861. wmi_ppe_threshold eht_ppet5G;
  32862. A_UINT32 eht_cap_info_internal;
  32863. /* eht_supp_mcs_ext_2G, eht_supp_mcs_ext_5G:
  32864. * array index interpretation:
  32865. * 0 – index indicated EHT-MCS map for 20Mhz only sta (4 bytes valid)
  32866. * 1 – index for <= 80MHz bw (only 3 bytes are valid and other is reserved)
  32867. * 2 – index for 160Mhz bw (only 3 bytes are valid and other is reserved)
  32868. * 3 – index for 320Mhz bw (only 3 bytes are valid and other is reserved)
  32869. *
  32870. * The format of the data stored in each array index element is defined
  32871. * by IEEE802.11 9.4.2.295c.4
  32872. * For example, for the 20 MHz / index 0 element:
  32873. * B0 -- B3: Rx Max Nss that Supports EHT-MCS 0–7
  32874. * B4 -- B7: Tx Max Nss that Supports EHT-MCS 0–7
  32875. * B8 -- B11: Rx Max Nss that Supports EHT-MCS 8–9
  32876. * B12 -- B15: Tx Max Nss that Supports EHT-MCS 8–9
  32877. * B16 -- B19: Rx Max Nss that Supports EHT-MCS 10–11
  32878. * B20 -- B23: Tx Max Nss that Supports EHT-MCS 10–11
  32879. * B24 -- B27: Rx Max Nss that Supports EHT-MCS 12–13
  32880. * B28 -- B31: Tx Max Nss that Supports EHT-MCS 12–13
  32881. */
  32882. A_UINT32 eht_supp_mcs_ext_2G[WMI_MAX_EHT_SUPP_MCS_2G_SIZE];
  32883. A_UINT32 eht_supp_mcs_ext_5G[WMI_MAX_EHT_SUPP_MCS_5G_SIZE];
  32884. union {
  32885. struct {
  32886. A_UINT32 emlsr_support:1,
  32887. emlsr_padding_delay:3,
  32888. emlsr_transition_delay:3,
  32889. emlmr_support:1,
  32890. emlmr_delay:3,
  32891. transition_timeout:4,
  32892. reserved: 17;
  32893. };
  32894. A_UINT32 eml_capability;
  32895. };
  32896. union {
  32897. struct {
  32898. A_UINT32 max_num_simultaneous_links:4,
  32899. srs_support:1,
  32900. tid_to_link_negotiation_support:2, /* Set to 0 if TID-to-link mapping is not supported by the MLD.
  32901. * Set to 1 if MLD supports the mapping of each TID to the same or different link set.
  32902. * Set to 2 if MLD only supports the mapping of all TIDs to the same link set.
  32903. * Value 3 is reserved */
  32904. freq_separation_str:5,
  32905. aar_support:1,
  32906. reserved2: 19;
  32907. };
  32908. A_UINT32 mld_capability;
  32909. };
  32910. union {
  32911. struct {
  32912. A_UINT32
  32913. op_update_para_support:1, /* Indicates support of operation parameter update negotiation */
  32914. reserved3: 31;
  32915. };
  32916. A_UINT32 ext_mld_capability;
  32917. };
  32918. union {
  32919. struct {
  32920. A_UINT32 medium_sync_duration:8,
  32921. medium_sync_ofdm_ed_threshold:4,
  32922. medium_sync_max_no_txops:4,
  32923. reserved4: 16;
  32924. };
  32925. A_UINT32 msd_capability;
  32926. };
  32927. } WMI_MAC_PHY_CAPABILITIES_EXT;
  32928. typedef struct {
  32929. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HW_MODE_CAPABILITIES */
  32930. /* hw_mode_id - identify a particular set of HW characteristics,
  32931. * as specified by the subsequent fields */
  32932. A_UINT32 hw_mode_id;
  32933. /* BIT0 represents phy_id 0, BIT1 represent phy_id 1 and so on
  32934. * number of bits set in phy_id_map represents number of WMI_MAC_PHY_CAPABILITIES TLV's
  32935. * one for each active PHY for current HW mode identified by hw_mode_id. For example for
  32936. * DBS/SBS mode there will be 2 WMI_MAC_PHY_CAPABILITIES TLVs and for single MAC modes it
  32937. * will be 1 WMI_MAC_PHY_CAPABILITIES TLVs */
  32938. A_UINT32 phy_id_map;
  32939. /* hw_mode_config_type
  32940. * Identify a particular type of HW mode such as SBS, DBS etc.
  32941. * Refer to WMI_HW_MODE_CONFIG_TYPE values.
  32942. *
  32943. * Use bits 31:27 of hw_mode_config_type for Per HW mode MLO capability
  32944. * flags.
  32945. * Refer to WMI_MLO_CAP_FLAG_XXX. For legacy chips which do not support
  32946. * MLO, these top bits will always be set to 0, so it won't impact the
  32947. * legacy chips which treat hw_mode_config_type as 32 bits.
  32948. */
  32949. union {
  32950. struct {
  32951. A_UINT32 hw_mode_config :27,
  32952. mlo_cap_flag :5; /* see WMI_MLO_CAP_FLAG_ defs */
  32953. };
  32954. A_UINT32 hw_mode_config_type;
  32955. };
  32956. /**************************************************************************
  32957. * DON'T ADD ANY FURTHER FIELDS HERE -
  32958. * It would cause the size of the READY_EXT message within some targets
  32959. * to exceed the size of the buffer used for the message.
  32960. **************************************************************************/
  32961. } WMI_HW_MODE_CAPABILITIES;
  32962. /*
  32963. * The following macros are for the bitfields witihin the supported flags field
  32964. * of WMI_MAC_PHY_CHAINMASK_CAPABILITY:
  32965. * Capabilities for the chainmask
  32966. */
  32967. #define WMI_SUPPORT_CHAN_WIDTH_20_GET(flags) WMI_GET_BITS(flags, 0, 1)
  32968. #define WMI_SUPPORT_CHAN_WIDTH_20_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
  32969. #define WMI_SUPPORT_CHAN_WIDTH_40_GET(flags) WMI_GET_BITS(flags, 1, 1)
  32970. #define WMI_SUPPORT_CHAN_WIDTH_40_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
  32971. #define WMI_SUPPORT_CHAN_WIDTH_80_GET(flags) WMI_GET_BITS(flags, 2, 1)
  32972. #define WMI_SUPPORT_CHAN_WIDTH_80_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
  32973. #define WMI_SUPPORT_CHAN_WIDTH_160_GET(flags) WMI_GET_BITS(flags, 3, 1)
  32974. #define WMI_SUPPORT_CHAN_WIDTH_160_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
  32975. #define WMI_SUPPORT_CHAN_WIDTH_80P80_GET(flags) WMI_GET_BITS(flags, 4, 1)
  32976. #define WMI_SUPPORT_CHAN_WIDTH_80P80_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
  32977. #define WMI_SUPPORT_AGILE_SPECTRAL_GET(flags) WMI_GET_BITS(flags, 5, 1)
  32978. #define WMI_SUPPORT_AGILE_SPECTRAL_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
  32979. #define WMI_SUPPORT_AGILE_SPECTRAL_160_GET(flags) WMI_GET_BITS(flags, 6, 1)
  32980. #define WMI_SUPPORT_AGILE_SPECTRAL_160_SET(flags, value) WMI_SET_BITS(flags, 6, 1, value)
  32981. #define WMI_SUPPORT_ADFS_160_GET(flags) WMI_GET_BITS(flags, 7, 1)
  32982. #define WMI_SUPPORT_ADFS_160_SET(flags, value) WMI_SET_BITS(flags, 7, 1, value)
  32983. #define WMI_SUPPORT_CHAN_WIDTH_320_GET(flags) WMI_GET_BITS(flags, 8, 1)
  32984. #define WMI_SUPPORT_CHAN_WIDTH_320_SET(flags, value) WMI_SET_BITS(flags, 8, 1, value)
  32985. #define WMI_SUPPORT_ADFS_320_GET(flags) WMI_GET_BITS(flags, 9, 1)
  32986. #define WMI_SUPPORT_ADFS_320_SET(flags, value) WMI_SET_BITS(flags, 9, 1, value)
  32987. #define WMI_SUPPORT_AGILE_SPECTRAL_320_GET(flags) WMI_GET_BITS(flags, 10, 1)
  32988. #define WMI_SUPPORT_AGILE_SPECTRAL_320_SET(flags, value) WMI_SET_BITS(flags, 10, 1, value)
  32989. #define WMI_SUPPORT_CHAIN_MASK_2G_GET(flags) WMI_GET_BITS(flags, 27, 1)
  32990. #define WMI_SUPPORT_CHAIN_MASK_2G_SET(flags, value) WMI_SET_BITS(flags, 27, 1, value)
  32991. #define WMI_SUPPORT_CHAIN_MASK_5G_GET(flags) WMI_GET_BITS(flags, 28, 1)
  32992. #define WMI_SUPPORT_CHAIN_MASK_5G_SET(flags, value) WMI_SET_BITS(flags, 28, 1, value)
  32993. #define WMI_SUPPORT_CHAIN_MASK_TX_GET(flags) WMI_GET_BITS(flags, 29, 1)
  32994. #define WMI_SUPPORT_CHAIN_MASK_TX_SET(flags, value) WMI_SET_BITS(flags, 29, 1, value)
  32995. #define WMI_SUPPORT_CHAIN_MASK_RX_GET(flags) WMI_GET_BITS(flags, 30, 1)
  32996. #define WMI_SUPPORT_CHAIN_MASK_RX_SET(flags, value) WMI_SET_BITS(flags, 30, 1, value)
  32997. #define WMI_SUPPORT_CHAIN_MASK_ADFS_GET(flags) WMI_GET_BITS(flags, 31, 1)
  32998. #define WMI_SUPPORT_CHAIN_MASK_ADFS_SET(flags, value) WMI_SET_BITS(flags, 31, 1, value)
  32999. /** Definition of valid chainmask and associated capabilities */
  33000. typedef struct {
  33001. A_UINT32 tlv_header;/* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_CAPABILITY */
  33002. /* supported flags: Capabilities for this chianmask*/
  33003. union {
  33004. struct {
  33005. A_UINT32 supports_chan_width_20:1,
  33006. supports_chan_width_40:1,
  33007. supports_chan_width_80:1,
  33008. supports_chan_width_160:1,
  33009. supports_chan_width_80P80:1,
  33010. supports_agile_spectral:1,
  33011. supports_agile_spectral_160:1,
  33012. supports_aDFS_160:1,
  33013. supports_chan_width_320:1,
  33014. supports_aDFS_320:1,
  33015. supports_agile_spectral_320:1,
  33016. reserved:16, /* bits 26:11 */
  33017. chain_mask_2G:1,
  33018. chain_mask_5G:1,
  33019. chain_mask_tx:1,
  33020. chain_mask_rx:1,
  33021. supports_aDFS:1; /* agile DFS */
  33022. };
  33023. A_UINT32 supported_flags;
  33024. };
  33025. A_UINT32 chainmask;
  33026. /**************************************************************************
  33027. * DON'T ADD ANY FURTHER FIELDS HERE -
  33028. * It would cause the size of the READY_EXT message within some targets
  33029. * to exceed the size of the buffer used for the message.
  33030. **************************************************************************/
  33031. } WMI_MAC_PHY_CHAINMASK_CAPABILITY;
  33032. typedef struct {
  33033. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_COMBO */
  33034. A_UINT32 chainmask_table_id;
  33035. /* Number of valid Chainmask in the table */
  33036. A_UINT32 num_valid_chainmask;
  33037. /**************************************************************************
  33038. * DON'T ADD ANY FURTHER FIELDS HERE -
  33039. * It would cause the size of the READY_EXT message within some targets
  33040. * to exceed the size of the buffer used for the message.
  33041. **************************************************************************/
  33042. /*
  33043. * This TLV is followed by the below TLVs:
  33044. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask]
  33045. */
  33046. } WMI_MAC_PHY_CHAINMASK_COMBO;
  33047. typedef struct {
  33048. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_MAC_PHY_HW_MODE_CAPS */
  33049. /* num HW modes */
  33050. A_UINT32 num_hw_modes;
  33051. /* number of unique chainmask combo tables */
  33052. A_UINT32 num_chainmask_tables;
  33053. /**************************************************************************
  33054. * DON'T ADD ANY FURTHER FIELDS HERE -
  33055. * It would cause the size of the READY_EXT message within some targets
  33056. * to exceed the size of the buffer used for the message.
  33057. **************************************************************************/
  33058. /*
  33059. * This TLV is followed by the below TLVs:
  33060. *
  33061. * WMI_HW_MODE_CAPABILITIES soc_hw_mode_caps[num_hw_modes]
  33062. *
  33063. * (intervening TLVs, e.g. HW_MODE_CAPS, MAC_PHY_CAPS, HAL_REG_CAPS)
  33064. *
  33065. * WMI_MAC_PHY_CHAINMASK_COMBO mac_phy_chainmask_combo[num_chainmask_tables]
  33066. * // number of chainmasks specified in mac_phy_chainmask_combo[0]
  33067. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask0]
  33068. * // number of chainmasks specified in mac_phy_chainmask_combo[1]
  33069. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask1]
  33070. * // number of chainmasks specified in mac_phy_chainmask_combo[2]
  33071. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask2]
  33072. * etc.
  33073. */
  33074. } WMI_SOC_MAC_PHY_HW_MODE_CAPS;
  33075. /*Below are Reg caps per PHY. Please note PHY ID starts with 0.*/
  33076. typedef struct {
  33077. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT */
  33078. /* phy id */
  33079. A_UINT32 phy_id;
  33080. /* regdomain value specified in EEPROM */
  33081. A_UINT32 eeprom_reg_domain;
  33082. /* regdomain */
  33083. A_UINT32 eeprom_reg_domain_ext;
  33084. /* CAP1 capabilities bit map, see REGDMN_CAP1_ defines */
  33085. A_UINT32 regcap1;
  33086. /* REGDMN EEPROM CAP, see REGDMN_EEPROM_EEREGCAP_ defines */
  33087. A_UINT32 regcap2;
  33088. /* REGDMN MODE, see REGDMN_MODE_ enum */
  33089. A_UINT32 wireless_modes;
  33090. A_UINT32 low_2ghz_chan; /* freq in MHz */
  33091. A_UINT32 high_2ghz_chan; /* freq in MHz */
  33092. A_UINT32 low_5ghz_chan; /* freq in MHz */
  33093. A_UINT32 high_5ghz_chan; /* freq in MHz */
  33094. /**************************************************************************
  33095. * DON'T ADD ANY FURTHER FIELDS HERE -
  33096. * It would cause the size of the READY_EXT message within some targets
  33097. * to exceed the size of the buffer used for the message.
  33098. **************************************************************************/
  33099. } WMI_HAL_REG_CAPABILITIES_EXT;
  33100. typedef struct {
  33101. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT2 */
  33102. /* phy id */
  33103. A_UINT32 phy_id;
  33104. /* regdomain value specified in EEPROM */
  33105. A_UINT32 wireless_modes_ext;
  33106. A_UINT32 low_2ghz_chan_ext; /* freq in MHz */
  33107. A_UINT32 high_2ghz_chan_ext; /* freq in MHz */
  33108. A_UINT32 low_5ghz_chan_ext; /* freq in MHz */
  33109. A_UINT32 high_5ghz_chan_ext; /* freq in MHz */
  33110. } WMI_HAL_REG_CAPABILITIES_EXT2;
  33111. /*
  33112. * TWT service capability bitmap in wmi_twt_caps_params TLV
  33113. * within WMI_SERVICE_READY_EXT2_EVENTID message
  33114. */
  33115. typedef enum {
  33116. WMI_TWT_STA_SYNC_EVENT_CAP = 1, /* STA TWT: FW internal errors reported using sync WMI_TWT_ACK_EVENTID */
  33117. /* Add new TWT Caps above */
  33118. WMI_TWT_MAX_CAP = 32,
  33119. } WMI_TWT_CAPS_BITMAP;
  33120. typedef struct {
  33121. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_caps_param */
  33122. /* twt_capability_bitmap
  33123. * TWT Capabilities - refer to WMI_TWT_CAPS_BITMAP for the meaning of
  33124. * the bits within the bitmap
  33125. */
  33126. A_UINT32 twt_capability_bitmap;
  33127. } wmi_twt_caps_params;
  33128. /*
  33129. * This TLV used for Scan Radio RDP
  33130. * We have an RDP which supports Multiband-Frequency (2 GHz, 5 GHz and 6 GHz)
  33131. * on a single radio.
  33132. * The AP acts as a special VAP. There will not be WMI_VDEV_UP_CMD.
  33133. * This radio is used only for scanning purpose and to send few MGMT frames.
  33134. * The DFS feature is disabled on this scan radio, since there will not be
  33135. * much TX traffic.
  33136. * The Host has to disable CAC timer because DFS feature not supported here.
  33137. * In order to know about the scan radio RDP, DFS disabled case and
  33138. * SCAN BLANKING support, the target has to send this information to Host
  33139. * per pdev via WMI_SERVICE_READY_EXT2_EVENT.
  33140. * The target is notified of the special scan VAP by the flags variable
  33141. * in the WMI_CREATE_CMD.
  33142. */
  33143. typedef struct {
  33144. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SCAN_RADIO_CAPABILITIES_EXT2 */
  33145. A_UINT32 phy_id;
  33146. /*
  33147. * Bit 0:
  33148. * 1 - SCAN_RADIO supported 0 - SCAN_RADIO not supported
  33149. * Refer to WMI_SCAN_RADIO_CAP_SCAN_RADIO_FLAG_SET, GET macros
  33150. * Bit 1:
  33151. * 1 - DFS enabled 0 - DFS disabled
  33152. * Refer to WMI_SCAN_RADIO_CAP_DFS_FLAG_SET, GET macros
  33153. * Bit 2:
  33154. * 1 - SCAN RADIO blanking supported
  33155. * 0 - SCAN RADIO blanking not supported
  33156. * Refer to WMI_SCAN_RADIO_CAP_BLANKING_SUPPORT_SET, GET macros
  33157. * [3:31] reserved
  33158. */
  33159. A_UINT32 flags;
  33160. } WMI_SCAN_RADIO_CAPABILITIES_EXT2;
  33161. #define WMI_SCAN_RADIO_CAP_SCAN_RADIO_FLAG_GET(flag) WMI_GET_BITS(flag, 0, 1)
  33162. #define WMI_SCAN_RADIO_CAP_SCAN_RADIO_FLAG_SET(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  33163. #define WMI_SCAN_RADIO_CAP_DFS_FLAG_GET(flag) WMI_GET_BITS(flag, 1, 1)
  33164. #define WMI_SCAN_RADIO_CAP_DFS_FLAG_SET(flag, val) WMI_SET_BITS(flag, 1, 1, val)
  33165. #define WMI_SCAN_RADIO_CAP_BLANKING_SUPPORT_GET(flag) WMI_GET_BITS(flag, 2, 1)
  33166. #define WMI_SCAN_RADIO_CAP_BLANKING_SUPPORT_SET(flag, val) WMI_SET_BITS(flag, 2, 1, val)
  33167. typedef struct {
  33168. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_HAL_REG_CAPABILITIES */
  33169. A_UINT32 num_phy;
  33170. /* num_phy WMI_HAL_REG_CAPABILITIES_EXT TLV's */
  33171. /**************************************************************************
  33172. * DON'T ADD ANY FURTHER FIELDS HERE -
  33173. * It would cause the size of the READY_EXT message within some targets
  33174. * to exceed the size of the buffer used for the message.
  33175. **************************************************************************/
  33176. } WMI_SOC_HAL_REG_CAPABILITIES;
  33177. typedef struct {
  33178. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_OEM_DMA_RING_CAPABILITIES */
  33179. A_UINT32 pdev_id;
  33180. A_UINT32 min_num_ptr;
  33181. /* Minimum number of pointers in the OEM DMA ring for this pdev */
  33182. A_UINT32 min_buf_size;
  33183. /* Minimum size in bytes of each buffer in the OEM DMA ring */
  33184. A_UINT32 min_buf_align;
  33185. /* Minimum alignment in bytes of each buffer in the OEM DMA ring */
  33186. /**************************************************************************
  33187. * DON'T ADD ANY FURTHER FIELDS HERE -
  33188. * It would cause the size of the READY_EXT message within some targets
  33189. * to exceed the size of the buffer used for the message.
  33190. **************************************************************************/
  33191. } WMI_OEM_DMA_RING_CAPABILITIES;
  33192. typedef enum {
  33193. WMI_SAR_VERSION_0_ORIGINAL = 0x00,
  33194. WMI_SAR_VERSION_1_FULL_TABLE = 0x01,
  33195. WMI_SAR_VERSION_2_DBS_SAR = 0x02,
  33196. WMI_SAR_VERSION_3_SBS_SAR = 0x03,
  33197. WMI_SAR_VERSION_SMART_TX = 0x04,
  33198. WMI_SAR_VERSION_TAS = 0x05,
  33199. WMI_SAR_VERSION_INVALID = 0x80
  33200. } wmi_sar_version_t;
  33201. typedef struct {
  33202. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SAR_CAPABILITIES*/
  33203. /* sar version in bdf */
  33204. A_UINT32 active_version; /* contains a wmi_sar_version_t value */
  33205. /**************************************************************************
  33206. * DON'T ADD ANY FURTHER FIELDS HERE -
  33207. * It would cause the size of the READY_EXT message within some targets
  33208. * to exceed the size of the buffer used for the message.
  33209. **************************************************************************/
  33210. } WMI_SAR_CAPABILITIES;
  33211. typedef enum {
  33212. WMI_SAR_FLAG_NONE = 0,
  33213. WMI_SAR_SET_CTL_GROUPING_DISABLE,
  33214. WMI_SAR_DBS_WITH_BT_DISABLE,
  33215. WMI_SAR_FLAG_MAX,
  33216. } wmi_sar_flags;
  33217. typedef struct {
  33218. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_flags*/
  33219. /* sar flags in bdf */
  33220. A_UINT32 sar_flags; /* refer to enum wmi_sar_flags */
  33221. } wmi_sar_flag_tlv_param;
  33222. typedef struct {
  33223. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_parameters_tlv */
  33224. /** global default adaptive dwell mode, used when WMI_SCAN_DWELL_MODE_DEFAULT */
  33225. A_UINT32 default_adaptive_dwell_mode;
  33226. /** the weight to calculate the average low pass filter for channel congestion. 0-100 */
  33227. A_UINT32 adapative_lpf_weight;
  33228. /** interval to monitor passive scan in msec */
  33229. A_UINT32 passive_monitor_interval_ms;
  33230. /** % of wifi activity to switch from passive to active 0-100 */
  33231. A_UINT32 wifi_activity_threshold_pct;
  33232. } wmi_scan_adaptive_dwell_parameters_tlv;
  33233. typedef struct {
  33234. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_config_fixed_param */
  33235. /* globally enable/disable adaptive dwell */
  33236. A_UINT32 enable;
  33237. /** pdev_id for identifying the MAC
  33238. * See macros starting with WMI_PDEV_ID_ for values.
  33239. * In non-DBDC case host should set it to 0
  33240. */
  33241. A_UINT32 pdev_id;
  33242. /**
  33243. * followed by TLV (tag length value) parameters array
  33244. * The TLV's are:
  33245. * wmi_scan_adaptive_dwell_parameters_tlv param[]; (0 or 1 elements)
  33246. */
  33247. } wmi_scan_adaptive_dwell_config_fixed_param;
  33248. typedef struct {
  33249. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_param_tlv */
  33250. /** module_id **/
  33251. A_UINT32 module_id;
  33252. /** number of dbs scans */
  33253. A_UINT32 num_dbs_scans;
  33254. /** number of non-dbs scans */
  33255. A_UINT32 num_non_dbs_scans;
  33256. } wmi_scan_dbs_duty_cycle_tlv_param;
  33257. typedef struct {
  33258. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_fixed_param */
  33259. /* number of scan client dutycycle param elements */
  33260. A_UINT32 num_clients;
  33261. /** pdev_id for identifying the MAC
  33262. * See macros starting with WMI_PDEV_ID_ for values.
  33263. * In non-DBDC case host should set it to 0
  33264. */
  33265. A_UINT32 pdev_id;
  33266. /**
  33267. * followed by TLV (tag length value) parameters array
  33268. * The TLV's are:
  33269. * wmi_scan_selection_duty_cycle_tlv_param[num_clients];
  33270. */
  33271. } wmi_scan_dbs_duty_cycle_fixed_param;
  33272. typedef struct {
  33273. /** TLV tag and len; tag equals
  33274. * WMITLV_TAG_STRUC_wmi_therm_throt_level_config_info */
  33275. A_UINT32 tlv_header;
  33276. /** temp_lwm:
  33277. * temperature sensor value in celsius when to exit to lower zone,
  33278. * this value can be lower than HWM of lower zone as zone overlapping
  33279. * is permitted by design to provide hysteresis
  33280. */
  33281. A_UINT32 temp_lwm;
  33282. /** temp_hwm:
  33283. * temperature sensor value in celsius when to exit to higher zone,
  33284. * this value can be higher than LWM of higher zone as zone overlapping
  33285. * is permitted by design to provide hysteresis
  33286. */
  33287. A_UINT32 temp_hwm;
  33288. /** dc_off_percent:
  33289. * duty cycle off percent 0-100.
  33290. * 0 means no off, 100 means no on (shutdown the phy).
  33291. */
  33292. A_UINT32 dc_off_percent;
  33293. /** prio:
  33294. * Disable only the transmit queues in firmware that have lower priority
  33295. * than value defined by prio.
  33296. * Prioritization:
  33297. * 0 = disable all data tx queues, No Prioritization defined
  33298. * 1 = disable BK tx queue
  33299. * 2 = disable BK+BE tx queues
  33300. * 3 = disable BK+BE+VI tx queues
  33301. */
  33302. A_UINT32 prio;
  33303. /**
  33304. * Pout power reduction in 0.25 dB units.
  33305. * For example, a value of 5 causes a power reduction of 1.25 dB.
  33306. */
  33307. A_UINT32 pout_reduction_25db;
  33308. /* tx chain mask: Chain mask to apply based on the temp level */
  33309. A_UINT32 tx_chain_mask;
  33310. } wmi_therm_throt_level_config_info;
  33311. typedef enum {
  33312. WMI_THERMAL_TEMP_RANGE_STATS_NONE = 0,
  33313. WMI_THERMAL_TEMP_RANGE_STATS_INIT,
  33314. WMI_THERMAL_TEMP_RANGE_STATS_REQUEST,
  33315. WMI_THERMAL_TEMP_RANGE_STATS_CLEAR,
  33316. WMI_THERMAL_STATS_CURRENT_ALL_SENSORS_TEMP,
  33317. } wmi_thermal_stats_action;
  33318. typedef struct {
  33319. /** TLV tag and len; tag equals
  33320. * WMITLV_TAG_STRUC_wmi_thermal_stats_cmd_fixed_param
  33321. */
  33322. A_UINT32 tlv_header;
  33323. /*
  33324. * Configure thermal temperature offset value for capturing
  33325. * thermal stats in thermal range.
  33326. * FW already has thermal throttling threshold temperature in BDF.
  33327. * Thermal STATS start capturing from temperature threshold to
  33328. * temperature threshold + offset.
  33329. * If thermal offset is 0 then thermal STATS capture is disabled.
  33330. *
  33331. * Units of thermal_offset are degrees Celsius.
  33332. */
  33333. A_UINT32 thermal_offset;
  33334. A_UINT32 thermal_action; /* refer to enum wmi_thermal_stats_action */
  33335. } wmi_thermal_stats_cmd_fixed_param;
  33336. typedef enum {
  33337. WMI_THERMAL_CLIENT_UNSPECIFIED = 0,
  33338. WMI_THERMAL_CLIENT_APPS = 1,
  33339. WMI_THERMAL_CLIENT_WPSS = 2,
  33340. WMI_THERMAL_CLIENT_FW = 3,
  33341. WMI_THERMAL_CLIENT_MAX
  33342. } WMI_THERMAL_MITIGATION_CLIENTS;
  33343. #define WMI_THERMAL_CLIENT_MAX_PRIORITY 10
  33344. typedef struct {
  33345. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_config_request_fixed_param */
  33346. A_UINT32 pdev_id; /* config for each pdev */
  33347. A_UINT32 enable; /* 0:disable, 1:enable */
  33348. A_UINT32 dc; /* duty cycle in ms */
  33349. A_UINT32 dc_per_event; /* how often (after how many duty cycles) the FW sends stats to host */
  33350. A_UINT32 therm_throt_levels; /* Indicates the number of thermal zone configuration */
  33351. A_UINT32 client_id; /* Indicates the client from whom the request is being forwarded to FW. Refer to WMI_THERMAL_MITIGATION_CLIENTS. */
  33352. A_UINT32 priority; /* Indicates the priority, higher the value, higher the priority. Varies from 1 to WMI_THERMAL_CLIENT_MAX_PRIORITY. */
  33353. /*
  33354. * Following this structure is the TLV:
  33355. * struct wmi_therm_throt_level_config_info therm_throt_level_config_info[therm_throt_levels];
  33356. */
  33357. } wmi_therm_throt_config_request_fixed_param;
  33358. typedef enum {
  33359. /* no throttling */
  33360. WMI_THERMAL_FULLPERF = 0,
  33361. /* throttling tx to do thermal mitigation */
  33362. WMI_THERMAL_MITIGATION = 1,
  33363. /* shut down the tx completely */
  33364. WMI_THERMAL_SHUTOFF = 2,
  33365. /* THERMAL_SHUTDOWN_TGT
  33366. * The target is over the temperature limit even with tx shut off.
  33367. * The target will be shut down entirely to control the temperature.
  33368. */
  33369. WMI_THERMAL_SHUTDOWN_TGT = 3,
  33370. } WMI_THERMAL_THROT_LEVEL;
  33371. #define WMI_THERMAL_STATS_TEMP_THRESH_LEVEL_MAX 5
  33372. /** FW response with the stats event id for every pdev and zones */
  33373. typedef struct {
  33374. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_stats_event_fixed_param */
  33375. A_UINT32 tlv_header;
  33376. A_UINT32 pdev_id; /* stats for corresponding pdev*/
  33377. A_UINT32 temp; /* Temperature reading in celsius */
  33378. A_UINT32 level; /* Current thermal throttling level -
  33379. * contains a WMI_THERMAL_THROT_LEVEL value. */
  33380. A_UINT32 therm_throt_levels; /* number of levels in therm_throt_level_stats_info */
  33381. /* This TLV is followed by another TLV of array of structs
  33382. * wmi_therm_throt_level_stats_info therm_throt_level_stats_info[therm_throt_levels];
  33383. * wmi_thermal_throt_temp_range_stats temp_range_stats[therm_throt_levels];
  33384. */
  33385. } wmi_therm_throt_stats_event_fixed_param;
  33386. typedef struct {
  33387. /** TLV tag and len; tag equals
  33388. * WMITLV_TAG_STRUC_wmi_therm_throt_level_stats_info */
  33389. A_UINT32 tlv_header;
  33390. A_UINT32 level_count; /* count of each time thermal throttling entered this state */
  33391. A_UINT32 dc_count; /* total number of duty cycles spent in this state. */
  33392. /* this number increments by one each time we are in this state and we finish one full duty cycle. */
  33393. } wmi_therm_throt_level_stats_info;
  33394. typedef struct {
  33395. /** TLV tag and len; tag equals
  33396. * WMITLV_TAG_STRUC_wmi_thermal_throt_temp_range_stats
  33397. */
  33398. A_UINT32 tlv_header;
  33399. /**
  33400. * Temperature range to capture thermal stats between start to end
  33401. * temperature level.
  33402. */
  33403. A_UINT32 start_temp_level; /* unit in degC */
  33404. A_UINT32 end_temp_level; /* unit in degC */
  33405. /** Total time spent on each thermal stats level, units are milliseconds. */
  33406. A_UINT32 total_time_ms_lo;
  33407. A_UINT32 total_time_ms_hi;
  33408. /**
  33409. * Thermal stats counter for every time thermal stats level enters
  33410. * this temperature range.
  33411. */
  33412. A_UINT32 num_entry;
  33413. } wmi_thermal_throt_temp_range_stats;
  33414. typedef enum {
  33415. WMI_REG_EXT_FCC_MIDBAND = 0,
  33416. WMI_REG_EXT_JAPAN_MIDBAND = 1,
  33417. WMI_REG_EXT_FCC_DFS_HT40 = 2,
  33418. WMI_REG_EXT_JAPAN_NONDFS_HT40 = 3,
  33419. WMI_REG_EXT_JAPAN_DFS_HT40 = 4,
  33420. WMI_REG_EXT_FCC_CH_144 = 5,
  33421. } WMI_REG_EXT_BITMAP;
  33422. #ifdef WMI_CMD_STRINGS
  33423. static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command)
  33424. {
  33425. switch (wmi_command) {
  33426. /* initialize the wlan sub system */
  33427. WMI_RETURN_STRING(WMI_INIT_CMDID);
  33428. /* Scan specific commands */
  33429. /* start scan request to FW */
  33430. WMI_RETURN_STRING(WMI_START_SCAN_CMDID);
  33431. /* stop scan request to FW */
  33432. WMI_RETURN_STRING(WMI_STOP_SCAN_CMDID);
  33433. /* full list of channels as defined by the regulatory
  33434. * that will be used by scanner */
  33435. WMI_RETURN_STRING(WMI_SCAN_CHAN_LIST_CMDID);
  33436. /* overwrite default priority table in scan scheduler */
  33437. WMI_RETURN_STRING(WMI_SCAN_SCH_PRIO_TBL_CMDID);
  33438. /* This command to adjust the priority and min.max_rest_time
  33439. * of an on ongoing scan request.
  33440. */
  33441. WMI_RETURN_STRING(WMI_SCAN_UPDATE_REQUEST_CMDID);
  33442. /* PDEV(physical device) specific commands */
  33443. /* set regulatorty ctl id used by FW to determine the exact
  33444. * ctl power limits */
  33445. WMI_RETURN_STRING(WMI_PDEV_SET_REGDOMAIN_CMDID);
  33446. /* set channel. mainly used for supporting monitor mode */
  33447. WMI_RETURN_STRING(WMI_PDEV_SET_CHANNEL_CMDID);
  33448. /* set pdev specific parameters */
  33449. WMI_RETURN_STRING(WMI_PDEV_SET_PARAM_CMDID);
  33450. /* enable packet log */
  33451. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_ENABLE_CMDID);
  33452. /* disable packet log*/
  33453. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_DISABLE_CMDID);
  33454. /* set wmm parameters */
  33455. WMI_RETURN_STRING(WMI_PDEV_SET_WMM_PARAMS_CMDID);
  33456. /* set HT cap ie that needs to be carried probe requests
  33457. * HT/VHT channels */
  33458. WMI_RETURN_STRING(WMI_PDEV_SET_HT_CAP_IE_CMDID);
  33459. /* set VHT cap ie that needs to be carried on probe
  33460. * requests on VHT channels */
  33461. WMI_RETURN_STRING(WMI_PDEV_SET_VHT_CAP_IE_CMDID);
  33462. /* Command to send the DSCP-to-TID map to the target */
  33463. WMI_RETURN_STRING(WMI_PDEV_SET_DSCP_TID_MAP_CMDID);
  33464. /* set quiet ie parameters. primarily used in AP mode */
  33465. WMI_RETURN_STRING(WMI_PDEV_SET_QUIET_MODE_CMDID);
  33466. /* Enable/Disable Green AP Power Save */
  33467. WMI_RETURN_STRING(WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID);
  33468. /* get TPC config for the current operating channel */
  33469. WMI_RETURN_STRING(WMI_PDEV_GET_TPC_CONFIG_CMDID);
  33470. /* set the base MAC address for the physical device before
  33471. * a VDEV is created. For firmware that does not support
  33472. * this feature and this command, the pdev MAC address will
  33473. * not be changed. */
  33474. WMI_RETURN_STRING(WMI_PDEV_SET_BASE_MACADDR_CMDID);
  33475. /* eeprom content dump , the same to bdboard data */
  33476. WMI_RETURN_STRING(WMI_PDEV_DUMP_CMDID);
  33477. /* VDEV(virtual device) specific commands */
  33478. /* vdev create */
  33479. WMI_RETURN_STRING(WMI_VDEV_CREATE_CMDID);
  33480. /* vdev delete */
  33481. WMI_RETURN_STRING(WMI_VDEV_DELETE_CMDID);
  33482. /* vdev start request */
  33483. WMI_RETURN_STRING(WMI_VDEV_START_REQUEST_CMDID);
  33484. /* vdev restart request (RX only, NO TX, used for CAC period)*/
  33485. WMI_RETURN_STRING(WMI_VDEV_RESTART_REQUEST_CMDID);
  33486. /* vdev up request */
  33487. WMI_RETURN_STRING(WMI_VDEV_UP_CMDID);
  33488. /* vdev stop request */
  33489. WMI_RETURN_STRING(WMI_VDEV_STOP_CMDID);
  33490. /* vdev down request */
  33491. WMI_RETURN_STRING(WMI_VDEV_DOWN_CMDID);
  33492. /* set a vdev param */
  33493. WMI_RETURN_STRING(WMI_VDEV_SET_PARAM_CMDID);
  33494. /* set a key (used for setting per peer unicast
  33495. * and per vdev multicast) */
  33496. WMI_RETURN_STRING(WMI_VDEV_INSTALL_KEY_CMDID);
  33497. /* Set bss max idle time */
  33498. WMI_RETURN_STRING(WMI_VDEV_BSS_MAX_IDLE_TIME_CMDID);
  33499. /* wnm sleep mode command */
  33500. WMI_RETURN_STRING(WMI_VDEV_WNM_SLEEPMODE_CMDID);
  33501. WMI_RETURN_STRING(WMI_VDEV_WMM_ADDTS_CMDID);
  33502. WMI_RETURN_STRING(WMI_VDEV_WMM_DELTS_CMDID);
  33503. WMI_RETURN_STRING(WMI_VDEV_SET_WMM_PARAMS_CMDID);
  33504. WMI_RETURN_STRING(WMI_VDEV_SET_GTX_PARAMS_CMDID);
  33505. WMI_RETURN_STRING(WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID);
  33506. WMI_RETURN_STRING(WMI_VDEV_PLMREQ_START_CMDID);
  33507. WMI_RETURN_STRING(WMI_VDEV_PLMREQ_STOP_CMDID);
  33508. WMI_RETURN_STRING(WMI_VDEV_TSF_TSTAMP_ACTION_CMDID);
  33509. WMI_RETURN_STRING(WMI_VDEV_SET_IE_CMDID);
  33510. WMI_RETURN_STRING(WMI_VDEV_REPORT_AP_OPER_BW_CMDID);
  33511. /* peer specific commands */
  33512. /** create a peer */
  33513. WMI_RETURN_STRING(WMI_PEER_CREATE_CMDID);
  33514. /** delete a peer */
  33515. WMI_RETURN_STRING(WMI_PEER_DELETE_CMDID);
  33516. /** delete all peer (excluding bss peer) */
  33517. WMI_RETURN_STRING(WMI_VDEV_DELETE_ALL_PEER_CMDID);
  33518. /** flush specific tid queues of a peer */
  33519. WMI_RETURN_STRING(WMI_PEER_FLUSH_TIDS_CMDID);
  33520. /** set a parameter of a peer */
  33521. WMI_RETURN_STRING(WMI_PEER_SET_PARAM_CMDID);
  33522. /* set peer to associated state. will cary all parameters
  33523. * determined during assocication time */
  33524. WMI_RETURN_STRING(WMI_PEER_ASSOC_CMDID);
  33525. /* add a wds (4 address ) entry. used only for testing
  33526. * WDS feature on AP products */
  33527. WMI_RETURN_STRING(WMI_PEER_ADD_WDS_ENTRY_CMDID);
  33528. /* remove wds (4 address ) entry. used only for testing WDS
  33529. * feature on AP products */
  33530. WMI_RETURN_STRING(WMI_PEER_REMOVE_WDS_ENTRY_CMDID);
  33531. /* set up mcast info for multicast to unicast conversion */
  33532. WMI_RETURN_STRING(WMI_PEER_MCAST_GROUP_CMDID);
  33533. /* request peer info from FW to get PEER_INFO_EVENTID */
  33534. WMI_RETURN_STRING(WMI_PEER_INFO_REQ_CMDID);
  33535. /* unmap response for a peer */
  33536. WMI_RETURN_STRING(WMI_PEER_UNMAP_RESPONSE_CMDID);
  33537. /* beacon/management specific commands */
  33538. /* transmit beacon by reference. used for transmitting beacon
  33539. * on low latency interface like pcie */
  33540. WMI_RETURN_STRING(WMI_BCN_TX_CMDID);
  33541. /* transmit beacon by value */
  33542. WMI_RETURN_STRING(WMI_PDEV_SEND_BCN_CMDID);
  33543. /* set the beacon template. used in beacon offload mode to setup
  33544. * the common beacon template with the FW to be used by FW to
  33545. * generate beacons */
  33546. WMI_RETURN_STRING(WMI_BCN_TMPL_CMDID);
  33547. /* set beacon filter with FW */
  33548. WMI_RETURN_STRING(WMI_BCN_FILTER_RX_CMDID);
  33549. /* enable/disable filtering of probe requests in the firmware */
  33550. WMI_RETURN_STRING(WMI_PRB_REQ_FILTER_RX_CMDID);
  33551. /* transmit management frame by value. will be deprecated */
  33552. WMI_RETURN_STRING(WMI_MGMT_TX_CMDID);
  33553. /* set the probe response template. used in beacon offload mode
  33554. * to setup the common probe response template with the FW to
  33555. * be used by FW to generate probe responses */
  33556. WMI_RETURN_STRING(WMI_PRB_TMPL_CMDID);
  33557. /** set FILS Discovery frame template for FW to generate FD frames */
  33558. WMI_RETURN_STRING(WMI_FD_TMPL_CMDID);
  33559. /* commands to directly control ba negotiation directly from
  33560. * host. only used in test mode */
  33561. /* turn off FW Auto addba mode and let host control addba */
  33562. WMI_RETURN_STRING(WMI_ADDBA_CLEAR_RESP_CMDID);
  33563. /* send add ba request */
  33564. WMI_RETURN_STRING(WMI_ADDBA_SEND_CMDID);
  33565. WMI_RETURN_STRING(WMI_ADDBA_STATUS_CMDID);
  33566. /* send del ba */
  33567. WMI_RETURN_STRING(WMI_DELBA_SEND_CMDID);
  33568. /* set add ba response will be used by FW to generate
  33569. * addba response*/
  33570. WMI_RETURN_STRING(WMI_ADDBA_SET_RESP_CMDID);
  33571. /* send single VHT MPDU with AMSDU */
  33572. WMI_RETURN_STRING(WMI_SEND_SINGLEAMSDU_CMDID);
  33573. /* Station power save specific config */
  33574. /* enable/disable station powersave */
  33575. WMI_RETURN_STRING(WMI_STA_POWERSAVE_MODE_CMDID);
  33576. /* set station power save specific parameter */
  33577. WMI_RETURN_STRING(WMI_STA_POWERSAVE_PARAM_CMDID);
  33578. /* set station mimo powersave mode */
  33579. WMI_RETURN_STRING(WMI_STA_MIMO_PS_MODE_CMDID);
  33580. /* DFS-specific commands */
  33581. /* enable DFS (radar detection)*/
  33582. WMI_RETURN_STRING(WMI_PDEV_DFS_ENABLE_CMDID);
  33583. /* disable DFS (radar detection)*/
  33584. WMI_RETURN_STRING(WMI_PDEV_DFS_DISABLE_CMDID);
  33585. /* enable DFS phyerr/parse filter offload */
  33586. WMI_RETURN_STRING(WMI_DFS_PHYERR_FILTER_ENA_CMDID);
  33587. /* enable DFS phyerr/parse filter offload */
  33588. WMI_RETURN_STRING(WMI_DFS_PHYERR_FILTER_DIS_CMDID);
  33589. /* Roaming specific commands */
  33590. /* set roam scan mode */
  33591. WMI_RETURN_STRING(WMI_ROAM_SCAN_MODE);
  33592. /* set roam scan RSSI threshold below which roam
  33593. * scan is enabled */
  33594. WMI_RETURN_STRING(WMI_ROAM_SCAN_RSSI_THRESHOLD);
  33595. /* set roam scan period for periodic roam scan mode */
  33596. WMI_RETURN_STRING(WMI_ROAM_SCAN_PERIOD);
  33597. /* set roam scan trigger RSSI change threshold */
  33598. WMI_RETURN_STRING(WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD);
  33599. /* set roam AP profile */
  33600. WMI_RETURN_STRING(WMI_ROAM_AP_PROFILE);
  33601. /* set channel list for roam scans */
  33602. WMI_RETURN_STRING(WMI_ROAM_CHAN_LIST);
  33603. /* offload scan specific commands */
  33604. /* set offload scan AP profile */
  33605. WMI_RETURN_STRING(WMI_OFL_SCAN_ADD_AP_PROFILE);
  33606. /* remove offload scan AP profile */
  33607. WMI_RETURN_STRING(WMI_OFL_SCAN_REMOVE_AP_PROFILE);
  33608. /* set offload scan period */
  33609. WMI_RETURN_STRING(WMI_OFL_SCAN_PERIOD);
  33610. /* P2P specific commands */
  33611. /* set P2P device info. FW will used by FW to create P2P IE
  33612. * to be carried in probe response generated during p2p listen
  33613. * and for p2p discoverability */
  33614. WMI_RETURN_STRING(WMI_P2P_DEV_SET_DEVICE_INFO);
  33615. /* enable/disable p2p discoverability on STA/AP VDEVs */
  33616. WMI_RETURN_STRING(WMI_P2P_DEV_SET_DISCOVERABILITY);
  33617. /* set p2p ie to be carried in beacons generated by FW for GO */
  33618. WMI_RETURN_STRING(WMI_P2P_GO_SET_BEACON_IE);
  33619. /* set p2p ie to be carried in probe response frames generated
  33620. * by FW for GO */
  33621. WMI_RETURN_STRING(WMI_P2P_GO_SET_PROBE_RESP_IE);
  33622. /* set the vendor specific p2p ie data.
  33623. * FW will use this to parse the P2P NoA
  33624. * attribute in the beacons/probe responses received.
  33625. */
  33626. WMI_RETURN_STRING(WMI_P2P_SET_VENDOR_IE_DATA_CMDID);
  33627. /* set the configure of p2p find offload */
  33628. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID);
  33629. /* set the vendor specific p2p ie data for p2p find offload */
  33630. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_APPIE_CMDID);
  33631. /* set the BSSID/device name pattern of p2p find offload */
  33632. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID);
  33633. /* set OppPS related parameters **/
  33634. WMI_RETURN_STRING(WMI_P2P_SET_OPPPS_PARAM_CMDID);
  33635. /* AP power save specific config
  33636. * set AP power save specific param */
  33637. WMI_RETURN_STRING(WMI_AP_PS_PEER_PARAM_CMDID);
  33638. /* set AP UAPSD coex specific param */
  33639. WMI_RETURN_STRING(WMI_AP_PS_PEER_UAPSD_COEX_CMDID);
  33640. /* Rate-control specific commands */
  33641. WMI_RETURN_STRING(WMI_PEER_RATE_RETRY_SCHED_CMDID);
  33642. /* WLAN Profiling commands. */
  33643. WMI_RETURN_STRING(WMI_WLAN_PROFILE_TRIGGER_CMDID);
  33644. WMI_RETURN_STRING(WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID);
  33645. WMI_RETURN_STRING(WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID);
  33646. WMI_RETURN_STRING(WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID);
  33647. WMI_RETURN_STRING(WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID);
  33648. /* Suspend resume command Ids */
  33649. WMI_RETURN_STRING(WMI_PDEV_SUSPEND_CMDID);
  33650. WMI_RETURN_STRING(WMI_PDEV_RESUME_CMDID);
  33651. /* Beacon filter commands */
  33652. /* add a beacon filter */
  33653. WMI_RETURN_STRING(WMI_ADD_BCN_FILTER_CMDID);
  33654. /* remove a beacon filter */
  33655. WMI_RETURN_STRING(WMI_RMV_BCN_FILTER_CMDID);
  33656. /* WOW Specific WMI commands */
  33657. /* add pattern for awake */
  33658. WMI_RETURN_STRING(WMI_WOW_ADD_WAKE_PATTERN_CMDID);
  33659. /* deleta a wake pattern */
  33660. WMI_RETURN_STRING(WMI_WOW_DEL_WAKE_PATTERN_CMDID);
  33661. /* enable/deisable wake event */
  33662. WMI_RETURN_STRING(WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID);
  33663. /* enable WOW */
  33664. WMI_RETURN_STRING(WMI_WOW_ENABLE_CMDID);
  33665. /* host woke up from sleep event to FW. Generated in response
  33666. * to WOW Hardware event */
  33667. WMI_RETURN_STRING(WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID);
  33668. /* RTT measurement related cmd */
  33669. /* request to make an RTT measurement */
  33670. WMI_RETURN_STRING(WMI_RTT_MEASREQ_CMDID);
  33671. /* request to report a tsf measurement */
  33672. WMI_RETURN_STRING(WMI_RTT_TSF_CMDID);
  33673. /* spectral scan command */
  33674. /* configure spectral scan */
  33675. WMI_RETURN_STRING(WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID);
  33676. /* enable/disable spectral scan and trigger */
  33677. WMI_RETURN_STRING(WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID);
  33678. /* F/W stats */
  33679. /* one time request for stats */
  33680. WMI_RETURN_STRING(WMI_REQUEST_STATS_CMDID);
  33681. /* Push MCC Adaptive Scheduler Stats to Firmware */
  33682. WMI_RETURN_STRING(WMI_MCC_SCHED_TRAFFIC_STATS_CMDID);
  33683. /* ARP OFFLOAD REQUEST*/
  33684. WMI_RETURN_STRING(WMI_SET_ARP_NS_OFFLOAD_CMDID);
  33685. /* Proactive ARP Response Add Pattern Command*/
  33686. WMI_RETURN_STRING(WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID);
  33687. /* Proactive ARP Response Del Pattern Command*/
  33688. WMI_RETURN_STRING(WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID);
  33689. /* NS offload confid*/
  33690. WMI_RETURN_STRING(WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID);
  33691. /* GTK offload Specific WMI commands */
  33692. WMI_RETURN_STRING(WMI_GTK_OFFLOAD_CMDID);
  33693. /* CSA offload Specific WMI commands */
  33694. /* csa offload enable */
  33695. WMI_RETURN_STRING(WMI_CSA_OFFLOAD_ENABLE_CMDID);
  33696. /* chan switch command */
  33697. WMI_RETURN_STRING(WMI_CSA_OFFLOAD_CHANSWITCH_CMDID);
  33698. /* Chatter commands */
  33699. /* Change chatter mode of operation */
  33700. WMI_RETURN_STRING(WMI_CHATTER_SET_MODE_CMDID);
  33701. /* chatter add coalescing filter command */
  33702. WMI_RETURN_STRING(WMI_CHATTER_ADD_COALESCING_FILTER_CMDID);
  33703. /* chatter delete coalescing filter command */
  33704. WMI_RETURN_STRING(WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID);
  33705. /* chatter coalecing query command */
  33706. WMI_RETURN_STRING(WMI_CHATTER_COALESCING_QUERY_CMDID);
  33707. /* addba specific commands */
  33708. /* start the aggregation on this TID */
  33709. WMI_RETURN_STRING(WMI_PEER_TID_ADDBA_CMDID);
  33710. /* stop the aggregation on this TID */
  33711. WMI_RETURN_STRING(WMI_PEER_TID_DELBA_CMDID);
  33712. /* set station mimo powersave method */
  33713. WMI_RETURN_STRING(WMI_STA_DTIM_PS_METHOD_CMDID);
  33714. /* Configure the Station UAPSD AC Auto Trigger Parameters */
  33715. WMI_RETURN_STRING(WMI_STA_UAPSD_AUTO_TRIG_CMDID);
  33716. /* Configure the Keep Alive Parameters */
  33717. WMI_RETURN_STRING(WMI_STA_KEEPALIVE_CMDID);
  33718. /* Request ssn from target for a sta/tid pair */
  33719. WMI_RETURN_STRING(WMI_BA_REQ_SSN_CMDID);
  33720. /* misc command group */
  33721. /* echo command mainly used for testing */
  33722. WMI_RETURN_STRING(WMI_ECHO_CMDID);
  33723. /* !!IMPORTANT!!
  33724. * If you need to add a new WMI command to the
  33725. * WMI_RETURN_STRING(WMI_GRP_MISC) sub-group,
  33726. * please make sure you add it BEHIND
  33727. * WMI_RETURN_STRING(WMI_PDEV_UTF_CMDID);
  33728. * as we MUST have a fixed value here to maintain compatibility between
  33729. * UTF and the ART2 driver
  33730. */
  33731. /* UTF WMI commands */
  33732. WMI_RETURN_STRING(WMI_PDEV_UTF_CMDID);
  33733. /* set debug log config */
  33734. WMI_RETURN_STRING(WMI_DBGLOG_CFG_CMDID);
  33735. /* QVIT specific command id */
  33736. WMI_RETURN_STRING(WMI_PDEV_QVIT_CMDID);
  33737. /* Factory Testing Mode request command
  33738. * used for integrated chipsets */
  33739. WMI_RETURN_STRING(WMI_PDEV_FTM_INTG_CMDID);
  33740. /* set and get keepalive parameters command */
  33741. WMI_RETURN_STRING(WMI_VDEV_SET_KEEPALIVE_CMDID);
  33742. WMI_RETURN_STRING(WMI_VDEV_GET_KEEPALIVE_CMDID);
  33743. /* For fw recovery test command */
  33744. WMI_RETURN_STRING(WMI_FORCE_FW_HANG_CMDID);
  33745. /* Set Mcast/Bdcast filter */
  33746. WMI_RETURN_STRING(WMI_SET_MCASTBCAST_FILTER_CMDID);
  33747. /* set thermal management params */
  33748. WMI_RETURN_STRING(WMI_THERMAL_MGMT_CMDID);
  33749. WMI_RETURN_STRING(WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID);
  33750. WMI_RETURN_STRING(WMI_LRO_CONFIG_CMDID);
  33751. WMI_RETURN_STRING(WMI_TRANSFER_DATA_TO_FLASH_CMDID);
  33752. WMI_RETURN_STRING(WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID);
  33753. WMI_RETURN_STRING(WMI_VDEV_WISA_CMDID);
  33754. WMI_RETURN_STRING(WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID);
  33755. WMI_RETURN_STRING(WMI_WOW_SET_ACTION_WAKE_UP_CMDID);
  33756. WMI_RETURN_STRING(WMI_MAWC_SENSOR_REPORT_IND_CMDID);
  33757. WMI_RETURN_STRING(WMI_ROAM_CONFIGURE_MAWC_CMDID);
  33758. WMI_RETURN_STRING(WMI_NLO_CONFIGURE_MAWC_CMDID);
  33759. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_MAWC_CMDID);
  33760. /* GPIO Configuration */
  33761. WMI_RETURN_STRING(WMI_GPIO_CONFIG_CMDID);
  33762. WMI_RETURN_STRING(WMI_GPIO_OUTPUT_CMDID);
  33763. /* Txbf configuration command */
  33764. WMI_RETURN_STRING(WMI_TXBF_CMDID);
  33765. /* FWTEST Commands */
  33766. WMI_RETURN_STRING(WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID);
  33767. /* set NoA descs */
  33768. WMI_RETURN_STRING(WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID);
  33769. /* TDLS Configuration */
  33770. /* enable/disable TDLS */
  33771. WMI_RETURN_STRING(WMI_TDLS_SET_STATE_CMDID);
  33772. /* set tdls peer state */
  33773. WMI_RETURN_STRING(WMI_TDLS_PEER_UPDATE_CMDID);
  33774. /* Resmgr Configuration */
  33775. /* Adaptive OCS is enabled by default in the FW.
  33776. * This command is used to disable FW based adaptive OCS.
  33777. */
  33778. WMI_RETURN_STRING
  33779. (WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID);
  33780. /* set the requested channel time quota for the home channels */
  33781. WMI_RETURN_STRING(WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID);
  33782. /* set the requested latency for the home channels */
  33783. WMI_RETURN_STRING(WMI_RESMGR_SET_CHAN_LATENCY_CMDID);
  33784. /* STA SMPS Configuration */
  33785. /* force SMPS mode */
  33786. WMI_RETURN_STRING(WMI_STA_SMPS_FORCE_MODE_CMDID);
  33787. /* set SMPS parameters */
  33788. WMI_RETURN_STRING(WMI_STA_SMPS_PARAM_CMDID);
  33789. /* Wlan HB commands */
  33790. /* enable/disable wlan HB */
  33791. WMI_RETURN_STRING(WMI_HB_SET_ENABLE_CMDID);
  33792. /* set tcp parameters for wlan HB */
  33793. WMI_RETURN_STRING(WMI_HB_SET_TCP_PARAMS_CMDID);
  33794. /* set tcp pkt filter for wlan HB */
  33795. WMI_RETURN_STRING(WMI_HB_SET_TCP_PKT_FILTER_CMDID);
  33796. /* set udp parameters for wlan HB */
  33797. WMI_RETURN_STRING(WMI_HB_SET_UDP_PARAMS_CMDID);
  33798. /* set udp pkt filter for wlan HB */
  33799. WMI_RETURN_STRING(WMI_HB_SET_UDP_PKT_FILTER_CMDID);
  33800. /* Wlan RMC commands*/
  33801. /* enable/disable RMC */
  33802. WMI_RETURN_STRING(WMI_RMC_SET_MODE_CMDID);
  33803. /* configure action frame period */
  33804. WMI_RETURN_STRING(WMI_RMC_SET_ACTION_PERIOD_CMDID);
  33805. /* For debug/future enhancement purposes only,
  33806. * configures/finetunes RMC algorithms */
  33807. WMI_RETURN_STRING(WMI_RMC_CONFIG_CMDID);
  33808. /* WLAN MHF offload commands */
  33809. /* enable/disable MHF offload */
  33810. WMI_RETURN_STRING(WMI_MHF_OFFLOAD_SET_MODE_CMDID);
  33811. /* Plumb routing table for MHF offload */
  33812. WMI_RETURN_STRING(WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID);
  33813. /* location scan commands */
  33814. /* start batch scan */
  33815. WMI_RETURN_STRING(WMI_BATCH_SCAN_ENABLE_CMDID);
  33816. /* stop batch scan */
  33817. WMI_RETURN_STRING(WMI_BATCH_SCAN_DISABLE_CMDID);
  33818. /* get batch scan result */
  33819. WMI_RETURN_STRING(WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID);
  33820. /* OEM related cmd */
  33821. WMI_RETURN_STRING(WMI_OEM_REQ_CMDID);
  33822. WMI_RETURN_STRING(WMI_OEM_REQUEST_CMDID);
  33823. /* NAN request cmd */
  33824. WMI_RETURN_STRING(WMI_NAN_CMDID);
  33825. /* Modem power state cmd */
  33826. WMI_RETURN_STRING(WMI_MODEM_POWER_STATE_CMDID);
  33827. WMI_RETURN_STRING(WMI_REQUEST_STATS_EXT_CMDID);
  33828. WMI_RETURN_STRING(WMI_OBSS_SCAN_ENABLE_CMDID);
  33829. WMI_RETURN_STRING(WMI_OBSS_SCAN_DISABLE_CMDID);
  33830. WMI_RETURN_STRING(WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID);
  33831. WMI_RETURN_STRING(WMI_ROAM_SCAN_CMD);
  33832. WMI_RETURN_STRING(WMI_PDEV_SET_LED_CONFIG_CMDID);
  33833. WMI_RETURN_STRING(WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID);
  33834. WMI_RETURN_STRING(WMI_CHAN_AVOID_UPDATE_CMDID);
  33835. WMI_RETURN_STRING(WMI_COEX_CONFIG_CMDID);
  33836. WMI_RETURN_STRING(WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID);
  33837. WMI_RETURN_STRING(WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID);
  33838. WMI_RETURN_STRING(WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID);
  33839. WMI_RETURN_STRING(WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID);
  33840. WMI_RETURN_STRING(WMI_REQUEST_LINK_STATS_CMDID);
  33841. WMI_RETURN_STRING(WMI_START_LINK_STATS_CMDID);
  33842. WMI_RETURN_STRING(WMI_CLEAR_LINK_STATS_CMDID);
  33843. WMI_RETURN_STRING(WMI_GET_FW_MEM_DUMP_CMDID);
  33844. WMI_RETURN_STRING(WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID);
  33845. WMI_RETURN_STRING(WMI_LPI_START_SCAN_CMDID);
  33846. WMI_RETURN_STRING(WMI_LPI_STOP_SCAN_CMDID);
  33847. WMI_RETURN_STRING(WMI_EXTSCAN_START_CMDID);
  33848. WMI_RETURN_STRING(WMI_EXTSCAN_STOP_CMDID);
  33849. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID);
  33850. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID);
  33851. WMI_RETURN_STRING(WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID);
  33852. WMI_RETURN_STRING(WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID);
  33853. WMI_RETURN_STRING(WMI_EXTSCAN_SET_CAPABILITIES_CMDID);
  33854. WMI_RETURN_STRING(WMI_EXTSCAN_GET_CAPABILITIES_CMDID);
  33855. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID);
  33856. WMI_RETURN_STRING(WMI_ROAM_SYNCH_COMPLETE);
  33857. WMI_RETURN_STRING(WMI_D0_WOW_ENABLE_DISABLE_CMDID);
  33858. WMI_RETURN_STRING(WMI_EXTWOW_ENABLE_CMDID);
  33859. WMI_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID);
  33860. WMI_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID);
  33861. WMI_RETURN_STRING(WMI_UNIT_TEST_CMDID);
  33862. WMI_RETURN_STRING(WMI_ROAM_SET_RIC_REQUEST_CMDID);
  33863. WMI_RETURN_STRING(WMI_PDEV_GET_TEMPERATURE_CMDID);
  33864. WMI_RETURN_STRING(WMI_SET_DHCP_SERVER_OFFLOAD_CMDID);
  33865. WMI_RETURN_STRING(WMI_TPC_CHAINMASK_CONFIG_CMDID);
  33866. WMI_RETURN_STRING(WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID);
  33867. WMI_RETURN_STRING(WMI_SCAN_PROB_REQ_OUI_CMDID);
  33868. WMI_RETURN_STRING(WMI_TDLS_SET_OFFCHAN_MODE_CMDID);
  33869. WMI_RETURN_STRING(WMI_PDEV_SET_LED_FLASHING_CMDID);
  33870. WMI_RETURN_STRING(WMI_MDNS_OFFLOAD_ENABLE_CMDID);
  33871. WMI_RETURN_STRING(WMI_MDNS_SET_FQDN_CMDID);
  33872. WMI_RETURN_STRING(WMI_MDNS_SET_RESPONSE_CMDID);
  33873. WMI_RETURN_STRING(WMI_MDNS_GET_STATS_CMDID);
  33874. WMI_RETURN_STRING(WMI_MDNS_SET_STAIP_CMDID);
  33875. WMI_RETURN_STRING(WMI_ROAM_INVOKE_CMDID);
  33876. WMI_RETURN_STRING(WMI_SET_ANTENNA_DIVERSITY_CMDID);
  33877. WMI_RETURN_STRING(WMI_SAP_OFL_ENABLE_CMDID);
  33878. WMI_RETURN_STRING(WMI_APFIND_CMDID);
  33879. WMI_RETURN_STRING(WMI_PASSPOINT_LIST_CONFIG_CMDID);
  33880. WMI_RETURN_STRING(WMI_OCB_SET_SCHED_CMDID);
  33881. WMI_RETURN_STRING(WMI_OCB_SET_CONFIG_CMDID);
  33882. WMI_RETURN_STRING(WMI_OCB_SET_UTC_TIME_CMDID);
  33883. WMI_RETURN_STRING(WMI_OCB_START_TIMING_ADVERT_CMDID);
  33884. WMI_RETURN_STRING(WMI_OCB_STOP_TIMING_ADVERT_CMDID);
  33885. WMI_RETURN_STRING(WMI_OCB_GET_TSF_TIMER_CMDID);
  33886. WMI_RETURN_STRING(WMI_DCC_GET_STATS_CMDID);
  33887. WMI_RETURN_STRING(WMI_DCC_CLEAR_STATS_CMDID);
  33888. WMI_RETURN_STRING(WMI_DCC_UPDATE_NDL_CMDID);
  33889. WMI_RETURN_STRING(WMI_ROAM_FILTER_CMDID);
  33890. WMI_RETURN_STRING(WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID);
  33891. WMI_RETURN_STRING(WMI_DEBUG_MESG_FLUSH_CMDID);
  33892. WMI_RETURN_STRING(WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID);
  33893. WMI_RETURN_STRING(WMI_SOC_SET_PCL_CMDID);
  33894. WMI_RETURN_STRING(WMI_SOC_SET_HW_MODE_CMDID);
  33895. WMI_RETURN_STRING(WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID);
  33896. WMI_RETURN_STRING(WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID);
  33897. WMI_RETURN_STRING(WMI_DIAG_EVENT_LOG_CONFIG_CMDID);
  33898. WMI_RETURN_STRING(WMI_PACKET_FILTER_CONFIG_CMDID);
  33899. WMI_RETURN_STRING(WMI_PACKET_FILTER_ENABLE_CMDID);
  33900. WMI_RETURN_STRING(WMI_SAP_SET_BLACKLIST_PARAM_CMDID);
  33901. WMI_RETURN_STRING(WMI_WOW_UDP_SVC_OFLD_CMDID);
  33902. WMI_RETURN_STRING(WMI_MGMT_TX_SEND_CMDID);
  33903. WMI_RETURN_STRING(WMI_SOC_SET_ANTENNA_MODE_CMDID);
  33904. WMI_RETURN_STRING(WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID);
  33905. WMI_RETURN_STRING(WMI_AP_PS_EGAP_PARAM_CMDID);
  33906. WMI_RETURN_STRING(WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID);
  33907. WMI_RETURN_STRING(WMI_BPF_GET_CAPABILITY_CMDID);
  33908. WMI_RETURN_STRING(WMI_BPF_GET_VDEV_STATS_CMDID);
  33909. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID);
  33910. WMI_RETURN_STRING(WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID);
  33911. WMI_RETURN_STRING(WMI_NDI_GET_CAP_REQ_CMDID);
  33912. WMI_RETURN_STRING(WMI_NDP_INITIATOR_REQ_CMDID);
  33913. WMI_RETURN_STRING(WMI_NDP_RESPONDER_REQ_CMDID);
  33914. WMI_RETURN_STRING(WMI_NDP_END_REQ_CMDID);
  33915. WMI_RETURN_STRING(WMI_PEER_UPDATE_WDS_ENTRY_CMDID);
  33916. WMI_RETURN_STRING(WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID);
  33917. WMI_RETURN_STRING(WMI_PDEV_FIPS_CMDID);
  33918. WMI_RETURN_STRING(WMI_PDEV_SMART_ANT_ENABLE_CMDID);
  33919. WMI_RETURN_STRING(WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID);
  33920. WMI_RETURN_STRING(WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID);
  33921. WMI_RETURN_STRING(WMI_PDEV_SET_CTL_TABLE_CMDID);
  33922. WMI_RETURN_STRING(WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID);
  33923. WMI_RETURN_STRING(WMI_PDEV_GET_TPC_CMDID);
  33924. WMI_RETURN_STRING(WMI_MIB_STATS_ENABLE_CMDID);
  33925. WMI_RETURN_STRING(WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID);
  33926. WMI_RETURN_STRING(WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID);
  33927. WMI_RETURN_STRING(WMI_VDEV_RATEMASK_CMDID);
  33928. WMI_RETURN_STRING(WMI_VDEV_ATF_REQUEST_CMDID);
  33929. WMI_RETURN_STRING(WMI_VDEV_SET_DSCP_TID_MAP_CMDID);
  33930. WMI_RETURN_STRING(WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID);
  33931. WMI_RETURN_STRING(WMI_VDEV_SET_QUIET_MODE_CMDID);
  33932. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID);
  33933. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID);
  33934. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID);
  33935. WMI_RETURN_STRING(WMI_PEER_ATF_REQUEST_CMDID);
  33936. WMI_RETURN_STRING(WMI_FWTEST_CMDID);
  33937. WMI_RETURN_STRING(WMI_QBOOST_CFG_CMDID);
  33938. WMI_RETURN_STRING(WMI_PDEV_GET_NFCAL_POWER_CMDID);
  33939. WMI_RETURN_STRING(WMI_PDEV_SET_PCL_CMDID);
  33940. WMI_RETURN_STRING(WMI_PDEV_SET_HW_MODE_CMDID);
  33941. WMI_RETURN_STRING(WMI_PDEV_SET_MAC_CONFIG_CMDID);
  33942. WMI_RETURN_STRING(WMI_PDEV_SET_ANTENNA_MODE_CMDID);
  33943. WMI_RETURN_STRING(WMI_ROAM_SET_MBO_PARAM_CMDID);
  33944. WMI_RETURN_STRING(WMI_CHAN_AVOID_RPT_ALLOW_CMDID);
  33945. WMI_RETURN_STRING(WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID);
  33946. WMI_RETURN_STRING(WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID);
  33947. WMI_RETURN_STRING(WMI_PDEV_WAL_POWER_DEBUG_CMDID);
  33948. WMI_RETURN_STRING(WMI_PEER_BWF_REQUEST_CMDID);
  33949. WMI_RETURN_STRING(WMI_DBGLOG_TIME_STAMP_SYNC_CMDID);
  33950. WMI_RETURN_STRING(WMI_P2P_LISTEN_OFFLOAD_START_CMDID);
  33951. WMI_RETURN_STRING(WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID);
  33952. WMI_RETURN_STRING(WMI_PEER_REORDER_QUEUE_SETUP_CMDID);
  33953. WMI_RETURN_STRING(WMI_PEER_REORDER_QUEUE_REMOVE_CMDID);
  33954. WMI_RETURN_STRING(WMI_SET_MULTIPLE_MCAST_FILTER_CMDID);
  33955. WMI_RETURN_STRING(WMI_READ_DATA_FROM_FLASH_CMDID);
  33956. WMI_RETURN_STRING(WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID);
  33957. WMI_RETURN_STRING(WMI_PEER_SET_RX_BLOCKSIZE_CMDID);
  33958. WMI_RETURN_STRING(WMI_PDEV_SET_WAKEUP_CONFIG_CMDID);
  33959. WMI_RETURN_STRING(WMI_PDEV_GET_ANTDIV_STATUS_CMDID);
  33960. WMI_RETURN_STRING(WMI_PEER_ANTDIV_INFO_REQ_CMDID);
  33961. WMI_RETURN_STRING(WMI_MNT_FILTER_CMDID);
  33962. WMI_RETURN_STRING(WMI_PDEV_GET_CHIP_POWER_STATS_CMDID);
  33963. WMI_RETURN_STRING(WMI_COEX_GET_ANTENNA_ISOLATION_CMDID);
  33964. WMI_RETURN_STRING(WMI_PDEV_SET_STATS_THRESHOLD_CMDID);
  33965. WMI_RETURN_STRING(WMI_REQUEST_WLAN_STATS_CMDID);
  33966. WMI_RETURN_STRING(WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID);
  33967. WMI_RETURN_STRING(WMI_REQUEST_PEER_STATS_INFO_CMDID);
  33968. WMI_RETURN_STRING(WMI_REQUEST_RADIO_CHAN_STATS_CMDID);
  33969. WMI_RETURN_STRING(WMI_ROAM_PER_CONFIG_CMDID);
  33970. WMI_RETURN_STRING(WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID);
  33971. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID);
  33972. WMI_RETURN_STRING(WMI_HW_DATA_FILTER_CMDID);
  33973. WMI_RETURN_STRING(WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID);
  33974. WMI_RETURN_STRING(WMI_LPI_OEM_REQ_CMDID);
  33975. WMI_RETURN_STRING(WMI_PDEV_UPDATE_PKT_ROUTING_CMDID);
  33976. WMI_RETURN_STRING(WMI_PDEV_CHECK_CAL_VERSION_CMDID);
  33977. WMI_RETURN_STRING(WMI_PDEV_SET_DIVERSITY_GAIN_CMDID);
  33978. WMI_RETURN_STRING(WMI_VDEV_SET_ARP_STAT_CMDID);
  33979. WMI_RETURN_STRING(WMI_VDEV_GET_ARP_STAT_CMDID);
  33980. WMI_RETURN_STRING(WMI_VDEV_GET_TX_POWER_CMDID);
  33981. WMI_RETURN_STRING(WMI_OFFCHAN_DATA_TX_SEND_CMDID);
  33982. WMI_RETURN_STRING(WMI_SET_INIT_COUNTRY_CMDID);
  33983. WMI_RETURN_STRING(WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID);
  33984. WMI_RETURN_STRING(WMI_THERM_THROT_SET_CONF_CMDID);
  33985. WMI_RETURN_STRING(WMI_OEM_DMA_RING_CFG_REQ_CMDID);
  33986. WMI_RETURN_STRING(WMI_PDEV_BSS_CHAN_INFO_REQUEST_CMDID);
  33987. WMI_RETURN_STRING(WMI_VDEV_LIMIT_OFFCHAN_CMDID);
  33988. WMI_RETURN_STRING(WMI_ROAM_BTM_CONFIG_CMDID);
  33989. WMI_RETURN_STRING(WMI_WLM_CONFIG_CMDID);
  33990. WMI_RETURN_STRING(WMI_PDEV_UPDATE_CTLTABLE_REQUEST_CMDID);
  33991. WMI_RETURN_STRING(WMI_PDEV_CONFIG_VENDOR_OUI_ACTION_CMDID);
  33992. WMI_RETURN_STRING(WMI_PDEV_SEND_FD_CMDID);
  33993. WMI_RETURN_STRING(WMI_ENABLE_FILS_CMDID);
  33994. WMI_RETURN_STRING(WMI_PDEV_SET_AC_TX_QUEUE_OPTIMIZED_CMDID);
  33995. WMI_RETURN_STRING(WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID);
  33996. WMI_RETURN_STRING(WMI_PDEV_SET_RX_FILTER_PROMISCUOUS_CMDID);
  33997. WMI_RETURN_STRING(WMI_SAP_OBSS_DETECTION_CFG_CMDID);
  33998. WMI_RETURN_STRING(WMI_PDEV_DMA_RING_CFG_REQ_CMDID);
  33999. WMI_RETURN_STRING(WMI_11K_OFFLOAD_REPORT_CMDID);
  34000. WMI_RETURN_STRING(WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID);
  34001. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_ENABLE_CMDID);
  34002. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_WORK_MEMORY_CMDID);
  34003. WMI_RETURN_STRING(WMI_BPF_GET_VDEV_WORK_MEMORY_CMDID);
  34004. WMI_RETURN_STRING(WMI_BSS_COLOR_CHANGE_ENABLE_CMDID);
  34005. WMI_RETURN_STRING(WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID);
  34006. WMI_RETURN_STRING(WMI_RUNTIME_DPD_RECAL_CMDID);
  34007. WMI_RETURN_STRING(WMI_TWT_ENABLE_CMDID);
  34008. WMI_RETURN_STRING(WMI_TWT_DISABLE_CMDID);
  34009. WMI_RETURN_STRING(WMI_TWT_ADD_DIALOG_CMDID);
  34010. WMI_RETURN_STRING(WMI_TWT_DEL_DIALOG_CMDID);
  34011. WMI_RETURN_STRING(WMI_TWT_PAUSE_DIALOG_CMDID);
  34012. WMI_RETURN_STRING(WMI_TWT_RESUME_DIALOG_CMDID);
  34013. WMI_RETURN_STRING(WMI_TWT_VDEV_CONFIG_CMDID);
  34014. WMI_RETURN_STRING(WMI_REQUEST_ROAM_SCAN_STATS_CMDID);
  34015. WMI_RETURN_STRING(WMI_PEER_TID_CONFIGURATIONS_CMDID);
  34016. WMI_RETURN_STRING(WMI_VDEV_SET_CUSTOM_SW_RETRY_TH_CMDID);
  34017. WMI_RETURN_STRING(WMI_GET_TPC_POWER_CMDID);
  34018. WMI_RETURN_STRING(WMI_MOTION_DET_CONFIG_PARAM_CMDID);
  34019. WMI_RETURN_STRING(WMI_MOTION_DET_BASE_LINE_CONFIG_PARAM_CMDID);
  34020. WMI_RETURN_STRING(WMI_MOTION_DET_START_STOP_CMDID);
  34021. WMI_RETURN_STRING(WMI_MOTION_DET_BASE_LINE_START_STOP_CMDID);
  34022. WMI_RETURN_STRING(WMI_SAR_LIMITS_CMDID);
  34023. WMI_RETURN_STRING(WMI_SAR_GET_LIMITS_CMDID);
  34024. WMI_RETURN_STRING(WMI_PEER_CHAN_WIDTH_SWITCH_CMDID);
  34025. WMI_RETURN_STRING(WMI_PDEV_OBSS_PD_SPATIAL_REUSE_SET_DEF_OBSS_THRESH_CMDID);
  34026. WMI_RETURN_STRING(WMI_PDEV_HE_TB_ACTION_FRM_CMDID);
  34027. WMI_RETURN_STRING(WMI_HPCS_PULSE_START_CMDID);
  34028. WMI_RETURN_STRING(WMI_VDEV_CHAINMASK_CONFIG_CMDID);
  34029. WMI_RETURN_STRING(WMI_VDEV_BCN_OFFLOAD_QUIET_CONFIG_CMDID);
  34030. WMI_RETURN_STRING(WMI_NDP_CMDID);
  34031. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_FILTER_CMDID);
  34032. WMI_RETURN_STRING(WMI_SET_CURRENT_COUNTRY_CMDID);
  34033. WMI_RETURN_STRING(WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID);
  34034. WMI_RETURN_STRING(WMI_PEER_TX_PN_REQUEST_CMDID);
  34035. WMI_RETURN_STRING(WMI_ROAM_BSS_LOAD_CONFIG_CMDID);
  34036. WMI_RETURN_STRING(WMI_VDEV_GET_MWS_COEX_INFO_CMDID);
  34037. WMI_RETURN_STRING(WMI_REQUEST_WLM_STATS_CMDID);
  34038. WMI_RETURN_STRING(WMI_PDEV_SET_RAP_CONFIG_CMDID);
  34039. WMI_RETURN_STRING(WMI_STA_TDCC_CONFIG_CMDID);
  34040. WMI_RETURN_STRING(WMI_ROAM_DEAUTH_CONFIG_CMDID);
  34041. WMI_RETURN_STRING(WMI_ROAM_IDLE_CONFIG_CMDID);
  34042. WMI_RETURN_STRING(WMI_IDLE_TRIGGER_MONITOR_CMDID);
  34043. WMI_RETURN_STRING(WMI_PDEV_DSM_FILTER_CMDID);
  34044. WMI_RETURN_STRING(WMI_TWT_BTWT_INVITE_STA_CMDID);
  34045. WMI_RETURN_STRING(WMI_TWT_BTWT_REMOVE_STA_CMDID);
  34046. WMI_RETURN_STRING(WMI_OEM_DATA_CMDID);
  34047. WMI_RETURN_STRING(WMI_ROAM_PREAUTH_STATUS_CMDID);
  34048. WMI_RETURN_STRING(WMI_SET_ELNA_BYPASS_CMDID);
  34049. WMI_RETURN_STRING(WMI_GET_ELNA_BYPASS_CMDID);
  34050. WMI_RETURN_STRING(WMI_AUDIO_AGGR_ENABLE_CMDID);
  34051. WMI_RETURN_STRING(WMI_AUDIO_AGGR_ADD_GROUP_CMDID);
  34052. WMI_RETURN_STRING(WMI_AUDIO_AGGR_DEL_GROUP_CMDID);
  34053. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_RATE_CMDID);
  34054. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_RETRY_CMDID);
  34055. WMI_RETURN_STRING(WMI_AUDIO_AGGR_UPDATE_STA_GROUP_INFO_CMDID);
  34056. WMI_RETURN_STRING(WMI_CFR_CAPTURE_FILTER_CMDID);
  34057. WMI_RETURN_STRING(WMI_ATF_SSID_GROUPING_REQUEST_CMDID);
  34058. WMI_RETURN_STRING(WMI_ATF_GROUP_WMM_AC_CONFIG_REQUEST_CMDID);
  34059. WMI_RETURN_STRING(WMI_PEER_ATF_EXT_REQUEST_CMDID);
  34060. WMI_RETURN_STRING(WMI_GET_CHANNEL_ANI_CMDID);
  34061. WMI_RETURN_STRING(WMI_SET_OCL_CMDID);
  34062. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_AUTO_RATE_CMDID);
  34063. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_PROBE_CMDID);
  34064. WMI_RETURN_STRING(WMI_VDEV_AUDIO_SYNC_TRIGGER_CMDID);
  34065. WMI_RETURN_STRING(WMI_VDEV_AUDIO_SYNC_QTIMER_CMDID);
  34066. WMI_RETURN_STRING(WMI_ROAM_GET_SCAN_CHANNEL_LIST_CMDID);
  34067. WMI_RETURN_STRING(WMI_VDEV_GET_BIG_DATA_CMDID);
  34068. WMI_RETURN_STRING(WMI_PDEV_FRAME_INJECT_CMDID);
  34069. WMI_RETURN_STRING(WMI_PDEV_TBTT_OFFSET_SYNC_CMDID);
  34070. WMI_RETURN_STRING(WMI_VDEV_GET_BIG_DATA_P2_CMDID);
  34071. WMI_RETURN_STRING(WMI_AUDIO_AGGR_GET_STATISTICS_CMDID);
  34072. WMI_RETURN_STRING(WMI_AUDIO_AGGR_RESET_STATISTICS_CMDID);
  34073. WMI_RETURN_STRING(WMI_ANT_CONTROLLER_CMDID);
  34074. WMI_RETURN_STRING(WMI_SIMULATION_TEST_CMDID);
  34075. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_RTSCTS_CONFIG_CMDID);
  34076. WMI_RETURN_STRING(WMI_REQUEST_CTRL_PATH_STATS_CMDID);
  34077. WMI_RETURN_STRING(WMI_PDEV_GET_TPC_STATS_CMDID);
  34078. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_SCHED_METHOD_CMDID);
  34079. WMI_RETURN_STRING(WMI_AUDIO_AGGR_GET_SCHED_METHOD_CMDID);
  34080. WMI_RETURN_STRING(WMI_REQUEST_UNIFIED_LL_GET_STA_CMDID);
  34081. WMI_RETURN_STRING(WMI_QOS_NULL_FRAME_TX_SEND_CMDID);
  34082. WMI_RETURN_STRING(WMI_PDEV_ENABLE_DURATION_BASED_TX_MODE_SELECTION_CMDID);
  34083. WMI_RETURN_STRING(WMI_TWT_NUDGE_DIALOG_CMDID);
  34084. WMI_RETURN_STRING(WMI_VDEV_SET_TPC_POWER_CMDID);
  34085. WMI_RETURN_STRING(WMI_VDEV_TID_LATENCY_CONFIG_CMDID);
  34086. WMI_RETURN_STRING(WMI_PEER_TID_LATENCY_CONFIG_CMDID);
  34087. WMI_RETURN_STRING(WMI_MLO_LINK_SET_ACTIVE_CMDID);
  34088. WMI_RETURN_STRING(WMI_PDEV_GET_DPD_STATUS_CMDID);
  34089. WMI_RETURN_STRING(WMI_MLO_SETUP_CMDID);
  34090. WMI_RETURN_STRING(WMI_MLO_READY_CMDID);
  34091. WMI_RETURN_STRING(WMI_MLO_TEARDOWN_CMDID);
  34092. WMI_RETURN_STRING(WMI_VDEV_IGMP_OFFLOAD_CMDID);
  34093. WMI_RETURN_STRING(WMI_MGMT_RX_REO_FILTER_CONFIGURATION_CMDID);
  34094. WMI_RETURN_STRING(WMI_PDEV_SET_BIOS_SAR_TABLE_CMDID);
  34095. WMI_RETURN_STRING(WMI_PDEV_SET_BIOS_GEO_TABLE_CMDID);
  34096. WMI_RETURN_STRING(WMI_PDEV_GET_HALPHY_CAL_STATUS_CMDID);
  34097. WMI_RETURN_STRING(WMI_PDEV_SET_HALPHY_CAL_BMAP_CMDID);
  34098. WMI_RETURN_STRING(WMI_AFC_CMDID);
  34099. WMI_RETURN_STRING(WMI_PDEV_MULTIPLE_VDEV_SET_PARAM_CMDID);
  34100. WMI_RETURN_STRING(WMI_PDEV_MEC_AGING_TIMER_CONFIG_CMDID);
  34101. WMI_RETURN_STRING(WMI_PEER_CONFIG_PPE_DS_CMDID);
  34102. WMI_RETURN_STRING(WMI_VDEV_ENABLE_DISABLE_INTRA_BSS_CMDID);
  34103. WMI_RETURN_STRING(WMI_PEER_ENABLE_DISABLE_INTRA_BSS_CMDID);
  34104. WMI_RETURN_STRING(WMI_ROAM_MLO_CONFIG_CMDID);
  34105. WMI_RETURN_STRING(WMI_REQUEST_THERMAL_STATS_CMDID);
  34106. WMI_RETURN_STRING(WMI_PDEV_SET_BIOS_INTERFACE_CMDID);
  34107. WMI_RETURN_STRING(WMI_VDEV_SET_MU_SNIF_CMDID);
  34108. WMI_RETURN_STRING(WMI_VDEV_ICMP_OFFLOAD_CMDID);
  34109. WMI_RETURN_STRING(WMI_ROAM_SET_PARAM_CMDID);
  34110. WMI_RETURN_STRING(WMI_PDEV_FIPS_EXTEND_CMDID);
  34111. WMI_RETURN_STRING(WMI_PDEV_FIPS_MODE_SET_CMDID);
  34112. WMI_RETURN_STRING(WMI_SAWF_SVC_CLASS_CFG_CMDID);
  34113. WMI_RETURN_STRING(WMI_SAWF_SVC_CLASS_DISABLE_CMDID);
  34114. WMI_RETURN_STRING(WMI_VDEV_UPDATE_MAC_ADDR_CMDID);
  34115. WMI_RETURN_STRING(WMI_SOC_TQM_RESET_ENABLE_DISABLE_CMDID);
  34116. WMI_RETURN_STRING(WMI_VDEV_MULTIPLE_PEER_GROUP_CMDID);
  34117. WMI_RETURN_STRING(WMI_VDEV_SET_LTF_KEY_SEED_CMDID);
  34118. WMI_RETURN_STRING(WMI_RTT_PASN_AUTH_STATUS_CMD);
  34119. WMI_RETURN_STRING(WMI_RTT_PASN_DEAUTH_CMD);
  34120. WMI_RETURN_STRING(WMI_VDEV_PN_MGMT_RX_FILTER_CMDID);
  34121. WMI_RETURN_STRING(WMI_PEER_RX_PN_REQUEST_CMDID);
  34122. WMI_RETURN_STRING(WMI_SET_MULTIPLE_PDEV_VDEV_PARAM_CMDID);
  34123. WMI_RETURN_STRING(WMI_PMM_SCRATCH_REG_ALLOCATION_CMDID);
  34124. WMI_RETURN_STRING(WMI_MLO_PEER_TID_TO_LINK_MAP_CMDID);
  34125. WMI_RETURN_STRING(WMI_ROAM_ENABLE_VENDOR_CONTROL_CMDID);
  34126. WMI_RETURN_STRING(WMI_ROAM_GET_VENDOR_CONTROL_PARAM_CMDID);
  34127. WMI_RETURN_STRING(WMI_REQUEST_HALPHY_CTRL_PATH_STATS_CMDID);
  34128. WMI_RETURN_STRING(WMI_PEER_FLUSH_POLICY_CMDID);
  34129. WMI_RETURN_STRING(WMI_WOW_COAP_ADD_PATTERN_CMDID);
  34130. WMI_RETURN_STRING(WMI_WOW_COAP_DEL_PATTERN_CMDID);
  34131. WMI_RETURN_STRING(WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMDID);
  34132. WMI_RETURN_STRING(WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMDID);
  34133. WMI_RETURN_STRING(WMI_WOW_COAP_GET_BUF_INFO_CMDID);
  34134. WMI_RETURN_STRING(WMI_COEX_DBAM_CMDID);
  34135. WMI_RETURN_STRING(WMI_PDEV_FEATURESET_CMDID);
  34136. WMI_RETURN_STRING(WMI_VDEV_PARAM_ENABLE_SR_PROHIBIT_CMDID);
  34137. WMI_RETURN_STRING(WMI_XGAP_ENABLE_CMDID);
  34138. WMI_RETURN_STRING(WMI_PDEV_MESH_RX_FILTER_ENABLE_CMDID);
  34139. WMI_RETURN_STRING(WMI_MLO_LINK_REMOVAL_CMDID);
  34140. WMI_RETURN_STRING(WMI_MLO_AP_VDEV_TID_TO_LINK_MAP_CMDID);
  34141. WMI_RETURN_STRING(WMI_PDEV_DIV_GET_RSSI_ANTID_CMDID);
  34142. WMI_RETURN_STRING(WMI_PDEV_UPDATE_PMK_CACHE_CMDID);
  34143. WMI_RETURN_STRING(WMI_PDEV_UPDATE_FILS_HLP_PKT_CMDID);
  34144. WMI_RETURN_STRING(WMI_PDEV_SET_SRG_BSS_COLOR_BITMAP_CMDID);
  34145. WMI_RETURN_STRING(WMI_PDEV_SET_SRG_PARTIAL_BSSID_BITMAP_CMDID);
  34146. WMI_RETURN_STRING(WMI_PDEV_SET_SRG_OBSS_COLOR_ENABLE_BITMAP_CMDID);
  34147. WMI_RETURN_STRING(WMI_PDEV_SET_SRG_OBSS_BSSID_ENABLE_BITMAP_CMDID);
  34148. WMI_RETURN_STRING(WMI_PDEV_SET_NON_SRG_OBSS_COLOR_ENABLE_BITMAP_CMDID);
  34149. WMI_RETURN_STRING(WMI_PDEV_SET_NON_SRG_OBSS_BSSID_ENABLE_BITMAP_CMDID);
  34150. WMI_RETURN_STRING(WMI_VDEV_SET_PCL_CMDID);
  34151. WMI_RETURN_STRING(WMI_PEER_RESERVED0_CMDID);
  34152. WMI_RETURN_STRING(WMI_PEER_CFR_CAPTURE_CMDID);
  34153. WMI_RETURN_STRING(WMI_PEER_CONFIG_VLAN_CMDID);
  34154. WMI_RETURN_STRING(WMI_PEER_TX_FILTER_CMDID);
  34155. WMI_RETURN_STRING(WMI_BCN_OFFLOAD_CTRL_CMDID);
  34156. WMI_RETURN_STRING(WMI_PDEV_DFS_PHYERR_OFFLOAD_ENABLE_CMDID);
  34157. WMI_RETURN_STRING(WMI_PDEV_DFS_PHYERR_OFFLOAD_DISABLE_CMDID);
  34158. WMI_RETURN_STRING(WMI_VDEV_ADFS_CH_CFG_CMDID);
  34159. WMI_RETURN_STRING(WMI_VDEV_ADFS_OCAC_ABORT_CMDID);
  34160. WMI_RETURN_STRING(WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON_CMDID);
  34161. WMI_RETURN_STRING(WMI_REQUEST_RCPI_CMDID);
  34162. WMI_RETURN_STRING(WMI_WFA_CONFIG_CMDID);
  34163. WMI_RETURN_STRING(WMI_HB_OIC_PING_OFFLOAD_PARAM_CMDID);
  34164. WMI_RETURN_STRING(WMI_HB_OIC_PING_OFFLOAD_SET_ENABLE_CMDID);
  34165. WMI_RETURN_STRING(WMI_HB_DHCP_LEASE_RENEW_OFFLOAD_CMDID);
  34166. WMI_RETURN_STRING(WMI_RMC_SET_MANUAL_LEADER_CMDID);
  34167. WMI_RETURN_STRING(WMI_11D_SCAN_START_CMDID);
  34168. WMI_RETURN_STRING(WMI_11D_SCAN_STOP_CMDID);
  34169. WMI_RETURN_STRING(WMI_VENDOR_PDEV_CMDID);
  34170. WMI_RETURN_STRING(WMI_VENDOR_VDEV_CMDID);
  34171. WMI_RETURN_STRING(WMI_VENDOR_PEER_CMDID);
  34172. WMI_RETURN_STRING(WMI_VDEV_SET_TWT_EDCA_PARAMS_CMDID); /* XPAN TWT */
  34173. WMI_RETURN_STRING(WMI_ESL_EGID_CMDID);
  34174. WMI_RETURN_STRING(WMI_TDMA_SCHEDULE_REQUEST_CMDID);
  34175. WMI_RETURN_STRING(WMI_HPA_CMDID);
  34176. WMI_RETURN_STRING(WMI_PDEV_SET_TGTR2P_TABLE_CMDID); /* To set target rate to power table */
  34177. WMI_RETURN_STRING(WMI_MLO_VDEV_GET_LINK_INFO_CMDID);
  34178. WMI_RETURN_STRING(WMI_VDEV_SET_ULOFDMA_MANUAL_SU_TRIG_CMDID);
  34179. WMI_RETURN_STRING(WMI_VDEV_SET_ULOFDMA_MANUAL_MU_TRIG_CMDID);
  34180. WMI_RETURN_STRING(WMI_VDEV_STANDALONE_SOUND_CMDID);
  34181. WMI_RETURN_STRING(WMI_PDEV_SET_RF_PATH_CMDID); /* set RF path of PHY */
  34182. WMI_RETURN_STRING(WMI_VDEV_PAUSE_CMDID);
  34183. WMI_RETURN_STRING(WMI_GPIO_STATE_REQ_CMDID);
  34184. WMI_RETURN_STRING(WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID);
  34185. WMI_RETURN_STRING(WMI_MLO_LINK_RECOMMENDATION_CMDID);
  34186. WMI_RETURN_STRING(WMI_NAN_OEM_DATA_CMDID);
  34187. WMI_RETURN_STRING(WMI_PDEV_WSI_STATS_INFO_CMDID);
  34188. WMI_RETURN_STRING(WMI_CSA_EVENT_STATUS_INDICATION_CMDID);
  34189. WMI_RETURN_STRING(WMI_VDEV_SCHED_MODE_PROBE_REQ_CMDID);
  34190. WMI_RETURN_STRING(WMI_VDEV_OOB_CONNECTION_REQ_CMDID);
  34191. WMI_RETURN_STRING(WMI_AUDIO_TRANSPORT_SWITCH_RESP_STATUS_CMDID);
  34192. WMI_RETURN_STRING(WMI_PEER_MULTIPLE_REORDER_QUEUE_SETUP_CMDID);
  34193. WMI_RETURN_STRING(WMI_COEX_MULTIPLE_CONFIG_CMDID);
  34194. WMI_RETURN_STRING(WMI_PDEV_ENABLE_LED_BLINK_DOWNLOAD_TABLE_CMDID);
  34195. WMI_RETURN_STRING(WMI_PDEV_ENABLE_WIFI_RADAR_CMDID);
  34196. WMI_RETURN_STRING(WMI_VDEV_GET_TWT_SESSION_STATS_INFO_CMDID);
  34197. WMI_RETURN_STRING(WMI_PDEV_ENABLE_XLNA_CMDID);
  34198. WMI_RETURN_STRING(WMI_PDEV_SET_CUSTOM_TX_POWER_PER_MCS_CMDID);
  34199. WMI_RETURN_STRING(WMI_PEER_ACTIVE_TRAFFIC_MAP_CMDID);
  34200. WMI_RETURN_STRING(WMI_REQUEST_OPM_STATS_CMDID);
  34201. WMI_RETURN_STRING(WMI_SOC_TX_PACKET_CUSTOM_CLASSIFY_CMDID);
  34202. WMI_RETURN_STRING(WMI_SET_AP_SUSPEND_RESUME_CMDID);
  34203. WMI_RETURN_STRING(WMI_P2P_GO_DFS_AP_CONFIG_CMDID);
  34204. }
  34205. return (A_UINT8 *) "Invalid WMI cmd";
  34206. }
  34207. #endif /* WMI_CMD_STRINGS */
  34208. /** WMI commands/events for the regulatory offload */
  34209. /** Host indicating current country code to FW */
  34210. typedef struct {
  34211. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_current_country_cmd_fixed_param */
  34212. A_UINT32 pdev_id;
  34213. A_UINT32 new_alpha2; /** alpha2 characters representing the country code */
  34214. } wmi_set_current_country_cmd_fixed_param;
  34215. typedef enum {
  34216. WMI_COUNTRYCODE_ALPHA2,
  34217. WMI_COUNTRYCODE_COUNTRY_ID,
  34218. WMI_COUNTRYCODE_DOMAIN_CODE,
  34219. } WMI_COUNTRYCODE_TYPE;
  34220. typedef struct {
  34221. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_init_country_cmd_fixed_param */
  34222. A_UINT32 pdev_id;
  34223. A_UINT32 countrycode_type; /* WMI_COUNTRYCODE_TYPE */
  34224. union {
  34225. struct {
  34226. /* Three character for alpha2. The first two is ISO name for country the last one
  34227. present if it is indoor and out door. First char in bits 7:0 and second char in bits 15:8 ... */
  34228. A_UINT32 alpha2:24,
  34229. unused:8;
  34230. };
  34231. A_UINT32 country_id; /* Country ID */
  34232. A_UINT32 domain_code; /* Domain code */
  34233. } country_code;
  34234. } wmi_set_init_country_cmd_fixed_param;
  34235. typedef enum {
  34236. /**
  34237. * serv_resp_format_type will indicate the format in which afc_serv data
  34238. * is written into host/target shared memory
  34239. * This type can be expanded in future as per requirements.
  34240. */
  34241. AFC_SERV_RESP_FORMAT_JSON = 0,
  34242. AFC_SERV_RESP_FORMAT_BINARY = 1,
  34243. AFC_SERV_RESP_FORMAT_IGNORE = 2, /* When cmd type is reset,server response is set to FORMAT_IGNORE */
  34244. } WMI_AFC_SERV_RESP_FORMAT_TYPE;
  34245. typedef enum {
  34246. /**
  34247. * wmi_afc_cmd_type will indicate type of AFC command sent to FW.
  34248. * Once AFC server writes data at TZ memory location SERV_RESP_READY
  34249. * type command is sent to FW.
  34250. * This type can be expanded in future as per requirements.
  34251. */
  34252. WMI_AFC_CMD_SERV_RESP_READY = 1,
  34253. WMI_AFC_CMD_RESET = 2, /* Added cmd type to handle AFC reset */
  34254. WMI_AFC_CMD_CLEAR_PAYLOAD = 3, /* Added cmd type to clear AFC response payload in proxy mode */
  34255. } WMI_AFC_CMD_TYPE;
  34256. /** Host indicating AFC info availability to FW */
  34257. typedef struct {
  34258. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_afc_cmd_fixed_param */
  34259. A_UINT32 pdev_id;
  34260. A_UINT32 cmd_type; /* refer WMI_AFC_CMD_TYPE */
  34261. A_UINT32 serv_resp_format; /* refer WMI_AFC_SERV_RESP_FORMAT_TYPE */
  34262. } wmi_afc_cmd_fixed_param;
  34263. /** Host indicates AFC info availability to FW using WMI_AFC_CMD
  34264. * This AFC info is written by AFC application/ server in host/target
  34265. * shared memory reserved during bootup.
  34266. * The structure is placeholder, indicating way afc_serv_resp is written in FW.
  34267. * This structure will not be attach as input to WMI command.
  34268. * This structure will be common to both host and FW.
  34269. * The structure of this WMI AFC info is as follows.
  34270. */
  34271. typedef struct {
  34272. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_afc_serv_resp_struct */
  34273. A_UINT32 status; /* validity flag to be updated by TZ/ PF stub layer,
  34274. * to indicate if payload is valid or not.
  34275. * status = 1 will indicate payload is valid. */
  34276. A_UINT32 time_to_live; /* Total time for which this AFC info is valid in seconds */
  34277. A_UINT32 length; /* length of the payload, in bytes */
  34278. A_UINT32 payload_format; /* The format of payload written in FW memory:
  34279. * 0 -> JSON format
  34280. * 1 -> Binary format
  34281. * Refer to WMI_AFC_SERV_RESP_FORMAT_TYPE.
  34282. */
  34283. /*
  34284. * The structure above is followed by array of char which will have
  34285. * JSON string or binary data, as specified by the payload_format field.
  34286. * A_CHAR bufp[]; AFC payload (JSON string or binary data)
  34287. */
  34288. } wmi_afc_serv_resp_struct;
  34289. /*
  34290. * The following structures define the format used for AFC binary data objects
  34291. * shared by the host SW and target FW.
  34292. * FW expects these structures to be written in shared memory in little-endian
  34293. * format. If the host/AFC app uses big endian format, Host/APP needs to
  34294. * byteswap the data, so FW will get data in the expected little-endian format.
  34295. */
  34296. typedef struct {
  34297. A_UINT32 freq_info; /* bits 15:0 = u16 start_freq,
  34298. * bits 31:16 = u16 end_freq
  34299. * both in MHz units
  34300. */
  34301. A_INT32 max_psd; /* Maximum PSD in dBm/MHz, value is stored in 0.01 dBm/MHz steps */
  34302. } afc_freq_info;
  34303. typedef struct {
  34304. A_UINT32 channel_cfi; /* channel center frequency index */
  34305. /*
  34306. * maximum permissible EIRP available for above CFI in dBm,
  34307. * value is stored in 0.01 dBm steps.
  34308. * Note: This A_UINT32 field can receive negative EIRP value from AFC
  34309. * server. These negative EIRP value cases are handled internally.
  34310. */
  34311. A_UINT32 max_eirp_pwr;
  34312. } afc_eirp_info;
  34313. typedef struct {
  34314. A_UINT32 global_operating_class;
  34315. A_UINT32 num_channels; /* num of valid channels for above global operating class */
  34316. /* This structure is followed by (num_channels*sizeof(afc_eirp_info))
  34317. * bytes array:
  34318. * afc_eirp_info eirp_info[num_channels];
  34319. * List of channel cfi and eirp power values,
  34320. * Total size will be num_channels * sizeof(afc_eirp_info)
  34321. */
  34322. } afc_channel_info;
  34323. /*
  34324. * For case of afc_server_resp containing binary payload, the buf pointer
  34325. * in wmi_afc_serv_resp_struct will be poiniting to binary format payload
  34326. * which is in the format defined below.
  34327. */
  34328. typedef struct {
  34329. A_UINT32 local_error_code; /* Internal error code between AFC app and target success = 0, General failure = 1 */
  34330. A_UINT32 version; /* Internal version between AFC app and Target for structure pattern */
  34331. A_UINT32 afc_wfa_version; /* Version defined in AFC spec document. bits 15:0 -- minor version & bits 31:16 -- major version */
  34332. A_UINT32 request_id; /* AFC unique request ID */
  34333. A_UINT32 avail_exp_time_d; /* avail_exp_time_d and avail_exp_time_t are in UTC
  34334. * Availability expiry time date format: YYYY-MM-DD,
  34335. * bits 7:0 -DD - Day (expected values 1-31)
  34336. * bits 15:8 -MM - Month (expected values 1-12)
  34337. * bits 31:16 -YYYY - Year
  34338. */
  34339. A_UINT32 avail_exp_time_t; /* Availability expiry time format HH-MM-SS
  34340. * bits 7:0 -SS - Time in Sec (expected values 0-59)
  34341. * bits 15:8 -MM - Minute (expected values 0-59)
  34342. * bits 23:16 -HH - Hour (expected values 0-23)
  34343. * bits 31:24 -reserved
  34344. */
  34345. A_INT32 afc_serv_resp_code; /* response code defined in afc wfa document, refer WMI_AFC_SERV_RESP_CODE */
  34346. A_UINT32 num_frequency_obj; /* Total number of frequency objects */
  34347. A_UINT32 num_channel_obj; /* Total number of frequency objects */
  34348. char shortdesc[64]; /* This field represents a short description related to the result indicated by the response_code
  34349. * field. End of description will be indicated by 0 */
  34350. A_UINT32 reserved[2]; /* reserve space for future fields - needs to be set to 0x0 */
  34351. /*
  34352. * This structure is followed by an array of frequency info and
  34353. * channel info array:
  34354. * - afc_freq_info freq_info[num_frequency_obj];
  34355. * List of frequency power values, total size will be
  34356. * num_frequency_obj * sizeof(afc_freq_info)
  34357. * - afc_channel_info chan_info[num_channel_obj];
  34358. * List of channel power values, total size will be
  34359. * num_channel_obj * sizeof(afc_channel_info)
  34360. */
  34361. } afc_spectrum_inquiry_resp_bin_type;
  34362. typedef struct {
  34363. /** TLV tag and len; tag equals
  34364. * WMITLV_TAG_STRUC_wmi_vdev_enable_disable_intra_bss_cmd_fixed_param
  34365. */
  34366. A_UINT32 tlv_header;
  34367. /** The corresponding vdev_id.
  34368. */
  34369. A_UINT32 vdev_id;
  34370. /* Enable/Disable intra_bss.
  34371. */
  34372. A_UINT32 enable;
  34373. } wmi_vdev_enable_disable_intra_bss_cmd_fixed_param;
  34374. typedef struct {
  34375. /** TLV tag and len; tag equals
  34376. * WMITLV_TAG_STRUC_wmi_peer_enable_disable_intra_bss_cmd_fixed_param
  34377. */
  34378. A_UINT32 tlv_header;
  34379. /** Mac Address of the peer.
  34380. */
  34381. wmi_mac_addr mac_addr;
  34382. /** The corresponding vdev_id.
  34383. */
  34384. A_UINT32 vdev_id;
  34385. /* Enable/Disable intra_bss.
  34386. */
  34387. A_UINT32 enable;
  34388. } wmi_peer_enable_disable_intra_bss_cmd_fixed_param;
  34389. /* Freq units in MHz */
  34390. #define WMI_REG_RULE_START_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 0, 16)
  34391. #define WMI_REG_RULE_START_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 0, 16, value)
  34392. #define WMI_REG_RULE_END_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 16, 16)
  34393. #define WMI_REG_RULE_END_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 16, 16, value)
  34394. /* BW in MHz */
  34395. #define WMI_REG_RULE_MAX_BW_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 0, 16)
  34396. #define WMI_REG_RULE_MAX_BW_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 0, 16, value)
  34397. /* regpower in dBm */
  34398. #define WMI_REG_RULE_REG_POWER_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 16, 8)
  34399. #define WMI_REG_RULE_REG_POWER_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 16, 8, value)
  34400. /* antenna gain */
  34401. #define WMI_REG_RULE_ANTENNA_GAIN_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 24, 8)
  34402. #define WMI_REG_RULE_ANTENNA_GAIN_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 24, 8, value)
  34403. typedef enum {
  34404. WMI_REG_FLAG_CHAN_NO_IR = 0x0001, /* passive channel */
  34405. WMI_REG_FLAG_CHAN_RADAR = 0x0002, /* dfs channel */
  34406. WMI_REG_FLAG_CHAN_NO_OFDM = 0x0004, /* no ofdm channel */
  34407. WMI_REG_FLAG_CHAN_INDOOR_ONLY = 0x0008, /* indoor only channel */
  34408. } WMI_REGULATORY_FLAGS;
  34409. #define WMI_REG_RULE_FLAGS_GET(flag_info) WMI_GET_BITS(flag_info, 0, 16)
  34410. #define WMI_REG_RULE_FLAGS_SET(flag_info, value) WMI_SET_BITS(flag_info, 0, 16, value)
  34411. typedef struct {
  34412. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_rule_struct */
  34413. A_UINT32 freq_info; /* bits 15:0 = u16 start_freq,
  34414. * bits 31:16 = u16 end_freq
  34415. * (both in MHz units) */
  34416. A_UINT32 bw_pwr_info; /* bits 15:0 = u16 max_bw (MHz units),
  34417. bits 23:16 = u8 reg_power (dBm units),
  34418. bits 31:24 = u8 ant_gain (dB units) */
  34419. A_UINT32 flag_info; /* bits 15:0 = u16 flags,
  34420. bits 31:16 reserved */
  34421. } wmi_regulatory_rule_struct;
  34422. #define WMI_REG_RULE_PSD_FLAG_GET(psd_power_info) \
  34423. WMI_GET_BITS(psd_power_info, 0, 1)
  34424. #define WMI_REG_RULE_PSD_FLAG_SET(psd_power_info, value) \
  34425. WMI_SET_BITS(psd_power_info, 0, 1, value)
  34426. #define WMI_REG_RULE_PSD_EIRP_GET(psd_power_info) \
  34427. WMI_GET_BITS(psd_power_info, 16, 16)
  34428. #define WMI_REG_RULE_PSD_EIRP_SET(psd_power_info, value) \
  34429. WMI_SET_BITS(psd_power_info, 16, 16, value)
  34430. typedef struct {
  34431. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_rule_ext_struct */
  34432. A_UINT32 freq_info; /* bits 15:0 = u16 start_freq,
  34433. bits 31:16 = u16 end_freq
  34434. (both in MHz units)
  34435. use same MACRO as wmi_regulatory_rule_struct
  34436. */
  34437. A_UINT32 bw_pwr_info; /* bits 15:0 = u16 max_bw (MHz units),
  34438. bits 23:16 = u8 reg_power (dBm units),
  34439. bits 31:24 = u8 ant_gain (dB units)
  34440. use same MACRO as wmi_regulatory_rule_struct
  34441. */
  34442. A_UINT32 flag_info; /* bits 15:0 = u16 flags,
  34443. bits 31:16 reserved
  34444. use same MACRO as wmi_regulatory_rule_struct
  34445. */
  34446. A_UINT32 psd_power_info; /* bits 0 - whether PSD power,
  34447. bits 15:1 - reserved
  34448. bits 31:16 - maximum PSD EIRP (dB/MHz)
  34449. */
  34450. /*
  34451. * NOTE: no further fields can be added into this struct, due to
  34452. * message buffer size limitations in certain targets for the
  34453. * WMI_REG_CHAN_LIST_CC_EXT_EVENT message.
  34454. */
  34455. } wmi_regulatory_rule_ext_struct;
  34456. #define WMI_REG_CHAN_PRIORITY_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 0, 16)
  34457. #define WMI_REG_CHAN_PRIORITY_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 0, 16, value)
  34458. typedef struct {
  34459. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_chan_priority_struct */
  34460. A_UINT32 freq_info;
  34461. /* freq_info:
  34462. * bits 15:0 = u16 Cutoff Frequency value for Prioritization (in MHz units)
  34463. * The frequencies above this value will be prioritized and
  34464. * the frequencies below this value will be de-prioritized.
  34465. * bits 31:16 = reserved for future
  34466. */
  34467. /*
  34468. * NOTE: no further fields can be added into this struct, due to
  34469. * message buffer size limitations in certain targets for the
  34470. * WMI_REG_CHAN_LIST_CC_EXT_EVENT message.
  34471. */
  34472. } wmi_regulatory_chan_priority_struct;
  34473. #define WMI_REG_FCC_RULE_CHAN_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 0, 16)
  34474. #define WMI_REG_FCC_RULE_CHAN_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 0, 16, value)
  34475. #define WMI_REG_FCC_RULE_FCC_TX_POWER_GET(freq_info) WMI_GET_BITS(freq_info, 16, 8)
  34476. #define WMI_REG_FCC_RULE_FCC_TX_POWER_SET(freq_info, value) WMI_SET_BITS(freq_info, 16, 8, value)
  34477. typedef struct {
  34478. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_fcc_rule_struct */
  34479. A_UINT32 freq_info;
  34480. /* freq_info:
  34481. * bits 15:0 = u16 channel frequency (in MHz units)
  34482. * bits 23:16 = u8 FCC_Tx_power (dBm units)
  34483. * bits 31:24 = u8 reserved for future
  34484. */
  34485. /*
  34486. * NOTE: no further fields can be added into this struct, due to
  34487. * message buffer size limitations in certain targets for the
  34488. * WMI_REG_CHAN_LIST_CC_EXT_EVENT message.
  34489. */
  34490. } wmi_regulatory_fcc_rule_struct;
  34491. typedef enum {
  34492. WMI_REG_DFS_UNINIT_REGION = 0,
  34493. WMI_REG_DFS_FCC_REGION = 1,
  34494. WMI_REG_DFS_ETSI_REGION = 2,
  34495. WMI_REG_DFS_MKK_REGION = 3,
  34496. WMI_REG_DFS_CN_REGION = 4,
  34497. WMI_REG_DFS_KR_REGION = 5,
  34498. /* Add new items above */
  34499. WMI_REG_DFS_UNDEF_REGION = 0xFFFF,
  34500. } WMI_REG_DFS_REGION;
  34501. typedef enum {
  34502. WMI_REGULATORY_PHYMODE_NO11A = 0x0001, /* NO 11A */
  34503. WMI_REGULATORY_PHYMODE_NO11B = 0x0002, /* NO 11B */
  34504. WMI_REGULATORY_PHYMODE_NO11G = 0x0004, /* NO 11G */
  34505. WMI_REGULATORY_PHYMODE_NO11N = 0x0008, /* NO 11N */
  34506. WMI_REGULATORY_PHYMODE_NO11AC = 0x0010, /* NO 11AC */
  34507. WMI_REGULATORY_PHYMODE_NO11AX = 0x0020, /* NO 11AX */
  34508. WMI_REGULATORY_PHYMODE_NO11BE = 0x0040, /* NO 11BE */
  34509. } WMI_REGULATORY_PHYBITMAP;
  34510. typedef enum {
  34511. WMI_REG_SET_CC_STATUS_PASS = 0,
  34512. WMI_REG_CURRENT_ALPHA2_NOT_FOUND = 1,
  34513. WMI_REG_INIT_ALPHA2_NOT_FOUND = 2,
  34514. WMI_REG_SET_CC_CHANGE_NOT_ALLOWED = 3,
  34515. WMI_REG_SET_CC_STATUS_NO_MEMORY = 4,
  34516. WMI_REG_SET_CC_STATUS_FAIL = 5,
  34517. } WMI_REG_SET_CC_STATUS_CODE;
  34518. typedef struct {
  34519. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_event_fixed_param */
  34520. A_UINT32 status_code; /* WMI_REG_SET_CC_STATUS_CODE */
  34521. A_UINT32 phy_id;
  34522. A_UINT32 alpha2;
  34523. A_UINT32 num_phy;
  34524. A_UINT32 country_id;
  34525. A_UINT32 domain_code;
  34526. A_UINT32 dfs_region; /* WMI_REG_DFS_REGION */
  34527. A_UINT32 phybitmap; /* WMI_REGULATORY_PHYBITMAP */
  34528. A_UINT32 min_bw_2g; /* BW in MHz */
  34529. A_UINT32 max_bw_2g; /* BW in MHz */
  34530. A_UINT32 min_bw_5g; /* BW in MHz */
  34531. A_UINT32 max_bw_5g; /* BW in MHz */
  34532. A_UINT32 num_2g_reg_rules;
  34533. A_UINT32 num_5g_reg_rules;
  34534. /*
  34535. * followed by wmi_regulatory_rule_struct TLV array. First 2G and then 5G
  34536. * - wmi_regulatory_fcc_rule_struct reg_fcc_rule[]
  34537. */
  34538. } wmi_reg_chan_list_cc_event_fixed_param;
  34539. typedef enum {
  34540. WMI_REG_CLIENT_REGULAR = 0,
  34541. WMI_REG_CLIENT_SUBORDINATE = 1,
  34542. /* 2 and 3 are reserved for future growth */
  34543. WMI_REG_CLIENT_MAX = 4, /* can't expand, b/c used as array length below */
  34544. } wmi_reg_client_type;
  34545. typedef struct {
  34546. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_event_ext_fixed_param */
  34547. A_UINT32 status_code; /* WMI_REG_SET_CC_STATUS_CODE */
  34548. A_UINT32 phy_id;
  34549. A_UINT32 alpha2;
  34550. A_UINT32 num_phy;
  34551. A_UINT32 country_id; /* uses CountryCode enum values */
  34552. A_UINT32 domain_code; /* used EnumRd enum values */
  34553. A_UINT32 dfs_region; /* WMI_REG_DFS_REGION */
  34554. A_UINT32 phybitmap; /* WMI_REGULATORY_PHYBITMAP */
  34555. A_UINT32 min_bw_2g; /* BW in MHz */
  34556. A_UINT32 max_bw_2g; /* BW in MHz */
  34557. A_UINT32 min_bw_5g; /* BW in MHz */
  34558. A_UINT32 max_bw_5g; /* BW in MHz */
  34559. A_UINT32 num_2g_reg_rules;
  34560. A_UINT32 num_5g_reg_rules;
  34561. A_UINT32 client_type; /* populated if device can function as client */
  34562. A_UINT32 rnr_tpe_usable; /* If RNR TPE Octet usable for that country */
  34563. A_UINT32 unspecified_ap_usable; /* If unspecified AP usable for that country */
  34564. A_UINT32 domain_code_6g_ap_lpi;
  34565. A_UINT32 domain_code_6g_ap_sp;
  34566. A_UINT32 domain_code_6g_ap_vlp;
  34567. A_UINT32 domain_code_6g_client_lpi[WMI_REG_CLIENT_MAX];
  34568. A_UINT32 domain_code_6g_client_sp[WMI_REG_CLIENT_MAX];
  34569. A_UINT32 domain_code_6g_client_vlp[WMI_REG_CLIENT_MAX];
  34570. A_UINT32 domain_code_6g_super_id;
  34571. A_UINT32 min_bw_6g_ap_sp; /* MHz */
  34572. A_UINT32 max_bw_6g_ap_sp;
  34573. A_UINT32 min_bw_6g_ap_lpi;
  34574. A_UINT32 max_bw_6g_ap_lpi;
  34575. A_UINT32 min_bw_6g_ap_vlp;
  34576. A_UINT32 max_bw_6g_ap_vlp;
  34577. A_UINT32 min_bw_6g_client_sp[WMI_REG_CLIENT_MAX];
  34578. A_UINT32 max_bw_6g_client_sp[WMI_REG_CLIENT_MAX];
  34579. A_UINT32 min_bw_6g_client_lpi[WMI_REG_CLIENT_MAX];
  34580. A_UINT32 max_bw_6g_client_lpi[WMI_REG_CLIENT_MAX];
  34581. A_UINT32 min_bw_6g_client_vlp[WMI_REG_CLIENT_MAX];
  34582. A_UINT32 max_bw_6g_client_vlp[WMI_REG_CLIENT_MAX];
  34583. A_UINT32 num_6g_reg_rules_ap_sp;
  34584. A_UINT32 num_6g_reg_rules_ap_lpi;
  34585. A_UINT32 num_6g_reg_rules_ap_vlp;
  34586. A_UINT32 num_6g_reg_rules_client_sp[WMI_REG_CLIENT_MAX];
  34587. A_UINT32 num_6g_reg_rules_client_lpi[WMI_REG_CLIENT_MAX];
  34588. A_UINT32 num_6g_reg_rules_client_vlp[WMI_REG_CLIENT_MAX];
  34589. /*
  34590. * NOTE: no further fields can be added into this struct, due to
  34591. * message buffer size limitations in certain targets for the
  34592. * WMI_REG_CHAN_LIST_CC_EXT_EVENT message.
  34593. */
  34594. /*
  34595. * This fixed_param TLV is followed by the following TLVs:
  34596. * - wmi_regulatory_rule_ext reg_rule_array[] struct TLV array.
  34597. * Within the reg rule ext TLV array, the 2G elements occur first,
  34598. * then the 5G elements, then the 6G elements (AP LPI, AP SP, AP VLP,
  34599. * client LPI x4, client SP x4, client VLP x4).
  34600. * - wmi_regulatory_chan_priority_struct reg_chan_priority[]
  34601. * - wmi_regulatory_fcc_rule_struct reg_fcc_rule[]
  34602. * - wmi_reg_chan_list_cc_ext_additional_params reg_more_data[]
  34603. * struct used to fill more fixed additional data, as existing
  34604. * fixed_param TLV struct can't be extended.
  34605. * - wmi_regulatory_rule_meta_data reg_meta_data[]
  34606. * struct used to fill meta information specific to new reg rules
  34607. * getting added(i.e. from C2C onwards).
  34608. */
  34609. } wmi_reg_chan_list_cc_event_ext_fixed_param;
  34610. #define WMI_REG_CAPS_C2C_SUPPORT_GET(additional_regulatory_capabilities) \
  34611. WMI_GET_BITS(additional_regulatory_capabilities, 0, 1)
  34612. #define WMI_REG_CAPS_C2C_SUPPORT_SET(additional_regulatory_capabilities, value) \
  34613. WMI_SET_BITS(additional_regulatory_capabilities, 0, 1, value)
  34614. typedef struct {
  34615. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_ext_additional_params */
  34616. /* additional_regulatory_capabilities:
  34617. * bit 0 - whether C2C supported
  34618. * bits 31:1 - reserved
  34619. */
  34620. A_UINT32 additional_regulatory_capabilities;
  34621. } wmi_reg_chan_list_cc_ext_additional_params;
  34622. typedef enum {
  34623. WMI_REG_RULE_TYPE_indoor_enabled_ap,
  34624. WMI_REG_RULE_TYPE_indoor_enabled_def_cli,
  34625. WMI_REG_RULE_TYPE_indoor_enabled_sub_cli,
  34626. WMI_REG_RULE_TYPE_MAX,
  34627. } WMI_REG_RULE_TYPE;
  34628. typedef struct {
  34629. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_rule_meta_data */
  34630. A_UINT32 reg_rule_type; /* Refer enum WMI_REG_RULE_TYPE */
  34631. A_UINT32 domain_code_6ghz;
  34632. A_UINT32 min_bw_6ghz; /* units = MHz */
  34633. A_UINT32 max_bw_6ghz; /* units = MHz */
  34634. A_UINT32 num_6ghz_reg_rules;
  34635. } wmi_regulatory_rule_meta_data;
  34636. /* WFA AFC Version */
  34637. #define WMI_AFC_WFA_MINOR_VERSION_GET(afc_wfa_version) WMI_GET_BITS(afc_wfa_version, 0, 16)
  34638. #define WMI_AFC_WFA_MINOR_VERSION_SET(afc_wfa_version, value) WMI_SET_BITS(afc_wfa_version, 0, 16, value)
  34639. #define WMI_AFC_WFA_MAJOR_VERSION_GET(afc_wfa_version) WMI_GET_BITS(afc_wfa_version, 16, 16)
  34640. #define WMI_AFC_WFA_MAJOR_VERSION_SET(afc_wfa_version, value) WMI_SET_BITS(afc_wfa_version, 16, 16, value)
  34641. /* avail_exp_time_d time is expected as YYYY-MM-DD */
  34642. #define WMI_AVAIL_EXPIRY_TIME_DAY_GET(avail_exp_time_d) WMI_GET_BITS(avail_exp_time_d, 0, 8)
  34643. #define WMI_AVAIL_EXPIRY_TIME_DAY_SET(avail_exp_time_d, value) WMI_SET_BITS(avail_exp_time_d, 0, 8, value)
  34644. #define WMI_AVAIL_EXPIRY_TIME_MONTH_GET(avail_exp_time_d) WMI_GET_BITS(avail_exp_time_d, 8, 8)
  34645. #define WMI_AVAIL_EXPIRY_TIME_MONTH_SET(avail_exp_time_d, value) WMI_SET_BITS(avail_exp_time_d, 8, 8, value)
  34646. #define WMI_AVAIL_EXPIRY_TIME_YEAR_GET(avail_exp_time_d) WMI_GET_BITS(avail_exp_time_d, 16, 16)
  34647. #define WMI_AVAIL_EXPIRY_TIME_YEAR_SET(avail_exp_time_d, value) WMI_SET_BITS(avail_exp_time_d, 16, 16, value)
  34648. /* avail_exp_time_t time is expected as HH-MM-SS */
  34649. #define WMI_AVAIL_EXPIRY_TIME_SEC_GET(avail_exp_time_t) WMI_GET_BITS(avail_exp_time_t, 0, 8)
  34650. #define WMI_AVAIL_EXPIRY_TIME_SEC_SET(avail_exp_time_t, value) WMI_SET_BITS(avail_exp_time_t, 0, 8, value)
  34651. #define WMI_AVAIL_EXPIRY_TIME_MINUTE_GET(avail_exp_time_t) WMI_GET_BITS(avail_exp_time_t, 8, 8)
  34652. #define WMI_AVAIL_EXPIRY_TIME_MINUTE_SET(avail_exp_time_t, value) WMI_SET_BITS(avail_exp_time_t, 8, 8, value)
  34653. #define WMI_AVAIL_EXPIRY_TIME_HOUR_GET(avail_exp_time_t) WMI_GET_BITS(avail_exp_time_t, 16, 8)
  34654. #define WMI_AVAIL_EXPIRY_TIME_HOUR_SET(avail_exp_time_t, value) WMI_SET_BITS(avail_exp_time_t, 16, 8, value)
  34655. typedef enum {
  34656. /**
  34657. * The following event type is mutually exclusive.
  34658. * afc_event_type will indicate type of AFC event sent from FW to host.
  34659. * 1. For sending Power Info WMI_AFC_EVENT_POWER_INFO event is used.
  34660. * 2. For sending AFC expiry use WMI_AFC_EVENT_TIMER_EXPIRY
  34661. * This type can be expanded in future as per requirements.
  34662. */
  34663. WMI_AFC_EVENT_POWER_INFO = 1,
  34664. WMI_AFC_EVENT_TIMER_EXPIRY = 2,
  34665. } WMI_AFC_EVENT_TYPE;
  34666. typedef enum {
  34667. /**
  34668. * The following afc_expiry_event_subtype is mutually exclusive
  34669. * and is a part of expiry event.
  34670. * 1. At boot up AFC expiry will contain AFC start.
  34671. * 2. If AFC timer expires AFC_RENEW status code will be sent to host
  34672. * with expiry event.
  34673. * 3. If AFC server is not responding to FW in specified time, FW will
  34674. * indicate host to switch to LPI.
  34675. * 4. In SP mode, if AFC server is not responding to FW in
  34676. * specified time then FW will indicate host to stop TX since
  34677. * there are no lower power mode available.
  34678. */
  34679. WMI_AFC_EXPIRY_EVENT_START = 1,
  34680. WMI_AFC_EXPIRY_EVENT_RENEW = 2,
  34681. WMI_AFC_EXPIRY_EVENT_SWITCH_TO_LOW_POWER_MODE = 3,
  34682. /* retain the deprecated old name as an alias for the new name */
  34683. WMI_AFC_EXPIRY_EVENT_SWITCH_TO_LPI =
  34684. WMI_AFC_EXPIRY_EVENT_SWITCH_TO_LOW_POWER_MODE,
  34685. WMI_AFC_EXPIRY_EVENT_STOP_TX = 4,
  34686. } WMI_AFC_EXPIRY_EVENT_SUBTYPE;
  34687. typedef enum {
  34688. /**
  34689. * The following fw_status_code is mutually exclusive
  34690. * and is used in power event.
  34691. * 0. AFC power event is success.
  34692. * 1. If Host does not indicate AFC indication cmd within certain time
  34693. * of AFC expiry FW_AFC_POWER_EVENT_RESP_NOT_RECEIVED will be used.
  34694. * 2. If FW is not able to parse afc_info, parsing_failure will be
  34695. * indicated using WMI_FW_AFC_POWER_EVENT_RESP_NOT_RECEIVED.
  34696. * 3. If due to some local reason AFC event is failed, AFC event failure
  34697. * is indicated using WMI_FW_AFC_POWER_EVENT_FAILURE.
  34698. */
  34699. WMI_FW_AFC_POWER_EVENT_SUCCESS = 0,
  34700. WMI_FW_AFC_POWER_EVENT_RESP_NOT_RECEIVED = 1,
  34701. WMI_FW_AFC_POWER_EVENT_RESP_PARSING_FAILURE = 2,
  34702. WMI_FW_AFC_POWER_EVENT_FAILURE = 3,
  34703. } WMI_FW_AFC_POWER_EVENT_STATUS_CODE;
  34704. typedef enum {
  34705. /**
  34706. * The following afc_server_resp_code is mutually exclusive.
  34707. * This response code will be indicated to AFC server.
  34708. * These codes are defined in WIFI spec doc for AFC as follows
  34709. * -1: General Failure
  34710. * 0: Success
  34711. * 100 - 199: General errors related to the protocol
  34712. * 300 - 399: Error events specific to message exchange for the
  34713. * Available Spectrum Inquiry
  34714. */
  34715. WMI_AFC_SERV_RESP_GENERAL_FAILURE = -1,
  34716. WMI_AFC_SERV_RESP_SUCCESS = 0,
  34717. WMI_AFC_SERV_RESP_VERSION_NOT_SUPPORTED = 100,
  34718. WMI_AFC_SERV_RESP_DEVICE_UNALLOWED = 101,
  34719. WMI_AFC_SERV_RESP_MISSING_PARAM = 102,
  34720. WMI_AFC_SERV_RESP_INVALID_VALUE = 103,
  34721. WMI_AFC_SERV_RESP_UNEXPECTED_PARAM = 106,
  34722. WMI_AFC_SERV_RESP_UNSUPPORTED_SPECTRUM = 300,
  34723. } WMI_AFC_SERV_RESP_CODE;
  34724. typedef struct {
  34725. /** TLV tag and len;
  34726. * tag equals WMITLV_TAG_STRUC_wmi_afc_event_fixed_param */
  34727. A_UINT32 tlv_header;
  34728. A_UINT32 phy_id;
  34729. A_UINT32 event_type; /* refer to WMI_AFC_EVENT_TYPE */
  34730. /** This TLV is (optionally) followed by TLV and TLV arrays containing
  34731. * different afc_event:
  34732. * 1. wmi_afc_expiry_event_param expiry_evt;
  34733. * This TLV contains afc_expiry_event_param of fixed size.
  34734. * 2. wmi_reg_afc_power_event_param afc_power_event;
  34735. * This TLV contains afc_power_info_param of fixed size.
  34736. * 3. wmi_6g_afc_frequency_info freq_info[]
  34737. * This TLV array contains zero or more TLVs of freq_info,
  34738. * which contain freq range and PSD.
  34739. * 4. wmi_6g_afc_channel_info channel_info[]
  34740. * This TLV array contains zero or more TLVs of global_operating
  34741. * class and number of channel
  34742. * in each global operating class
  34743. * 5. wmi_afc_chan_eirp_power_info chan_eirp_power_info[]
  34744. * This TLV array contains zero or more TLVs of channel CFI and
  34745. * EIRP power values for each of the total number of channels
  34746. * per global operating class.
  34747. */
  34748. } wmi_afc_event_fixed_param;
  34749. typedef struct {
  34750. /** TLV tag and len;
  34751. * tag equals WMITLV_TAG_STRUC_wmi_afc_expiry_event_param.
  34752. */
  34753. A_UINT32 tlv_header;
  34754. A_UINT32 request_id; /* AFC unique Request ID for AFC expiry event, This is Nonce generated by FW for freshness */
  34755. A_UINT32 event_subtype; /* refer to WMI_AFC_EXPIRY_EVENT_SUBTYPE */
  34756. A_UINT32 afc_wfa_version; /* bits 15:0 -- minor version
  34757. * bits 31:16 -- major version
  34758. * WMI_AFC_WFA_MINOR_VERSION_GET &
  34759. * WMI_AFC_WFA_MAJOR_VERSION_GET
  34760. */
  34761. } wmi_afc_expiry_event_param;
  34762. typedef struct {
  34763. /** TLV tag and len;
  34764. *tag equals WMITLV_TAG_STRUC_wmi_afc_power_event_param */
  34765. A_UINT32 tlv_header;
  34766. A_UINT32 fw_status_code; /* refer WMI_FW_AFC_POWER_EVENT_STATUS_CODE */
  34767. 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. */
  34768. 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. */
  34769. A_UINT32 afc_wfa_version; /* bits 15:0 -- minor version
  34770. * bits 31:16 -- major version
  34771. * WMI_AFC_WFA_MINOR_VERSION_GET &
  34772. * WMI_AFC_WFA_MAJOR_VERSION_GET
  34773. */
  34774. A_UINT32 avail_exp_time_d; /* avail_exp_time_d and avail_exp_time_t are
  34775. * in UTC
  34776. * Availability expiry time date format:
  34777. * YYYY-MM-DD,
  34778. * bits 7:0 -DD - Day (expected values 1-31)
  34779. * bits 15:8 -MM - Month (expected values 1-12)
  34780. * bits 31:16 -YYYY - Year
  34781. */
  34782. A_UINT32 avail_exp_time_t; /* Availability expiry time format HH-MM-SS
  34783. * bits 7:0 -SS - Time in Sec (expected values 0-59)
  34784. * bits 15:8 -MM - Minute (expected values 0-59)
  34785. * bits 23:16 -HH - Hour (expected values 0-23)
  34786. * bits 31:24 -reserved
  34787. */
  34788. } wmi_afc_power_event_param;
  34789. typedef struct {
  34790. /** TLV tag and len;
  34791. * tag equals WMITLV_TAG_STRUC_wmi_6g_afc_frequency_info */
  34792. A_UINT32 tlv_header;
  34793. A_UINT32 freq_info; /* bits 15:0 = u16 start_freq,
  34794. * bits 31:16 = u16 end_freq
  34795. * (both in MHz units)
  34796. * use MACRO as WMI_REG_RULE_START_FREQ_GET &
  34797. * WMI_REG_RULE_START_FREQ_SET
  34798. */
  34799. A_INT32 psd_power_info; /* Maximum PSD in dBm/MHz, value is stored in 0.01 dBm/MHz steps */
  34800. } wmi_6g_afc_frequency_info;
  34801. typedef struct {
  34802. /** TLV tag and len;
  34803. * tag equals WMITLV_TAG_STRUC_wmi_6g_afc_channel_info */
  34804. A_UINT32 tlv_header;
  34805. A_UINT32 global_operating_class;
  34806. A_UINT32 num_channels; /* num of valid channels for above global operating class */
  34807. /* This TLV will be followed by array of
  34808. * num_channels times wmi_afc_chan_eirp_power_info
  34809. * wmi_afc_chan_eirp_power_info power_info[]
  34810. * EIRP power array has chunks of elements corresponding to each channel
  34811. * in the channel array.
  34812. * i.e. the EIRP power array will contain
  34813. * (suppose N1 and N2 are number of valid channels from channel_info[0]
  34814. * and channel_info[1] respectively)
  34815. * eirp_power[0] power for channel 0 from channel_info[0]
  34816. * eirp_power[1] power for channel 1 from channel_info[0]
  34817. * ...
  34818. * eirp_power[N1-1] power for channel N1-1 from channel_info[0]
  34819. * eirp_power[N1] power for channel 0 from channel_info[1]
  34820. * eirp_power[N1+1] power for channel 1 from channel_info[1]
  34821. * ...
  34822. * eirp_power[N1+N2-1] power for channel N2-1 channel_info[1]
  34823. * ...
  34824. */
  34825. } wmi_6g_afc_channel_info;
  34826. typedef struct {
  34827. /** TLV tag and len;
  34828. * tag equals WMITLV_TAG_STRUC_wmi_afc_chan_eirp_power_info */
  34829. A_UINT32 tlv_header ;
  34830. A_UINT32 channel_cfi; /* channel center frequency indices */
  34831. A_UINT32 eirp_pwr; /* maximum permissible EIRP available for above CFI in dBm, value is stored in 0.01 dBm steps */
  34832. } wmi_afc_chan_eirp_power_info;
  34833. typedef struct {
  34834. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_start_cmd_fixed_param */
  34835. A_UINT32 vdev_id;
  34836. A_UINT32 scan_period_msec; /** scan duration in milli-seconds */
  34837. A_UINT32 start_interval_msec; /** offset duration to start the scan in milli-seconds */
  34838. } wmi_11d_scan_start_cmd_fixed_param;
  34839. typedef struct {
  34840. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_stop_cmd_fixed_param */
  34841. A_UINT32 vdev_id;
  34842. } wmi_11d_scan_stop_cmd_fixed_param;
  34843. /** FW indicating new current country code to Host */
  34844. typedef struct {
  34845. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_new_country_event_fixed_param */
  34846. A_UINT32 new_alpha2; /** alpha2 characters representing the country code */
  34847. } wmi_11d_new_country_event_fixed_param;
  34848. typedef struct {
  34849. /** TLV tag and len; tag equals
  34850. * WMITLV_TAG_STRUC_wmi_coex_get_antenna_isolation_cmd_fixed_param */
  34851. A_UINT32 tlv_header;
  34852. /* Currently there are no parameters for this message. */
  34853. } wmi_coex_get_antenna_isolation_cmd_fixed_param;
  34854. typedef struct {
  34855. /** TLV tag and len; tag equals
  34856. * WMITLV_TAG_STRUC_wmi_pdev_get_nfcal_power_fixed_param */
  34857. A_UINT32 tlv_header;
  34858. /** pdev_id for identifying the MAC
  34859. * See macros starting with WMI_PDEV_ID_ for values.
  34860. */
  34861. A_UINT32 pdev_id;
  34862. } wmi_pdev_get_nfcal_power_fixed_param;
  34863. typedef struct {
  34864. /** TLV tag and len; tag equals
  34865. * WMITLV_TAG_STRUC_wmi_coex_report_isolation_event_fixed_param */
  34866. A_UINT32 tlv_header;
  34867. /** 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.
  34868. * Currently the HW descriptor only supports 4 chains at most.
  34869. * Further isolation_chainX elements can be added in the future
  34870. * for additional chains, if needed.
  34871. */
  34872. A_UINT32 isolation_chain0:8, /* [7:0], isolation value for chain 0 */
  34873. isolation_chain1:8, /* [15:8], isolation value for chain 1 */
  34874. isolation_chain2:8, /* [23:16], isolation value for chain 2 */
  34875. isolation_chain3:8; /* [31:24], isolation value for chain 3 */
  34876. } wmi_coex_report_isolation_event_fixed_param;
  34877. typedef enum {
  34878. WMI_COEX_DBAM_COMP_SUCCESS = 0, /* success, mode is applied */
  34879. WMI_COEX_DBAM_COMP_ONGOING = 1, /* success, mode is applied */
  34880. WMI_COEX_DBAM_COMP_DELAYED = 2, /* DBAM is delayed and TDD is selected temporarily */
  34881. WMI_COEX_DBAM_COMP_NOT_SUPPORT = 3, /* DBAM is not supported */
  34882. WMI_COEX_DBAM_COMP_TEST_MODE = 4, /* ignore due to test mode */
  34883. WMI_COEX_DBAM_COMP_INVALID_PARAM = 5, /* invalid parameter is received */
  34884. WMI_COEX_DBAM_COMP_FAIL = 6, /* command failed */
  34885. } wmi_coex_dbam_comp_status;
  34886. typedef struct {
  34887. /** TLV tag and len; tag equals
  34888. * WMITLV_TAG_STRUC_wmi_coex_dbam_complete_event_fixed_param */
  34889. A_UINT32 tlv_header;
  34890. A_UINT32 comp_status; /* wmi_coex_dbam_comp_status */
  34891. } wmi_coex_dbam_complete_event_fixed_param;
  34892. typedef enum wmi_tas_power_history_event_type {
  34893. 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 */
  34894. WMI_TAS_POWER_HISTORY_EVENT_SAVE_COMPLETE = 1, /* Power history save complete */
  34895. } WMI_TAS_POWER_HISTORY_EVENT_TYPE;
  34896. typedef struct {
  34897. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tas_power_history_event_fixed_param */
  34898. A_UINT32 tlv_header;
  34899. A_UINT32 sub_type; /* refer to WMI_TAS_POWER_HISTORY_EVENT_TYPE */
  34900. } wmi_tas_power_history_event_fixed_param;
  34901. typedef enum {
  34902. WMI_RCPI_MEASUREMENT_TYPE_AVG_MGMT = 1,
  34903. WMI_RCPI_MEASUREMENT_TYPE_AVG_DATA = 2,
  34904. WMI_RCPI_MEASUREMENT_TYPE_LAST_MGMT = 3,
  34905. WMI_RCPI_MEASUREMENT_TYPE_LAST_DATA = 4,
  34906. } wmi_rcpi_measurement_type;
  34907. typedef struct {
  34908. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_rcpi_cmd_fixed_param */
  34909. A_UINT32 tlv_header;
  34910. /* VDEV identifier */
  34911. A_UINT32 vdev_id;
  34912. /* peer MAC address */
  34913. wmi_mac_addr peer_macaddr;
  34914. /* measurement type - defined in enum wmi_rcpi_measurement_type */
  34915. A_UINT32 measurement_type;
  34916. } wmi_request_rcpi_cmd_fixed_param;
  34917. typedef struct {
  34918. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_rcpi_event_fixed_param */
  34919. A_UINT32 tlv_header;
  34920. /* VDEV identifier */
  34921. A_UINT32 vdev_id;
  34922. /* peer MAC address */
  34923. wmi_mac_addr peer_macaddr;
  34924. /* measurement type - defined in enum wmi_rcpi_measurement_type */
  34925. A_UINT32 measurement_type;
  34926. /* Measured RCPI in dBm of the peer requested by host */
  34927. A_INT32 rcpi;
  34928. /** status
  34929. * 0 - Requested peer RCPI available
  34930. * 1 - Requested peer RCPI not available
  34931. */
  34932. A_UINT32 status;
  34933. } wmi_update_rcpi_event_fixed_param;
  34934. /* Definition of mask for various package id */
  34935. #define WMI_PKGID_MASK_AUTO 0x00000080
  34936. typedef struct {
  34937. /** TLV tag and len; tag equals*/
  34938. A_UINT32 tlv_header;
  34939. /**
  34940. * The value field is filled with WMI_PKGID_MASK values.
  34941. * Currently, the only flag used within values is
  34942. * WMI_PKGID_MASK_AUTO, where bit7=1 for automotive systems.
  34943. */
  34944. A_UINT32 value;
  34945. } wmi_pkgid_event_fixed_param;
  34946. typedef struct {
  34947. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_params */
  34948. A_UINT32 vdev_id; /* vdev id whose mac to be randomized */
  34949. /* enable is set to 1 if mac randomization to be enabled */
  34950. A_UINT32 enable;
  34951. /* randomization mac address if randomization is enabled */
  34952. wmi_mac_addr mac_addr;
  34953. /* To get the PMAC from freq param */
  34954. A_UINT32 freq; /* units in MHz */
  34955. } wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_param;
  34956. typedef struct {
  34957. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_event_fixed_params */
  34958. A_UINT32 vdev_id; /* vdev of id whose mac address was randomized */
  34959. A_UINT32 status; /* status is 1 if success and 0 if failed */
  34960. } wmi_vdev_add_mac_addr_to_rx_filter_status_event_fixed_param;
  34961. /* Definition of HW data filtering */
  34962. typedef enum {
  34963. WMI_HW_DATA_FILTER_DROP_NON_ARP_BC = 0x01,
  34964. WMI_HW_DATA_FILTER_DROP_NON_ICMPV6_MC = 0x02,
  34965. } WMI_HW_DATA_FILTER_BITMAP_TYPE;
  34966. typedef struct {
  34967. A_UINT32 tlv_header;
  34968. A_UINT32 vdev_id;
  34969. A_UINT32 enable; /* 1 . enable, 0- disable */
  34970. A_UINT32 hw_filter_bitmap; /* see WMI_HW_DATA_FILTER_BITMAP_TYPE */
  34971. } wmi_hw_data_filter_cmd_fixed_param;
  34972. /** values for multiple_vdev_restart_request flags */
  34973. /* Host is expecting consolidated Multiple Vdev Restart Response(MVRR) event. */
  34974. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_IS_MVRR_EVENT_SUPPORT(flag) WMI_GET_BITS(flag, 0, 1)
  34975. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_SET_MVRR_EVENT_SUPPORT(flag,val) WMI_SET_BITS(flag, 0, 1, val)
  34976. /* Host is sending phymode_list for each vdev. */
  34977. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_IS_PHYMODE_PRESENT(flag) WMI_GET_BITS(flag, 1, 1)
  34978. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_SET_PHYMODE_PRESENT(flag,val) WMI_SET_BITS(flag, 1, 1, val)
  34979. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_GET_PHYMODE(phymode) WMI_GET_BITS(phymode, 0, 6)
  34980. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_SET_PHYMODE(phymode, val) WMI_SET_BITS(phymode, 0, 6, val)
  34981. /** Indicates that VDEV ID is in bit-map format
  34982. * If this flag is set, FW will determine the vdev IDs from the positions
  34983. * of the bits that are set, and use these vdev IDs for vdev restart.
  34984. *
  34985. * This flag should not be set from host unless FW has set the service bit
  34986. * WMI_SERVICE_MULTIPLE_VDEV_RESTART_BITMAP_SUPPORT to indicate it supports
  34987. * this interpretation of the vdev IDs as a bitmap.
  34988. *
  34989. * If this flag is set then below is the way it will be parsed
  34990. * vdev_ids[0] = 53 (0011 0101) -> indicates vdev 0,2,4,5 is set
  34991. * vdev_ids[1] = 53 (0000 0101) -> indicates vdev 32,34 is set
  34992. * similar to this the value can be extended in feature for more vdev's
  34993. *
  34994. * If flag is not se then default parsing will be as below
  34995. * vdev_ids[0] = 0
  34996. * vdev_ids[1] = 2
  34997. * vdev_ids[2] = 4
  34998. * .
  34999. * .
  35000. * vdev_ids[5] = 34
  35001. */
  35002. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_BITMAP_SUPPORT(flag) WMI_GET_BITS(flag, 2, 1)
  35003. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_SET_BITMAP_SUPPORT(flag,val) WMI_SET_BITS(flag, 2, 1, val)
  35004. /* This command is used whenever host wants to restart multiple
  35005. * VDEVs using single command and the VDEV that are restarted will
  35006. * need to have same properties they had before restart except for the
  35007. * operating channel
  35008. */
  35009. typedef struct {
  35010. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_multiple_vdev_restart_request_cmd_fixed_param */
  35011. /** pdev_id for identifying the MAC
  35012. * See macros starting with WMI_PDEV_ID_ for values.
  35013. * In non-DBDC case host should set it to 0
  35014. */
  35015. A_UINT32 pdev_id;
  35016. /** unique id identifying the module, generated by the caller */
  35017. A_UINT32 requestor_id;
  35018. /** Disable H/W ack.
  35019. * During CAC, Our HW shouldn't ack directed frames
  35020. */
  35021. A_UINT32 disable_hw_ack;
  35022. /* Determine the duration of CAC on the given channel 'chan' */
  35023. A_UINT32 cac_duration_ms;
  35024. A_UINT32 num_vdevs;
  35025. /*
  35026. * Flags to indicate which parameters are sent as part of the request.
  35027. * This field is filled with the bitwise combination of the flag values
  35028. * defined by WMI_MULTIPLE_VDEV_RESTART_FLAG_xxx
  35029. */
  35030. A_UINT32 flags;
  35031. A_UINT32 puncture_20mhz_bitmap; /* each bit indicates one 20 MHz BW punctured */
  35032. /* The TLVs follows this structure:
  35033. * A_UINT32 vdev_ids[]; <--- Array of vdev IDs, or bitmap of vdev IDs
  35034. * In flags if WMI_MULTIPLE_VDEV_RESTART_FLAG_BITMAP_SUPPORT is set
  35035. * FW will interpret the vdev_ids values as a bitmap, and will use the
  35036. * position of all the bits set within the bitmap to determine the
  35037. * vdev IDs to use for vdev restart.
  35038. * If this flag is set then below is the way it will be parsed
  35039. * vdev_ids[0] = 53 (0011 0101) -> indicates vdev 0,2,4,5 is set
  35040. * vdev_ids[1] = 53 (0000 0101) -> indicates vdev 32,34 is set
  35041. * The array can be extended in feature for more vdevs.
  35042. * If this flag is not se then default parsing will be as below
  35043. * vdev_ids[0] = 0
  35044. * vdev_ids[1] = 2
  35045. * vdev_ids[2] = 4
  35046. * .
  35047. * .
  35048. * vdev_ids[5] = 34
  35049. * wmi_channel chan; <------ WMI channel
  35050. * A_UINT32 phymode_list[]; <-- Array of Phymode list, with
  35051. * each phymode value stored in bits 5:0 of the A_UINT32.
  35052. * Use the WMI_MULTIPLE_VDEV_RESTART_FLAG_GET/SET_PHYMODE macros
  35053. * to access the phymode value from within each A_UINT32 element.
  35054. * A_UINT32 preferred_tx_streams[]; <-- Array of preferred_tx_streams
  35055. * with vdev ID as index.
  35056. * A_UINT32 preferred_rx_streams[]; <-- Array of preferred_rx_streams
  35057. * with vdev ID as index.
  35058. * wmi_channel dbw_chan; <-- WMI channel
  35059. * optional TLV for dbw_chan
  35060. * wmi_dbw_chan_info dbw_chan_info
  35061. * optional TLV used for dbw_chan_info
  35062. */
  35063. } wmi_pdev_multiple_vdev_restart_request_cmd_fixed_param;
  35064. typedef struct {
  35065. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_csa_switch_count_status_event_fixed_param */
  35066. A_UINT32 tlv_header;
  35067. /** pdev_id for identifying the MAC
  35068. * See macros starting with WMI_PDEV_ID_ for values.
  35069. * In non-DBDC case host should set it to 0
  35070. */
  35071. A_UINT32 pdev_id;
  35072. /** CSA switch count value in the last transmitted beacon */
  35073. A_UINT32 current_switch_count;
  35074. A_UINT32 num_vdevs;
  35075. /* The TLVs follows this structure:
  35076. * A_UINT32 vdev_ids[]; <--- Array of VDEV ids.
  35077. */
  35078. } wmi_pdev_csa_switch_count_status_event_fixed_param;
  35079. typedef struct {
  35080. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csc_vdev_list */
  35081. A_UINT32 vdev_id;
  35082. A_UINT32 current_switch_count; /** CSC switch count value in the last transmitted beacon */
  35083. } wmi_csc_vdev_list;
  35084. typedef struct {
  35085. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_csc_switch_count_status_event_fixed_param */
  35086. A_UINT32 tlv_header;
  35087. /** pdev_id for identifying the MAC
  35088. * See macros starting with WMI_PDEV_ID_ for values.
  35089. * In non-DBDC case host should set it to 0
  35090. */
  35091. A_UINT32 pdev_id;
  35092. /** CSC switch count value in the last transmitted beacon */
  35093. A_UINT32 current_switch_count;
  35094. /* The TLVs follows this structure:
  35095. * struct wmi_csc_vdev_list vdev_info[]; // IDs of vdevs and their current switch countdown values
  35096. */
  35097. } wmi_pdev_csc_switch_count_status_event_fixed_param;
  35098. /* Operation types for packet routing command */
  35099. typedef enum {
  35100. WMI_PDEV_ADD_PKT_ROUTING,
  35101. WMI_PDEV_DEL_PKT_ROUTING,
  35102. } wmi_pdev_pkt_routing_op_code;
  35103. /* Packet routing types based on specific data types */
  35104. typedef enum {
  35105. WMI_PDEV_ROUTING_TYPE_ARP_IPV4,
  35106. WMI_PDEV_ROUTING_TYPE_NS_IPV6,
  35107. WMI_PDEV_ROUTING_TYPE_IGMP_IPV4,
  35108. WMI_PDEV_ROUTING_TYPE_MLD_IPV6,
  35109. WMI_PDEV_ROUTING_TYPE_DHCP_IPV4,
  35110. WMI_PDEV_ROUTING_TYPE_DHCP_IPV6,
  35111. WMI_PDEV_ROUTING_TYPE_DNS_TCP_IPV4,
  35112. WMI_PDEV_ROUTING_TYPE_DNS_TCP_IPV6,
  35113. WMI_PDEV_ROUTING_TYPE_DNS_UDP_IPV4,
  35114. WMI_PDEV_ROUTING_TYPE_DNS_UDP_IPV6,
  35115. WMI_PDEV_ROUTING_TYPE_ICMP_IPV4,
  35116. WMI_PDEV_ROUTING_TYPE_ICMP_IPV6,
  35117. WMI_PDEV_ROUTING_TYPE_TCP_IPV4,
  35118. WMI_PDEV_ROUTING_TYPE_TCP_IPV6,
  35119. WMI_PDEV_ROUTING_TYPE_UDP_IPV4,
  35120. WMI_PDEV_ROUTING_TYPE_UDP_IPV6,
  35121. WMI_PDEV_ROUTING_TYPE_IPV4,
  35122. WMI_PDEV_ROUTING_TYPE_IPV6,
  35123. WMI_PDEV_ROUTING_TYPE_EAP,
  35124. WMI_PDEV_ROUTING_TYPE_VLAN,
  35125. } wmi_pdev_pkt_routing_type;
  35126. typedef enum {
  35127. WMI_PDEV_WIFIRXCCE_USE_CCE_E = 0,
  35128. WMI_PDEV_WIFIRXCCE_USE_ASPT_E = 1,
  35129. WMI_PDEV_WIFIRXCCE_USE_FT_E = 2,
  35130. WMI_PDEV_WIFIRXCCE_USE_CCE2_E = 3,
  35131. } wmi_pdev_dest_ring_handler_type;
  35132. typedef enum {
  35133. WMI_SOC_TX_PACKET_TYPE_ARP = 1,
  35134. WMI_SOC_TX_PACKET_TYPE_EAPOL = 2,
  35135. WMI_SOC_TX_PACKET_TYPE_DHCP = 3,
  35136. WMI_SOC_TX_PACKET_TYPE_DNS = 4,
  35137. WMI_SOC_TX_PACKET_TYPE_ICMP = 5,
  35138. } wmi_soc_tx_packet_type;
  35139. /*
  35140. * This command shall be sent only when no VDEV is up.
  35141. * If the command is sent after any VDEV is up, target will ignore the command.
  35142. */
  35143. typedef struct {
  35144. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_tx_packet_custom_classify_cmd_fixed_param */
  35145. A_UINT32 tlv_header;
  35146. /** packet_bitmap:
  35147. * bitmap of the packets to be classified,
  35148. * Refer to wmi_soc_tx_packet_type for the interpretation of the bits
  35149. * within the bitmap.
  35150. */
  35151. A_UINT32 packet_bitmap;
  35152. } wmi_soc_tx_packet_custom_classify_cmd_fixed_param;
  35153. /*
  35154. * This command shall be sent only when no VDEV is up.
  35155. * If the command is sent after any VDEV is up, target will ignore the command.
  35156. */
  35157. typedef struct {
  35158. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_update_pkt_routing_cmd_fixed_param */
  35159. A_UINT32 tlv_header;
  35160. /** Identifies pdev on which routing needs to be applied */
  35161. A_UINT32 pdev_id;
  35162. /** Indicates the routing operation type: add/delete */
  35163. A_UINT32 op_code; /* wmi_pdev_pkt_routing_op_code */
  35164. /** Bitmap of multiple pkt routing types for a given destination ring and meta data */
  35165. A_UINT32 routing_type_bitmap; /* see wmi_pdev_pkt_routing_type */
  35166. /** 5 bits [4:0] are used to specify the destination ring where the CCE matched
  35167. * packet needs to be routed.
  35168. */
  35169. A_UINT32 dest_ring;
  35170. /** 16 bits [15:0] meta data can be passed to CCE. When the superrule matches,
  35171. * CCE copies this back in RX_MSDU_END_TLV.
  35172. */
  35173. A_UINT32 meta_data;
  35174. /**
  35175. * Indicates the dest ring handler type: CCE, APST, FT, CCE2
  35176. * Refer to wmi_pdev_dest_ring_handler_type / WMI_PDEV_WIFIRXCCE_USE_xxx
  35177. */
  35178. A_UINT32 dest_ring_handler;
  35179. } wmi_pdev_update_pkt_routing_cmd_fixed_param;
  35180. typedef enum {
  35181. WMI_CALIBRATION_NO_FEATURE = 0, /* The board was calibrated with a meta which did not have this feature */
  35182. WMI_CALIBRATION_OK, /* The calibration status is OK */
  35183. WMI_CALIBRATION_NOT_OK, /* The calibration status is NOT OK */
  35184. } WMI_CALIBRATION_STATUS;
  35185. #define WMI_BOARD_MCN_STRING_MAX_SIZE 19
  35186. /**
  35187. * WMI_BOARD_MCN_STRING_BUF_SIZE : represents the number of elements in board_mcn_detail.
  35188. * Since board_mcn_detail is of type A_UINT8, the value of WMI_BOARD_MCN_STRING_BUF_SIZE
  35189. * should be multiple of 4 for alignment reason. And the last byte byte is reserved for
  35190. * null-terminator
  35191. */
  35192. #define WMI_BOARD_MCN_STRING_BUF_SIZE (WMI_BOARD_MCN_STRING_MAX_SIZE+1) /* null-terminator */
  35193. typedef struct {
  35194. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_event_fixed_param */
  35195. A_UINT32 software_cal_version; /* Current software level calibration data version */
  35196. A_UINT32 board_cal_version; /* Calibration data version programmed on chip */
  35197. A_UINT32 cal_status; /* filled with WMI_CALIBRATION_STATUS enum value */
  35198. /* board_mcn_detail:
  35199. * Provides board's MCN (Material Control Number) information for the host
  35200. * to display. This is used to track the Hardware level revisions/versions.
  35201. * This array carries the ASCII values of the MCN to the host. And host
  35202. * would just print this in a string format whenever user requests.
  35203. * Note: On a big-endian host, the 4 bytes within each A_UINT32 portion
  35204. * of a WMI message will be automatically byteswapped by the copy engine
  35205. * as the messages are transferred between host and target, to convert
  35206. * between the target's little-endianness and the host's big-endianness.
  35207. * Consequently, a big-endian host will have to manually unswap the bytes
  35208. * within the board_mcn_detail string buffer to get the bytes back into
  35209. * the desired natural order.
  35210. */
  35211. A_UINT8 board_mcn_detail[WMI_BOARD_MCN_STRING_BUF_SIZE];
  35212. /** pdev_id for identifying the MAC
  35213. * See macros starting with WMI_PDEV_ID_ for values.
  35214. */
  35215. A_UINT32 pdev_id;
  35216. } wmi_pdev_check_cal_version_event_fixed_param;
  35217. typedef struct {
  35218. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_cmd_fixed_param */
  35219. /** pdev_id for identifying the MAC
  35220. * See macros starting with WMI_PDEV_ID_ for values.
  35221. */
  35222. A_UINT32 pdev_id;
  35223. } wmi_pdev_check_cal_version_cmd_fixed_param;
  35224. typedef struct {
  35225. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_diversity_gain_cmd_fixed_param */
  35226. /** Identifies pdev on which diversity gain to be applied */
  35227. A_UINT32 pdev_id;
  35228. /** The number of spatial stream */
  35229. A_UINT32 nss;
  35230. /** The number of gains */
  35231. A_UINT32 num_gains;
  35232. /*
  35233. * This fixed_param TLV is followed by other TLVs:
  35234. * A_UINT8 diversity_gains[num_gains]; (gain is in dB units)
  35235. */
  35236. } wmi_pdev_set_diversity_gain_cmd_fixed_param;
  35237. /* flags for unit_test_event */
  35238. #define WMI_UNIT_TEST_EVENT_FLAG_STATUS 0 /* 0 = success, 1 = fail */
  35239. #define WMI_UNIT_TEST_EVENT_FLAG_DONE 1 /* 0 = not done, 1 = done */
  35240. /* from bit 2 to bit 31 are reserved */
  35241. #define WMI_SET_UNIT_TEST_EVENT_FLAG_STATUS_SUCCESS(flag) do { \
  35242. (flag) |= (1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS); \
  35243. } while (0)
  35244. #define WMI_SET_UNIT_TEST_EVENT_FLAG_STATUS_FAIL(flag) do { \
  35245. (flag) &= ~(1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS); \
  35246. } while (0)
  35247. #define WMI_GET_UNIT_TEST_EVENT_FLAG_STSTUS(flag) \
  35248. ((flag) & (1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS))
  35249. #define WMI_SET_UNIT_TEST_EVENT_FLAG_DONE(flag) do { \
  35250. (flag) |= (1 << WMI_UNIT_TEST_EVENT_FLAG_DONE); \
  35251. } while (0)
  35252. #define WMI_CLR_UNIT_TEST_EVENT_FLAG_DONE(flag) do { \
  35253. (flag) &= ~(1 << WMI_UNIT_TEST_EVENT_FLAG_DONE); \
  35254. } while (0)
  35255. #define WMI_GET_UNIT_TEST_EVENT_FLAG_DONE(flag) \
  35256. ((flag) & (1 << WMI_UNIT_TEST_EVENT_FLAG_DONE))
  35257. typedef struct {
  35258. /* TLV tag and len; tag equals WMI_UNIT_TEST_EVENTID */
  35259. A_UINT32 tlv_header;
  35260. /* unique id identifying the VDEV, generated by the caller */
  35261. A_UINT32 vdev_id;
  35262. /* Identify the wlan module */
  35263. A_UINT32 module_id;
  35264. /* unique id identifying the unit test cmd, generated by the caller */
  35265. A_UINT32 diag_token;
  35266. /* flag for the status of the unit_test_cmd */
  35267. A_UINT32 flag;
  35268. /* data length number of bytes for current dump */
  35269. A_UINT32 payload_len;
  35270. /* TLV/Payload after this structure is sent in little endian
  35271. * format for the length mentioned in this structure.
  35272. * A_UINT8 payload[1];
  35273. */
  35274. } wmi_unit_test_event_fixed_param;
  35275. /* Definition of latency levels */
  35276. typedef enum {
  35277. WMI_WLM_LL_NORMAL = 0x0,
  35278. /* DEPRECATED */ WMI_WLM_LL_MODERATE = 0x1,
  35279. WMI_WLM_LL_XR = 0x1,
  35280. WMI_WLM_LL_LOW = 0x2,
  35281. WMI_WLM_LL_ULTRA_LOW = 0x3,
  35282. } WMI_WLM_LATENCY_LEVEL;
  35283. typedef struct {
  35284. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_vdev_latency_event_fixed_param */
  35285. /** The latency level for specified vdev_id */
  35286. A_UINT32 vdev_id;
  35287. /** latency level enum WMI_WLM_LATENCY_LEVEL honored by FW */
  35288. A_UINT32 latency_level;
  35289. } wmi_vdev_latency_event_fixed_param;
  35290. /*
  35291. * Lay out of flags in wmi_wlm_config_cmd_fixed_param
  35292. *
  35293. * |31 19| 18 | 17|16 14| 13 | 12| 11 | 10 | 9 | 8 |7 6|5 4|3 2| 1 | 0 |
  35294. * +-----+-----+---+-----+----+---+----+----+-----+----+----+----+----+---+---+
  35295. * | RSVD|SRATE|RTS| NSS |EDCA|TRY|SSLP|CSLP|DBMPS|RSVD|Roam|RSVD|DWLT|DFS|SUP|
  35296. * +------------------------------+---------------+---------+-----------------+
  35297. * | WAL | PS | Roam | Scan |
  35298. *
  35299. * Flag values:
  35300. * TRY: (1) enable short limit for retrying unacked tx, where the limit is
  35301. * based on the traffic's latency level
  35302. * (0) default tx retry behavior
  35303. * EDCA: (1) Apply VO parameters on BE
  35304. * (0) default behavior
  35305. * NSS: (0) no Nss limits, other than those negotiatied during association
  35306. * (1) during 2-chain operation, tx only a single spatial stream
  35307. * (2) - (7) reserved / invalid
  35308. * RTS: (0) default protection
  35309. * (1) always enable RTS/CTS protection
  35310. * SRATE: (0) default secondary rate policy
  35311. * (1) disable secondary rate
  35312. */
  35313. /* bit 0-3 of flags is used for scan operation */
  35314. /* bit 0: Avoid scan request from HLOS if bit is set */
  35315. #define WLM_FLAGS_SCAN_SUPPRESS 1 /* suppress all scan request */
  35316. /* bit 1: WLM_FLAGS_SCAN_SKIP_DFS, skip dfs channel if bit is set */
  35317. #define WLM_FLAGS_SCAN_SKIP_DFS 1 /* skip dfs channel operation */
  35318. /* bit 2-3: define policy of dwell time/duration of each foreign channel
  35319. (b3 b2)
  35320. (0 0 ): Default dwell time
  35321. (0 1 ): WLM_FLAGS_STICK_SCAN_DWELL_TIME : Stick to original active/passive dwell time, but split
  35322. foreign channel dwell times into fitting into min (dl_latency, ul_latency). Note it can increase
  35323. overall scan duration.
  35324. (1 0 ): WLM_FLAGS_SHRINK_SCAN_DWELL_TIME: Shrink active/passive dwell time to
  35325. min(dl_latency, ul_latency, dwell_time). It may reduce overall scan duration, but it may decrease
  35326. the accuracy of scan result.
  35327. (1 1 ): reserved
  35328. */
  35329. #define WLM_FLAGS_DEFAULT_SCAN_DWELL_TIME 0 /* Default scan dwell time */
  35330. #define WLM_FLAGS_STICK_SCAN_DWELL_TIME 1 /* Shrink off channel time but extend overall scan duration */
  35331. #define WLM_FLAGS_SHRINK_SCAN_DWELL_TIME 2 /* Shrink scan off channel time */
  35332. /* bit 4-5: reserved for scan */
  35333. /* bit 6-7 of flags is used for roaming operation */
  35334. /* bit 6-7: define roaming policy:
  35335. (b7 b6)
  35336. (0 0 ): WLM_FLAGS_ROAM_ALLOW: Default behavior, allow roaming in all scenarios
  35337. (0 1 ): WLM_FLAGS_ROAM_SUPPRESS: Disallow all roaming
  35338. (1 0 ): WLM_FLAGS_ALLOW_FINAL_BMISS_ROAM: Allow final bmiss roaming only
  35339. (1 1 ): reserved
  35340. */
  35341. #define WLM_FLAGS_ROAM_ALLOW 0
  35342. #define WLM_FLAGS_ROAM_SUPPRESS 1
  35343. #define WLM_FLAGS_ALLOW_FINAL_BMISS_ROAM 2
  35344. /* bit 8: reserved for roaming */
  35345. /* bit 9-11 of flags is used for powersave operation */
  35346. /* bit 9: WLM_FLAGS_PS_DISABLE_BMPS, disable BMPS if bit is set */
  35347. #define WLM_FLAGS_PS_DISABLE_BMPS 1 /* disable BMPS */
  35348. /* bit 10: WLM_FLAGS_PS_DISABLE_CSS_COLLAPSE, disable css power collapse if bit is set */
  35349. #define WLM_FLAGS_PS_DISABLE_CSS_COLLAPSE 1 /* disable css power collapse */
  35350. /* bit 11: WLM_FLAGS_PS_DISABLE_SYS_SLEEP, disable sys sleep if bit is set */
  35351. #define WLM_FLAGS_PS_DISABLE_SYS_SLEEP 1 /* disable sys sleep */
  35352. /* bit 17-31 of flags is reserved for powersave and WAL */
  35353. /* bit 23: WLM_FLAGS_PS_DISABLE_MLO_PROBE_SCAN,
  35354. * disable MLO probe scan if bit is set
  35355. */
  35356. #define WLM_FLAGS_PS_DISABLE_MLO_PROBE_SCAN 1 /* disable MLO probe scan */
  35357. /* bit 24: WLM_FLAGS_PS_DISABLE_ULL_FORCED_MLMR,
  35358. * Disable forced MLMR on ULL if bit is set.
  35359. * (MLMR may still happen due to other reasons.)
  35360. */
  35361. #define WLM_FLAGS_PS_DISABLE_ULL_FORCED_MLMR 1 /* disable forced MLMR on ULL */
  35362. /* bit 25: WLM_FLAGS_PS_DISABLE_ULL_FORCED_EMLSR,
  35363. * Disable forced EMLSR on ULL if bit is set.
  35364. * (eMLSR may still happen due to other reasons.)
  35365. */
  35366. #define WLM_FLAGS_PS_DISABLE_ULL_FORCED_EMLSR 1 /* disable forced EMLSR on ULL */
  35367. #define WLM_FLAGS_SCAN_IS_SUPPRESS(flag) WMI_GET_BITS(flag, 0, 1)
  35368. #define WLM_FLAGS_SCAN_SET_SUPPRESS(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  35369. #define WLM_FLAGS_SCAN_IS_SKIP_DFS(flag) WMI_GET_BITS(flag, 1, 1)
  35370. #define WLM_FLAGS_SCAN_SET_SKIP_DFS(flag, val) WMI_SET_BITS(flag, 1, 1, val)
  35371. #define WLM_FLAGS_SCAN_GET_DWELL_TIME_POLICY(flag) WMI_GET_BITS(flag, 2, 2)
  35372. #define WLM_FLAGS_SCAN_SET_DWELL_TIME_POLICY(flag, val) WMI_SET_BITS(flag, 2, 2, val)
  35373. #define WLM_FLAGS_TSF_LATENCY_COMPENSATE_ENABLED_GET(flag) WMI_GET_BITS(flag, 4, 1)
  35374. #define WLM_FLAGS_TSF_LATENCY_COMPENSATE_ENABLED_SET(flag) WMI_SET_BITS(flag, 4, 1, val)
  35375. #define WLM_FLAGS_ROAM_GET_POLICY(flag) WMI_GET_BITS(flag, 6, 2)
  35376. #define WLM_FLAGS_ROAM_SET_POLICY(flag, val) WMI_SET_BITS(flag, 6, 2, val)
  35377. #define WLM_FLAGS_PS_IS_BMPS_DISABLED(flag) WMI_GET_BITS(flag, 9, 1)
  35378. #define WLM_FLAGS_PS_IS_CSS_CLPS_DISABLED(flag) WMI_GET_BITS(flag, 10, 1)
  35379. #define WLM_FLAGS_PS_SET_CSS_CLPS_DISABLE(flag, val) WMI_SET_BITS(flag, 10, 1, val)
  35380. #define WLM_FLAGS_PS_IS_SYS_SLP_DISABLED(flag) WMI_GET_BITS(flag, 11, 1)
  35381. #define WLM_FLAGS_PS_SET_SYS_SLP_DISABLE(flag, val) WMI_SET_BITS(flag, 11, 1, val)
  35382. #define WLM_FLAGS_WAL_LIMIT_TRY_ENABLED(flag) WMI_GET_BITS(flag, 12, 1)
  35383. #define WLM_FLAGS_WAL_LIMIT_TRY_SET(flag, val) WMI_SET_BITS(flag, 12, 1, val)
  35384. #define WLM_FLAGS_WAL_ADJUST_EDCA_ENABLED(flag) WMI_GET_BITS(flag, 13, 1)
  35385. #define WLM_FLAGS_WAL_ADJUST_EDCA_SET(flag, val) WMI_SET_BITS(flag, 13, 1, val)
  35386. #define WLM_FLAGS_WAL_1NSS_ENABLED(flag) (WMI_GET_BITS(flag, 14, 3) & 0x1)
  35387. #define WLM_FLAGS_WAL_NSS_SET(flag, val) WMI_SET_BITS(flag, 14, 3, val)
  35388. #define WLM_FLAGS_WAL_ALWAYS_RTS_PROTECTION(flag) WMI_GET_BITS(flag, 17, 1)
  35389. #define WLM_FLAGS_WAL_RTS_PROTECTION_SET(flag, val) WMI_SET_BITS(flag, 17, 1, val)
  35390. #define WLM_FLAGS_WAL_DISABLE_SECONDARY_RATE(flag) WMI_GET_BITS(flag, 18, 1)
  35391. #define WLM_FLAGS_WAL_SECONDARY_RATE_SET(flag, val) WMI_SET_BITS(flag, 18, 1, val)
  35392. #define WLM_FLAGS_PS_IS_PCIE_L11_ENABLED(flag) WMI_GET_BITS(flag, 19, 1)
  35393. #define WLM_FLAGS_PS_SET_PCIE_L11_ENABLE(flag, val) WMI_SET_BITS(flag, 19, 1, val)
  35394. #define WLM_FLAGS_PS_IS_PHYRF_PS_ENABLED(flag) WMI_GET_BITS(flag, 20, 1)
  35395. #define WLM_FLAGS_PS_SET_PHYRF_PS_ENABLE(flag, val) WMI_SET_BITS(flag, 20, 1, val)
  35396. #define WLM_FLAGS_SCAN_IS_SPLIT_PAS_CH_ENABLED(flag) WMI_GET_BITS(flag, 21, 1)
  35397. #define WLM_FLAGS_SCAN_SET_SPLIT_PAS_CH_ENABLE(flag, val) WMI_SET_BITS(flag, 21, 1, val)
  35398. #define WLM_FLAGS_SCAN_IS_ADAPT_SCAN_ENABLED(flag) WMI_GET_BITS(flag, 22, 1)
  35399. #define WLM_FLAGS_SCAN_SET_ADAPT_SCAN_ENABLE(flag, val) WMI_SET_BITS(flag, 22, 1, val)
  35400. #define WLM_FLAGS_PS_IS_MLO_PROBE_SCAN_DISABLED(flag) WMI_GET_BITS(flag, 23, 1)
  35401. #define WLM_FLAGS_PS_SET_MLO_PROBE_SCAN_DISABLE(flag, val) WMI_SET_BITS(flag, 23, 1, val)
  35402. #define WLM_FLAGS_PS_IS_ULL_FORCED_MLMR_DISABLED(flag) WMI_GET_BITS(flag, 24, 1)
  35403. #define WLM_FLAGS_PS_SET_ULL_FORCED_MLMR_DISABLE(flag, val) WMI_SET_BITS(flag, 24, 1, val)
  35404. #define WLM_FLAGS_PS_IS_ULL_FORCED_EMLSR_DISABLED(flag) WMI_GET_BITS(flag, 25, 1)
  35405. #define WLM_FLAGS_PS_SET_ULL_FORCED_EMLSR_DISABLE(flag, val) WMI_SET_BITS(flag, 25, 1, val)
  35406. #define WLM_FLAGS_SET_FORCE_DEFAULT_LATENCY(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  35407. #define WLM_FLAGS_GET_FORCE_DEFAULT_LATENCY(flag) WMI_GET_BITS(flag, 0, 1)
  35408. #define WLM_MAX_HOST_CLIENTS 5
  35409. typedef struct {
  35410. /** TLV tag and len; tag equals WMI_WLM_CONFIG_CMD_fixed_param */
  35411. A_UINT32 tlv_header;
  35412. /* VDEV identifier */
  35413. A_UINT32 vdev_id;
  35414. /*
  35415. * Refer to WMI_WLM_LATENCY_LEVEL
  35416. * Once latency change detected, WLM will notify modules e.g. STAPS or SCAN/ROAM,
  35417. * who subscribed this event. And subscribers, like SCAN, may disable/cutoff offchan
  35418. * operation to support lower latency of WLAN.
  35419. */
  35420. A_UINT32 latency_level;
  35421. /*
  35422. * represent uplink latency in ms
  35423. * This parameter will be used by STAPS module to decide timing parameters, like
  35424. * ITO or SPEC wakeup interval. For SCAN/ROAM, it may used to calculate offchan
  35425. * durations.
  35426. * For host and FW with multi client LL feature enabled, this field is obsolete.
  35427. */
  35428. A_UINT32 ul_latency;
  35429. /*
  35430. * represent downlink latency in ms
  35431. * Similar usage as ul_latency
  35432. * For host and FW with multi client LL feature enabled, this field is obsolete.
  35433. */
  35434. A_UINT32 dl_latency;
  35435. /*
  35436. * flags for each client of WLM, refer to WLM_FLAGS_ definitions above.
  35437. * For host and FW with multi client LL feature enabled, this field is obsolete.
  35438. */
  35439. A_UINT32 flags;
  35440. /*
  35441. * bit 0 used as force reset:
  35442. * to override the latency level as default
  35443. * for all the wlm clients
  35444. */
  35445. A_UINT32 flags_ext;
  35446. /*
  35447. * clients of WLM Arbiter
  35448. * WLM_MAX_HOST_CLIENTS 5
  35449. */
  35450. A_UINT32 client_id_bitmask;
  35451. } wmi_wlm_config_cmd_fixed_param;
  35452. /* Broadcast TWT enable/disable for both REQUESTER and RESPONDER */
  35453. #define TWT_EN_DIS_FLAGS_GET_BTWT(flag) WMI_GET_BITS(flag, 0, 1)
  35454. #define TWT_EN_DIS_FLAGS_SET_BTWT(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  35455. /* legacy MBSSID enable/disable */
  35456. #define TWT_EN_DIS_FLAGS_GET_L_MBSSID(flag) WMI_GET_BITS(flag, 1, 1)
  35457. #define TWT_EN_DIS_FLAGS_SET_L_MBSSID(flag, val) WMI_SET_BITS(flag, 1, 1, val)
  35458. /* 11ax MBSSID enable/disable */
  35459. #define TWT_EN_DIS_FLAGS_GET_AX_MBSSID(flag) WMI_GET_BITS(flag, 2, 1)
  35460. #define TWT_EN_DIS_FLAGS_SET_AX_MBSSID(flag, val) WMI_SET_BITS(flag, 2, 1, val)
  35461. /* Configuration of TWT Modes,
  35462. * If this BIT is set BIT4/5 will be used in FW, else BIT4/5 will be ignored.
  35463. * Which means when we receive WMI_TWT_ENABLE_CMDID command from host,
  35464. * without BIT3 set we will enable both REQUESTER/RESPONDER.
  35465. *
  35466. * Same interpretation is used in WMI_TWT_DISABLE_CMDID, if BIT3 is not set
  35467. * we will disable both REQUESTER and RESPONDER.
  35468. */
  35469. #define TWT_EN_DIS_FLAGS_GET_SPLIT_CONFIG(flag) WMI_GET_BITS(flag, 3, 1)
  35470. #define TWT_EN_DIS_FLAGS_SET_SPLIT_CONFIG(flag, val) WMI_SET_BITS(flag, 3, 1, val)
  35471. /*
  35472. * The flags are used both in WMI_TWT_ENABLE_CMDID and WMI_TWT_DISABLE_CMDID.
  35473. *
  35474. * BIT4 represents whether the it is for REQUESTER or RESPONDER.
  35475. * BIT5 represents whether it is individual or broadcast mode.
  35476. *
  35477. * For instance, in WMI_TWT_ENABLE_CMDID if BIT4=0 and BIT5=0, then we will
  35478. * enable only Requester, we will not change any configuration of RESPONDER.
  35479. *
  35480. * Same way in WMI_TWT_DISABLE_CMDID if BIT4=0 and BIT5=0, then we will only
  35481. * disable Individual and Broadcast REQUESTER, we will not alter any RESPONDER
  35482. * configuration.
  35483. *
  35484. * If host is enabling or disabling both REQUESTER and RESPONDER host will
  35485. * send two WMI commands, one for REQUESTER and one for RESPONDER.
  35486. *
  35487. * WMI_TWT_ENABLE_CMDID command flags description,
  35488. * |----------------------------------------------------------------------|
  35489. * |BIT4=0, BIT5=0 | Enable Individual TWT requester |
  35490. * |----------------------------------------------------------------------|
  35491. * |BIT4=0, BIT5=1 | Enable both Individual and Broadcast TWT requester |
  35492. * |----------------------------------------------------------------------|
  35493. * |BIT4=1, BIT5=0 | Enable Individual TWT responder |
  35494. * |----------------------------------------------------------------------|
  35495. * |BIT4=1, BIT5=1 | Enable both Individual and Broadcast TWT responder |
  35496. * |----------------------------------------------------------------------|
  35497. *
  35498. *
  35499. * WMI_TWT_DISABLE_CMDID command flags description,
  35500. * |----------------------------------------------------------------------|
  35501. * |BIT4=0, BIT5=0 | Disable both Individual and Broadcast TWT requester |
  35502. * |----------------------------------------------------------------------|
  35503. * |BIT4=0, BIT5=1 | Disable Broadcast TWT requester |
  35504. * |----------------------------------------------------------------------|
  35505. * |BIT4=1, BIT5=0 | Disable both Individual and broadcast TWT responder |
  35506. * |----------------------------------------------------------------------|
  35507. * |BIT4=1, BIT5=1 | Disable Broadcast TWT responder |
  35508. * |----------------------------------------------------------------------|
  35509. *
  35510. * If user has enabled only individual requester at any point and after
  35511. * sometime if user wants to enable broadcast requester then user cannot
  35512. * directly send another WMI_TWT_ENABLE_CMDID with broadcast configuration,
  35513. * user has to disable TWT requester first and then enable both individual
  35514. * requester and broadcast requester. Same way for RESPONDER.
  35515. *
  35516. */
  35517. /* 0: requester; 1: responder */
  35518. #define TWT_EN_DIS_FLAGS_GET_REQ_RESP(flag) WMI_GET_BITS(flag, 4, 1)
  35519. #define TWT_EN_DIS_FLAGS_SET_REQ_RESP(flag, val) WMI_SET_BITS(flag, 4, 1, val)
  35520. /* 0: iTWT; 1: bTWT */
  35521. #define TWT_EN_DIS_FLAGS_GET_I_B_TWT(flag) WMI_GET_BITS(flag, 5, 1)
  35522. #define TWT_EN_DIS_FLAGS_SET_I_B_TWT(flag, val) WMI_SET_BITS(flag, 5, 1, val)
  35523. /* 0: bTWT; 1: rTWT */
  35524. #define TWT_EN_DIS_FLAGS_GET_B_R_TWT(flag) WMI_GET_BITS(flag, 6, 1)
  35525. #define TWT_EN_DIS_FLAGS_SET_B_R_TWT(flag, val) WMI_SET_BITS(flag, 6, 1, val)
  35526. /*
  35527. * disable autonomous bTWT session delete feature
  35528. * This feature will delete client triggered session when number of clients
  35529. * joined decreases to 0.
  35530. */
  35531. #define TWT_EN_DIS_FLAGS_GET_DIS_BTWT_AUTO_DELETE(flag) \
  35532. WMI_GET_BITS(flag, 7, 1)
  35533. #define TWT_EN_DIS_FLAGS_SET_DIS_BTWT_AUTO_DELETE(flag, val) \
  35534. WMI_SET_BITS(flag, 7, 1, val)
  35535. typedef struct {
  35536. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_enable_cmd_fixed_param */
  35537. /** 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
  35538. */
  35539. A_UINT32 pdev_id;
  35540. A_UINT32 sta_cong_timer_ms; /* STA TWT congestion timer TO value in terms of ms */
  35541. A_UINT32 mbss_support; /* Reserved */
  35542. A_UINT32 default_slot_size; /* This is the default value for the TWT slot setup by AP (units = microseconds) */
  35543. A_UINT32 congestion_thresh_setup; /* Minimum congestion required to start setting up TWT sessions */
  35544. /*
  35545. * The congestion parameters below are in percent of occupied airtime.
  35546. */
  35547. A_UINT32 congestion_thresh_teardown; /* Minimum congestion below which TWT will be torn down */
  35548. A_UINT32 congestion_thresh_critical; /* Threshold above which TWT will not be active */
  35549. /*
  35550. * The interference parameters below use an abstract method of evaluating
  35551. * interference. The parameters are in percent, ranging from 0 for no
  35552. * interference, to 100 for interference extreme enough to completely
  35553. * block the signal of interest.
  35554. */
  35555. A_UINT32 interference_thresh_teardown; /* Minimum interference above that TWT will not be active */
  35556. A_UINT32 interference_thresh_setup; /* Minimum interference below that TWT session can be setup */
  35557. A_UINT32 min_no_sta_setup; /* Minimum no of STA required to start TWT setup */
  35558. A_UINT32 min_no_sta_teardown; /* Minimum no of STA below which TWT will be torn down */
  35559. A_UINT32 no_of_bcast_mcast_slots; /* Number of default slot sizes reserved for BCAST/MCAST delivery */
  35560. A_UINT32 min_no_twt_slots; /* Minimum no of available slots for TWT to be operational */
  35561. 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) */
  35562. /*
  35563. * The below interval parameters have units of milliseconds.
  35564. */
  35565. A_UINT32 mode_check_interval; /* Interval between two successive check to decide the mode of TWT */
  35566. A_UINT32 add_sta_slot_interval; /* Interval between decisions making to create TWT slots for STAs */
  35567. A_UINT32 remove_sta_slot_interval; /* Interval between decisions making to remove TWT slot of STAs */
  35568. A_UINT32 flags; /* enable/disable flags, refer to MACROs TWT_EN_DIS_FLAGS_* (TWT_EN_DIS_FLAGS_GET_BTWT etc.) */
  35569. } wmi_twt_enable_cmd_fixed_param;
  35570. /* status code of enabling TWT */
  35571. typedef enum _WMI_ENABLE_TWT_STATUS_T {
  35572. WMI_ENABLE_TWT_STATUS_OK, /* enabling TWT successfully completed */
  35573. WMI_ENABLE_TWT_STATUS_ALREADY_ENABLED, /* TWT already enabled */
  35574. WMI_ENABLE_TWT_STATUS_NOT_READY, /* FW not ready for enabling TWT */
  35575. WMI_ENABLE_TWT_INVALID_PARAM, /* invalid parameters */
  35576. WMI_ENABLE_TWT_STATUS_UNKNOWN_ERROR, /* enabling TWT failed with an unknown reason */
  35577. } WMI_ENABLE_TWT_STATUS_T;
  35578. typedef struct {
  35579. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_enable_complete_event_fixed_param */
  35580. /** 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 */
  35581. A_UINT32 pdev_id;
  35582. A_UINT32 status; /* WMI_ENABLE_TWT_STATUS_T */
  35583. } wmi_twt_enable_complete_event_fixed_param;
  35584. typedef struct {
  35585. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_disable_cmd_fixed_param */
  35586. /** 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 */
  35587. A_UINT32 pdev_id; /* host should never set it to WMI_PDEV_ID_SOC */
  35588. A_UINT32 flags; /* enable/disable flags, refer to MACROs TWT_EN_DIS_FLAGS_* (TWT_EN_DIS_FLAGS_GET_BTWT etc.) */
  35589. A_UINT32 reason_code; /* refer to WMI_DISABLE_TWT_REASON_T */
  35590. } wmi_twt_disable_cmd_fixed_param;
  35591. typedef struct {
  35592. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_disable_complete_event_fixed_param */
  35593. A_UINT32 pdev_id;
  35594. A_UINT32 status; /* refer to WMI_DISABLE_TWT_STATUS_T enum */
  35595. } wmi_twt_disable_complete_event_fixed_param;
  35596. typedef struct {
  35597. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_vdev_config_cmd_fixed_param */
  35598. /** pdev_id for identifying the MAC.
  35599. * See macros starting with WMI_PDEV_ID_ for values.
  35600. */
  35601. A_UINT32 pdev_id;
  35602. A_UINT32 vdev_id;
  35603. /* TWT support flag to be applied to the vdev
  35604. * 0 = ITWT, BTWT and RTWT are disabled.
  35605. * 1 = ITWT is enabled
  35606. * 2 = ITWT and BTWT are enabled
  35607. * 3 = ITWT, BTWT and RTWT are enabled
  35608. */
  35609. A_UINT32 twt_support;
  35610. } wmi_twt_vdev_config_cmd_fixed_param;
  35611. /* status code of TWT Disable */
  35612. typedef enum _WMI_DISABLE_TWT_STATUS_T {
  35613. WMI_DISABLE_TWT_STATUS_OK, /* Disabling TWT successfully completed */
  35614. WMI_DISABLE_TWT_STATUS_ROAM_IN_PROGRESS, /* Roaming in progress */
  35615. WMI_DISABLE_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
  35616. WMI_DISABLE_TWT_STATUS_SCAN_IN_PROGRESS, /* Scan in progress */
  35617. } WMI_DISABLE_TWT_STATUS_T;
  35618. /* Host reason code of TWT Disable command : Set by Host */
  35619. typedef enum _WMI_DISABLE_TWT_REASON_T {
  35620. /* Host will set one of below reason code while disabling TWT */
  35621. WMI_DISABLE_TWT_REASON_NONE, /* Normal case */
  35622. WMI_DISABLE_TWT_REASON_CONCURRENCY_SCC, /* Concurrency case SCC */
  35623. WMI_DISABLE_TWT_REASON_CONCURRENCY_MCC, /* Concurrency case MCC */
  35624. WMI_DISABLE_TWT_REASON_CHANGE_CONGESTION_TIMEOUT, /* To change congestion time */
  35625. WMI_DISABLE_TWT_REASON_P2P_GO_NOA, /* P2P GO NOA reason */
  35626. } WMI_DISABLE_TWT_REASON_T;
  35627. /* Notification event ID to Host */
  35628. typedef enum _WMI_TWT_NOTIFICATION_ID_T {
  35629. WMI_TWT_NOTIFY_EVENT_READY = 1,
  35630. WMI_TWT_NOTIFY_EVENT_AP_TWT_REQ_BIT_SET = 2,
  35631. WMI_TWT_NOTIFY_EVENT_AP_TWT_REQ_BIT_CLEAR = 3,
  35632. } WMI_TWT_NOTIFICATION_ID_T;
  35633. typedef struct {
  35634. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_notify_event_fixed_param */
  35635. A_UINT32 vdev_id; /* vdev id of TWT notify event */
  35636. A_UINT32 event_id; /* refer to WMI_TWT_NOTIFICATION_ID_T */
  35637. } wmi_twt_notify_event_fixed_param;
  35638. /* from IEEE 802.11ah section 9.4.2.200 */
  35639. typedef enum _WMI_TWT_COMMAND_T {
  35640. WMI_TWT_COMMAND_REQUEST_TWT = 0,
  35641. WMI_TWT_COMMAND_SUGGEST_TWT = 1,
  35642. WMI_TWT_COMMAND_DEMAND_TWT = 2,
  35643. WMI_TWT_COMMAND_TWT_GROUPING = 3,
  35644. WMI_TWT_COMMAND_ACCEPT_TWT = 4,
  35645. WMI_TWT_COMMAND_ALTERNATE_TWT = 5,
  35646. WMI_TWT_COMMAND_DICTATE_TWT = 6,
  35647. WMI_TWT_COMMAND_REJECT_TWT = 7,
  35648. } WMI_TWT_COMMAND_T;
  35649. /* TWT command, refer to WMI_TWT_COMMAND_T */
  35650. #define TWT_FLAGS_GET_CMD(flag) WMI_GET_BITS(flag, 0, 8)
  35651. #define TWT_FLAGS_SET_CMD(flag, val) WMI_SET_BITS(flag, 0, 8, val)
  35652. /* 0 means Individual TWT, 1 means Broadcast TWT */
  35653. #define TWT_FLAGS_GET_BROADCAST(flag) WMI_GET_BITS(flag, 8, 1)
  35654. #define TWT_FLAGS_SET_BROADCAST(flag, val) WMI_SET_BITS(flag, 8, 1, val)
  35655. /* 0 means non-Trigger-enabled TWT, 1 means means Trigger-enabled TWT */
  35656. #define TWT_FLAGS_GET_TRIGGER(flag) WMI_GET_BITS(flag, 9, 1)
  35657. #define TWT_FLAGS_SET_TRIGGER(flag, val) WMI_SET_BITS(flag, 9, 1, val)
  35658. /* flow type 0 means announced TWT, 1 means un-announced TWT */
  35659. #define TWT_FLAGS_GET_FLOW_TYPE(flag) WMI_GET_BITS(flag, 10, 1)
  35660. #define TWT_FLAGS_SET_FLOW_TYPE(flag, val) WMI_SET_BITS(flag, 10, 1, val)
  35661. /* 0 means TWT protection is required, 1 means TWT protection is not required */
  35662. #define TWT_FLAGS_GET_PROTECTION(flag) WMI_GET_BITS(flag, 11, 1)
  35663. #define TWT_FLAGS_SET_PROTECTION(flag, val) WMI_SET_BITS(flag, 11, 1, val)
  35664. /* B-TWT ID 0: 0 means non-0 B-TWT ID or I-TWT, 1 means B-TWT ID 0 */
  35665. #define TWT_FLAGS_GET_BTWT_ID0(flag) WMI_GET_BITS(flag, 12, 1)
  35666. #define TWT_FLAGS_SET_BTWT_ID0(flag, val) WMI_SET_BITS(flag, 12, 1, val)
  35667. /* 0 means TWT Information frame is enabled, 1 means TWT Information frame is disabled */
  35668. #define TWT_FLAGS_GET_TWT_INFO_FRAME_DISABLED(flag) WMI_GET_BITS(flag, 13, 1)
  35669. #define TWT_FLAGS_SET_TWT_INFO_FRAME_DISABLED(flag, val) WMI_SET_BITS(flag, 13, 1, val)
  35670. /*
  35671. * 1 means PM_RESPONDER_MODE information sent in BIT15 is valid, 0 means it is not valid.
  35672. * Will be used for backward compatibility if host uses older FW versions
  35673. * then value will be 0 so host will not consider the BIT15 value.
  35674. */
  35675. #define TWT_FLAGS_GET_PM_RESPONDER_MODE_VALID(flag) WMI_GET_BITS(flag, 14, 1)
  35676. #define TWT_FLAGS_SET_PM_RESPONDER_MODE_VALID(flag, val) WMI_SET_BITS(flag, 14, 1, val)
  35677. /* 1 means PM_RESPONDER_MODE supported, 0 means not supported */
  35678. #define TWT_FLAGS_GET_PM_RESPONDER_MODE(flag) WMI_GET_BITS(flag, 15, 1)
  35679. #define TWT_FLAGS_SET_PM_RESPONDER_MODE(flag, val) WMI_SET_BITS(flag, 15, 1, val)
  35680. typedef struct {
  35681. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_ack_event_fixed_param */
  35682. A_UINT32 vdev_id; /* VDEV identifier */
  35683. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35684. A_UINT32 dialog_id; /* TWT dialog ID */
  35685. A_UINT32 twt_cmd; /* TWT command for which this ack is sent */
  35686. A_UINT32 status; /* Status code corresponding to twt_cmd.
  35687. * This status field contains a value from the
  35688. * status enum corresponding to the twt_cmd type
  35689. * (WMI_ADD_TWT_STATUS_T, WMI_DEL_TWT_STATUS_T,
  35690. * WMI_PAUSE_TWT_STATUS_T, etc.)
  35691. */
  35692. } wmi_twt_ack_event_fixed_param;
  35693. typedef struct {
  35694. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_cmd_fixed_param */
  35695. A_UINT32 vdev_id; /* VDEV identifier */
  35696. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35697. A_UINT32 dialog_id; /* TWT dialog_id (< 0xFF) is per peer, I-TWT & B-TWT use different diaglog ID */
  35698. /* 1. wake_intvl_mantis must be <= 0xFFFF
  35699. * 2. wake_intvl_us must be divided evenly by wake_intvl_mantis,
  35700. * i.e., wake_intvl_us % wake_intvl_mantis == 0
  35701. * 3. the quotient of wake_intvl_us/wake_intvl_mantis must be 2 to N-th(0<=N<=31) power,
  35702. * i.e., wake_intvl_us/wake_intvl_mantis == 2^N, 0<=N<=31
  35703. */
  35704. A_UINT32 wake_intvl_us; /* TWT Wake Interval in units of us */
  35705. A_UINT32 wake_intvl_mantis; /* TWT Wake Interval Mantissa */
  35706. /* wake_dura_us must be divided evenly by 256, i.e., wake_dura_us % 256 == 0 */
  35707. A_UINT32 wake_dura_us; /* TWT Wake Duration in units of us, must be <= 65280 (0xFF00) */
  35708. A_UINT32 sp_offset_us; /* this long time after TWT setup the 1st SP will start */
  35709. A_UINT32 flags; /* TWT flags, refer to MACROs TWT_FLAGS_*(TWT_FLAGS_GET_CMD etc) */
  35710. /* Broadcast TWT(B-TWT) Persistence, when used in Add/update Dialog,
  35711. * indicates for how long(in units of TBTTs) current B-TWT session
  35712. * parameters will not be changed.
  35713. * Refer to 11ax spec session "9.4.2.199 TWT element" for more info.
  35714. */
  35715. A_UINT32 b_twt_persistence;
  35716. /* Broadcast TWT(B-TWT) Recommendation, refer to section
  35717. * "9.4.2.199 TWT element" of latest 11ax draft
  35718. */
  35719. A_UINT32 b_twt_recommendation;
  35720. /* Min tolerance limit of wake interval.
  35721. * If this variable is set to 0 by host, FW will ignore it.
  35722. */
  35723. A_UINT32 min_wake_intvl_us;
  35724. /* Max tolerance limit of wake interval.
  35725. * If this variable is set to 0 by host, FW will ignore it.
  35726. */
  35727. A_UINT32 max_wake_intvl_us;
  35728. /* Min tolerance limit of wake duration.
  35729. * If this variable is set to 0 by host, FW will ignore it.
  35730. */
  35731. A_UINT32 min_wake_dura_us;
  35732. /* Max tolerance limit of wake duration.
  35733. * If this variable is set to 0 by host, FW will ignore it.
  35734. */
  35735. A_UINT32 max_wake_dura_us;
  35736. /*
  35737. * Service period start TSF (absolute)
  35738. * If sp_start_tsf_lo == sp_start_tsf_hi == 0, the specification
  35739. * is invalid, and shall be ignored.
  35740. */
  35741. A_UINT32 sp_start_tsf_lo; /* bits 31:0 */
  35742. A_UINT32 sp_start_tsf_hi; /* bits 63:32 */
  35743. /*
  35744. * In announced mode, wait for announce timeout before explicit announce
  35745. * using QoS NULL.
  35746. * If set to 0, FW will send QoS NULL immediately.
  35747. */
  35748. A_UINT32 announce_timeout_us;
  35749. A_UINT32 link_id_bitmap;
  35750. /* parameters required for R-TWT feature */
  35751. A_UINT32 r_twt_dl_tid_bitmap;
  35752. A_UINT32 r_twt_ul_tid_bitmap;
  35753. } wmi_twt_add_dialog_cmd_fixed_param;
  35754. /* status code of adding TWT dialog */
  35755. typedef enum _WMI_ADD_TWT_STATUS_T {
  35756. WMI_ADD_TWT_STATUS_OK, /* adding TWT dialog successfully completed */
  35757. WMI_ADD_TWT_STATUS_TWT_NOT_ENABLED, /* TWT not enabled */
  35758. WMI_ADD_TWT_STATUS_USED_DIALOG_ID, /* TWT dialog ID is already used */
  35759. WMI_ADD_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  35760. WMI_ADD_TWT_STATUS_NOT_READY, /* FW not ready */
  35761. WMI_ADD_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  35762. WMI_ADD_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  35763. WMI_ADD_TWT_STATUS_NO_RESPONSE, /* peer AP did not send the response frame */
  35764. WMI_ADD_TWT_STATUS_DENIED, /* AP did not accept the request */
  35765. WMI_ADD_TWT_STATUS_UNKNOWN_ERROR, /* adding TWT dialog failed with an unknown reason */
  35766. WMI_ADD_TWT_STATUS_AP_PARAMS_NOT_IN_RANGE, /* peer AP wake interval, duration not in range */
  35767. WMI_ADD_TWT_STATUS_AP_IE_VALIDATION_FAILED, /* peer AP IE Validation Failed */
  35768. WMI_ADD_TWT_STATUS_ROAM_IN_PROGRESS, /* Roaming in progress */
  35769. WMI_ADD_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
  35770. WMI_ADD_TWT_STATUS_SCAN_IN_PROGRESS, /* Scan in progress */
  35771. WMI_ADD_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  35772. WMI_ADD_TWT_STATUS_BTWT_NOT_ENBABLED, /* Broadcast TWT is not enabled */
  35773. WMI_ADD_TWT_STATUS_RTWT_NOT_ENBABLED, /* Restricted TWT is not enabled */
  35774. WMI_ADD_TWT_STATUS_LINK_SWITCH_IN_PROGRESS, /* Link switch is ongoing */
  35775. WMI_ADD_TWT_STATUS_UNSUPPORTED_MODE_MLMR, /* Unsupported in MLMR mode */
  35776. } WMI_ADD_TWT_STATUS_T;
  35777. typedef struct {
  35778. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_additional_params */
  35779. A_UINT32 flags; /* TWT flags, refer to MACROs TWT_FLAGS_*(TWT_FLAGS_GET_CMD etc) */
  35780. A_UINT32 wake_dur_us; /* Wake duration in uS */
  35781. A_UINT32 wake_intvl_us; /* Wake Interval in uS */
  35782. A_UINT32 sp_offset_us; /* SP Starting Offset */
  35783. A_UINT32 sp_tsf_us_lo; /* SP start TSF bits 31:0 */
  35784. A_UINT32 sp_tsf_us_hi; /* SP start TSF bits 63:32 */
  35785. } wmi_twt_add_dialog_additional_params;
  35786. typedef struct {
  35787. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_complete_event_fixed_param */
  35788. A_UINT32 vdev_id; /* VDEV identifier */
  35789. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35790. A_UINT32 dialog_id; /* TWT dialog ID */
  35791. A_UINT32 status; /* refer to WMI_ADD_TWT_STATUS_T */
  35792. /*
  35793. * This fixed_param TLV is followed by the below TLVs:
  35794. * wmi_twt_add_dialog_additional_params twt_params[]; // TWT params received
  35795. * // from peer
  35796. */
  35797. } wmi_twt_add_dialog_complete_event_fixed_param;
  35798. typedef struct {
  35799. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_del_dialog_cmd_fixed_param */
  35800. A_UINT32 vdev_id; /* VDEV identifier */
  35801. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35802. A_UINT32 dialog_id; /* TWT dialog ID */
  35803. /* Broadcast TWT(B-TWT) Persistence, when used in Del Dialog,
  35804. * indicates for how long(in units of TBTTs) current B-TWT session
  35805. * parameters will be present.
  35806. * Refer to 11ax spec session "9.4.2.199 TWT element" for more info.
  35807. */
  35808. A_UINT32 b_twt_persistence;
  35809. A_UINT32 is_bcast_twt;
  35810. } wmi_twt_del_dialog_cmd_fixed_param;
  35811. /* status code of deleting TWT dialog */
  35812. typedef enum _WMI_DEL_TWT_STATUS_T {
  35813. WMI_DEL_TWT_STATUS_OK, /* deleting TWT dialog successfully completed */
  35814. WMI_DEL_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  35815. WMI_DEL_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  35816. WMI_DEL_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  35817. WMI_DEL_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  35818. WMI_DEL_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  35819. WMI_DEL_TWT_STATUS_UNKNOWN_ERROR, /* deleting TWT dialog failed with an unknown reason */
  35820. WMI_DEL_TWT_STATUS_PEER_INIT_TEARDOWN, /* Peer Initiated Teardown */
  35821. WMI_DEL_TWT_STATUS_ROAMING, /* Reason Roaming Start*/
  35822. WMI_DEL_TWT_STATUS_CONCURRENCY, /* Teardown due to concurrency */
  35823. WMI_DEL_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
  35824. WMI_DEL_TWT_STATUS_SCAN_IN_PROGRESS, /* Reason Scan in progress */
  35825. WMI_DEL_TWT_STATUS_CHANGE_CONGESTION_TIMEOUT, /* Congestion timeout changed */
  35826. WMI_DEL_TWT_STATUS_P2P_GO_NOA, /* P2P GO NOA */
  35827. } WMI_DEL_TWT_STATUS_T;
  35828. typedef struct {
  35829. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_del_dialog_complete_event_fixed_param */
  35830. A_UINT32 vdev_id; /* VDEV identifier */
  35831. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35832. A_UINT32 dialog_id; /* TWT dialog ID */
  35833. A_UINT32 status; /* refer to WMI_DEL_TWT_STATUS_T */
  35834. } wmi_twt_del_dialog_complete_event_fixed_param;
  35835. typedef struct {
  35836. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_pause_dialog_cmd_fixed_param */
  35837. A_UINT32 vdev_id; /* VDEV identifier */
  35838. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35839. A_UINT32 dialog_id; /* TWT dialog ID */
  35840. } wmi_twt_pause_dialog_cmd_fixed_param;
  35841. /* status code of pausing TWT dialog */
  35842. typedef enum _WMI_PAUSE_TWT_STATUS_T {
  35843. WMI_PAUSE_TWT_STATUS_OK, /* pausing TWT dialog successfully completed */
  35844. WMI_PAUSE_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  35845. WMI_PAUSE_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  35846. WMI_PAUSE_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  35847. WMI_PAUSE_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  35848. WMI_PAUSE_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  35849. WMI_PAUSE_TWT_STATUS_UNKNOWN_ERROR, /* pausing TWT dialog failed with an unknown reason */
  35850. WMI_PAUSE_TWT_STATUS_ALREADY_PAUSED, /* The TWT dialog is already paused */
  35851. WMI_PAUSE_TWT_STATUS_TWT_INFO_FRM_NOT_SUPPORTED, /* TWT information frame is not supported by AP */
  35852. WMI_PAUSE_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
  35853. WMI_PAUSE_TWT_STATUS_ROAM_IN_PROGRESS, /* Roam in progress */
  35854. WMI_PAUSE_TWT_STATUS_SCAN_IN_PROGRESS, /* Scan in progress */
  35855. } WMI_PAUSE_TWT_STATUS_T;
  35856. typedef struct {
  35857. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_pause_dialog_complete_event_fixed_param */
  35858. A_UINT32 vdev_id; /* VDEV identifier */
  35859. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35860. A_UINT32 dialog_id; /* TWT dialog ID */
  35861. A_UINT32 status; /* refer to WMI_PAUSE_TWT_STATUS_T */
  35862. } wmi_twt_pause_dialog_complete_event_fixed_param;
  35863. typedef struct {
  35864. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_resume_dialog_cmd_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 sp_offset_us; /* this long time after TWT resumed the 1st SP will start */
  35869. A_UINT32 next_twt_size; /* Next TWT subfield Size, refer to IEEE 802.11ax section "9.4.1.60 TWT Information field" */
  35870. } wmi_twt_resume_dialog_cmd_fixed_param;
  35871. /* status code of resuming TWT dialog */
  35872. typedef enum _WMI_RESUME_TWT_STATUS_T {
  35873. WMI_RESUME_TWT_STATUS_OK, /* resuming TWT dialog successfully completed */
  35874. WMI_RESUME_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  35875. WMI_RESUME_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  35876. WMI_RESUME_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  35877. WMI_RESUME_TWT_STATUS_NOT_PAUSED, /* dialog not paused currently */
  35878. WMI_RESUME_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  35879. WMI_RESUME_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  35880. WMI_RESUME_TWT_STATUS_UNKNOWN_ERROR, /* resuming TWT dialog failed with an unknown reason */
  35881. WMI_RESUME_TWT_STATUS_TWT_INFO_FRM_NOT_SUPPORTED, /* TWT information frame is not supported by AP */
  35882. WMI_RESUME_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
  35883. WMI_RESUME_TWT_STATUS_ROAM_IN_PROGRESS, /* Roam in progress */
  35884. WMI_RESUME_TWT_STATUS_SCAN_IN_PROGRESS, /* Scan in progress */
  35885. } WMI_RESUME_TWT_STATUS_T;
  35886. typedef struct {
  35887. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_resume_dialog_complete_event_fixed_param */
  35888. A_UINT32 vdev_id; /* VDEV identifier */
  35889. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35890. A_UINT32 dialog_id; /* TWT dialog ID */
  35891. A_UINT32 status; /* refer to WMI_RESUME_TWT_STATUS_T */
  35892. } wmi_twt_resume_dialog_complete_event_fixed_param;
  35893. typedef struct {
  35894. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_nudge_dialog_cmd_fixed_param */
  35895. A_UINT32 vdev_id; /* VDEV identifier */
  35896. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35897. A_UINT32 dialog_id; /* TWT dialog ID */
  35898. A_UINT32 suspend_duration_ms; /* this long time after TWT paused the 1st SP will start (millisecond) */
  35899. A_UINT32 next_twt_size; /* Next TWT subfield Size, refer to IEEE 802.11ax section "9.4.1.60 TWT Information field" */
  35900. A_INT32 sp_start_offset; /* Next TWT service period will be offset by this time (microsecond) */
  35901. } wmi_twt_nudge_dialog_cmd_fixed_param;
  35902. /* status code of nudging TWT dialog */
  35903. typedef enum _WMI_TWT_NUDGE_STATUS_T {
  35904. WMI_NUDGE_TWT_STATUS_OK, /* nudging TWT dialog successfully completed */
  35905. WMI_NUDGE_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID doesn't exist */
  35906. WMI_NUDGE_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  35907. WMI_NUDGE_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  35908. WMI_NUDGE_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  35909. WMI_NUDGE_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  35910. WMI_NUDGE_TWT_STATUS_UNKNOWN_ERROR, /* nudging TWT dialog failed with an unknown reason */
  35911. WMI_NUDGE_TWT_STATUS_ALREADY_PAUSED, /* The TWT dialog is already paused */
  35912. WMI_NUDGE_TWT_STATUS_TWT_INFO_FRM_NOT_SUPPORTED, /* TWT information frame is not supported by AP */
  35913. WMI_NUDGE_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
  35914. WMI_NUDGE_TWT_STATUS_ROAM_IN_PROGRESS, /* Roam in progress */
  35915. WMI_NUDGE_TWT_STATUS_SCAN_IN_PROGRESS, /* Scan in progress */
  35916. } WMI_TWT_NUDGE_STATUS_T;
  35917. typedef struct {
  35918. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_nudge_dialog_complete_event_fixed_param */
  35919. A_UINT32 vdev_id; /* VDEV identifier */
  35920. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35921. A_UINT32 dialog_id; /* TWT dialog ID */
  35922. A_UINT32 status; /* refer to WMI_NUDGE_TWT_STATUS_T */
  35923. A_UINT32 sp_tsf_us_lo; /* SP resume TSF bits 31:0 */
  35924. A_UINT32 sp_tsf_us_hi; /* SP resume TSF bits 63:32 */
  35925. } wmi_twt_nudge_dialog_complete_event_fixed_param;
  35926. typedef struct {
  35927. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_btwt_invite_sta_cmd_fixed_param */
  35928. A_UINT32 vdev_id; /* VDEV identifier */
  35929. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35930. A_UINT32 dialog_id; /* TWT dialog ID */
  35931. /* parameters required for R-TWT feature */
  35932. A_UINT32 r_twt_dl_tid_bitmap;
  35933. A_UINT32 r_twt_ul_tid_bitmap;
  35934. } wmi_twt_btwt_invite_sta_cmd_fixed_param;
  35935. /* status code of inviting STA to B-TWT dialog */
  35936. typedef enum _WMI_TWT_BTWT_INVITE_STA_STATUS_T {
  35937. WMI_TWT_BTWT_INVITE_STA_STATUS_OK, /* inviting STA to B-TWT successfully completed */
  35938. WMI_TWT_BTWT_INVITE_STA_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  35939. WMI_TWT_BTWT_INVITE_STA_STATUS_INVALID_PARAM, /* invalid parameters */
  35940. WMI_TWT_BTWT_INVITE_STA_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  35941. WMI_TWT_BTWT_INVITE_STA_STATUS_ALREADY_JOINED, /* peer STA already joined the session */
  35942. WMI_TWT_BTWT_INVITE_STA_STATUS_NO_RESOURCE, /* FW resource exhausted */
  35943. WMI_TWT_BTWT_INVITE_STA_STATUS_NO_ACK, /* peer STA did not ACK the request/response frame */
  35944. WMI_TWT_BTWT_INVITE_STA_STATUS_UNKNOWN_ERROR, /* failed with an unknown reason */
  35945. } WMI_TWT_BTWT_INVITE_STA_STATUS_T;
  35946. typedef struct {
  35947. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_twt_btwt_invite_sta_complete_event_fixed_param */
  35948. A_UINT32 vdev_id; /* VDEV identifier */
  35949. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35950. A_UINT32 dialog_id; /* TWT dialog ID */
  35951. A_UINT32 status; /* refer to WMI_TWT_BTWT_INVITE_STA_STATUS_T */
  35952. } wmi_twt_btwt_invite_sta_complete_event_fixed_param;
  35953. typedef struct {
  35954. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_twt_btwt_remove_sta_cmd_fixed_param */
  35955. A_UINT32 vdev_id; /* VDEV identifier */
  35956. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35957. A_UINT32 dialog_id; /* TWT dialog ID */
  35958. /* parameters required for R-TWT feature */
  35959. A_UINT32 r_twt_dl_tid_bitmap;
  35960. A_UINT32 r_twt_ul_tid_bitmap;
  35961. } wmi_twt_btwt_remove_sta_cmd_fixed_param;
  35962. /* status code of removing STA from B-TWT dialog */
  35963. typedef enum _WMI_TWT_BTWT_REMOVE_STA_STATUS_T {
  35964. WMI_TWT_BTWT_REMOVE_STA_STATUS_OK, /* removing STA from B-TWT successfully completed */
  35965. WMI_TWT_BTWT_REMOVE_STA_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  35966. WMI_TWT_BTWT_REMOVE_STA_STATUS_INVALID_PARAM, /* invalid parameters */
  35967. WMI_TWT_BTWT_REMOVE_STA_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  35968. WMI_TWT_BTWT_REMOVE_STA_STATUS_NOT_JOINED, /* peer STA not joined yet */
  35969. WMI_TWT_BTWT_REMOVE_STA_STATUS_NO_RESOURCE, /* FW resource exhausted */
  35970. WMI_TWT_BTWT_REMOVE_STA_STATUS_NO_ACK, /* peer STA did not ACK the request/response frame */
  35971. WMI_TWT_BTWT_REMOVE_STA_STATUS_UNKNOWN_ERROR, /* failed with an unknown reason */
  35972. } WMI_TWT_BTWT_REMOVE_STA_STATUS_T;
  35973. typedef struct {
  35974. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_twt_btwt_remove_sta_complete_event_fixed_param */
  35975. A_UINT32 vdev_id; /* VDEV identifier */
  35976. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35977. A_UINT32 dialog_id; /* TWT dialog ID */
  35978. A_UINT32 status; /* refer to WMI_TWT_BTWT_REMOVE_STA_STATUS_T */
  35979. } wmi_twt_btwt_remove_sta_complete_event_fixed_param;
  35980. typedef enum {
  35981. WMI_DMA_RING_CONFIG_MODULE_SPECTRAL,
  35982. WMI_DMA_RING_CONFIG_MODULE_RTT,
  35983. WMI_DMA_RING_CONFIG_MODULE_CV_UPLOAD,
  35984. WMI_DMA_RING_CONFIG_MODULE_WIFI_RADAR,
  35985. } WMI_DMA_RING_SUPPORTED_MODULE;
  35986. typedef struct {
  35987. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_DMA_RING_CAPABILITIES */
  35988. A_UINT32 pdev_id;
  35989. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  35990. A_UINT32 ring_elems_min; /* minimum spaces in the DMA ring for this pdev */
  35991. A_UINT32 min_buf_size; /* minimum size in bytes of each buffer in the DMA ring */
  35992. A_UINT32 min_buf_align; /* minimum alignment in bytes of each buffer in the DMA ring */
  35993. /**************************************************************************
  35994. * DON'T ADD ANY FURTHER FIELDS HERE -
  35995. * It would cause the size of the READY_EXT message within some targets
  35996. * to exceed the size of the buffer used for the message.
  35997. **************************************************************************/
  35998. } WMI_DMA_RING_CAPABILITIES;
  35999. typedef struct {
  36000. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_ wmi_chan_rf_characterization_info */
  36001. /**
  36002. * [7:0] : channel metric - 0 = unusable, 1 = worst, 100 = best
  36003. * [11:8] : channel BW - This bit-field uses values compatible with
  36004. * enum definitions used internally within the target's
  36005. * halphy code. This bit field uses wmi_channel_width.
  36006. * [15:12]: Reserved
  36007. * [31:16]: Frequency - Center frequency of the channel for which
  36008. * the RF characterisation info applies (MHz)
  36009. */
  36010. A_UINT32 freq_info;
  36011. /**************************************************************************
  36012. * DON'T ADD ANY FURTHER FIELDS HERE -
  36013. * It would cause the size of the READY_EXT message within some targets
  36014. * to exceed the size of the buffer used for the message.
  36015. **************************************************************************/
  36016. } WMI_CHAN_RF_CHARACTERIZATION_INFO;
  36017. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC 0x000000ff
  36018. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC_S 0
  36019. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW 0x00000f00
  36020. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW_S 8
  36021. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ 0xffff0000
  36022. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ_S 16
  36023. #define WMI_CHAN_RF_CHARACTERIZATION_CHAN_METRIC_SET(dword,val) \
  36024. WMI_F_RMW((dword)->freq_info,(val), \
  36025. WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC)
  36026. #define WMI_CHAN_RF_CHARACTERIZATION_CHAN_METRIC_GET(dword) \
  36027. WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC)
  36028. #define WMI_CHAN_RF_CHARACTERIZATION_BW_SET(dword, val) \
  36029. WMI_F_RMW((dword)->freq_info,(val), \
  36030. WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW)
  36031. #define WMI_CHAN_RF_CHARACTERIZATION_BW_GET(dword) \
  36032. WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW)
  36033. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_SET(dword, val) \
  36034. WMI_F_RMW((dword)->freq_info,(val), \
  36035. WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ)
  36036. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_GET(dword) \
  36037. WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ)
  36038. typedef struct {
  36039. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_COEX_FIX_CHANNEL_CAPABILITIES */
  36040. /**************************************************************************
  36041. * 1: SAP fix channel has higher priority than ACS
  36042. * 0: SAP fix channel has lower priority than ACS
  36043. **************************************************************************/
  36044. A_UINT32 fix_channel_priority;
  36045. } WMI_COEX_FIX_CHANNEL_CAPABILITIES;
  36046. #define WMI_DMA_RING_PADDR_LO_S 0
  36047. #define WMI_DMA_RING_PADDR_LO 0xffffffff
  36048. #define WMI_DMA_RING_BASE_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  36049. #define WMI_DMA_RING_BASE_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  36050. #define WMI_DMA_RING_HEAD_IDX_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  36051. #define WMI_DMA_RING_HEAD_IDX_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  36052. #define WMI_DMA_RING_TAIL_IDX_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  36053. #define WMI_DMA_RING_TAIL_IDX_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  36054. #define WMI_DMA_RING_PADDR_HI_S 0
  36055. #define WMI_DMA_RING_PADDR_HI 0xffff
  36056. #define WMI_DMA_RING_BASE_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  36057. #define WMI_DMA_RING_BASE_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  36058. #define WMI_DMA_RING_HEAD_IDX_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  36059. #define WMI_DMA_RING_HEAD_IDX_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  36060. #define WMI_DMA_RING_TAIL_IDX_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  36061. #define WMI_DMA_RING_TAIL_IDX_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  36062. typedef struct {
  36063. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_ring_cfg_req_fixed_param */
  36064. A_UINT32 pdev_id;
  36065. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  36066. /**
  36067. * Bits 31:0: base address of ring [31:0]
  36068. */
  36069. A_UINT32 base_paddr_lo;
  36070. /**
  36071. * Bits 15:0: base address of ring [47:32]
  36072. * Bits 31:16: reserved (set to 0x0)
  36073. */
  36074. A_UINT32 base_paddr_hi;
  36075. /**
  36076. * Bits 31:0: address of head index [31:0]
  36077. */
  36078. A_UINT32 head_idx_paddr_lo;
  36079. /**
  36080. * Bits 15:0: address of head index [47:32]
  36081. * Bits 31:16: reserved (set to 0x0)
  36082. */
  36083. A_UINT32 head_idx_paddr_hi;
  36084. /**
  36085. * Bits 31:0: address of tail index [31:0]
  36086. */
  36087. A_UINT32 tail_idx_paddr_lo;
  36088. /**
  36089. * Bits 15:0: address of tail index [47:32]
  36090. * Bits 31:16: reserved (set to 0x0)
  36091. */
  36092. A_UINT32 tail_idx_paddr_hi;
  36093. A_UINT32 num_elems; /** Number of elems in the ring */
  36094. A_UINT32 buf_size; /** size of allocated buffer in bytes */
  36095. A_UINT32 num_resp_per_event; /** Number of wmi_dma_buf_release_entry packed together */
  36096. /**
  36097. * This parameter specifies the timeout in milliseconds.
  36098. * Target should timeout and send whatever resp it has if this time expires.
  36099. */
  36100. A_UINT32 event_timeout_ms;
  36101. } wmi_dma_ring_cfg_req_fixed_param;
  36102. typedef struct {
  36103. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_ring_cfg_rsp_fixed_param */
  36104. A_UINT32 pdev_id;
  36105. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  36106. A_UINT32 cfg_status; /** Configuration status; see A_STATUS */
  36107. } wmi_dma_ring_cfg_rsp_fixed_param;
  36108. typedef struct {
  36109. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_fixed_param */
  36110. A_UINT32 pdev_id; /** ID of pdev whose DMA ring produced the data */
  36111. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  36112. A_UINT32 num_buf_release_entry;
  36113. A_UINT32 num_meta_data_entry;
  36114. /* This TLV is followed by another TLV of array of structs.
  36115. * wmi_dma_buf_release_entry entries[num_buf_release_entry];
  36116. * wmi_dma_buf_release_spectral_meta_data meta_datat[num_meta_data_entry];
  36117. * wmi_dma_buf_release_cv_upload_meta_data cv_meta_data[num_meta_data_entry]
  36118. * wmi_dma_buf_release_cqi_upload_meta_data
  36119. * cqi_meta_data[num_meta_data_entry]
  36120. * wmi_dma_buf_release_wifi_radar_meta_data
  36121. * wifi_radar_meta_data[num_meta_data_entry]
  36122. */
  36123. } wmi_dma_buf_release_fixed_param;
  36124. typedef struct {
  36125. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_entry */
  36126. /**
  36127. * Bits 31:0: address of data [31:0]
  36128. */
  36129. A_UINT32 paddr_lo;
  36130. /**
  36131. * Bits 11:0: address of data [43:32]
  36132. * Bits 31:12: host context data [19:0]
  36133. */
  36134. A_UINT32 paddr_hi;
  36135. } wmi_dma_buf_release_entry;
  36136. typedef struct {
  36137. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_spectral_meta_data */
  36138. /**
  36139. * meta data information.
  36140. * Host uses the noise floor values as one of the major parameter
  36141. * to classify the spectral data.
  36142. * This information will not be provided by ucode unlike the fft reports
  36143. * which gets DMAed to DDR buffer.
  36144. * Hence sending the NF values in dBm units as meta data information.
  36145. */
  36146. A_INT32 noise_floor[WMI_MAX_CHAINS];
  36147. /**
  36148. * The time taken by target in micro seconds to complete the reset routine
  36149. * and re-initiate the spectral scan.
  36150. * If the delay is 0, the WAR to bookkeep the timestamp won't be exercised
  36151. * in HOST.
  36152. */
  36153. A_UINT32 reset_delay;
  36154. /**
  36155. * Current center freq1 (MHz units)
  36156. */
  36157. A_UINT32 freq1;
  36158. /**
  36159. * Current center freq2 (MHz units)
  36160. */
  36161. A_UINT32 freq2;
  36162. /**
  36163. * Channel Width (MHz units)
  36164. */
  36165. A_UINT32 ch_width;
  36166. } wmi_dma_buf_release_spectral_meta_data;
  36167. typedef enum {
  36168. NO_SCALING = 0, /* No bin scaling*/
  36169. /**
  36170. * scaled_bin_mag = bin_mag *
  36171. * sqrt(10^(max(legacy_max_gain - default_agc_max_gain + low_level_offset - RSSI_corr,
  36172. * (agc_total_gain_db < default_agc_max_gain) * high_level_offset)/10)) *
  36173. * 2^(DET{0,1,2}_SPECTRAL_SCAN_BIN_SCALE - legacy_spectral_scan_bin_scale)
  36174. */
  36175. AGC_GAIN_RSSI_CORR_BASED = 1,
  36176. } WMI_SPECTRAL_SCALING_FORMULA_ID;
  36177. typedef struct {
  36178. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_spectral_bin_scaling_params */
  36179. A_UINT32 pdev_id; /* ID of pdev to which the scaling parameters are to be applied */
  36180. WMI_SPECTRAL_SCALING_FORMULA_ID formula_id; /* Represets the formula to be used */
  36181. A_UINT32 low_level_offset; /* low level offset for fine tuning the scaling factor based on RSSI and AGC gain */
  36182. A_UINT32 high_level_offset; /* high level offset for fine tuning the scaling factor based on RSSI and AGC gain */
  36183. A_UINT32 rssi_thr; /* RSSI threshold to be used to adjust the inband power of the given spectral report */
  36184. A_UINT32 default_agc_max_gain;/* DEFAULT AGC MAX GAIN used. Fetched from register RXTD_RADAR_SBS_CTRL_1_L bits20:13 */
  36185. /**************************************************************************
  36186. * DON'T ADD ANY FURTHER FIELDS HERE -
  36187. * It would cause the size of the READY_EXT message within some targets
  36188. * to exceed the size of the buffer used for the message.
  36189. **************************************************************************/
  36190. } wmi_spectral_bin_scaling_params;
  36191. #define WMI_SPECTRAL_BW_CAPS_GET(bw_caps, index) WMI_GET_BITS(bw_caps, index, 1)
  36192. #define WMI_SPECTRAL_BW_CAPS_SET(bw_caps, index, value) WMI_SET_BITS(bw_caps, index, 1, value)
  36193. #define WMI_SPECTRAL_FFT_SIZE_CAPS_GET(fft_size_caps, index) WMI_GET_BITS(ft_size_caps, index, 1)
  36194. #define WMI_SPECTRAL_FFT_SIZE_CAPS_SET(fft_size_caps, index, value) WMI_SET_BITS(fft_size_caps, index, 1, value)
  36195. typedef struct {
  36196. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_spectral_scan_bw_capabilities */
  36197. A_UINT32 pdev_id; /* ID of pdev for which the bandwidth capabilities are advertised */
  36198. A_UINT32 sscan_mode; /* scan mode to denote whether this is a normal/agile scan (refer to wmi_spectral_scan_mode) */
  36199. A_UINT32 operating_bw; /* Operating bandwidth which supports the bandwidth capabilities, as per enum wmi_channel_width */
  36200. union {
  36201. struct { /* To indicate the scan bandwidths support for the operating bandwidth and scan mode */
  36202. A_UINT32 supports_sscan_bw_20:1,
  36203. supports_sscan_bw_40:1,
  36204. supports_sscan_bw_80:1,
  36205. supports_sscan_bw_160:1,
  36206. supports_sscan_bw_80p80:1,
  36207. supports_sscan_bw_320:1,
  36208. reserved:26;
  36209. };
  36210. A_UINT32 supported_flags;
  36211. };
  36212. } wmi_spectral_scan_bw_capabilities;
  36213. typedef struct {
  36214. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_spectral_fft_size_capabilities */
  36215. A_UINT32 pdev_id; /* ID of pdev for which the bandwidth capabilities are advertised */
  36216. A_UINT32 sscan_bw; /* sscan bandwidth, as per enum wmi_channel_width */
  36217. union {
  36218. struct { /* To indicate the scan FFT sizes supported in the sscan bandwidth */
  36219. A_UINT32 supports_fft_size_1:1,
  36220. supports_fft_size_2:1,
  36221. supports_fft_size_3:1,
  36222. supports_fft_size_4:1,
  36223. supports_fft_size_5:1,
  36224. supports_fft_size_6:1,
  36225. supports_fft_size_7:1,
  36226. supports_fft_size_8:1,
  36227. supports_fft_size_9:1,
  36228. supports_fft_size_10:1,
  36229. supports_fft_size_11:1,
  36230. reserved:21;
  36231. };
  36232. A_UINT32 supported_flags;
  36233. };
  36234. } wmi_spectral_fft_size_capabilities;
  36235. typedef struct {
  36236. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_ctl_failsafe_event_params */
  36237. A_UINT32 pdev_id; /* ID of pdev to which ctl failsafe status is sent */
  36238. A_UINT32 ctl_FailsafeStatus; /* To indicate if Failsafe value is imposed on CTL. 0- Success, 1- Failsafe imposed */
  36239. } wmi_pdev_ctl_failsafe_check_fixed_param;
  36240. typedef struct {
  36241. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_runtime_dpd_recal_cmd_fixed_param */
  36242. A_UINT32 enable; /* Enable/disable */
  36243. /* Thermal Thresholds,
  36244. * DPD recalibration will be triggered, when current temperature is
  36245. * either greater than (tmpt_base_c + dlt_tmpt_c_h),
  36246. * or less than (tmpt_base_c + dlt_tmpt_c_l).
  36247. * Here tmpt_base_c is the temperature in centigrade when first run dpd calibration.
  36248. */
  36249. A_UINT32 dlt_tmpt_c_h;
  36250. A_UINT32 dlt_tmpt_c_l;
  36251. /* cooling_time_ms
  36252. * The time (in milliseconds) expected to be needed for the unit
  36253. * to cool from dlt_tmpt_c_h to dlt_tmpt_c_l.
  36254. */
  36255. A_UINT32 cooling_time_ms;
  36256. /* Max duration for dpd re-cal. Unit: ms */
  36257. A_UINT32 dpd_dur_max_ms;
  36258. } wmi_runtime_dpd_recal_cmd_fixed_param;
  36259. typedef enum {
  36260. WMI_ROAM_TRIGGER_REASON_NONE = 0,
  36261. WMI_ROAM_TRIGGER_REASON_PER,
  36262. WMI_ROAM_TRIGGER_REASON_BMISS,
  36263. WMI_ROAM_TRIGGER_REASON_LOW_RSSI,
  36264. WMI_ROAM_TRIGGER_REASON_HIGH_RSSI,
  36265. WMI_ROAM_TRIGGER_REASON_PERIODIC,
  36266. WMI_ROAM_TRIGGER_REASON_MAWC,
  36267. WMI_ROAM_TRIGGER_REASON_DENSE,
  36268. WMI_ROAM_TRIGGER_REASON_BACKGROUND,
  36269. WMI_ROAM_TRIGGER_REASON_FORCED,
  36270. WMI_ROAM_TRIGGER_REASON_BTM,
  36271. WMI_ROAM_TRIGGER_REASON_UNIT_TEST,
  36272. WMI_ROAM_TRIGGER_REASON_BSS_LOAD,
  36273. WMI_ROAM_TRIGGER_REASON_DEAUTH,
  36274. WMI_ROAM_TRIGGER_REASON_IDLE,
  36275. /*
  36276. * NOTE: don't add any more ROAM_TRIGGER_REASON values here.
  36277. * There are checks in the FW that require the value of
  36278. * WMI_ROAM_TRIGGER_REASON_MAX to be < 16.
  36279. * Add new ROAM_TRIGGER_REASON values below, inside the
  36280. * WMI_ROAM_TRIGGER_EXT_REASON_ID enum.
  36281. */
  36282. WMI_ROAM_TRIGGER_REASON_MAX,
  36283. } WMI_ROAM_TRIGGER_REASON_ID;
  36284. /*
  36285. * The WMI_ROAM_TRIGGER_REASON_ID enum cannot be expanded with new values,
  36286. * due to checks in the FW that require WMI_ROAM_TRIGGER_REASON_MAX to be
  36287. * less than 16.
  36288. * The WMI_ROAM_TRIGGER_EXT_REASON_ID enum is used to hold further roam
  36289. * trigger reasons.
  36290. */
  36291. typedef enum {
  36292. WMI_ROAM_TRIGGER_REASON_STA_KICKOUT = WMI_ROAM_TRIGGER_REASON_MAX,
  36293. WMI_ROAM_TRIGGER_REASON_ESS_RSSI,
  36294. WMI_ROAM_TRIGGER_REASON_WTC_BTM,
  36295. WMI_ROAM_TRIGGER_REASON_PMK_TIMEOUT,
  36296. WMI_ROAM_TRIGGER_REASON_BTC,
  36297. WMI_ROAM_TRIGGER_EXT_REASON_MAX
  36298. } WMI_ROAM_TRIGGER_EXT_REASON_ID;
  36299. /* value for DENSE roam trigger */
  36300. #define WMI_RX_TRAFFIC_ABOVE_THRESHOLD 0x1
  36301. #define WMI_TX_TRAFFIC_ABOVE_THRESHOLD 0x2
  36302. typedef struct {
  36303. A_UINT32 trigger_id; /* id from WMI_ROAM_TRIGGER_REASON_ID */
  36304. /* interpretation of trigger value is as follows, for different trigger IDs
  36305. * ID = PER -> value = PER percentage
  36306. * ID = LOW_RSSI -> value = RSSI in dB wrt noise floor,
  36307. * ID = HIGH_RSSI -> value = RSSI in dB wrt to noise floor,
  36308. * ID = DENSE -> value = specification if it is tx or rx traffic threshold,
  36309. * (see WMI_[RX,TX]_TRAFFIC_ABOVE_THRESHOLD)
  36310. * ID = PERIODIC -> value = periodicity in ms
  36311. *
  36312. * for other IDs trigger_value would be 0 (invalid)
  36313. */
  36314. A_UINT32 trigger_value;
  36315. } wmi_roam_scan_trigger_reason;
  36316. typedef struct {
  36317. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_roam_scan_stats_cmd_fixed_param */
  36318. A_UINT32 vdev_id;
  36319. } wmi_request_roam_scan_stats_cmd_fixed_param;
  36320. /** BSS load configuration parameters for roam trigger */
  36321. typedef struct {
  36322. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bss_load_cmd_fixed_param */
  36323. A_UINT32 vdev_id;
  36324. /** Minimum number of beacons to be consider for calculating average AP BSS load within time monitor_time_window */
  36325. A_UINT32 beacons_min_count;
  36326. /** Monitor time window in seconds */
  36327. A_UINT32 monitor_time_window;
  36328. /** BSS load threshold after which roam scan should trigger */
  36329. A_UINT32 bss_load_threshold;
  36330. /** rssi_2g_threshold
  36331. * If connected AP is in 2.4 GHz, then consider bss load roam triggered
  36332. * only if load % > bss_load_threshold && connected AP RSSI is worse
  36333. * than rssi_2g_threshold.
  36334. */
  36335. A_INT32 rssi_2g_threshold; /* units = dBm */
  36336. /** rssi_5g_threshold
  36337. * If connected AP is in 5 GHz, then consider bss load roam triggered
  36338. * only if load % > bss_load_threshold && connected AP RSSI is worse
  36339. * than rssi_5g_threshold.
  36340. */
  36341. A_INT32 rssi_5g_threshold; /* units = dBm */
  36342. /** rssi_6g_threshold
  36343. * If connected AP is in 6 GHz, then consider bss load roam triggered
  36344. * only if load % > bss_load_threshold && connected AP RSSI is worse
  36345. * than rssi_6g_threshold. If rssi_6g_threshold is 0, it should be ignored.
  36346. */
  36347. A_INT32 rssi_6g_threshold; /* units = dBm */
  36348. /** bss_load_alpha_pct
  36349. * This parameter is used for updating the exponential average of the
  36350. * BSS load:
  36351. * new avg BSS load =
  36352. * new BSS load measurement * alpha / 100 +
  36353. * old avg BSS load * (100 - alpha) / 100
  36354. * This parameter uses percent units. E.g. if bss_load_alpha_pct == 10,
  36355. * the new average will be the sum of 10% of the new measurement + 90% of
  36356. * the old average.
  36357. */
  36358. A_UINT32 bss_load_alpha_pct;
  36359. } wmi_roam_bss_load_config_cmd_fixed_param;
  36360. /** Deauth roam trigger parameters */
  36361. typedef struct {
  36362. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_deauth_config_cmd_fixed_param */
  36363. A_UINT32 vdev_id;
  36364. /* 1-Enable, 0-Disable */
  36365. A_UINT32 enable;
  36366. } wmi_roam_deauth_config_cmd_fixed_param;
  36367. /** IDLE roam trigger parameters */
  36368. typedef struct {
  36369. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_idle_config_cmd_fixed_param */
  36370. A_UINT32 vdev_id;
  36371. /* 1: Enable, 0: Disable */
  36372. A_UINT32 enable;
  36373. /* Connected AP band. 0: Any Band, 1: 2.4 GHz Band, 2: 5 GHz Band */
  36374. A_UINT32 band;
  36375. /* Trigger Idle roaming only if RSSI change of connected AP is within rssi_delta during idle time */
  36376. A_UINT32 rssi_delta; /* units = dB */
  36377. /* Trigger idle roam only if connected RSSI is better than min_rssi */
  36378. A_INT32 min_rssi; /* units = dBm */
  36379. /* Inactive/Idle time duration
  36380. * After screen is OFF (or whatever condition is suitable in a given
  36381. * system as an indication that the system is likely idle)
  36382. * and if below conditions are met then idle roaming will be triggered.
  36383. * 1. Connected AP band is matching with band value configured
  36384. * 2. No TX/RX data for more than idle_time configured
  36385. * or TX/RX data packets count is less than data_packet_count
  36386. * during idle_time
  36387. * 3. Connected AP RSSI change is not more than rssi_delta
  36388. * 4. Connected AP RSSI is better than min_rssi.
  36389. * The purpose of this trigger for idle scan is to issue the scan
  36390. * even if (moreover, particularly if) the connection to the
  36391. * existing AP is still good, to keep the STA from getting locked
  36392. * onto the current good AP and thus missing out on an available
  36393. * even better AP. This min_rssi threshold can be used to adjust
  36394. * the connection quality level at which the STA considers doing an
  36395. * idle scan.
  36396. */
  36397. A_UINT32 idle_time; /* units = seconds */
  36398. /* Maximum allowed data packets count during idle time */
  36399. A_UINT32 data_packet_count;
  36400. } wmi_roam_idle_config_cmd_fixed_param;
  36401. /** trigger to start/stop monitoring if system is idle command parameters */
  36402. typedef struct {
  36403. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_idle_trigger_monitor_cmd_fixed_param */
  36404. /* idle_trigger_monitor values are from WMI_IDLE_TRIGGER_MONITOR_ID */
  36405. A_UINT32 idle_trigger_monitor;
  36406. } wmi_idle_trigger_monitor_cmd_fixed_param;
  36407. typedef enum {
  36408. WMI_IDLE_TRIGGER_MONITOR_NONE = 0, /* no-op */
  36409. /* IDLE_TRIGGER_MONITOR_ON
  36410. * The host's screen has turned off (or some other event indicating that
  36411. * the system is likely idle) -
  36412. * start monitoring to check if the system is idle.
  36413. */
  36414. WMI_IDLE_TRIGGER_MONITOR_ON,
  36415. /* IDLE_TRIGGER_MONITOR_OFF
  36416. * The host's screen has turned on (or some other event indicating that
  36417. * the system is not idle)
  36418. */
  36419. WMI_IDLE_TRIGGER_MONITOR_OFF,
  36420. } WMI_SCREEN_STATUS_NOTIFY_ID;
  36421. typedef struct {
  36422. /** TLV tag and len; tag equals wmi_pdev_dsm_filter_fixed_param */
  36423. A_UINT32 tlv_header;
  36424. /**
  36425. * TLV (tag length value) parameter's following pdev_dsm_filter_cmd are,
  36426. *
  36427. * wmi_pdev_bssid_disallow_list_config_param bssid_disallow_list[];
  36428. * i.e array containing all disallow AP filter lists including
  36429. * the new DSM lists (avoidlist / driver_blacklist) and existing
  36430. * lists (supplicant_blacklist / rssi_rejectlist etc.)
  36431. */
  36432. } wmi_pdev_dsm_filter_fixed_param;
  36433. typedef struct {
  36434. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_bssid_disallow_list_config_param */
  36435. A_UINT32 tlv_header;
  36436. /** bssid type i.e whether bssid falls in avoid list or driver_blacklist etc.
  36437. see WMI_BSSID_DISALLOW_LIST_TYPE **/
  36438. A_UINT32 bssid_type;
  36439. /** mac address of disallow BSSID */
  36440. wmi_mac_addr bssid;
  36441. /** Disallow AP for certain duration, in units of milliseconds */
  36442. A_UINT32 remaining_disallow_duration;
  36443. /** AP will be allowed for candidate, when AP RSSI better than expected RSSI units in dBm */
  36444. A_INT32 expected_rssi;
  36445. /* Blacklist reason from WMI_BLACKLIST_REASON_ID */
  36446. A_UINT32 reason;
  36447. /* Source of adding AP to BL from WMI_BLACKLIST_SOURCE_ID */
  36448. A_UINT32 source;
  36449. /*
  36450. * timestamp is the absolute time w.r.t host timer which is synchronized
  36451. * between the host and target.
  36452. * This timestamp indicates the time when AP added to blacklist.
  36453. */
  36454. A_UINT32 timestamp;
  36455. /* Original timeout value in milli seconds when AP added to BL */
  36456. A_UINT32 original_timeout;
  36457. /*
  36458. * The disallow link ID bitmap indicates links which should not be allowed
  36459. * for any assoc or partner link combination.
  36460. * If all links for MLD AP are disallowed, then the value shall be
  36461. * 0xffffffff.
  36462. */
  36463. A_UINT32 disallow_linkid_bitmap;
  36464. /* MLD address of AP */
  36465. wmi_mac_addr mld;
  36466. /* List of link combinations for which association is failed */
  36467. A_UINT32 ml_failed_links_combo_bitmap[WMI_MAX_FAILED_LINK_COMBO_COUNT];
  36468. /* Failed link combo count filled in ml_failed_links_combo_bitmap[] */
  36469. A_UINT32 ml_failed_link_combo_count;
  36470. } wmi_pdev_bssid_disallow_list_config_param;
  36471. typedef enum {
  36472. /* USER_SPACE_BLACK_LIST
  36473. * Black Listed AP's by host's user space
  36474. */
  36475. WMI_BSSID_DISALLOW_USER_SPACE_BLACK_LIST = 1,
  36476. /* DRIVER_BLACK_LIST
  36477. * Black Listed AP's by host driver
  36478. * used for data stall migitation
  36479. */
  36480. WMI_BSSID_DISALLOW_DRIVER_BLACK_LIST,
  36481. /* USER_SPACE_AVOID_LIST
  36482. * Avoid List AP's by host's user space
  36483. * used for data stall migitation
  36484. */
  36485. WMI_BSSID_DISALLOW_USER_SPACE_AVOID_LIST,
  36486. /* DRIVER_AVOID_LIST
  36487. * Avoid List AP's by host driver
  36488. * used for data stall migitation
  36489. */
  36490. WMI_BSSID_DISALLOW_DRIVER_AVOID_LIST,
  36491. /* RSSI_REJECT_LIST
  36492. * OCE AP's
  36493. */
  36494. WMI_BSSID_DISALLOW_RSSI_REJECT_LIST,
  36495. } WMI_BSSID_DISALLOW_LIST_TYPE;
  36496. /* WLAN_PDEV_MAX_NUM_BSSID_DISALLOW_LIST:
  36497. * Maximum number of BSSID disallow entries which host is allowed to send
  36498. * to firmware within the WMI_PDEV_DSM_FILTER_CMDID message.
  36499. */
  36500. #define WLAN_PDEV_MAX_NUM_BSSID_DISALLOW_LIST 28
  36501. /** Roam Pre-Authentication completion status */
  36502. typedef struct {
  36503. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_preauth_status_cmd_fixed_param */
  36504. A_UINT32 vdev_id;
  36505. /* preauth_status, 0 - Success, Non Zero - Failure
  36506. * Refer to IEEE Std 802.11-2016 Table 9-46 for meaning of status values.
  36507. */
  36508. A_UINT32 preauth_status;
  36509. /* AP BSSID for which pre-authentication is completed */
  36510. wmi_mac_addr candidate_ap_bssid;
  36511. /**
  36512. * This fixed_param TLV is followed by the below TLVs:
  36513. *
  36514. * PMKID computed after successful pre-authentication. This is valid only if preauth_status is success
  36515. * A_UINT8 pmkid[];
  36516. *
  36517. * PMK computed after successful pre-authentication. This is valid only if preauth_status is success
  36518. * A_UINT8 pmk[];
  36519. */
  36520. } wmi_roam_preauth_status_cmd_fixed_param;
  36521. /** Roam Pre-Authentication start event */
  36522. typedef struct {
  36523. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_preauth_start_event_fixed_param */
  36524. A_UINT32 vdev_id;
  36525. /* AP BSSID for which host needs to start pre-authentication */
  36526. wmi_mac_addr candidate_ap_bssid;
  36527. /*
  36528. * Transmit address for which host needs to start pre-authentication
  36529. * in MLO case. In non MLO cases, transmit_addr will be filled with 0x0.
  36530. */
  36531. wmi_mac_addr transmit_addr;
  36532. /* AKM suite type (as defined in the IEEE 802.11 spec) */
  36533. A_UINT32 akm_suite_type;
  36534. } wmi_roam_preauth_start_event_fixed_param;
  36535. typedef struct {
  36536. /*
  36537. * The timestamp is in units of ticks of a 19.2MHz clock.
  36538. * The timestamp is taken at roam scan start.
  36539. */
  36540. A_UINT32 lower32bit;
  36541. A_UINT32 upper32bit;
  36542. } wmi_roaming_timestamp;
  36543. typedef struct {
  36544. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_stats_event_fixed_param */
  36545. A_UINT32 vdev_id;
  36546. /* number of roam scans */
  36547. A_UINT32 num_roam_scans;
  36548. /* This TLV is followed by TLV's:
  36549. * A_UINT32 client_id[num_roam_scans]; based on WMI_SCAN_CLIENT_ID
  36550. * wmi_roaming_timestamp timestamp[num_roam_scans]; clock ticks at the time of scan start
  36551. * A_UINT32 num_channels[num_roam_scans]; number of channels that are scanned
  36552. * A_UINT32 chan_info[]; channel frequencies (MHz) in each scan
  36553. * The num_channels[] elements specify how many elements there are
  36554. * within chan_info[] for each scan.
  36555. * For example, if num_channels = [2, 3] then chan_info will have 5
  36556. * elements, with the first 2 elements from the first scan, and
  36557. * the last 3 elements from the second scan.
  36558. * wmi_mac_addr old_bssid[num_roam_scans]; bssid we are connected to at the time of roaming
  36559. * A_UINT32 is_roaming_success[num_roam_scans]; value is 1 if roaming is successful, 0 if roaming failed
  36560. * wmi_mac_addr new_bssid[num_roam_scans]; bssid after roaming
  36561. * A_UINT32 num_of_roam_candidates[num_roam_scans]; number of candidates found in each roam scan
  36562. * roam_scan_trigger_reason roam_reason[num_roam_scans]; reason for each roam scan
  36563. * wmi_mac_addr bssid[]; bssids of candidates in each roam scan
  36564. * The num_of_roam_candidates[] elements specify how many elements
  36565. * there are within bssid[] for each scan.
  36566. * For example, if num_of_roam_candidates = [2, 3] then bssid will
  36567. * have 5 elements, with the first 2 elements from the first scan,
  36568. * and the last 3 elements from the second scan.
  36569. * A_UINT32 score[]; score of candidates in each roam scan
  36570. * The num_of_roam_candidates[] elements specify how many elements
  36571. * there are within score[] for each scan.
  36572. * For example, if num_of_roam_candidates = [2, 3] then score will
  36573. * have 5 elements, with the first 2 elements from the first scan,
  36574. * and the last 3 elements from the second scan.
  36575. * A_UINT32 channel[]; channel frequency (MHz) of candidates in each roam scan
  36576. * The num_of_roam_candidates[] elements specify how many elements
  36577. * there are within channel[] for each scan.
  36578. * For example, if num_of_roam_candidates = [2, 3] then channel will
  36579. * have 5 elements, with the first 2 elements from the first scan,
  36580. * and the last 3 elements from the second scan.
  36581. * A_UINT32 rssi[]; RSSI in dB w.r.t. noise floor of candidates
  36582. * in each roam scan.
  36583. * The num_of_roam_candidates[] elements specify how many elements
  36584. * there are within rssi[] for each scan.
  36585. * For example, if num_of_roam_candidates = [2, 3] then rssi will
  36586. * have 5 elements, with the first 2 elements from the first scan,
  36587. * and the last 3 elements from the second scan.
  36588. */
  36589. } wmi_roam_scan_stats_event_fixed_param;
  36590. typedef enum {
  36591. WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER = 1, /* Roam scan triggered due to periodic timer expiry */
  36592. WMI_ROAM_TRIGGER_SUB_REASON_INACTIVITY_TIMER, /* Roam scan triggered due to inactivity detection */
  36593. /* INACTIVITY_TIMER_LOW_RSSI - alias for INACTIVITY_TIMER */
  36594. WMI_ROAM_TRIGGER_SUB_REASON_INACTIVITY_TIMER_LOW_RSSI =
  36595. WMI_ROAM_TRIGGER_SUB_REASON_INACTIVITY_TIMER,
  36596. WMI_ROAM_TRIGGER_SUB_REASON_BTM_DI_TIMER, /* Roam scan triggered due to BTM Disassoc Imminent timeout */
  36597. WMI_ROAM_TRIGGER_SUB_REASON_FULL_SCAN, /* Roam scan triggered due to partial scan failure */
  36598. WMI_ROAM_TRIGGER_SUB_REASON_LOW_RSSI_PERIODIC, /* Roam scan triggered due to Low RSSI periodic timer */
  36599. WMI_ROAM_TRIGGER_SUB_REASON_CU_PERIODIC, /* Roam scan triggered due to CU periodic timer */
  36600. /* PERIODIC_TIMER_AFTER_INACTIVITY:
  36601. * Roam scan triggered due to periodic timer after device in
  36602. * inactivity state.
  36603. * This timer is enabled/used for roaming in a vendor-specific manner.
  36604. */
  36605. WMI_ROAM_TRIGGER_SUB_REASCON_PERIODIC_TIMER_AFTER_INACTIVITY,
  36606. WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY =
  36607. WMI_ROAM_TRIGGER_SUB_REASCON_PERIODIC_TIMER_AFTER_INACTIVITY,
  36608. /*
  36609. * PERIODIC_TIMER_AFTER_INACTIVITY_LOW_RSSI - alias for
  36610. * PERIODIC_TIMER_AFTER_INACTIVITY
  36611. */
  36612. WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY_LOW_RSSI =
  36613. WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY,
  36614. WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY_CU,
  36615. WMI_ROAM_TRIGGER_SUB_REASON_INACTIVITY_TIMER_CU,
  36616. /* MLD_EXTRA_PARTIAL_SCAN:
  36617. * FW triggers extra partial scan when all ml links are not found
  36618. * during first partial scan.
  36619. */
  36620. WMI_ROAM_TRIGGER_SUB_REASON_MLD_EXTRA_PARTIAL_SCAN,
  36621. } WMI_ROAM_TRIGGER_SUB_REASON_ID;
  36622. typedef enum wmi_roam_invoke_status_error {
  36623. WMI_ROAM_INVOKE_STATUS_SUCCESS = 0,
  36624. WMI_ROAM_INVOKE_STATUS_VDEV_INVALID = 0x11, /* Invalid VDEV */
  36625. WMI_ROAM_INVOKE_STATUS_BSS_INVALID, /* Invalid VDEV BSS */
  36626. WMI_ROAM_INVOKE_STATUS_VDEV_DOWN, /* VDEV is not UP */
  36627. WMI_ROAM_INVOKE_STATUS_ROAM_HANDLE_INVALID, /* VDEV ROAM handle is invalid */
  36628. WMI_ROAM_INVOKE_STATUS_OFFLOAD_DISABLE, /* Roam offload is not enabled */
  36629. WMI_ROAM_INVOKE_STATUS_AP_SSID_LENGTH_INVALID, /* Connected AP profile SSID length is zero */
  36630. WMI_ROAM_INVOKE_STATUS_HO_DISALLOW, /* Already FW internal roaming is in progress */
  36631. WMI_ROAM_INVOKE_STATUS_ALREADY_RUNNING, /* Roam Invoke already in progress either from internal FW BTM request or from host*/
  36632. WMI_ROAM_INVOKE_STATUS_NON_ROAMABLE_AP, /* Roam HO is not triggered due to non roamable AP */
  36633. WMI_ROAM_INVOKE_STATUS_HO_INTERNAL_FAIL, /* Candidate AP save failed */
  36634. WMI_ROAM_INVOKE_STATUS_DISALLOW, /* Roam invoke trigger is not enabled */
  36635. WMI_ROAM_INVOKE_STATUS_SCAN_FAIL, /* Scan start fail */
  36636. WMI_ROAM_INVOKE_STATUS_START_HO_FAIL, /* Roam HO start fail */
  36637. WMI_ROAM_INVOKE_STATUS_INVALID_PARAMS, /* Roam invoke params are invalid */
  36638. WMI_ROAM_INVOKE_STATUS_INVALID_SCAN_MODE, /* Roam scan mode is invalid */
  36639. WMI_ROAM_INVOKE_STATUS_NO_CAND_AP, /* No candidate AP found to roam to */
  36640. WMI_ROAM_INVOKE_STATUS_HO_FAIL, /* handoff failed */
  36641. } wmi_roam_invoke_status_error_t;
  36642. typedef struct {
  36643. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_reason_tlv_param */
  36644. /*
  36645. * timestamp is the absolute time w.r.t host timer which is synchronized
  36646. * between the host and target.
  36647. * This timestamp indicates the time when roam trigger happened.
  36648. */
  36649. A_UINT32 timestamp; /* Timestamp in milli seconds */
  36650. /* trigger_reason:
  36651. * Roam trigger reason from WMI_ROAM_TRIGGER_REASON_ID
  36652. */
  36653. A_UINT32 trigger_reason;
  36654. /* trigger_sub_reason:
  36655. * Reason for each roam scan from WMI_ROAM_TRIGGER_SUB_REASON_ID,
  36656. * if multiple scans are triggered for a single roam trigger.
  36657. */
  36658. A_UINT32 trigger_sub_reason;
  36659. A_UINT32 current_rssi; /* Connected AP RSSI in dBm */
  36660. /* roam_rssi_threshold:
  36661. * RSSI threshold value in dBm for low RSSI roam trigger.
  36662. */
  36663. A_UINT32 roam_rssi_threshold;
  36664. A_UINT32 cu_load; /* Connected AP CU load percentage (0-100) */
  36665. /* deauth_type:
  36666. * 1 -> De-authentication
  36667. * 2 -> Disassociation
  36668. */
  36669. A_UINT32 deauth_type;
  36670. /* deauth_reason:
  36671. * De-authentication or disassociation reason.
  36672. * De-authentication / disassociation Values are enumerated in the
  36673. * 802.11 spec.
  36674. */
  36675. A_UINT32 deauth_reason;
  36676. /* btm_request_mode:
  36677. * Mode Values are enumerated in the 802.11 spec.
  36678. */
  36679. A_UINT32 btm_request_mode;
  36680. A_UINT32 disassoc_imminent_timer; /* in Milli seconds */
  36681. /* validity_internal:
  36682. * Preferred candidate list validity interval in Milli seconds.
  36683. */
  36684. A_UINT32 validity_internal;
  36685. /* candidate_list_count:
  36686. * Number of preferred candidates from BTM request.
  36687. */
  36688. A_UINT32 candidate_list_count;
  36689. /* btm_response_status_code:
  36690. * Response status Values are enumerated in the 802.11 spec.
  36691. */
  36692. A_UINT32 btm_response_status_code;
  36693. union {
  36694. /*
  36695. * If a definition of these vendor-specific files has been provided,
  36696. * use the vendor-specific names for these fields as an alias for
  36697. */
  36698. #ifdef WMI_ROAM_TRIGGER_REASON_VENDOR_SPECIFIC1
  36699. WMI_ROAM_TRIGGER_REASON_VENDOR_SPECIFIC1;
  36700. #endif
  36701. struct {
  36702. /* opaque space reservation for vendor-specific fields */
  36703. A_UINT32 vendor_specific1[7];
  36704. };
  36705. };
  36706. /* BTM BSS termination timeout value in milli seconds */
  36707. A_UINT32 btm_bss_termination_timeout;
  36708. /* BTM MBO assoc retry timeout value in milli seconds */
  36709. A_UINT32 btm_mbo_assoc_retry_timeout;
  36710. union {
  36711. /*
  36712. * If a definition of these vendor-specific files has been provided,
  36713. * use the vendor-specific names for these fields as an alias for
  36714. */
  36715. #ifdef WMI_ROAM_TRIGGER_REASON_VENDOR_SPECIFIC2
  36716. WMI_ROAM_TRIGGER_REASON_VENDOR_SPECIFIC2;
  36717. #endif
  36718. struct {
  36719. /* opaque space reservation for vendor-specific fields */
  36720. A_UINT32 vendor_specific2[4];
  36721. };
  36722. };
  36723. /* btm_req_dialog_token: dialog token number in BTM request frame */
  36724. A_UINT32 btm_req_dialog_token;
  36725. /* data RSSI in dBm when abort to roam scan */
  36726. A_INT32 data_rssi;
  36727. /* data RSSI threshold in dBm */
  36728. A_INT32 data_rssi_threshold;
  36729. /* rx linkspeed status, 0:good linkspeed, 1:bad */
  36730. A_UINT32 rx_linkspeed_status;
  36731. } wmi_roam_trigger_reason;
  36732. #define WMI_GET_BTCONNECT_STATUS(flags) WMI_GET_BITS(flags, 0, 1)
  36733. #define WMI_SET_BTCONNECT_STATUS(flags, val) WMI_SET_BITS(flags, 0, 1, val)
  36734. #define WMI_GET_MLO_BAND(flags) WMI_GET_BITS(flags, 1, 3)
  36735. #define WMI_SET_MLO_BAND(flags, val) WMI_SET_BITS(flags, 1, 3, val)
  36736. typedef enum wmi_mlo_band_info {
  36737. WMI_MLO_BAND_NO_MLO = 0,
  36738. WMI_MLO_BAND_2GHZ_MLO,
  36739. WMI_MLO_BAND_5GHZ_MLO,
  36740. WMI_MLO_BAND_6GHZ_MLO,
  36741. } wmi_mlo_band_info_t;
  36742. typedef struct {
  36743. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_info_tlv_param */
  36744. /* roam_scan_type:
  36745. * 0 -> Partial roam scan
  36746. * 1 -> Full roam scan
  36747. */
  36748. A_UINT32 roam_scan_type;
  36749. /* next_rssi_trigger_threshold:
  36750. * Updated RSSI threshold value in dBm for next roam trigger.
  36751. */
  36752. A_UINT32 next_rssi_trigger_threshold;
  36753. A_UINT32 roam_scan_channel_count; /* Number of channels scanned during roam scan */
  36754. A_UINT32 roam_ap_count; /* Number of roamable APs */
  36755. A_UINT32 frame_info_count; /* Number of frame info */
  36756. /*
  36757. * scan_complete_timestamp is the absolute time w.r.t host timer
  36758. * which is synchronized between the host and target.
  36759. * This timestamp indicates the time when roam scan finished.
  36760. */
  36761. A_UINT32 scan_complete_timestamp; /* milli second units */
  36762. /*
  36763. * Flags capturing factors involved during roam scan:
  36764. * Bit 0 : Bluetooth connect status, 0(not connected) or 1(connected).
  36765. * Bit 1-3 : Indicates which link triggered roaming in MLD cases.
  36766. * The value is one of the wmi_mlo_band_info_t enum constants.
  36767. * Refer to WMI_[GET,SET]_MLO_BAND macros.
  36768. * Bit 4-31 : reserved for future use.
  36769. */
  36770. A_UINT32 flags;
  36771. } wmi_roam_scan_info;
  36772. typedef struct {
  36773. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_channel_info_tlv_param */
  36774. A_UINT32 channel; /* Channel frequency in MHz */
  36775. A_UINT32 ch_dwell_type; /* indicates channel dwell type:
  36776. * 0 -> unspecified
  36777. * 1 -> active
  36778. * 2 -> passive
  36779. */
  36780. } wmi_roam_scan_channel_info;
  36781. #define WMI_GET_AP_INFO_MLO_STATUS(flags) WMI_GET_BITS(flags, 0, 1)
  36782. #define WMI_SET_AP_INFO_MLO_STATUS(flags, val) WMI_SET_BITS(flags, 0, 1, val)
  36783. typedef struct {
  36784. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_info_tlv_param */
  36785. /*
  36786. * timestamp is the absolute time w.r.t host timer which is synchronized
  36787. * between the host and target.
  36788. * This timestamp indicates the time when candidate AP is found
  36789. * during roam scan.
  36790. */
  36791. A_UINT32 timestamp; /* Timestamp in milli seconds */
  36792. A_UINT32 candidate_type; /* 0 - Candidate AP, 1 - Connected AP */
  36793. wmi_mac_addr bssid; /* AP MAC address */
  36794. A_UINT32 channel; /* AP channel frequency in MHz */
  36795. A_UINT32 rssi; /* AP current RSSI in dBm */
  36796. A_UINT32 cu_load; /* AP current cu load percentage (0-100) */
  36797. /*
  36798. * The score fields below don't have a pre-determined range,
  36799. * but use the sense that a higher score indicates a better
  36800. * roam candidate.
  36801. */
  36802. A_UINT32 rssi_score; /* AP current RSSI score */
  36803. A_UINT32 cu_score; /* AP current cu score */
  36804. A_UINT32 total_score; /* AP total score */
  36805. A_UINT32 etp; /* AP Estimated Throughput (ETP) value in mbps */
  36806. /* Blacklist reason from WMI_BLACKLIST_REASON_ID */
  36807. A_UINT32 bl_reason;
  36808. /* Source of adding AP to BL from WMI_BLACKLIST_SOURCE_ID */
  36809. A_UINT32 bl_source;
  36810. /*
  36811. * timestamp is the absolute time w.r.t host timer which is synchronized
  36812. * between the host and target.
  36813. * This timestamp indicates the time when AP added to blacklist.
  36814. */
  36815. A_UINT32 bl_timestamp;
  36816. /* Original timeout value in milli seconds when AP added to BL */
  36817. A_UINT32 bl_original_timeout;
  36818. /* flags:
  36819. * bit 0: MLD AP FLAG -> 1: MLD AP, 0: non-MLD AP
  36820. * Refer to WMI_[GET,SET]_AP_INFO_MLO_STATUS macros.
  36821. * bit 1-31: reserved.
  36822. */
  36823. A_UINT32 flags;
  36824. wmi_mac_addr mld_addr;
  36825. } wmi_roam_ap_info;
  36826. typedef enum {
  36827. /* Failures reasons for not triggering roaming */
  36828. WMI_ROAM_FAIL_REASON_NO_SCAN_START = 1, /* Roam scan not started */
  36829. WMI_ROAM_FAIL_REASON_SCAN_NOT_ALLOWED = WMI_ROAM_FAIL_REASON_NO_SCAN_START, /* Roam scan is not allowed to start */
  36830. WMI_ROAM_FAIL_REASON_NO_AP_FOUND, /* No roamable APs found during roam scan */
  36831. WMI_ROAM_FAIL_REASON_NO_CAND_AP_FOUND, /* No candidate APs found during roam scan */
  36832. /* Failure reasons after roaming is triggered */
  36833. WMI_ROAM_FAIL_REASON_HOST, /* Roam fail due to VDEV STOP issued from Host */
  36834. WMI_ROAM_FAIL_REASON_AUTH_SEND, /* Unable to send auth request frame */
  36835. WMI_ROAM_FAIL_REASON_AUTH_RECV, /* Received auth response with error status code */
  36836. WMI_ROAM_FAIL_REASON_NO_AUTH_RESP, /* Not receiving auth response frame */
  36837. WMI_ROAM_FAIL_REASON_REASSOC_SEND, /* Unable to send reassoc request frame */
  36838. WMI_ROAM_FAIL_REASON_REASSOC_RECV, /* Received reassoc response with error status code */
  36839. WMI_ROAM_FAIL_REASON_NO_REASSOC_RESP, /* Not receiving reassoc response frame */
  36840. WMI_ROAM_FAIL_REASON_EAPOL_TIMEOUT, /* EAPOL TIMEOUT */
  36841. WMI_ROAM_FAIL_REASON_EAPOL_M1_TIMEOUT = WMI_ROAM_FAIL_REASON_EAPOL_TIMEOUT, /* EAPOL M1 is not received */
  36842. WMI_ROAM_FAIL_REASON_MLME, /* MLME internal error */
  36843. WMI_ROAM_FAIL_REASON_INTERNAL_ABORT, /* Internal abort */
  36844. WMI_ROAM_FAIL_REASON_SCAN_START, /* Unable to start roam scan */
  36845. WMI_ROAM_FAIL_REASON_AUTH_NO_ACK, /* No ACK is received for Auth request */
  36846. WMI_ROAM_FAIL_REASON_AUTH_INTERNAL_DROP, /* Auth request is dropped internally */
  36847. WMI_ROAM_FAIL_REASON_REASSOC_NO_ACK, /* No ACK is received for Reassoc request */
  36848. WMI_ROAM_FAIL_REASON_REASSOC_INTERNAL_DROP, /* Reassoc request is dropped internally */
  36849. WMI_ROAM_FAIL_REASON_EAPOL_M2_SEND, /* Unable to send EAPOL M2 frame */
  36850. WMI_ROAM_FAIL_REASON_EAPOL_M2_INTERNAL_DROP, /* EAPOL M2 frame dropped internally */
  36851. WMI_ROAM_FAIL_REASON_EAPOL_M2_NO_ACK, /* No Ack is received for EAPOL M2 frame */
  36852. WMI_ROAM_FAIL_REASON_EAPOL_M3_TIMEOUT, /* M3 is not received */
  36853. WMI_ROAM_FAIL_REASON_EAPOL_M4_SEND, /* Unable to send EAPOL M4 frame */
  36854. WMI_ROAM_FAIL_REASON_EAPOL_M4_INTERNAL_DROP, /* EAPOL M4 frame dropped internally */
  36855. WMI_ROAM_FAIL_REASON_EAPOL_M4_NO_ACK, /* No Ack is received for EAPOL M4 frame */
  36856. WMI_ROAM_FAIL_REASON_NO_SCAN_FOR_FINAL_BMISS, /* Roam scan is not started for Final Bmiss case */
  36857. WMI_ROAM_FAIL_REASON_DISCONNECT, /* Deauth or Disassoc received from AP during roaming handoff */
  36858. WMI_ROAM_FAIL_REASON_SYNC, /* when host wakes-up during roaming in-progress, abort current roaming if previous sync is pending */
  36859. WMI_ROAM_FAIL_REASON_SAE_INVALID_PMKID, /* WPA3-SAE invalid PMKID */
  36860. WMI_ROAM_FAIL_REASON_SAE_PREAUTH_TIMEOUT, /* WPA3-SAE pre-authentication timeout */
  36861. WMI_ROAM_FAIL_REASON_SAE_PREAUTH_FAIL, /* WPA3-SAE pre-authentication failed */
  36862. WMI_ROAM_FAIL_REASON_UNABLE_TO_START_ROAM_HO, /* Roam HO is not started due to FW internal issue */
  36863. /* Failure reasons to indicate no candidate and final bmiss event sent */
  36864. WMI_ROAM_FAIL_REASON_NO_AP_FOUND_AND_FINAL_BMISS_SENT, /* No roamable APs found during roam scan and final bmiss event sent */
  36865. WMI_ROAM_FAIL_REASON_NO_CAND_AP_FOUND_AND_FINAL_BMISS_SENT, /* No candidate APs found during roam scan and final bmiss event sent */
  36866. WMI_ROAM_FAIL_REASON_CURR_AP_STILL_OK, /* Roam scan not happen due to current network condition is fine */
  36867. WMI_ROAM_FAIL_REASON_SCAN_CANCEL, /* Roam scan canceled */
  36868. 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 */
  36869. WMI_ROAM_FAIL_REASON_UNKNOWN = 255,
  36870. } WMI_ROAM_FAIL_REASON_ID;
  36871. typedef enum {
  36872. WMI_ROAM_ABORT_UNSPECIFIED = 0, /* Target did not specify detailed reason for roam scan being aborted */
  36873. WMI_ROAM_ABORT_LOWRSSI_DATA_RSSI_HIGH = 1, /* Roam scan is not started due to high data RSSI during low-RSSI roaming */
  36874. WMI_ROAM_ABORT_LOWRSSI_LINK_SPEED_GOOD, /* Roam scan is not started due to good link speed during low-RSSI roaming */
  36875. WMI_ROAM_ABORT_BG_DATA_RSSI_HIGH, /* Roam scan is not started due to high data RSSI during background roaming */
  36876. WMI_ROAM_ABORT_BG_RSSI_ABOVE_THRESHOLD, /* Roam scan is not started due to high beacon RSSI during background roaming */
  36877. WMI_ROAM_SCAN_CANCEL_IDLE_SCREEN_ON, /* Idle roam scan is canceled due to screen on */
  36878. WMI_ROAM_SCAN_CANCEL_OTHER_PRIORITY_ROAM_SCAN, /* Roam scan is canceled due to other high priority roam scan */
  36879. } WMI_ROAM_FAIL_SUB_REASON_ID;
  36880. typedef struct {
  36881. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_result_tlv_param */
  36882. /*
  36883. * timestamp is the absolute time w.r.t host timer which is synchronized
  36884. * between the host and target.
  36885. * This timestamp indicates the time when roaming is completed.
  36886. */
  36887. A_UINT32 timestamp; /* Timestamp in milli seconds */
  36888. A_UINT32 roam_status; /* 0 - Roaming is success, 1 - Roaming is failed */
  36889. A_UINT32 roam_fail_reason; /* from WMI_ROAM_FAIL_REASON_ID */
  36890. wmi_mac_addr bssid; /* bssid corresponds to roam_fail_reason */
  36891. A_UINT32 roam_abort_reason; /* Detail reason for roam scan not start, from WMI_ROAM_FAIL_SUB_REASON_ID */
  36892. } wmi_roam_result;
  36893. #define WMI_ROAM_NEIGHBOR_REPORT_INFO_REQUEST_TOKEN_GET(detail) WMI_GET_BITS(detail, 0, 8)
  36894. #define WMI_ROAM_NEIGHBOR_REPORT_INFO_REQUEST_TOKEN_SET(detail,val) WMI_SET_BITS(detail, 0, 8, val)
  36895. #define WMI_ROAM_NEIGHBOR_REPORT_INFO_RESPONSE_TOKEN_GET(detail) WMI_GET_BITS(detail, 8, 8)
  36896. #define WMI_ROAM_NEIGHBOR_REPORT_INFO_RESPONSE_TOKEN_SET(detail,val) WMI_SET_BITS(detail, 8, 8, val)
  36897. #define WMI_ROAM_NEIGHBOR_REPORT_INFO_NUM_OF_NRIE_GET(detail) WMI_GET_BITS(detail, 16, 8)
  36898. #define WMI_ROAM_NEIGHBOR_REPORT_INFO_NUM_OF_NRIE_SET(detail,val) WMI_SET_BITS(detail, 16, 8, val)
  36899. #define WMI_ROAM_NEIGHBOR_REPORT_INFO_MLO_BAND_INFO_GET(detail) WMI_GET_BITS(detail, 24, 3)
  36900. #define WMI_ROAM_NEIGHBOR_REPORT_INFO_MLO_BAND_INFO_SET(detail,val) WMI_SET_BITS(detail, 24, 3, val)
  36901. typedef struct {
  36902. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_neighbor_report_info_tlv_param */
  36903. /* request_type:
  36904. * 1 -> BTM query
  36905. * 2 -> 11K neighbor report request
  36906. */
  36907. A_UINT32 request_type;
  36908. /* neighbor_report_request_timestamp:
  36909. * timestamp is the absolute time w.r.t host timer which is synchronized
  36910. * between the host and target.
  36911. * This timestamp indicates the time when neighbor report request
  36912. * is received.
  36913. */
  36914. A_UINT32 neighbor_report_request_timestamp; /* in milli seconds */
  36915. /* neighbor_report_response_timestamp:
  36916. * This timestamp indicates the time when neighbor report response is sent.
  36917. */
  36918. A_UINT32 neighbor_report_response_timestamp; /* in milli seconds */
  36919. A_UINT32 neighbor_report_channel_count; /* Number of channels received in neighbor report response */
  36920. A_UINT32 btm_query_token; /* btm query dialog token */
  36921. /* btm_query_reason_code:
  36922. * Transition Query Reasons are enumerated in table 7-43x
  36923. * of the 802.11v spec.
  36924. */
  36925. A_UINT32 btm_query_reason_code;
  36926. /* neighbor_report_detail:
  36927. * [7:0] : neighbor report request token
  36928. * [15:8] : neighbor report response token
  36929. * [23:16] : the number of neighbor report elements in response frame
  36930. * [26:24] : band on which frame is sent; the value will be one of the
  36931. * wmi_mlo_band_info enum constants
  36932. * Refer to WMI_ROAM_NEIGHBOR_REPORT_INFO_MLO_BAND_INFO_GET,SET
  36933. * macros.
  36934. * [31:27] : reserved
  36935. * Refer to the above WMI_ROAM_NEIGHBOR_REPORT_INFO_*_GET,_SET macros for
  36936. * reading and writing these bitfields.
  36937. */
  36938. A_UINT32 neighbor_report_detail;
  36939. } wmi_roam_neighbor_report_info;
  36940. #define WMI_ROAM_BTM_RESP_MLO_BAND_INFO_GET(detail) WMI_GET_BITS(detail, 0, 3)
  36941. #define WMI_ROAM_BTM_RESP_MLO_BAND_INFO_SET(detail,val) WMI_SET_BITS(detail, 0, 3, val)
  36942. typedef struct {
  36943. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_btm_response_info_tlv_param */
  36944. /*enum STATUS_CODE_WNM_BTM defined in ieee80211_defs.h*/
  36945. A_UINT32 btm_status;
  36946. /* AP MAC address */
  36947. wmi_mac_addr target_bssid;
  36948. /* vsie_reason value:
  36949. * 0x00 Will move to Cellular
  36950. * 0x01 Unspecified
  36951. * 0x02 Not supported
  36952. * 0x03 No Cellular Network
  36953. * 0x04 Controlled by framework
  36954. * 0x05 Roam to better AP
  36955. * 0x06 Suspend mode
  36956. * 0x07 RSSI is strong enough
  36957. * 0x08-0xFF TBD
  36958. */
  36959. A_UINT32 vsie_reason;
  36960. /*
  36961. * timestamp is the absolute time w.r.t host timer which is synchronized
  36962. * between the host and target.
  36963. * This timestamp indicates the time when btm response is sent.
  36964. */
  36965. A_UINT32 timestamp; /* milli second units */
  36966. A_UINT32 btm_resp_dialog_token; /* dialog_token in btm response frame */
  36967. /* btm_resp_bss_termination_delay:
  36968. * bss_termination_delay in btm response frame is the number of minutes
  36969. * that the responding STA requests the BSS to delay termination.
  36970. */
  36971. A_UINT32 btm_resp_bss_termination_delay;
  36972. /* info:
  36973. * Bit[0:2] - band on which frame is sent, band value will be one of the
  36974. * wmi_mlo_band_info_t enum constants
  36975. * Refer to WMI_ROAM_BTM_RESP_MLO_BAND_INFO_GET,SET macros.
  36976. * Bit[3:31] - reserved.
  36977. */
  36978. A_UINT32 info;
  36979. } wmi_roam_btm_response_info;
  36980. typedef struct {
  36981. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_btm_request_candidate_info_tlv_param */
  36982. wmi_mac_addr btm_candidate_bssid; /* BTM candidate MAC address */
  36983. A_UINT32 preference; /* preference in Preference IE */
  36984. } wmi_roam_btm_request_candidate_info;
  36985. typedef struct {
  36986. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_neighbor_report_channel_info_tlv_param */
  36987. A_UINT32 channel; /* Channel frequency in MHz */
  36988. } wmi_roam_neighbor_report_channel_info;
  36989. #define WMI_GET_ASSOC_ID(frame_info_ext) WMI_GET_BITS(frame_info_ext, 0, 16)
  36990. #define WMI_SET_ASSOC_ID(frame_info_ext, val) WMI_SET_BITS(frame_info_ext, 0, 16, val)
  36991. #define WMI_GET_MLO_BITMAP_BAND_INFO(frame_info_ext) WMI_GET_BITS(frame_info_ext, 16, 5)
  36992. #define WMI_SET_MLO_BITMAP_BAND_INFO(frame_info_ext, val) WMI_SET_BITS(frame_info_ext, 16, 5, val)
  36993. #define WMI_GET_RX_INDICATE(frame_info_ext) WMI_GET_BITS(frame_info_ext, 21, 1)
  36994. #define WMI_SET_RX_INDICATE(frame_info_ext, val) WMI_SET_BITS(frame_info_ext, 21, 1, val)
  36995. #define WMI_GET_TX_FAILED_REASON(frame_info_ext) WMI_GET_BITS(frame_info_ext, 22, 4)
  36996. #define WMI_SET_TX_FAILED_REASON(frame_info_ext, val) WMI_SET_BITS(frame_info_ext, 22, 4, val)
  36997. #define WMI_GET_MAP_ID(frame_info_ext) WMI_GET_BITS(frame_info_ext, 26, 6)
  36998. #define WMI_SET_MAP_ID(frame_info_ext, val) WMI_SET_BITS(frame_info_ext, 26, 6, val)
  36999. typedef struct {
  37000. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_frame_info_tlv_param */
  37001. /* timestamp is the absolute time w.r.t host timer which is synchronized between the host and target */
  37002. A_UINT32 timestamp; /* Timestamp when frame is sent or received */
  37003. /*
  37004. * frame_info = frame_type | (frame_subtype << 2) | (request_or_response << 6) | (auth_algo_num << 7) | (seq_num << 16)
  37005. * frame_type(2 bits), frame_subtype(4 bits) are from 802.11 spec.
  37006. * If frame_type is WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT, frame_subtype
  37007. * should be one of value in WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE.
  37008. * request_or_response(1 bit) - Valid if frame_subtype is authentication.
  37009. * 0 - Authentication request 1 - Authentication response
  37010. * auth_algo_num(5bits) : Lower 5 bits of 9.4.1.1 Authentication Algorithm
  37011. * Number field
  37012. * The auth_algo_num bits shall be ignored unless
  37013. * WMI_SERVICE_ROAM_STAT_PER_CANDIDATE_FRAME_INFO_SUPPORT is set and
  37014. * frame_subtype is auth frame.
  37015. * seq_num(16 bits) - frame sequence number
  37016. */
  37017. A_UINT32 frame_info;
  37018. /* status_code:
  37019. * For Rx frames : Status code from 802.11 spec, section 9.4.1.9
  37020. * For Rx frames (deauth / disassoc) : Reason code from 802.11 spec,
  37021. * section 9.4.1.7
  37022. * For Tx frames : Status_code should be one of value in
  37023. * WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS
  37024. */
  37025. A_UINT32 status_code;
  37026. /*
  37027. * rssi_dbm_abs
  37028. * Last known RSSI of the current BSSID at the moment when the frame
  37029. * was sent and received.
  37030. * This RSSI value is valid for deauth / disassoc frame only.
  37031. * The rssi_dbm_abs value is the absolute value of the RSSI in dBm units.
  37032. * For example, if the RSSI is -40 dBm, rssi_dbm_abs will be 40.
  37033. */
  37034. A_UINT32 rssi_dbm_abs;
  37035. /* retry_count
  37036. * To show how many times the same frame (but with different
  37037. * sequence number) is retransmitted, in protocol level.
  37038. */
  37039. A_UINT32 retry_count;
  37040. wmi_mac_addr bssid; /* AP MAC address */
  37041. /*
  37042. * frame_info_ext captures below fields:
  37043. * Bit 0-15 : (re)assoc id of (re)association response frame,
  37044. * section 9.4.1.8 AID field.
  37045. * Bit 16-20 : MLO bitmap band info,
  37046. * bit0: 2GHz, bit1: 5GHz, bit2: 6GHz, bits 3-4: reserved
  37047. * Refer to WMI_[GET,SET]_MLO_BITMAP_BAND_INFO macros.
  37048. * Bit 21 : indicate whether this frame is rx :0-not rx; 1-rx
  37049. * Refer to WMI_[GET,SET]_RX_INDICATE macros.
  37050. * Bit 22-25 : opaque tx failure reason
  37051. * Refer to WMI_[GET,SET]_TX_FAILED_REASON macros.
  37052. * Bit 26-31 : Indicate the map id, used to identify the all the
  37053. * ML link info corresponding to current roaming candidate.
  37054. */
  37055. A_UINT32 frame_info_ext;
  37056. } wmi_roam_frame_info;
  37057. typedef enum {
  37058. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT = 3,
  37059. } WMI_ROAM_FRAME_INFO_FRAME_TYPE;
  37060. typedef enum {
  37061. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_M1 = 1,
  37062. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_M2,
  37063. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_M3,
  37064. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_M4,
  37065. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_GTK_M1,
  37066. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_GTK_M2,
  37067. } WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE;
  37068. typedef enum {
  37069. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS_ACK = 0,
  37070. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS_NO_ACK,
  37071. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS_TX_FAIL,
  37072. } WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS;
  37073. typedef struct {
  37074. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_initial_info_tlv_param */
  37075. /* count of full scan */
  37076. A_UINT32 roam_full_scan_count;
  37077. A_INT32 rssi_th; /* unit: dBm */
  37078. A_UINT32 cu_th; /* channel utilization threshold: uses units of percent */
  37079. /* timer_canceled:
  37080. * bit0: timer1 canceled
  37081. * bit1: timer2 canceled
  37082. * bit2: inactive timer canceled
  37083. */
  37084. A_UINT32 timer_canceled;
  37085. } wmi_roam_initial_info;
  37086. typedef enum {
  37087. WMI_ROAM_MSG_RSSI_RECOVERED = 1, /* Connected AP RSSI is recovered to good region */
  37088. WMI_ROAM_MSG_CONNECTED_IN_POOR_RSSI = 2, /* DUT connected to AP whose RSSI is below low RSSI threshold */
  37089. } WMI_ROAM_MSG_ID;
  37090. typedef struct {
  37091. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_msg_info_tlv_param */
  37092. /*
  37093. * timestamp is the absolute time (in milliseconds) w.r.t host timer
  37094. * which is synchronized between the host and target
  37095. */
  37096. A_UINT32 timestamp;
  37097. A_UINT32 msg_id; /* Message ID from WMI_ROAM_MSG_ID */
  37098. /* msg_param values are interpreted differently for different msg_id values.
  37099. * if msg_id == WMI_ROAM_MSG_RSSI_RECOVERED:
  37100. * msg_param1 contains current AP RSSI in dBm
  37101. * (unsigned -> signed conversion is required)
  37102. * msg_param2 contains next trigger RSSI threshold in dBm
  37103. * (unsigned -> signed conversion is required)
  37104. */
  37105. A_UINT32 msg_param1;
  37106. A_UINT32 msg_param2;
  37107. } wmi_roam_msg_info;
  37108. typedef struct {
  37109. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_stats_event_fixed_param */
  37110. A_UINT32 vdev_id;
  37111. A_UINT32 roam_scan_trigger_count; /* Number of roam scans triggered */
  37112. } wmi_roam_stats_event_fixed_param;
  37113. typedef struct {
  37114. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_reason_cmm_tlv_param */
  37115. /*
  37116. * timestamp is the absolute time w.r.t host timer which is synchronized
  37117. * between the host and target.
  37118. * This timestamp indicates the time when roam trigger happened.
  37119. */
  37120. A_UINT32 timestamp; /* Timestamp in milli seconds */
  37121. /* trigger_reason:
  37122. * Roam trigger reason from WMI_ROAM_TRIGGER_REASON_ID
  37123. */
  37124. A_UINT32 trigger_reason;
  37125. /* trigger_sub_reason:
  37126. * Reason for each roam scan from WMI_ROAM_TRIGGER_SUB_REASON_ID,
  37127. * if multiple scans are triggered for a single roam trigger.
  37128. */
  37129. A_UINT32 trigger_sub_reason;
  37130. A_UINT32 current_rssi; /* Connected AP RSSI in dBm */
  37131. } wmi_roam_trigger_reason_cmm;
  37132. typedef struct {
  37133. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_rssi_tlv_param */
  37134. /* roam_rssi_threshold:
  37135. * RSSI threshold value in dBm for low RSSI roam trigger.
  37136. */
  37137. A_UINT32 roam_rssi_threshold;
  37138. /* data RSSI in dBm */
  37139. A_UINT32 data_rssi;
  37140. /* data RSSI threshold in dBm */
  37141. A_UINT32 data_rssi_threshold;
  37142. /* rx linkspeed status, 0:good linkspeed, 1:bad */
  37143. A_UINT32 rx_linkspeed_status;
  37144. } wmi_roam_trigger_rssi;
  37145. typedef struct {
  37146. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_bss_load_tlv_param */
  37147. A_UINT32 cu_load; /* Connected AP CU load percentage (0-100) */
  37148. } wmi_roam_trigger_bss_load;
  37149. typedef struct {
  37150. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_deauth_tlv_param */
  37151. /* deauth_type:
  37152. * 1 -> De-authentication
  37153. * 2 -> Disassociation
  37154. */
  37155. A_UINT32 deauth_type;
  37156. /* deauth_reason:
  37157. * De-authentication or disassociation reason.
  37158. * De-authentication / disassociation Values are enumerated in the
  37159. * 802.11 spec.
  37160. */
  37161. A_UINT32 deauth_reason;
  37162. } wmi_roam_trigger_deauth;
  37163. typedef struct {
  37164. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_btm_tlv_param */
  37165. /* btm_request_mode:
  37166. * Mode Values are enumerated in the 802.11 spec.
  37167. */
  37168. A_UINT32 btm_request_mode;
  37169. A_UINT32 disassoc_imminent_timer; /* in Milli seconds */
  37170. /* validity_internal:
  37171. * Preferred candidate list validity interval in Milli seconds.
  37172. */
  37173. A_UINT32 validity_internal;
  37174. /* candidate_list_count:
  37175. * Number of preferred candidates from BTM request.
  37176. */
  37177. A_UINT32 candidate_list_count;
  37178. /* btm_response_status_code:
  37179. * Response status Values are enumerated in the 802.11 spec.
  37180. */
  37181. A_UINT32 btm_response_status_code;
  37182. /* BTM BSS termination timeout value in milli seconds */
  37183. A_UINT32 btm_bss_termination_timeout;
  37184. /* BTM MBO assoc retry timeout value in milli seconds */
  37185. A_UINT32 btm_mbo_assoc_retry_timeout;
  37186. /* btm_req_dialog_token: dialog token number in BTM request frame */
  37187. A_UINT32 btm_req_dialog_token;
  37188. } wmi_roam_trigger_btm;
  37189. typedef struct {
  37190. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_bmiss_tlv_param */
  37191. /* B[0-6]: final bmiss cnt.
  37192. * B[7-23]: consecutive bmiss cnt
  37193. * B[24]: isQosNullSuccess: 0: success, 1:fail
  37194. */
  37195. A_UINT32 bmiss_status;
  37196. } wmi_roam_trigger_bmiss;
  37197. typedef struct {
  37198. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_dense_tlv_param */
  37199. /* RX Throughput in bytes per second in dense env */
  37200. A_UINT32 rx_tput;
  37201. /* TX Throughput in bytes per second in dense env */
  37202. A_UINT32 tx_tput;
  37203. /* dense_status: b[0-7]: roamable AP count info in dense env */
  37204. A_UINT32 dense_status;
  37205. } wmi_roam_trigger_dense;
  37206. typedef struct {
  37207. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_force_tlv_param */
  37208. A_UINT32 invoke_reason; /* from wlan_roam_invoke_reason */
  37209. } wmi_roam_trigger_force;
  37210. typedef struct {
  37211. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_kickout_tlv_param */
  37212. /* consecutive tx failure threshold */
  37213. A_UINT32 kickout_th;
  37214. A_UINT32 kickout_reason; /* from PEER_KICKOUT_REASON */
  37215. } wmi_roam_trigger_kickout;
  37216. typedef struct {
  37217. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_per_tlv_param */
  37218. /* For PER roam,
  37219. * If the number of PPDUs with PHY rate < low_rate_thresh exceeds
  37220. * N * tx/rx_rate_thresh_percnt / 100, roaming will be triggered.
  37221. * b[0-7]: tx_rate_thresh_percnt
  37222. * b[16-23]:rx_rate_thresh_percnt
  37223. */
  37224. A_UINT32 rate_thresh_percnt;
  37225. } wmi_roam_trigger_per;
  37226. typedef struct {
  37227. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_periodic_tlv_param */
  37228. /* roam scan periodic : units = milliseconds*/
  37229. A_UINT32 periodic_timer_ms;
  37230. } wmi_roam_trigger_periodic;
  37231. typedef struct {
  37232. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_hi_rssi_tlv_param */
  37233. /* roam High RSSI threshold */
  37234. A_UINT32 hi_rssi_threshold;
  37235. } wmi_roam_trigger_hi_rssi;
  37236. #define WMI_MLO_LINK_INFO_GET_MAP_ID(link_info) WMI_GET_BITS(link_info, 0, 6)
  37237. #define WMI_MLO_LINK_INFO_SET_MAP_ID(link_info, val) WMI_SET_BITS(link_info, 0, 6, val)
  37238. #define WMI_MLO_LINK_INFO_GET_STATUS(link_info) WMI_GET_BITS(link_info, 6, 1)
  37239. #define WMI_MLO_LINK_INFO_SET_STATUS(link_info, val) WMI_SET_BITS(link_info, 6, 1, val)
  37240. #define WMI_MLO_LINK_INFO_GET_BAND(link_info) WMI_GET_BITS(link_info, 7, 3)
  37241. #define WMI_MLO_LINK_INFO_SET_BAND(link_info, val) WMI_SET_BITS(link_info, 7, 3, val)
  37242. #define WMI_MLO_LINK_INFO_GET_IEEE_LINK_ID(link_info) WMI_GET_BITS(link_info, 10, 4)
  37243. #define WMI_MLO_LINK_INFO_SET_IEEE_LINK_ID(link_info, val) WMI_SET_BITS(link_info, 10, 4, val)
  37244. typedef struct {
  37245. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_info_tlv_param */
  37246. wmi_mac_addr link_addr;
  37247. A_UINT32 link_info;
  37248. /*
  37249. * b[0-5] : Map Id - maps the corresponding candidate AP for which
  37250. * re-assoc resp received.
  37251. * b[6] : Status - link status, AP accepted/rejected this link
  37252. * 0 - accepted
  37253. * 1 - rejected
  37254. * b[7-9] : Band - link band info (band value is from wmi_mlo_band_info)
  37255. * b[10-13] : IEEE link id - Link id associated with AP
  37256. */
  37257. } wmi_mlo_link_info;
  37258. typedef struct {
  37259. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_get_scan_channel_list_cmd_fixed_param */
  37260. A_UINT32 vdev_id;
  37261. } wmi_roam_get_scan_channel_list_cmd_fixed_param;
  37262. typedef struct {
  37263. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_channel_list_event_fixed_param */
  37264. A_UINT32 vdev_id;
  37265. wmi_ssid ssid; /* SSID of connected AP */
  37266. /*
  37267. * This event can be sent as a response to
  37268. * WMI_ROAM_GET_SCAN_CHANNEL_LIST_CMDID or
  37269. * can be sent asynchronously during disconnection.
  37270. * command_response = 1, when it is sent as a response to
  37271. * WMI_ROAM_GET_SCAN_CHANNEL_LIST_CMDID
  37272. * = 0, for other cases
  37273. */
  37274. A_UINT32 command_response;
  37275. /*
  37276. * This fixed_param TLV is followed by the below TLVs:
  37277. *
  37278. * List of roam scan channel frequencies in MHz
  37279. * A_UINT32 channel_list[];
  37280. */
  37281. } wmi_roam_scan_channel_list_event_fixed_param;
  37282. typedef enum {
  37283. WMI_ROAM_CND_RSSI_SCORING = 0x00000001, /* FW considers RSSI scoring */
  37284. WMI_ROAM_CND_HT_SCORING = 0x00000002, /* FW considers HT scoring */
  37285. WMI_ROAM_CND_VHT_SCORING = 0x00000004, /* FW considers VHT scoring */
  37286. WMI_ROAM_CND_HE_SCORING = 0x00000008, /* FW considers 11ax scoring */
  37287. WMI_ROAM_CND_BW_SCORING = 0x00000010, /* FW considers Bandwidth scoring */
  37288. WMI_ROAM_CND_BAND_SCORING = 0x00000020, /* FW considers Band(2G/5G) scoring */
  37289. WMI_ROAM_CND_NSS_SCORING = 0x00000040, /* FW considers NSS(1x1 / 2x2) scoring */
  37290. WMI_ROAM_CND_CHAN_CONGESTION_SCORING = 0x00000080, /* FW considers ESP/QBSS scoring */
  37291. WMI_ROAM_CND_BEAMFORMING_SCORING = 0x00000100, /* FW considers Beamforming scoring */
  37292. WMI_ROAM_CND_PCL_SCORING = 0x00000200, /* FW considers PCL scoring */
  37293. WMI_ROAM_CND_OCE_WAN_SCORING = 0x00000400, /* FW considers OCE WAN metrics scoring */
  37294. WMI_ROAM_CND_OCE_AP_TX_PWR_SCORING = 0x00000800, /* FW considers OCE AP Tx power scoring */
  37295. WMI_ROAM_CND_OCE_AP_SUBNET_ID_SCORING = 0x00001000, /* FW considers OCE AP subnet id scoring */
  37296. WMI_ROAM_CND_SAE_PK_AP_SCORING = 0x00002000, /* FW considers SAE-PK enabled AP scoring */
  37297. WMI_ROAM_CND_SECURITY_SCORING = 0x00004000, /* FW considers security scoring */
  37298. } WMI_ROAM_CND_SCORING_PARAMS;
  37299. typedef struct {
  37300. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_capability_report_event_fixed_param */
  37301. /*
  37302. * This event is sent asynchronously during FW init.
  37303. * It indicates FW roam related capabilities to host.
  37304. *
  37305. * scoring_capability_bitmap = Indicates firmware candidate scoring
  37306. * capabilities. It's a bitmap of values
  37307. * from enum WMI_ROAM_CND_SCORING_PARAMS.
  37308. */
  37309. A_UINT32 scoring_capability_bitmap;
  37310. } wmi_roam_capability_report_event_fixed_param;
  37311. /*
  37312. * Definition of disallow connection modes.
  37313. */
  37314. typedef enum {
  37315. /* Bit 0: roam to 5GL+5GH MLSR is not allowed if the bit is set. */
  37316. WMI_ROAM_MLO_CONNECTION_MODE_5GL_5GH_MLSR = 0x1,
  37317. } WMI_ROAM_MLO_CONNECTION_MODES;
  37318. typedef struct {
  37319. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_mlo_config_cmd_fixed_param */
  37320. wmi_mac_addr partner_link_addr; /* Assigned link address which can be used as self link addr when vdev is not created */
  37321. A_UINT32 vdev_id;
  37322. /*
  37323. * Configure max number of link mlo connection supports.
  37324. * Invalid value or 0 will use max supported value by fw.
  37325. */
  37326. A_UINT32 support_link_num;
  37327. /*
  37328. * Bit 0: 2G band support if 1
  37329. * Bit 1: 5G band support if 1
  37330. * Bit 2: 6G band support if 1
  37331. */
  37332. A_UINT32 support_link_band; /* Configure the band bitmap of mlo connection supports. */
  37333. A_UINT32 max_active_links; /* Max active links supported for STA */
  37334. /*
  37335. * Disallow the specified connection mode(s) when roaming to MLD AP.
  37336. * Refer to the WMI_ROAM_MLO_CONNECTION_MODES enum for the connection mode
  37337. * each bit represents.
  37338. */
  37339. A_UINT32 disallow_connect_modes;
  37340. /*
  37341. * If max_link_combo_count is non-zero, STA should try to roam to next
  37342. * candidate once max allowed link combinations is reached with current
  37343. * candidate AP.
  37344. */
  37345. A_UINT32 max_link_combo_count;
  37346. } wmi_roam_mlo_config_cmd_fixed_param;
  37347. typedef struct {
  37348. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
  37349. /** unique id identifying the VDEV, generated by the caller */
  37350. A_UINT32 vdev_id;
  37351. /** parameter id - see WMI_ROAM_PARAM */
  37352. A_UINT32 param_id;
  37353. /** parameter value */
  37354. A_UINT32 param_value;
  37355. } wmi_roam_set_param_cmd_fixed_param;
  37356. typedef struct {
  37357. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_enable_vendor_cmd_fixed_param */
  37358. /** unique id identifying the VDEV, generated by the caller */
  37359. A_UINT32 vdev_id;
  37360. /** abstract mechanism for differentiating vendors */
  37361. A_UINT32 vendor_id;
  37362. /** 1 - Enable, 0 - Disable */
  37363. A_UINT32 enable;
  37364. } wmi_roam_enable_vendor_control_cmd_fixed_param;
  37365. typedef enum {
  37366. ROAM_VENDOR_CONTROL_PARAM_TRIGGER = 1,
  37367. ROAM_VENDOR_CONTROL_PARAM_DELTA,
  37368. ROAM_VENDOR_CONTROL_PARAM_FULL_SCANPERIOD,
  37369. ROAM_VENDOR_CONTROL_PARAM_PARTIAL_SCANPERIOD,
  37370. ROAM_VENDOR_CONTROL_PARAM_ACTIVE_CH_DWELLTIME,
  37371. ROAM_VENDOR_CONTROL_PARAM_PASSIVE_CH_DWELLTIME,
  37372. ROAM_VENDOR_CONTROL_PARAM_HOME_CH_TIME,
  37373. ROAM_VENDOR_CONTROL_PARAM_AWAY_TIME,
  37374. /* Sending query for all roam_vendor_control_param */
  37375. ROAM_VENDOR_CONTROL_PARAM_ALL = 0xFFFFFFFF,
  37376. } WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID;
  37377. typedef struct {
  37378. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_vendor_param_cmd_fixed_param */
  37379. /** unique id identifying the VDEV, generated by the caller */
  37380. A_UINT32 vdev_id;
  37381. /** Vendor Control Param ID from enum WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID */
  37382. A_UINT32 param_id;
  37383. } wmi_roam_get_vendor_control_param_cmd_fixed_param;
  37384. /* WMI_ROAM_GET_VENDOR_CONTROL_PARAM_EVENTID - No need to make this event as wakeable event
  37385. * Host ensures to take wakelock after sending WMI_ROAM_GET_VENDOR_CONTROL_PARAM_CMDID command */
  37386. typedef struct {
  37387. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_get_vendor_control_param_event_fixed_param */
  37388. /** unique id identifying the VDEV, generated by the caller */
  37389. A_UINT32 vdev_id;
  37390. /**
  37391. * Vendor Control Param ID from enum WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID
  37392. * If param_id is ROAM_VENDOR_CONTROL_PARAM_ALL, send all vendor control
  37393. * param value defined in enum WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID
  37394. * using wmi_vendor_control_param tlv
  37395. */
  37396. A_UINT32 param_id;
  37397. /** Vendor control param value */
  37398. A_UINT32 param_value;
  37399. } wmi_roam_get_vendor_control_param_event_fixed_param;
  37400. typedef struct {
  37401. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vendor_control_param */
  37402. /** Vendor Control Param ID from enum WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID */
  37403. A_UINT32 param_id;
  37404. /** Vendor control param value */
  37405. A_UINT32 param_value;
  37406. } wmi_vendor_control_param;
  37407. /** the definition of different ROAM parameters */
  37408. typedef enum {
  37409. /*
  37410. * roam param to configure below roam events
  37411. * Bit : 0 disabled - do not send WMI_ROAM_NOTIF_SCAN_END in WMI_ROAM_EVENTID
  37412. * Bit : 0 enabled - send WMI_ROAM_NOTIF_SCAN_END in WMI_ROAM_EVENTID
  37413. * 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
  37414. * 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
  37415. * Bit : 2-31 - reserved
  37416. */
  37417. WMI_ROAM_PARAM_ROAM_EVENTS_CONFIG = 1,
  37418. /*
  37419. * Bit : 0 if unset, POOR_LINKSPEED
  37420. * Bit : 0 if set, GOOD_LINKSPEED
  37421. */
  37422. WMI_ROAM_PARAM_LINKSPEED_STATE = 2,
  37423. /*
  37424. * roam param to configure roam scan params for DFS jitter reduction
  37425. * Bit : 0 enabled - DFS channel jitter reduction is enabled.
  37426. * Bit : 0 disabled - DFS channel jitter reduction is disabled.
  37427. *
  37428. * Bit : 1-7 - To indicate the passive-to-active conversion timeout
  37429. * with range 40 to 70 in ms, default value is 50ms.
  37430. * If an invalid (out of range) value is provided, the
  37431. * default value will be used.
  37432. * Bit : 8-13 - To indicate the DFS RSSI threshold for current AP
  37433. * with range 0 to 58, default value is 0 dB
  37434. * (DFS RSSI threshold = -70 dBm + 0 dB = -70 dBm).
  37435. * The specified value (in dB) is added to the -70 dBm
  37436. * baseline value to get the RSSI threshold in dBm.
  37437. * If an invalid (out of range) value is provided, the
  37438. * default value will be used.
  37439. * Bit : 14-19 - To indicate the DFS RSSI threshold for candidate AP
  37440. * with range 0 to 58, default value is 0 dB
  37441. * (DFS RSSI threshold = -70 - 0 = -70 dBm).
  37442. * The specified value (in dB) is added to the -70 dBm
  37443. * baseline value to get the RSSI threshold in dBm.
  37444. * If an invalid (out of range) value is provided, the
  37445. * default value will be used.
  37446. * Bit : 20 disabled - To indicate DFS roam scan policy is AGILE
  37447. * Bit : 20 enabled - To indicate DFS roam scan policy is Legacy
  37448. *
  37449. * Bit : 21-31 are reserved
  37450. */
  37451. WMI_ROAM_PARAM_ROAM_SCAN_DFS_CONFIG_BITMAP = 3,
  37452. /*
  37453. * roam param to configure HO_DELAY_RX value at runtime
  37454. * The configured value of ho_delay_rx will be in milliseconds
  37455. * Maximum value which user can configure using this Param ID is 1000 msec.
  37456. *
  37457. * If any value beyond this Maximum value is provided by user, FW will
  37458. * configure the ho_delay_rx value to Maximum allowed value i.e. 1000 msec.
  37459. */
  37460. WMI_ROAM_PARAM_ROAM_HO_DELAY_RUNTIME_CONFIG = 4,
  37461. /*
  37462. * Roam param to enable/disable full scan channel optimization
  37463. * As per current implementation of roam scan, if there are no APs found
  37464. * during partial scan, immediately a full scan will be initiated as a
  37465. * fallback. This includes all channels that were already scanned as part
  37466. * of partial scan.
  37467. * This flag controls the optimization, to exclude all channels, which are
  37468. * already scanned as part of partial scan.
  37469. */
  37470. WMI_ROAM_PARAM_ROAM_CONTROL_FULL_SCAN_CHANNEL_OPTIMIZATION = 5,
  37471. /*
  37472. * Roam param to enable/disable scanning of 6 GHz PSC channels
  37473. * As per current implementation, Wi-Fi STA scans on all 6 GHz PSC channels
  37474. * as part of full scan during a roam scan irrespective of whether APs are
  37475. * present in 6 GHz or not.
  37476. * This flag controls the optimization to do the scan in 6 GHz PSC channels
  37477. * only if channel map or newly received RNR indicates 6 GHz APs during
  37478. * current 2.4 GHz or 5 GHz scanning of Roam Full scan.
  37479. */
  37480. WMI_ROAM_PARAM_ROAM_CONTROL_FULL_SCAN_6GHZ_PSC_ONLY_WITH_RNR = 6,
  37481. /*
  37482. * Flag to tell whether MCC is disallowed or not in sta + sta currrent case.
  37483. * If flag is unset, then no limitation for channels which sta can roam to.
  37484. * If flag is set, then the channels which one of STA roam to cause MCC with other STA, it will be disallowed.
  37485. */
  37486. WMI_ROAM_PARAM_ROAM_MCC_DISALLOW = 7,
  37487. /*
  37488. * Roam param to provide additional RSSI Boost for 6 GHz Candidate AP
  37489. * during Roam Scan in case any 6 GHz candidate has better Roam score
  37490. * but fails RSSI Delta Check.
  37491. * This configurable RSSI Boost value for 6GHz Candidate AP will be
  37492. * configured via ini RoamRssiDiff6GHz
  37493. * This configured RSSI boost value will only be applicable for 6GHz
  37494. * Candidate AP when the STA is connected to 2.4/5 GHz Band AP and will
  37495. * not impact if STA is connected to 6GHz Band AP
  37496. */
  37497. WMI_ROAM_PARAM_ROAM_RSSI_BOOST_FOR_6GHZ_CAND_AP = 8,
  37498. /*
  37499. * Roam param to indicate unsupported Power Type for 6 GHz Candidate AP
  37500. * found during Roam Scan. If AP operates on the power type disabled by
  37501. * the host, then that candidate should not be selected.
  37502. * This unsupported Power Type will be configured based
  37503. * on disabled 6GHz Power Types in Regdomain
  37504. *
  37505. * If below bits in the obtianed Bitmap is set then any AP
  37506. * broadcasting these Power Types should not be selected
  37507. * BIT 0 - Indoor Access Point
  37508. * BIT 1 - Standard Power (SP) Access Point
  37509. * BIT 2 - Very Low Power (VLP) Access Point
  37510. * BIT 3-7 - Reserved
  37511. */
  37512. WMI_ROAM_PARAM_ROAM_UNSUPPORTED_6GHZ_POWERTYPE = 9,
  37513. /*
  37514. * crypto params to allow EHT/MLO in WPA2/WPA3 security.
  37515. * BITMAP of wlan_crypto_roam_eht_config
  37516. */
  37517. WMI_ROAM_PARAM_CRYPTO_EHT_CONFIG = 10,
  37518. /*
  37519. * Roam Param for enabling/disabling Roam Latency Optimization via below
  37520. * BITMAP of wlan_roam_latency_optimization_t
  37521. */
  37522. WMI_ROAM_PARAM_ROAM_LATENCY_OPTIMIZATION_BITMAP = 11,
  37523. /*=== END ROAM_PARAM_PROTOTYPE SECTION ===*/
  37524. } WMI_ROAM_PARAM;
  37525. typedef enum {
  37526. /*
  37527. * BIT 0 - WLAN_CRYPTO_WPA2_ALLOW_NON_MLO_EHT:
  37528. * Connect to non-MLO/MLO WPA2 EHT APs in EHT without PMF support.
  37529. *
  37530. * BIT 1 - WLAN_CRYPTO_WPA2_ALLOW_MLO:
  37531. * Connect to MLO WPA2 EHT APs in MLO without PMF support.
  37532. *
  37533. * BIT 2 - WLAN_CRYPTO_WPA2_ALLOW_NON_MLO_EHT_MFPC_SET:
  37534. * Connect to non-MLO/MLO WPA2 EHT APs in EHT.
  37535. * (PMF capable is mandatory).
  37536. *
  37537. * BIT 3 - WLAN_CRYPTO_WPA2_ALLOW_MLO_MFPC_SET:
  37538. * Connect to MLO WPA2 EHT APs in MLO
  37539. * (PMF capable is mandatory).
  37540. *
  37541. * BIT 4 - 15 - reserved for future WPA2 security configs
  37542. *
  37543. * BIT 16 - WLAN_CRYPTO_WPA3_SAE_ALLOW_NON_MLO_EHT_HNP:
  37544. * Connect to non-MLO/MLO WPA3-SAE without support for H2E
  37545. * (or no RSNXE IE in beacon) in non-MLO EHT.
  37546. *
  37547. * BIT 17 - WLAN_CRYPTO_WPA3_SAE_ALLOW_MLO_HNP:
  37548. * Connect to MLO WPA3-SAE without support for H2E
  37549. * (or no RSNXE IE in beacon).
  37550. */
  37551. WLAN_CRYPTO_WPA2_ALLOW_NON_MLO_EHT = 0x00000001,
  37552. WLAN_CRYPTO_WPA2_ALLOW_MLO = 0x00000002,
  37553. WLAN_CRYPTO_WPA2_ALLOW_NON_MLO_EHT_MFPC_SET = 0x00000004,
  37554. WLAN_CRYPTO_WPA2_ALLOW_MLO_MFPC_SET = 0x00000008,
  37555. WLAN_CRYPTO_WPA3_SAE_ALLOW_NON_MLO_EHT_HNP = 0x00010000,
  37556. WLAN_CRYPTO_WPA3_SAE_ALLOW_MLO_HNP = 0x00020000,
  37557. } wlan_crypto_roam_eht_config;
  37558. typedef struct {
  37559. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_big_data_cmd_fixed_param */
  37560. A_UINT32 vdev_id;
  37561. } wmi_vdev_get_big_data_cmd_fixed_param;
  37562. typedef struct {
  37563. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_send_big_data_event_fixed_param */
  37564. A_UINT32 vdev_id;
  37565. /** param list **/
  37566. /* Target power (dBm units) - 2.4G/5G */
  37567. A_UINT32 target_power_2g_dsss;
  37568. A_UINT32 target_power_2g_ofdm;
  37569. A_UINT32 target_power_2g_mcs0;
  37570. A_UINT32 target_power_5g_ofdm;
  37571. A_UINT32 target_power_5g_mcs0;
  37572. /* ANI level from hal-phy */
  37573. A_UINT32 ani_level;
  37574. /* Number of probe requests sent while roaming after BMISS */
  37575. A_UINT32 tx_probe_req;
  37576. /* Number of probe responses received while roaming after BMISS */
  37577. A_UINT32 rx_probe_response;
  37578. /*
  37579. * Number of retries (both by HW and FW) for tx data MPDUs sent by this vdev
  37580. */
  37581. A_UINT32 num_data_retries;
  37582. /* Number of tx data MPDUs dropped from this vdev due to tx retry limit */
  37583. A_UINT32 num_tx_data_fail;
  37584. /* Number of aggregated unicast tx expecting response ppdu */
  37585. A_UINT32 data_tx_ppdu_count;
  37586. /* Number of aggregated unicast tx expecting response mpdu */
  37587. A_UINT32 data_tx_mpdu_count;
  37588. /* number of rx frames with good PCLP */
  37589. A_UINT32 rx_frame_good_pclp_count;
  37590. /* Number of occasions that no valid delimiter is detected by ampdu parser */
  37591. A_UINT32 invalid_delimiter_count;
  37592. /* Number of frames for which the CRC check failed in the MAC */
  37593. A_UINT32 rx_crc_check_fail_count;
  37594. /* tx fifo overflows count for transmissions by this vdev */
  37595. A_UINT32 txpcu_fifo_overflows_count;
  37596. /* Number of ucast ACKS received good FCS (doesn't include block acks) */
  37597. A_UINT32 successful_acks_count;
  37598. /*
  37599. * RX BlockACK Counts
  37600. * Note that this counts the number of block acks received by this vdev,
  37601. * not the number of MPDUs acked by block acks.
  37602. */
  37603. A_UINT32 rx_block_ack_count;
  37604. /* Beacons received from member of BSS */
  37605. A_UINT32 member_bss_beacon_count;
  37606. /* Beacons received from other BSS */
  37607. A_UINT32 non_bss_beacon_count;
  37608. /* Number of RX Data multicast frames dropped by the HW */
  37609. A_UINT32 rx_data_mc_frame_filtered_count;
  37610. } wmi_vdev_send_big_data_event_fixed_param;
  37611. typedef struct {
  37612. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_big_data_p2_cmd_fixed_param */
  37613. A_UINT32 vdev_id;
  37614. } wmi_vdev_get_big_data_p2_cmd_fixed_param;
  37615. typedef struct {
  37616. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_send_big_data_p2_event_fixed_param */
  37617. A_UINT32 vdev_id;
  37618. /** param list **/
  37619. /* total number of TSF out of sync */
  37620. A_UINT32 tsf_out_of_sync;
  37621. /**
  37622. * ANI (noise interference) level corresponding to the channel.
  37623. * The range of values is different for chips of different target
  37624. * architectures. Helium values range from 0 to 9, while Lithium
  37625. * and Beryllium values range from -5 to 15.
  37626. * In all cases, higher values indicate more noise interference.
  37627. */
  37628. A_INT32 ani_level;
  37629. /*
  37630. * This fixed_param TLV is followed by the below TLVs:
  37631. * List of datapath big data stats. This stat is not interpreted by
  37632. * host. This gets directly updated on big data server and later FW
  37633. * team will analyze this data.
  37634. *
  37635. * A_UINT32 bd_datapath_stats[]; // DEPRECATED
  37636. * wmi_big_data_dp_stats_tlv_param big_data_dp_stats[];
  37637. */
  37638. } wmi_vdev_send_big_data_p2_event_fixed_param;
  37639. typedef struct {
  37640. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bd_datapath_stats_tlv_param */
  37641. A_UINT32 tlv_header;
  37642. /* Tx power before disconnection.
  37643. * The units of the following tx power fields are 0.5 dBm for Helium
  37644. * architecture target (e.g. a value of 1 means tx power = 0.5 dBm),
  37645. * and are 0.25 dBm for subsequent target architectures.
  37646. */
  37647. A_UINT32 last_data_tx_pwr;
  37648. A_UINT32 target_power_dsss;
  37649. A_UINT32 target_power_ofdm;
  37650. /* Rate index of last data frame before disconnection */
  37651. A_UINT32 last_tx_data_rix;
  37652. /* Tx rate (in kbps) of last data frame before disconnection */
  37653. A_UINT32 last_tx_data_rate_kbps;
  37654. } wmi_big_data_dp_stats_tlv_param;
  37655. typedef enum {
  37656. WMI_6GHZ_REG_PWRMODE_LPI = 0, /* LPI mode for AP and client products */
  37657. WMI_6GHZ_REG_PWRMODE_SP = 1, /* SP mode for AP and client products */
  37658. WMI_6GHZ_REG_PWRMODE_VLP = 2, /* VLP mode for AP and client products */
  37659. WMI_6GHZ_REG_PWRMODE_SP_STA = 3, /* SP client mode for AP products */
  37660. WMI_6GHZ_REG_PWRMODE_MAX = 5
  37661. } WMI_6GHZ_REG_PWRMODE_TYPE;
  37662. typedef struct {
  37663. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_tpc_power_fixed_param */
  37664. A_UINT32 vdev_id;
  37665. A_UINT32 psd_power; /* Value: 0 or 1, is PSD power or not */
  37666. A_UINT32 eirp_power; /* Maximum EIRP power (dDm units), valid only if power is PSD */
  37667. A_UINT32 power_type_6ghz; /* Type: WMI_6GHZ_REG_TYPE, used for halphy CTL lookup */
  37668. /*
  37669. * This fixed_param TLV is followed by the below TLVs:
  37670. *
  37671. * Based on power_type_6ghz sent in fixed param, the array TLVs
  37672. * will be interpreted as described below:
  37673. *
  37674. * For power_type_6ghz - LPI and VLP power mode:
  37675. * num_pwr_levels of wmi_vdev_ch_power_info
  37676. * This array TLV will be filled based on psd_power field in
  37677. * fixed param.
  37678. * If psd_power = 1, TLV carries 20MHz sub-channel center frequency
  37679. * and PSD-power values.
  37680. * If psd_power = 0, TLV carries Cfreq and EIRP for all BWs
  37681. * (<= current channel BSS BW).
  37682. * wmi_vdev_ch_power_psd_info & wmi_vdev_ch_power_eirp_info are not used
  37683. * for LPI and VLP power mode.
  37684. *
  37685. * For power_type_6ghz SP and SP_CLIENT power mode:
  37686. * num_pwr_levels of wmi_vdev_ch_power_psd_info is filled as below
  37687. * Holds BSS sub-channel center frequency and OOBE PSD-power values.
  37688. * OOBE PSD values for AP and STA are filled in below manner:
  37689. * AP case:
  37690. * For example, DUT is operating in 160 MHz and pri20
  37691. * lies in first sub-channel,
  37692. * OOBE_PSD_20 | MIN_OOBE_PSD_40 | MIN_OOBE_PSD_80 |
  37693. * MIN_OOBE_PSD_80 | MIN_OOBE_PSD_160 | MIN_OOBE__PSD_160 |
  37694. * MIN_OOBE_PSD_160 | MIN_OOBE_PSD_160
  37695. * STA case:
  37696. * For example,STA is operating in 160 MHz
  37697. * OOBE_PSD_20 | OOBE_PSD_20 | OOBE_PSD_20 | OOBE_PSD_20 |
  37698. * OOBE_PSD_20 | OOBE_PSD_20 | OOBE_PSD_20 | OOBE_PSD_20
  37699. *
  37700. * num_pwr_levels of wmi_vdev_ch_power_eirp_info
  37701. * Carries Cfreq and EIRP for all BWs (<= current channel BSS BW).
  37702. * For both AP and STA, EIRP are filled in below manner:
  37703. * Example: If operating BW is 160 MHz
  37704. * EIRP_20 | EIRP_40 | EIRP_80 | EIRP_160
  37705. *
  37706. * If the wmi_vdev_ch_power_psd_info or wmi_vdev_ch_power_eirp_info TLV
  37707. * arrays are not both present, check for older TLV
  37708. * (wmi_vdev_ch_power_info) as explained for LPI and VLP.
  37709. */
  37710. } wmi_vdev_set_tpc_power_fixed_param;
  37711. typedef struct {
  37712. A_UINT32 tlv_header;
  37713. A_UINT32 chan_cfreq; /* Channel center frequency (MHz) */
  37714. A_UINT32 tx_power; /* Unit: dBm, either PSD/EIRP power for this frequency or incremental for non-PSD BW */
  37715. } wmi_vdev_ch_power_info;
  37716. typedef struct {
  37717. A_UINT32 tlv_header;
  37718. A_UINT32 chan_cfreq; /* Channel center frequency (MHz) of all BSS Sub-channel */
  37719. /* psd_power:
  37720. * Unit: 0.25dBm/MHz, OOBE PSD power of sub-channel
  37721. * Example: a power spectral density of 1 dBm / MHz will be reported
  37722. * as the value 4.
  37723. */
  37724. A_INT32 psd_power;
  37725. } wmi_vdev_ch_power_psd_info;
  37726. typedef struct {
  37727. A_UINT32 tlv_header;
  37728. A_UINT32 chan_cfreq; /* Channel center frequency (MHz) for all BWs (<= current channel BSS BW) */
  37729. /* eirp_power:
  37730. * Unit: 0.25dBm, EIRP power for all BWs (<= current channel BSS BW)
  37731. * Example: a power of 1 dBm will be reported as the value 4.
  37732. */
  37733. A_INT32 eirp_power;
  37734. } wmi_vdev_ch_power_eirp_info;
  37735. typedef struct {
  37736. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_txpower_query_cmd_fixed_param */
  37737. A_UINT32 request_id; /* unique request ID to distinguish the command / event set */
  37738. /* The mode value has the following meaning :
  37739. * 0 : 11a
  37740. * 1 : 11bg
  37741. * 2 : 11b
  37742. * 3 : 11g only
  37743. * 4 : 11a HT20
  37744. * 5 : 11g HT20
  37745. * 6 : 11a HT40
  37746. * 7 : 11g HT40
  37747. * 8 : 11a VHT20
  37748. * 9 : 11a VHT40
  37749. * 10 : 11a VHT80
  37750. * 11 : 11g VHT20
  37751. * 12 : 11g VHT40
  37752. * 13 : 11g VHT80
  37753. * 14 : unknown
  37754. */
  37755. A_UINT32 mode;
  37756. A_UINT32 rate; /* rate index */
  37757. A_UINT32 nss; /* number of spatial stream */
  37758. A_UINT32 beamforming; /* beamforming parameter 0:disabled, 1:enabled */
  37759. A_UINT32 chain_mask; /* mask for the antenna set to get power */
  37760. A_UINT32 chain_index; /* index for the antenna */
  37761. } wmi_get_tpc_power_cmd_fixed_param;
  37762. typedef struct {
  37763. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_tpc_power_evt_fixed_param */
  37764. A_UINT32 request_id; /* request ID set by the command */
  37765. A_INT32 tx_power; /* TX power for the specified HALPHY parameters in half dBm unit */
  37766. } wmi_get_tpc_power_evt_fixed_param;
  37767. typedef struct {
  37768. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_dpd_status_cmd_fixed_param */
  37769. A_UINT32 pdev_id; /* PDEV ID set by the command */
  37770. } wmi_pdev_get_dpd_status_cmd_fixed_param;
  37771. typedef enum {
  37772. WMI_DPD_STATUS_DISABLE = 0,
  37773. WMI_DPD_STATUS_ENABLE = 1,
  37774. WMI_DPD_STATUS_INVALID = 2,
  37775. } WMI_DPD_STATUS;
  37776. typedef struct {
  37777. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_dpd_status_evt_fixed_param */
  37778. A_UINT32 pdev_id; /* PDEV Id set by the command */
  37779. A_UINT32 dpd_status; /* DPD status obtained from HALPHY, refer to WMI_DPD_STATUS */
  37780. } wmi_pdev_get_dpd_status_evt_fixed_param;
  37781. typedef struct {
  37782. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_halphy_cal_status_cmd_fixed_param */
  37783. A_UINT32 pdev_id; /* PDEV ID set by the command */
  37784. } wmi_pdev_get_halphy_cal_status_cmd_fixed_param;
  37785. typedef struct {
  37786. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_aoa_phasedelta_evt_fixed_param */
  37787. A_UINT32 pdev_id; /* PDEV Id set by the command */
  37788. A_UINT32 freq; /* Current channel in MHz */
  37789. /*
  37790. * Chain Info
  37791. * LSB 16 bits - Max chain supported,
  37792. * MSB 16 bits - Chain pair which has phase values:
  37793. * 0x0003 - chain 0 and 1
  37794. * 0x000c - chain 2 and 3
  37795. * 0x0030 - chain 4 and 5
  37796. * 0x00c0 - chain 6 and 7
  37797. */
  37798. A_UINT32 chainInfo;
  37799. /*
  37800. * Phase Delta values:
  37801. * Two phase delta values are packed into each A_UINT32 word
  37802. * LSB 16-bit is 1st value and MSB 16-bit is 2nd value
  37803. * Phasedelta values will be 0-1023 (mapped to 0-360 degree)
  37804. * Each gain from 0 to 61 has a phasedelta value, e.g.
  37805. * gain 0's phase delta occupies bits 15:0 of phasedelta[chain][0],
  37806. * gain 1's phase delta occupies bits 31:16 of phasedelta[chain][0],
  37807. * gain 2's phase delta occupies bits 15:0 of phasedelta[chain][1], etc.
  37808. */
  37809. A_UINT32 phasedelta[WMI_MAX_CHAINS_FOR_AOA_RCC][MAX_AOA_PHASEDELTA];
  37810. /*
  37811. * IBF cal values:
  37812. * Used for final AoA calculation
  37813. * [AoAPhase = ( PhaseDeltaValue + IBFcalValue ) % 1024]
  37814. */
  37815. A_UINT32 perChainIbfCalVal[WMI_MAX_CHAINS_FOR_AOA_RCC];
  37816. } wmi_pdev_aoa_phasedelta_evt_fixed_param;
  37817. #define WMI_AOA_MAX_SUPPORTED_CHAINS_GET(chain_data) \
  37818. WMI_GET_BITS(chain_data, 0, 16)
  37819. #define WMI_AOA_MAX_SUPPORTED_CHAINS_SET(chain_data, value) \
  37820. WMI_SET_BITS(chain_data, 0, 16, value)
  37821. #define WMI_AOA_SUPPORTED_CHAINMASK_GET(chain_data) \
  37822. WMI_GET_BITS(chain_data, 16, 16)
  37823. #define WMI_AOA_SUPPORTED_CHAINMASK_SET(chain_data, value) \
  37824. WMI_SET_BITS(chain_data, 16, 16, value)
  37825. typedef struct {
  37826. /** TLV tag and len; tag equals
  37827. * WMITLV_TAG_STRUC_wmi_pdev_enhanced_aoa_phasedelta_eventid */
  37828. A_UINT32 tlv_header;
  37829. /* Current Operating Channel Frequency in MHz */
  37830. A_UINT32 freq;
  37831. /** pdev_id:
  37832. * Identify the MAC.
  37833. * See macros starting with WMI_PDEV_ID_ for values.
  37834. * In non-DBDC case host should set it to 0.
  37835. */
  37836. A_UINT32 pdev_id;
  37837. /** chain_info:
  37838. * B0 -- B15 : Max number of chains supported
  37839. * B16 --B31 : Data shared for chainmask -
  37840. * indicates the chains to which the data shared.
  37841. */
  37842. union {
  37843. struct {
  37844. A_UINT32 max_supported_chains:16,
  37845. data_for_chainmask:16;
  37846. };
  37847. A_UINT32 chain_info;
  37848. };
  37849. /** XBAR configuration to get RF2BB/BB2RF chain mapping
  37850. * Samples of xbar_config,
  37851. * If xbar_config is 0xFAC688(hex):
  37852. * RF chains 0-7 are connected to BB chains 0-7
  37853. * here,
  37854. * bits 0 to 2 = 0, maps BB chain 0 for RF chain 0
  37855. * bits 3 to 5 = 1, maps BB chain 1 for RF chain 1
  37856. * bits 6 to 8 = 2, maps BB chain 2 for RF chain 2
  37857. * bits 9 to 11 = 3, maps BB chain 3 for RF chain 3
  37858. * bits 12 to 14 = 4, maps BB chain 4 for RF chain 4
  37859. * bits 15 to 17 = 5, maps BB chain 5 for RF chain 5
  37860. * bits 18 to 20 = 6, maps BB chain 6 for RF chain 6
  37861. * bits 21 to 23 = 7, maps BB chain 7 for RF chain 7
  37862. *
  37863. * If xbar_config is 0x688FAC(hex):
  37864. * RF chains 0-3 are connected to BB chains 4-7
  37865. * RF chains 4-7 are connected to BB chains 0-3
  37866. * here,
  37867. * bits 0 to 2 = 4, maps BB chain 4 for RF chain 0
  37868. * bits 3 to 5 = 5, maps BB chain 5 for RF chain 1
  37869. * bits 6 to 8 = 6, maps BB chain 6 for RF chain 2
  37870. * bits 9 to 11 = 7, maps BB chain 7 for RF chain 3
  37871. * bits 12 to 14 = 0, maps BB chain 0 for RF chain 4
  37872. * bits 15 to 17 = 1, maps BB chain 1 for RF chain 5
  37873. * bits 18 to 20 = 2, maps BB chain 2 for RF chain 6
  37874. * bits 21 to 23 = 3, maps BB chain 3 for RF chain 7
  37875. */
  37876. A_UINT32 xbar_config;
  37877. /**
  37878. * IBF cal values:
  37879. * Used for final AoA calculation
  37880. * [AoAPhase = ( PhaseDeltaValue + IBFcalValue ) % 1024]
  37881. */
  37882. A_UINT32 per_chain_ibf_cal_val[WMI_MAX_CHAINS];
  37883. /**
  37884. * This TLV is followed by TLV arrays containing
  37885. * different types of data header and data buffer TLVs:
  37886. * 1. wmi_enhanced_aoa_gain_phase_data_hdr.
  37887. * This TLV contains the array of structure fields which indicate
  37888. * the type and format of data carried in the following data buffer
  37889. * TLV.
  37890. * 2. aoa_data_buf[] - Data buffer TLV.
  37891. * TLV header contains the total buffer size.
  37892. * Data buffer contains the phase_delta_array[Chains][GainEntries]
  37893. * in absolute phase values ranging 0-1024 and
  37894. * gain_delta_array[Chains][GainEntries] are gain index values.
  37895. */
  37896. } wmi_pdev_enhanced_aoa_phasedelta_evt_fixed_param;
  37897. #define WMI_AOA_DATA_TYPE_GET(data_info) \
  37898. WMI_GET_BITS(data_info, 0, 8)
  37899. #define WMI_AOA_DATA_TYPE_SET(data_info,value) \
  37900. WMI_SET_BITS(data_info, 0, 8, value)
  37901. #define WMI_AOA_NUM_ENTIRES_GET(data_info) \
  37902. WMI_GET_BITS(data_info, 8, 8)
  37903. #define WMI_AOA_NUM_DATA_ENTRIES_SET(data_info,value) \
  37904. WMI_SET_BITS(data_info, 8, 8, value)
  37905. typedef enum _WMI_AOA_EVENT_DATA_TYPE {
  37906. WMI_PHASE_DELTA_ARRAY = 0x0,
  37907. WMI_GAIN_GROUP_STOP_ARRAY = 0x1,
  37908. /* add new types here */
  37909. WMI_MAX_DATA_TYPE_ARRAY,
  37910. } WMI_AOA_EVENT_DATA_TYPE;
  37911. typedef struct {
  37912. /** TLV tag and len; tag equals
  37913. * WMITLV_TAG_STRUC_wmi_pdev_enhanced_aoa_phasedelta_eventid */
  37914. A_UINT32 tlv_header;
  37915. /** data_info:
  37916. * Data follows the LSB first and MSB second order in a 32bit word
  37917. * bit mapping:
  37918. * B0 -- B7 : Data type
  37919. * B8 -- B15 : Number of entries to be parsed in terms of 32bit word
  37920. *
  37921. * If data is Phase delta values - Data type is 0x0
  37922. * group stop gain index values - Data type is 0x1
  37923. *
  37924. * num_entries - Total number of data entries in uint32
  37925. */
  37926. union {
  37927. struct {
  37928. A_UINT32 data_type:8,
  37929. num_entries:8,
  37930. reserved:16;
  37931. };
  37932. A_UINT32 data_info;
  37933. };
  37934. } wmi_enhanced_aoa_gain_phase_data_hdr;
  37935. typedef enum _WMI_AGC_GAIN_TABLE_IDX {
  37936. WMI_AGC_DG_TABLE_IDX = 0,
  37937. WMI_AGC_LG_TABLE_IDX,
  37938. WMI_AGC_VLG_TABLE_IDX,
  37939. WMI_AGC_MAX_GAIN_TABLE_IDX = 8,
  37940. } WMI_AGC_GAIN_TABLE_IDX;
  37941. #define WMI_AOA_BDF_NUM_GAIN_TBL_ELEMS_PER_WORD 4
  37942. #define WMI_AOA_NUM_GAIN_TBL_ELEMS_PER_WORD 2
  37943. #define WMI_AOA_NUM_BYTES_FOR_BDF_GAIN_TBL_ELEM 1
  37944. #define WMI_AOA_NUM_BYTES_FOR_GAIN_TBL_ELEM 2
  37945. /* 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)) */
  37946. /* 2 bytes (at most)used to store each gain table elements */
  37947. #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)
  37948. /* 1 byte (at most) used to store each gain table elements obtained from BDF */
  37949. #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)
  37950. typedef enum {
  37951. WMI_AOA_2G = 0,
  37952. WMI_AOA_5G,
  37953. WMI_AOA_6G,
  37954. WMI_AOA_MAX_BAND,
  37955. } WMI_AOA_SUPPORTED_BANDS;
  37956. #define WMI_AOA_MAX_AGC_GAIN_GET(pcap_var, tbl_idx, output) \
  37957. do { \
  37958. A_UINT8 word_idx = 0; \
  37959. A_UINT8 bit_index = 0; \
  37960. A_UINT8 nth_byte = 0; \
  37961. word_idx = tbl_idx >> 1; \
  37962. nth_byte = (tbl_idx % WMI_AOA_NUM_GAIN_TBL_ELEMS_PER_WORD); \
  37963. bit_index = nth_byte * 8 * WMI_AOA_NUM_BYTES_FOR_GAIN_TBL_ELEM; \
  37964. output = WMI_GET_BITS(*(pcap_var + word_idx), bit_index, 16); \
  37965. } while (0)
  37966. #define WMI_AOA_MAX_AGC_GAIN_SET(pcap_var, tbl_idx, value) \
  37967. do { \
  37968. A_UINT8 word_idx = 0; \
  37969. A_UINT8 bit_index = 0; \
  37970. A_UINT8 nth_byte = 0; \
  37971. word_idx = tbl_idx >> 1; \
  37972. nth_byte = (tbl_idx % WMI_AOA_NUM_GAIN_TBL_ELEMS_PER_WORD); \
  37973. bit_index = nth_byte * 8 * WMI_AOA_NUM_BYTES_FOR_GAIN_TBL_ELEM; \
  37974. WMI_SET_BITS(*(pcap_var+word_idx), bit_index, 16, value); \
  37975. } while (0)
  37976. #define WMI_AOA_MAX_BDF_ENTRIES_GET(pcap_var, tbl_idx, output) \
  37977. do { \
  37978. A_UINT8 word_idx = 0; \
  37979. A_UINT8 bit_index = 0; \
  37980. A_UINT8 nth_byte = 0; \
  37981. word_idx = tbl_idx >> 2; \
  37982. nth_byte = (tbl_idx % WMI_AOA_BDF_NUM_GAIN_TBL_ELEMS_PER_WORD); \
  37983. bit_index = nth_byte * 8 * WMI_AOA_NUM_BYTES_FOR_BDF_GAIN_TBL_ELEM; \
  37984. output = WMI_GET_BITS(*(pcap_var+word_idx), bit_index, 8); \
  37985. } while (0)
  37986. #define WMI_AOA_MAX_BDF_ENTRIES_SET(pcap_var, tbl_idx, value) \
  37987. do { \
  37988. A_UINT8 word_idx = 0; \
  37989. A_UINT8 nth_byte = 0; \
  37990. A_UINT8 bit_index = 0; \
  37991. word_idx = tbl_idx >> 2; \
  37992. nth_byte = (tbl_idx % WMI_AOA_BDF_NUM_GAIN_TBL_ELEMS_PER_WORD); \
  37993. bit_index = nth_byte * 8 * WMI_AOA_NUM_BYTES_FOR_BDF_GAIN_TBL_ELEM; \
  37994. WMI_SET_BITS(*(pcap_var+word_idx), bit_index, 8, value); \
  37995. } while (0)
  37996. typedef struct {
  37997. /** TLV tag and len; tag equals
  37998. * WMITLV_TAG_STRUC_wmi_enhanced_aoa_caps_param */
  37999. A_UINT32 tlv_header;
  38000. /* Maximum number of Rx AGC gain tables supported */
  38001. A_UINT32 max_agc_gain_tbls;
  38002. /* 1 byte is used to store bdf max number of elements in each gain tables */
  38003. A_UINT32 max_bdf_gain_entries[WMI_AOA_BDF_NUM_WORD_ENTRIES_FOR_MAX_NUM_AGC_TBL_ELEMS];
  38004. /** This TLV is followed by TLV array - wmi_enhanced_aoa_per_band_caps_param
  38005. * containing band specifc agc gain table information.
  38006. */
  38007. } wmi_enhanced_aoa_caps_param;
  38008. typedef struct {
  38009. /** TLV tag and len; tag equals
  38010. * WMITLV_TAG_STRUC_wmi_enhanced_aoa_per_band_caps_param */
  38011. A_UINT32 tlv_header;
  38012. /* Band information - WMI_AOA_SUPPORTED_BANDS */
  38013. A_UINT32 band_info;
  38014. /* 2 bytes are used to store agc max number of elements in each gain tables */
  38015. A_UINT32 max_agc_gain[WMI_AOA_NUM_WORD_ENTRIES_FOR_MAX_NUM_AGC_TBL_ELEMS];
  38016. } wmi_enhanced_aoa_per_band_caps_param;
  38017. /* WMI_HALPHY_CAL_LIST:
  38018. *
  38019. * Below is the list of HALPHY online CAL currently enabled in
  38020. * WIN chipsets
  38021. */
  38022. typedef enum {
  38023. WMI_HALPHY_CAL_ADC = 0,
  38024. WMI_HALPHY_CAL_BWFILTER,
  38025. WMI_HALPHY_CAL_PDET_AND_PAL,
  38026. WMI_HALPHY_CAL_RXDCO,
  38027. WMI_HALPHY_CAL_COMB_TXLO_TXIQ_RXIQ,
  38028. WMI_HALPHY_CAL_IBF,
  38029. WMI_HALPHY_CAL_PA_DROOP,
  38030. WMI_HALPHY_CAL_DAC,
  38031. WMI_HALPHY_CAL_ANI,
  38032. WMI_HALPHY_CAL_NOISE_FLOOR,
  38033. WMI_HALPHY_CAL_MAX_CAL_LIST
  38034. } WMI_HALPHY_CAL_LIST;
  38035. /* WMI_HALPHY_CAL_VALID_BITMAP_STATUS
  38036. *
  38037. * In WMI wmi_pdev_get_halphy_cal_status_evt_fixed_param
  38038. * (halphy_cal_valid_bmap member), below enum list must be used
  38039. * to get which calibration status indication is sent by FW to HOST.
  38040. * Only if that particular bit it set, corresponding bit of the
  38041. * halphy_cal_status variable will be valid.
  38042. */
  38043. typedef enum {
  38044. WMI_HALPHY_CAL_ADC_BMAP = (1 << WMI_HALPHY_CAL_ADC),
  38045. WMI_HALPHY_CAL_BWFILTER_BMAP = (1 << WMI_HALPHY_CAL_BWFILTER),
  38046. WMI_HALPHY_CAL_PDET_AND_PAL_BMAP = (1 << WMI_HALPHY_CAL_PDET_AND_PAL),
  38047. WMI_HALPHY_CAL_RXDCO_BMAP = (1 << WMI_HALPHY_CAL_RXDCO),
  38048. WMI_HALPHY_CAL_COMB_TXLO_TXIQ_RXIQ_BMAP = (1 << WMI_HALPHY_CAL_COMB_TXLO_TXIQ_RXIQ),
  38049. WMI_HALPHY_CAL_IBF_BMAP = (1 << WMI_HALPHY_CAL_IBF),
  38050. WMI_HALPHY_CAL_PA_DROOP_BMAP = (1 << WMI_HALPHY_CAL_PA_DROOP),
  38051. WMI_HALPHY_CAL_DAC_BMAP = (1 << WMI_HALPHY_CAL_DAC),
  38052. WMI_HALPHY_CAL_ANI_BMAP = (1 << WMI_HALPHY_CAL_ANI),
  38053. WMI_HALPHY_CAL_NOISE_FLOOR_BMAP = (1 << WMI_HALPHY_CAL_NOISE_FLOOR),
  38054. } WMI_HALPHY_CAL_VALID_BITMAP_STATUS;
  38055. typedef struct {
  38056. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_halphy_cal_status_evt_fixed_param */
  38057. A_UINT32 pdev_id; /* PDEV Id set by the command */
  38058. /*
  38059. * Calibration valid bitmap from HALPHY, refer to
  38060. * WMI_HALPHY_CAL_VALID_BITMAP_STATUS.
  38061. * Only if this particular bit it set, corresponding bit of the
  38062. * halphy_cal_status variable will be valid.
  38063. */
  38064. A_UINT32 halphy_cal_valid_bmap;
  38065. /* Calibration result status bitmap from HALPHY.
  38066. * The WMI_HALPHY_CAL_VALID_BITMAP_STATUS enum identifies which bit
  38067. * in the bitmap corresponds to which cal type.
  38068. * Each valid bit uses the following settings:
  38069. * 1 - SUCCESS
  38070. * 0 - FAILURE
  38071. */
  38072. A_UINT32 halphy_cal_status;
  38073. } wmi_pdev_get_halphy_cal_status_evt_fixed_param;
  38074. typedef struct {
  38075. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_halphy_cal_bmap_cmd_fixed_param */
  38076. A_UINT32 pdev_id; /* PDEV ID set by the command */
  38077. /*
  38078. * Calibration valid bitmap from HOST, refer to
  38079. * WMI_HALPHY_CAL_VALID_BITMAP_STATUS.
  38080. * Based on the bitmap value, HALPHY will set corresponding mask values
  38081. * to each of the online calibrations
  38082. */
  38083. A_UINT32 online_halphy_cals_bmap;
  38084. /* Calibration enable/disable support for home/scan channel
  38085. * 0 - home channel
  38086. * 1 - scan channel
  38087. * 2 - both home and scan channel
  38088. */
  38089. A_UINT32 home_scan_channel;
  38090. } wmi_pdev_set_halphy_cal_bmap_cmd_fixed_param;
  38091. typedef struct {
  38092. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_halphy_cal_bmap_evt_fixed_param */
  38093. A_UINT32 pdev_id; /* PDEV Id set by the command */
  38094. /* Status indication for calibration
  38095. * 0 - SUCCESS
  38096. * 1 - FAIL
  38097. * This WMI command will by sent from HOST dynamically but only one
  38098. * at a time. So no need of cookie/request handshake.
  38099. */
  38100. A_UINT32 status;
  38101. } wmi_pdev_set_halphy_cal_bmap_evt_fixed_param;
  38102. /* below structures are related to Motion Detection. */
  38103. typedef struct {
  38104. /** TLV tag and len; tag equals
  38105. * WMITLV_TAG_STRUC_wmi_motion_det_config_params_cmd_fixed_param */
  38106. A_UINT32 tlv_header; /** TLV Header */
  38107. A_UINT32 vdev_id; /** Vdev ID */
  38108. A_UINT32 time_t1; /** Time gap of successive bursts of
  38109. * measurement frames during coarse
  38110. * motion detection (in ms) */
  38111. A_UINT32 time_t2; /** Time gap of successive bursts of
  38112. * measurement frames during fine
  38113. * motion detection (in ms) */
  38114. A_UINT32 n1; /** number of measurement frames in one
  38115. * burst, for coarse detection */
  38116. A_UINT32 n2; /** number of measurement frames in one
  38117. * burst, for fine detection */
  38118. A_UINT32 time_t1_gap; /** gap between measurement frames in
  38119. * course detection (in ms) */
  38120. A_UINT32 time_t2_gap; /** gap between measurement frames in
  38121. * fine detection (in ms) */
  38122. A_UINT32 coarse_K; /** number of times motion detection has to
  38123. * be performed for coarse detection */
  38124. A_UINT32 fine_K; /** number of times motion detection has to
  38125. * be performed for fine detection */
  38126. A_UINT32 coarse_Q; /** number of times motion is expected
  38127. * to be detected for success case in
  38128. * coarse detection */
  38129. A_UINT32 fine_Q; /** number of times motion is expected
  38130. * to be detected for success case in
  38131. * fine detection */
  38132. A_UINT32 md_coarse_thr_high; /** higher threshold value (in percent)
  38133. * from host to FW, which will be used in
  38134. * coarse detection phase of motion detection.
  38135. * This is the threshold for the correlation
  38136. * of the old RF local-scattering environment
  38137. * with the current RF local-scattering
  38138. * environment. A value of 100(%) indicates
  38139. * that neither the transceiver nor any
  38140. * nearby objects have changed position. */
  38141. A_UINT32 md_fine_thr_high; /** higher threshold value (in percent)
  38142. * from host to FW, which will be used in
  38143. * fine detection phase of motion detection.
  38144. * This is the threshold for correlation
  38145. * between the old and current RF environments,
  38146. * as explained above. */
  38147. A_UINT32 md_coarse_thr_low; /** lower threshold value (in percent)
  38148. * for immediate detection of motion in
  38149. * coarse detection phase.
  38150. * This is the threshold for correlation
  38151. * between the old and current RF environments,
  38152. * as explained above. */
  38153. A_UINT32 md_fine_thr_low; /** lower threshold value (in percent)
  38154. * for immediate detection of motion in
  38155. * fine detection phase.
  38156. * This is the threshold for correlation
  38157. * between the old and current RF environments,
  38158. * as explained above. */
  38159. } wmi_motion_det_config_params_cmd_fixed_param;
  38160. typedef struct {
  38161. /** TLV tag and len; tag equals
  38162. * WMITLV_TAG_STRUC_wmi_motion_det_base_line_config_params_cmd_fixed_param */
  38163. A_UINT32 tlv_header; /** TLV Header */
  38164. A_UINT32 vdev_id; /** Vdev ID */
  38165. A_UINT32 bl_time_t; /** time T for baseline (in ms)
  38166. * Every bl_time_t, bl_n packets are sent */
  38167. A_UINT32 bl_packet_gap; /** gap between measurement frames for baseline
  38168. * (in ms) */
  38169. A_UINT32 bl_n; /** number of measurement frames to be sent
  38170. * during one baseline */
  38171. A_UINT32 bl_num_meas; /** number of times the baseline measurement
  38172. * to be done */
  38173. } wmi_motion_det_base_line_config_params_cmd_fixed_param;
  38174. typedef struct {
  38175. /** TLV tag and len; tag equals
  38176. * WMITLV_TAG_STRUC_wmi_motion_det_start_stop_cmd_fixed_param */
  38177. A_UINT32 tlv_header; /** TLV Header */
  38178. A_UINT32 vdev_id; /** Vdev ID */
  38179. A_UINT32 enable; /** start = 1, stop =0 */
  38180. } wmi_motion_det_start_stop_cmd_fixed_param;
  38181. typedef struct {
  38182. /** TLV tag and len; tag equals
  38183. * WMITLV_TAG_STRUC_wmi_motion_det_base_line_start_stop_cmd_fixed_param */
  38184. A_UINT32 tlv_header; /** TLV Header */
  38185. A_UINT32 vdev_id; /** Vdev ID */
  38186. A_UINT32 enable; /** start = 1, stop =0 */
  38187. } wmi_motion_det_base_line_start_stop_cmd_fixed_param;
  38188. typedef struct {
  38189. /** TLV tag and len; tag equals
  38190. * WMITLV_TAG_STRUC_wmi_motion_det_event */
  38191. A_UINT32 tlv_header; /** TLV Header */
  38192. A_UINT32 vdev_id; /** Vdev ID */
  38193. A_UINT32 status; /** status = 1 -> motion detected */
  38194. } wmi_motion_det_event;
  38195. typedef struct {
  38196. /** TLV tag and len; tag equals
  38197. * WMITLV_TAG_STRUC_wmi_motion_det_base_line_event */
  38198. A_UINT32 tlv_header; /** TLV Header */
  38199. A_UINT32 vdev_id; /** Vdev ID */
  38200. A_UINT32 bl_baseline_value; /** baseline correlation value calculated
  38201. * during baselining phase (in %) */
  38202. A_UINT32 bl_max_corr_reserved; /** max corr value obtained during baselining
  38203. * phase (in %); reserved for future */
  38204. A_UINT32 bl_min_corr_reserved; /** min corr value obtained during baselining
  38205. * phase (in %); reserved for future */
  38206. } wmi_motion_det_base_line_event;
  38207. /* Below structures are related to OBSS_PD_SPATIAL Reuse */
  38208. typedef struct {
  38209. /** TLV tag and len; tag equals
  38210. * WMITLV_TAG_STRUC_wmi_obss_set_cmd_fixed_param */
  38211. A_UINT32 tlv_header;
  38212. /** Enable/Disable Spatial Reuse */
  38213. A_UINT32 enable;
  38214. /*
  38215. * In the below fields, "OBSS level" refers to the power of the
  38216. * signals received from "Other BSS".
  38217. * Spatial reuse will only be permitted if the Other BSS's signal power
  38218. * is within the min to max range specified by the below fields.
  38219. */
  38220. /** Minimum OBSS level to use */
  38221. A_INT32 obss_min; /* RSSI in dBm */
  38222. /** Maximum OBSS level to use */
  38223. A_INT32 obss_max; /* RSSI in dBm */
  38224. /** Vdev id*/
  38225. A_UINT32 vdev_id;
  38226. } wmi_obss_spatial_reuse_set_cmd_fixed_param;
  38227. /*
  38228. * Below structure is related to WMI CMD that configures the default
  38229. * minimum (OBSS_MIN) and maximum (OBSS_MAX) Other BSS levels (RSSI in dBm)
  38230. * for VDEV of a give type (STA or AP). These thresholds are configured
  38231. * within the Host and passed down to the FW. FW will use these
  38232. * default OBSS_MIN and OBSS_MAX values during roaming if the assoc response
  38233. * from the AP does not include spatial reuse parameter set Info Element.
  38234. */
  38235. typedef struct {
  38236. /** TLV tag and len; tag equals
  38237. * WMITLV_TAG_STRUC_wmi_obss_spatial_reuse_set_def_obss_thresh_cmd_fixed_param
  38238. */
  38239. A_UINT32 tlv_header;
  38240. /*
  38241. * In the below fields, "OBSS level" refers to the power of the
  38242. * signals received from "Other BSS".
  38243. * Spatial reuse will only be permitted if the Other BSS's signal power
  38244. * is within the min to max range specified by the below fields.
  38245. */
  38246. /** Minimum OBSS level to use */
  38247. A_INT32 obss_min; /* RSSI in dBm */
  38248. /** Maximum OBSS level to use */
  38249. A_INT32 obss_max; /* RSSI in dBm */
  38250. /** Type of VDEV for which these threshold are applicable.
  38251. * vdev_type should be one of WMI_VDEV_TYPE_STA or WMI_VDEV_TYPE_AP
  38252. */
  38253. A_UINT32 vdev_type;
  38254. } wmi_obss_spatial_reuse_set_def_obss_thresh_cmd_fixed_param;
  38255. typedef struct {
  38256. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_wmi_chan_width_peer_list */
  38257. wmi_mac_addr peer_macaddr;
  38258. A_UINT32 chan_width; /* wmi_channel_width */
  38259. A_UINT32 puncture_20mhz_bitmap; /* per peer wmi puncture_bitmap,
  38260. * each bit indicates one 20 MHz BW
  38261. * punctured.
  38262. * This variable should be read from left,
  38263. * LSb will point to the lowest-frequency
  38264. * 20 MHz frequency slice.
  38265. * bit value:
  38266. * 0 - 20 MHz BW is punctured
  38267. * 1 - not punctured
  38268. */
  38269. } wmi_chan_width_peer_list;
  38270. #define WMI_PEER_CHAN_WIDTH_SWITCH_SET_VALID_VDEV_ID(comp) WMI_SET_BITS(comp, 31,1, 1)
  38271. #define WMI_PEER_CHAN_WIDTH_SWITCH_GET_VALID_VDEV_ID(comp) WMI_GET_BITS(comp, 31, 1)
  38272. #define WMI_PEER_CHAN_WIDTH_SWITCH_SET_VALID_PUNCTURE_BITMAP(comp) WMI_SET_BITS(comp, 30, 1, 1)
  38273. #define WMI_PEER_CHAN_WIDTH_SWITCH_GET_VALID_PUNCTURE_BITMAP(comp) WMI_GET_BITS(comp, 30, 1)
  38274. /* bits 29:8 currently unused */
  38275. #define WMI_PEER_CHAN_WIDTH_SWITCH_SET_VDEV_ID(comp, value) WMI_SET_BITS(comp, 0, 8, value)
  38276. #define WMI_PEER_CHAN_WIDTH_SWITCH_GET_VDEV_ID(comp) WMI_GET_BITS(comp, 0, 8)
  38277. typedef struct {
  38278. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_chan_width_switch_cmd_fixed_param */
  38279. A_UINT32 num_peers;
  38280. /* vdev_var:
  38281. * The MSb (bit 31) indicates that the vdev_id is valid.
  38282. * Bit 30 indicates that the puncture bitmap is valid.
  38283. * The LSB (bits 0-7) is used to infer the actual vdev_id.
  38284. * The other bits can be used for future enhancements.
  38285. */
  38286. A_UINT32 vdev_var;
  38287. /*
  38288. * Following this structure is the TLV:
  38289. * struct wmi_chan_width_peer_list chan_width_peer_info[num_peers];
  38290. */
  38291. } wmi_peer_chan_width_switch_cmd_fixed_param;
  38292. #define WMI_PEER_BULK_SET_VDEV_ID(comp, value) WMI_SET_BITS(comp, 0, 8, value)
  38293. #define WMI_PEER_BULK_GET_VDEV_ID(comp) WMI_GET_BITS(comp, 0, 8)
  38294. /* bits 30:8 currently unused */
  38295. #define WMI_PEER_BULK_SET_VALID_VDEV_ID(comp) WMI_SET_BITS(comp, 31, 1, 1)
  38296. #define WMI_PEER_BULK_GET_VALID_VDEV_ID(comp) WMI_GET_BITS(comp, 31, 1)
  38297. typedef struct {
  38298. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_wmi_peer_list */
  38299. wmi_mac_addr peer_macaddr;
  38300. /** parameter id */
  38301. A_UINT32 param_id;
  38302. A_UINT32 param_value;
  38303. } wmi_peer_list;
  38304. /* WMI_PEER_BULK_SET_CMDID */
  38305. typedef struct {
  38306. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_bulk_set_cmd_fixed_param */
  38307. /* vdev_var:
  38308. * The MSb (bit 31) indicates that the vdev_id is valid.
  38309. * The LSB (bits 0-7) is used to infer the actual vdev_id.
  38310. * The other bits can be used for future enhancements.
  38311. */
  38312. A_UINT32 vdev_var;
  38313. /*
  38314. * Following this structure is the TLV array:
  38315. * struct wmi_peer_list peer_info[];
  38316. */
  38317. } wmi_peer_bulk_set_cmd_fixed_param;
  38318. typedef struct {
  38319. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_he_tb_action_frm_cmd_fixed_param */
  38320. A_UINT32 tlv_header;
  38321. /* enable or disable HE TB Action frame */
  38322. A_UINT32 enable;
  38323. /* length of action frame body in bytes */
  38324. A_UINT32 data_len;
  38325. /* This TLV is followed by another TLV of array of bytes
  38326. * A_UINT8 data[];
  38327. * This data array contains the action frame raw data
  38328. */
  38329. } wmi_pdev_he_tb_action_frm_cmd_fixed_param;
  38330. typedef struct {
  38331. /** TLV tag and len; tag equals
  38332. * WMITLV_TAG_STRUC_wmi_hpcs_pulse_start_cmd_fixed_param */
  38333. A_UINT32 tlv_header; /** TLV Header */
  38334. A_UINT32 vdev_id; /** Vdev ID */
  38335. A_UINT32 start; /** Start/Stop */
  38336. A_UINT32 sync_time; /** Lower 32-bit of the TSF at which the
  38337. * pulse should be synced. */
  38338. A_UINT32 pulse_interval; /** Periodicity of pulses in micro seconds */
  38339. A_UINT32 active_sync_period; /** Number of beacons to sync before generating
  38340. * pulse in units of beacon interval.
  38341. * Valid for clock slaves only. */
  38342. A_UINT32 gpio_pin; /** GPIO Pin number to be used */
  38343. A_UINT32 pulse_width; /** Duration of pulse in micro seconds */
  38344. } wmi_hpcs_pulse_start_cmd_fixed_param;
  38345. typedef struct {
  38346. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_muedca_params_config_event_fixed_param */
  38347. A_UINT32 tlv_header; /** TLV Header */
  38348. A_UINT32 pdev_id;
  38349. /*
  38350. * The following per-AC arrays are indexed using the
  38351. * WMI_AC_xxx / wmi_traffic_ac enum values.
  38352. */
  38353. /* aifsn
  38354. * Arbitration inter frame spacing number (AIFSN)
  38355. * Values are integers used for back off computation.
  38356. */
  38357. A_UINT32 aifsn[WMI_AC_MAX];
  38358. /* ecwmin
  38359. * Exponent form of ContentionWindow min (ECWmin)
  38360. * Values are integers used for back off computation.
  38361. */
  38362. A_UINT32 ecwmin[WMI_AC_MAX];
  38363. /* ecwmax
  38364. * Exponent form of ContentionWindow max (ECWmax)
  38365. * Values are integers used for back off computation.
  38366. */
  38367. A_UINT32 ecwmax[WMI_AC_MAX];
  38368. /* muedca_expiration_time
  38369. * MU EDCA Expiration time refers to the length of time after the most
  38370. * recent UL trigger time. The MU EDCA Timer field indicates the time
  38371. * limit, in units of 8 TUs
  38372. */
  38373. A_UINT32 muedca_expiration_time[WMI_AC_MAX];
  38374. } wmi_muedca_params_config_event_fixed_param;
  38375. /* Default PE Duration subfield indicates the PE duration in units of 4 us */
  38376. #define WMI_HEOPS_DEFPE_GET_D3(he_ops) WMI_GET_BITS(he_ops, 0, 3)
  38377. #define WMI_HEOPS_DEFPE_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 0, 3, value)
  38378. /* TWT required */
  38379. #define WMI_HEOPS_TWT_REQUIRED_GET_D3(he_ops) WMI_GET_BITS(he_ops, 3, 1)
  38380. #define WMI_HEOPS_TWT_REQUIRED_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 3, 1, value)
  38381. /* RTS threshold in units of 32 us,0 - always use RTS 1023 - this is disabled */
  38382. #define WMI_HEOPS_RTSTHLD_GET_D3(he_ops) WMI_GET_BITS(he_ops, 4, 10)
  38383. #define WMI_HEOPS_RTSTHLD_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 4, 10, value)
  38384. /* VHT Operation Information Present */
  38385. #define WMI_HEOPS_VHTOPSPRSNT_GET_D3(he_ops) WMI_GET_BITS(he_ops, 14, 1)
  38386. #define WMI_HEOPS_VHTOPSPRSNT_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 14, 1, value)
  38387. /* Co-Located BSS */
  38388. #define WMI_HEOPS_COLOCBSS_GET_D3(he_ops) WMI_GET_BITS(he_ops, 15, 1)
  38389. #define WMI_HEOPS_COLOCBSS_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 15, 1, value)
  38390. /* ER SU Disable */
  38391. #define WMI_HEOPS_ERSUDIS_GET_D3(he_ops) WMI_GET_BITS(he_ops, 16, 1)
  38392. #define WMI_HEOPS_ERSUDIS_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 16, 1, value)
  38393. /* bit17 - bit23 are reserved */
  38394. /* BSS color */
  38395. #define WMI_HEOPS_COLOR_GET_D3(he_ops) WMI_GET_BITS(he_ops, 24, 6)
  38396. #define WMI_HEOPS_COLOR_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 24, 6, value)
  38397. /* Partial BSS Color field indicates whether BSS applies an AID assignment rule using partial BSS color bits */
  38398. #define WMI_HEOPS_PARTBSSCOLOR_GET_D3(he_ops) WMI_GET_BITS(he_ops, 30, 1)
  38399. #define WMI_HEOPS_PARTBSSCOLOR_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 30, 1, value)
  38400. /* when set to 1 disables use of BSS color */
  38401. #define WMI_HEOPS_BSSCOLORDISABLE_GET_D3(he_ops) WMI_GET_BITS(he_ops, 31, 1)
  38402. #define WMI_HEOPS_BSSCOLORDISABLE_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 31, 1, value)
  38403. /* PHY Capabilities Information field */
  38404. /* bit 0 reserved */
  38405. /*
  38406. * B0: Indicates STA support 40 MHz channel width in 2.4 GHz
  38407. * B1: Indicates STA support 40 MHz and 80 MHz channel width in 5 GHz
  38408. * B2: Indicates STA supports 160 MHz channel width in 5 GHz
  38409. * B3: Indicates STA supports 160/80+80 MHz channel width in 5 GHz
  38410. * B4: If B1 is set to 0, then B5 indicates support of 242/106/52/26-tone
  38411. * RU mapping in 40 MHz channel width in 2.4 GHz. Otherwise Reserved.
  38412. * B5: If B2, B3, and B4 are set to 0, then B6 indicates support of
  38413. * 242-tone RU mapping in 40 MHz and 80
  38414. * MHz channel width in 5 GHz. Otherwise Reserved.
  38415. * B6: Reserved
  38416. */
  38417. #define WMI_HECAP_PHY_CBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 1, 7)
  38418. #define WMI_HECAP_PHY_CBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 1, 7, value)
  38419. /*
  38420. * B0: Indicates STA supports reception of preamble puncturing in 80 MHz,
  38421. * where in the preamble only the secondary 20 MHz is punctured
  38422. * B1: Indicates STA supports reception of preamble puncturing in 80 MHz,
  38423. * where in the preamble only one of the two 20 MHz sub-channels in the
  38424. * secondary 40 MHz is punctured
  38425. * B2: Indicates STA supports reception of preamble puncturing in 160 MHz
  38426. * or 80+80 MHz, where in the primary 80 MHz of the preamble only the
  38427. * secondary 20 MHz is punctured
  38428. * B3: Indicates STA supports reception of preamble puncturing in 160 MHz
  38429. * or 80+80 MHz, where in the primary 80 MHz of the preamble, the
  38430. * primary 40 MHz is present
  38431. */
  38432. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 8, 4)
  38433. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 8, 4, value)
  38434. /* Indicates transmitting STA is a Class A (1) or a Class B (0) device */
  38435. #define WMI_HECAP_PHY_COD_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 12, 1)
  38436. #define WMI_HECAP_PHY_COD_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 12, 1, value)
  38437. /* Indicates support of transmission and reception of LDPC encoded packets */
  38438. #define WMI_HECAP_PHY_LDPC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 13, 1)
  38439. #define WMI_HECAP_PHY_LDPC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 13, 1, value)
  38440. /*
  38441. * B0: Indicates support of reception of 1x LTF and 0.8us guard interval duration for HE SU PPDUs.
  38442. */
  38443. #define WMI_HECAP_PHY_LTFGIFORHE_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 14, 1)
  38444. #define WMI_HECAP_PHY_LTFGIFORHE_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 14, 1, value)
  38445. /*
  38446. * If the Doppler Rx subfield is 1, indicates the maximum number of space-time streams supported for reception
  38447. * when a midamble is present in the Data field.
  38448. * If the Doppler Tx subfield is 1, indicates the maximum number of space-time streams supported for transmission
  38449. * when a midamble is present in the Data field.
  38450. * If both Doppler Rx and Doppler Tx subfields are 1, indicates the maximum number of space-time streams
  38451. * supported for transmission and reception when a midamble is present in the Data field.
  38452. */
  38453. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 15, 2)
  38454. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 15, 2, value)
  38455. /*
  38456. * B0: For a transmitting STA acting as beamformee, it indicates support of
  38457. * NDP reception using 4x LTF and 3.2 us guard interval duration
  38458. */
  38459. #define WMI_HECAP_PHY_LTFGIFORNDP_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 17, 1)
  38460. #define WMI_HECAP_PHY_LTFGIFORNDP_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 17, 1, value)
  38461. /*
  38462. * indicates support for the transmission of an HE TB PPDU that has a
  38463. * bandwidth less than or equal to 80 MHz and is using STBC and with
  38464. * one spatial stream
  38465. */
  38466. #define WMI_HECAP_PHY_TXSTBC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 18, 1)
  38467. #define WMI_HECAP_PHY_TXSTBC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 18, 1, value)
  38468. /* indicates support for the reception of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx */
  38469. #define WMI_HECAP_PHY_RXSTBC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 19, 1)
  38470. #define WMI_HECAP_PHY_RXSTBC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 19, 1, value)
  38471. /* indicates transmitting STA supports transmitting HE PPDUs with Doppler procedure */
  38472. #define WMI_HECAP_PHY_TXDOPPLER_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 20, 1)
  38473. #define WMI_HECAP_PHY_TXDOPPLER_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 20, 1, value)
  38474. /* indicates transmitting STA supports receiving HE PPDUs with Doppler procedure */
  38475. #define WMI_HECAP_PHY_RXDOPPLER_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 21, 1)
  38476. #define WMI_HECAP_PHY_RXDOPPLER_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 21, 1, value)
  38477. /*
  38478. * If the transmitting STA is an AP:
  38479. * indicates STA supports of reception of full bandwidth UL MU-MIMO
  38480. * transmission.
  38481. * If the transmitting STA is a non-AP STA:
  38482. * indicates STA supports of transmission of full bandwidth UL MU-MIMO
  38483. * transmission.
  38484. */
  38485. #define WMI_HECAP_PHY_UL_MU_MIMO_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 22, 1)
  38486. #define WMI_HECAP_PHY_UL_MU_MIMO_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 22, 1, value)
  38487. /*
  38488. * If the transmitting STA is an AP:
  38489. * indicates STA supports of reception of UL MUMIMO transmission on an
  38490. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  38491. * If the transmitting STA is a non-AP STA:
  38492. * indicates STA supports of transmission of UL MU-MIMO transmission on an
  38493. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  38494. */
  38495. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 23, 1)
  38496. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 23, 1, value)
  38497. /* Tx DCM
  38498. * B0:B1
  38499. * 00: Does not support DCM
  38500. * 01: BPSK
  38501. * 10: QPSK
  38502. * 11: 16-QAM
  38503. * B2 signals maximum number of spatial streams with DCM
  38504. * 0: 1 spatial stream
  38505. * 1: 2 spatial streams
  38506. */
  38507. #define WMI_HECAP_PHY_DCMTX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 24, 3)
  38508. #define WMI_HECAP_PHY_DCMTX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 24, 3, value)
  38509. /* Rx DCM
  38510. * B0:B1
  38511. * 00: Does not support DCM
  38512. * 01: BPSK
  38513. * 10: QPSK
  38514. * 11: 16-QAM
  38515. * B2 signals maximum number of spatial streams with DCM
  38516. * 0: 1 spatial stream
  38517. * 1: 2 spatial streams
  38518. */
  38519. #define WMI_HECAP_PHY_DCMRX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 27, 3)
  38520. #define WMI_HECAP_PHY_DCMRX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 27, 3, value)
  38521. /*
  38522. * Indicates that the STA supports the reception of an HE MU PPDU payload
  38523. * over full bandwidth and partial bandwidth (106-tone RU within 20 MHz).
  38524. */
  38525. #define WMI_HECAP_PHY_ULHEMU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 30, 1)
  38526. #define WMI_HECAP_PHY_ULHEMU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 30, 1, value)
  38527. /* Indicates support for operation as an SU beamformer */
  38528. #define WMI_HECAP_PHY_SUBFMR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 31, 1)
  38529. #define WMI_HECAP_PHY_SUBFMR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 31, 1, value)
  38530. /* Indicates support for operation as an SU beamformee */
  38531. #define WMI_HECAP_PHY_SUBFME_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 0, 1)
  38532. #define WMI_HECAP_PHY_SUBFME_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 0, 1, value)
  38533. /* Indicates support for operation as an MU Beamformer */
  38534. #define WMI_HECAP_PHY_MUBFMR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 1, 1)
  38535. #define WMI_HECAP_PHY_MUBFMR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 1, 1, value)
  38536. /*
  38537. * Num STS -1 for <= 80MHz (min val 3)
  38538. * The maximum number of space-time streams minus 1 that the STA can
  38539. * receive in an HE NDP
  38540. */
  38541. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 2, 3)
  38542. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 2, 3, value)
  38543. /*
  38544. * Num STS -1 for > 80MHz (min val 3)
  38545. * The maximum number of space-time streams minus 1 that the STA can
  38546. * receive in an HE NDP
  38547. */
  38548. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  38549. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  38550. /*
  38551. * Number Of Sounding Dimensions For <= 80 MHz
  38552. * If SU beamformer capable, set to the maximum supported value of the
  38553. * TXVECTOR parameter NUM_STS minus 1.
  38554. * Otherwise, reserved.
  38555. */
  38556. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  38557. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  38558. /*
  38559. * Number Of Sounding Dimensions For > 80 MHz
  38560. * If SU beamformer capable, set to the maximum supported value of the
  38561. * TXVECTOR parameter NUM_STS minus 1.
  38562. * Otherwise, reserved.
  38563. */
  38564. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 11, 3)
  38565. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 11, 3, value)
  38566. /*
  38567. * Indicates if the HE beamformee is capable of feedback with tone
  38568. * grouping of 16 in the HE Compressed Beamforming Report field for
  38569. * a SU-type feedback.
  38570. */
  38571. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 14, 1)
  38572. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 14, 1, value)
  38573. /*
  38574. * Indicates if the HE beamformee is capable of feedback with tone
  38575. * grouping of 16 in the HE Compressed Beamforming Report field for
  38576. * a MU-type feedback.
  38577. */
  38578. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 15, 1)
  38579. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 15, 1, value)
  38580. /*
  38581. * Indicates if HE beamformee is capable of feedback with codebook
  38582. * size {4, 2} in the HECompressed Beamforming Report field for
  38583. * a SU-type feedback.
  38584. */
  38585. #define WMI_HECAP_PHY_CODBK42SU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 16, 1)
  38586. #define WMI_HECAP_PHY_CODBK42SU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 16, 1, value)
  38587. /*
  38588. * Indicates if HE beamformee is capable of feedback with codebook
  38589. * size {7, 5} in the HE Compressed Beamforming Report field for
  38590. * a MU-type feedback.
  38591. */
  38592. #define WMI_HECAP_PHY_CODBK75MU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 17, 1)
  38593. #define WMI_HECAP_PHY_CODBK75MU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 17, 1, value)
  38594. /*
  38595. * Beamforming Feedback With Trigger Frame
  38596. * If the transmitting STA is an AP STA:
  38597. * B0: indicates support of reception of SU-Type partial(1) and full bandwidth feedback(0)
  38598. * B1: indicates support of reception of MU-Type partial(1) bandwidth feedback
  38599. * B2: indicates support of reception of CQI-Only partial and full bandwidth feedback
  38600. * If the transmitting STA is a non-AP STA:
  38601. * B0: indicates support of transmission of SU-Type partial(1) and full bandwidth(0) feedback
  38602. * B1: indicates support of transmission of MU-Type partial(1) bandwidth feedback
  38603. * B2: indicates support of transmission of CQI-Onlypartial (1)and full bandwidth feedback
  38604. */
  38605. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 18, 3)
  38606. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 18, 3, value)
  38607. /* Indicates the support of transmission and reception of an HE extended range SU PPDU payload transmitted
  38608. * over the right 106-tone RU or partial BW ER
  38609. */
  38610. #define WMI_HECAP_PHY_HEERSU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 21, 1)
  38611. #define WMI_HECAP_PHY_HEERSU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 21, 1, value)
  38612. /* Indicates that the non-AP STA supports reception of a DL MU-MIMO transmission on an RU in an HE MU PPDU
  38613. * where the RU does not span the entire PPDU bandwidth.
  38614. */
  38615. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 22, 1)
  38616. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 22, 1, value)
  38617. /* Indicates whether or not the PPE Threshold field is present */
  38618. #define WMI_HECAP_PHY_PETHRESPRESENT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 23, 1)
  38619. #define WMI_HECAP_PHY_PETHRESPRESENT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 23, 1, value)
  38620. /* Indicates that the STA supports SRP-based SR operation */
  38621. #define WMI_HECAP_PHY_SRPSPRESENT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 24, 1)
  38622. #define WMI_HECAP_PHY_SRPPRESENT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 24, 1, value)
  38623. /* Indicates that the STA supports a power boost factor ar for the r-th RU in the range [0.5, 2] */
  38624. #define WMI_HECAP_PHY_PWRBOOSTAR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 25, 1)
  38625. #define WMI_HECAP_PHY_PWRBOOSTAR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 25, 1, value)
  38626. /* Indicates support for the reception of 4x LTF and 0.8us guard interval duration for HE SU PPDUs. */
  38627. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 26, 1)
  38628. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 26, 1, value)
  38629. /* For a transmitting STA acting as a beamformee, it indicates the maximum Nc for beamforming sounding
  38630. * feedback supported If SU beamformee capable, then set to the maximum Nc for beamforming sounding feedback
  38631. * minus 1. Otherwise, reserved.
  38632. */
  38633. #define WMI_HECAP_PHY_MAXNC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 27, 3)
  38634. #define WMI_HECAP_PHY_MAXNC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 27, 3, value)
  38635. /* Indicates support for the transmission of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  38636. * STBC with one spatial stream
  38637. */
  38638. #define WMI_HECAP_PHY_STBCTXGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 30, 1)
  38639. #define WMI_HECAP_PHY_STBCTXGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 30, 1, value)
  38640. /* Indicates support for the reception of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  38641. * STBC with one spatial stream
  38642. */
  38643. #define WMI_HECAP_PHY_STBCRXGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 31, 1)
  38644. #define WMI_HECAP_PHY_STBCRXGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 31, 1, value)
  38645. /* Indicates support for the reception of an HE ER SU PPDU with 4x LTF and 0.8 us guard interval duration */
  38646. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 0, 1)
  38647. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 0, 1, value)
  38648. /*
  38649. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  38650. * 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.
  38651. */
  38652. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 1, 1)
  38653. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 1, 1, value)
  38654. /*
  38655. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  38656. * 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.
  38657. */
  38658. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 2, 1)
  38659. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 2, 1, value)
  38660. /*
  38661. * Indicates supports of 160 MHz OFDMA for a non-AP HE STA that sets bit B1 of Channel Width Set to 1, and
  38662. * sets B2 and B3 of Channel Width Set each to 0, when operating with 80 MHz channel width. The capability
  38663. * bit is applicable while receiving a 80+80 MHz or a 160 MHz HE MU PPDU, or transmitting a 80+80 MHz or a
  38664. * 160 MHz HE TB PPDU.
  38665. */
  38666. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 3, 1)
  38667. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 3, 1, value)
  38668. /* Indicates support for the reception of an HE ER SU PPDU with 1x LTF and 0.8 us guard interval duration */
  38669. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 4, 1)
  38670. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 4, 1, value)
  38671. /*
  38672. * If the Doppler Rx subfield is 1, indicates support for receiving midambles with 2x HE-LTF, 1x HE-LTF in
  38673. * 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
  38674. * HE ER SU PPDU if the HE ER SU PPDU With 1x HELTF And 0.8 s GI subfield is set to 1.
  38675. *
  38676. * If the Doppler Tx subfield is 1, indicates support for transmitting midambles with 2x HE-LTF, 1x HE-LTF
  38677. * in HE TB PPDU when allowed.
  38678. * If both the Doppler Rx and Doppler Tx subfields are 1, indicates support for receiving midambles with 2x HELTF,
  38679. * 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
  38680. * 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
  38681. * to 1; and also support for transmitting midambles with 2x HE-LTF, 1x HE-LTF in HE TB PPDU when allowed.
  38682. */
  38683. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 5, 1)
  38684. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 5, 1, value)
  38685. /*
  38686. * If the DCM Max Constellation Tx subfield is greater than 0, then the DCM Max BW subfield indicates the
  38687. * maximum bandwidth of a PPDU that the STA might transmit with DCM applied.
  38688. *
  38689. * If the DCM Max Constellation Rx subfield is greater than 0, then the DCM Max BW subfield indicates the
  38690. * maximum bandwidth of a PPDU with DCM applied that the STA can receive.
  38691. *
  38692. * If both the DCM Max Constellation Tx subfield and DCM Max Constellation Rx subfield are 0, then this
  38693. * subfield is reserved.
  38694. *
  38695. * 0=20MHz, 1=40Mhz, 2=80Mhz, 3=160Mhz or 80+80Mhz
  38696. */
  38697. #define WMI_HECAP_PHY_DCMMAXBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 6, 2)
  38698. #define WMI_HECAP_PHY_DCMMAXBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 6, 2, value)
  38699. /*
  38700. * For a non-AP STA, indicates support for receiving a DL HE MU PPDU where the number of OFDM symbols
  38701. * in the HE SIG-B field is greater than 16.
  38702. */
  38703. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 8, 1)
  38704. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 8, 1, value)
  38705. /*
  38706. * For an AP, indicates support for the reception of full bandwidth non-triggered CQI-only feedback.
  38707. * For a non-AP STA, indicates support for the transmission of full bandwidth non-triggered CQI-only feedback.
  38708. */
  38709. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 9, 1)
  38710. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 9, 1, value)
  38711. /*
  38712. * For a non-AP STA, indicates support for the transmission of 1024-QAM on a 26-, 52-, and 106-tone RU.
  38713. * Reserved for an AP.
  38714. */
  38715. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 10, 1)
  38716. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 10, 1, value)
  38717. /*
  38718. * Indicates support for the reception of 1024-QAM on a 26-, 52-, and 106-tone RU.
  38719. */
  38720. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 11, 1)
  38721. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 11, 1, value)
  38722. /*
  38723. * Indicates support for reception of an HE MU PPDU with an RU spanning the entire PPDU bandwidth and a
  38724. * compressed HE-SIG-B format.
  38725. */
  38726. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 12, 1)
  38727. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 12, 1, value)
  38728. /*
  38729. * Indicates support for reception of an HE MU PPDU with a bandwidth less than or equal to 80 MHz, an RU
  38730. * spanning the entire PPDU bandwidth and a non-compressed HE-SIG-B format.
  38731. */
  38732. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 13, 1)
  38733. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 13, 1, value)
  38734. /* HE MAC Capabilities Information field format */
  38735. /* HTC + HE Support Set to 1 if STA supports reception of HE Variant HT control Field */
  38736. #define WMI_HECAP_MAC_HECTRL_GET_D3(he_cap) WMI_GET_BITS(he_cap, 0, 1)
  38737. #define WMI_HECAP_MAC_HECTRL_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 0, 1, value)
  38738. /* set to 1 to for TWT Requestor support */
  38739. #define WMI_HECAP_MAC_TWTREQ_GET_D3(he_cap) WMI_GET_BITS(he_cap, 1, 1)
  38740. #define WMI_HECAP_MAC_TWTREQ_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 1, 1, value)
  38741. /* set to 1 to for TWT Responder support */
  38742. #define WMI_HECAP_MAC_TWTRSP_GET_D3(he_cap) WMI_GET_BITS(he_cap, 2, 1)
  38743. #define WMI_HECAP_MAC_TWTRSP_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 2, 1, value)
  38744. /* Level of frag support
  38745. Set to 0 for no support for dynamic fragmentation.
  38746. Set to 1 for support for dynamic fragments that are contained within a S-MPDU
  38747. Set to 2 for support for dynamic fragments that are contained within a Single MPDU and support for up to
  38748. one dynamic fragment for each MSDU and each MMPDU within an A-MPDU or multi-TID A-MPDU.
  38749. Set to 3 for support for dynamic fragments that are contained within a Single MPDU and support for multiple
  38750. dynamic fragments for each MSDU within an AMPDU or multi-TID AMPDU and up to one dynamic fragment
  38751. for each MMPDU in a multi-TID A-MPDU that is not a Single MPDU
  38752. */
  38753. #define WMI_HECAP_MAC_HEFRAG_GET_D3(he_cap) WMI_GET_BITS(he_cap, 3, 2)
  38754. #define WMI_HECAP_MAC_HEFRAG_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 3, 2, value)
  38755. /* The maximum number of fragmented MSDUs, Nmax,defined by this field is Nmax = 2 Maximum Number Of FMPDUs */
  38756. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET_D3(he_cap) WMI_GET_BITS(he_cap, 5, 3)
  38757. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 5, 3, value)
  38758. /* 0 = no restriction on the minimum payload , 1 = 128 octets min, 2 = 256 octets min, 3 = 512 octets min */
  38759. #define WMI_HECAP_MAC_MINFRAGSZ_GET_D3(he_cap) WMI_GET_BITS(he_cap, 8, 2)
  38760. #define WMI_HECAP_MAC_MINFRAGSZ_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 8, 2, value)
  38761. /*0 = no additional processing time, 1 = 8us,2 = 16us */
  38762. #define WMI_HECAP_MAC_TRIGPADDUR_GET_D3(he_cap) WMI_GET_BITS(he_cap, 10, 2)
  38763. #define WMI_HECAP_MAC_TRIGPADDUR_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 10, 2, value)
  38764. /* Indicates the number of TIDs of QoS Data frames that an HE STA can receive in a multi-TID AMPDU */
  38765. #define WMI_HECAP_MAC_MTID_RX_GET_D3(he_cap) WMI_GET_BITS(he_cap, 12, 3)
  38766. #define WMI_HECAP_MAC_MTID_RX_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 12, 3, value)
  38767. /* Indicates support for link adaptation using the HLA Control subfield. */
  38768. #define WMI_HECAP_MAC_HELINK_ADPT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 15, 2)
  38769. #define WMI_HECAP_MAC_HELINK_ADPT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 15, 2, value)
  38770. /* Set to 1 for reception of AllAck support */
  38771. #define WMI_HECAP_MAC_AACK_GET_D3(he_cap) WMI_GET_BITS(he_cap, 17, 1)
  38772. #define WMI_HECAP_MAC_AACK_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 17, 1, value)
  38773. /* Set to 1 if the STA supports reception of the UL MU Response Scheduling A-Control field */
  38774. #define WMI_HECAP_MAC_TRS_GET_D3(he_cap) WMI_GET_BITS(he_cap, 18, 1)
  38775. #define WMI_HECAP_MAC_TRS_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 18, 1, value)
  38776. /* Set to 1 if the STA supports the BSR A-Control field functionality.*/
  38777. #define WMI_HECAP_MAC_BSR_GET_D3(he_cap) WMI_GET_BITS(he_cap, 19, 1)
  38778. #define WMI_HECAP_MAC_BSR_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 19, 1, value)
  38779. /* Set to 1 when the STA supports broadcast TWT functionality.*/
  38780. #define WMI_HECAP_MAC_BCSTTWT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 20, 1)
  38781. #define WMI_HECAP_MAC_BCSTTWT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 20, 1, value)
  38782. /* Set to 1 if STA supports rx of Multi-STA BA that has 32-bit Block Ack Bitmap */
  38783. #define WMI_HECAP_MAC_32BITBA_GET_D3(he_cap) WMI_GET_BITS(he_cap, 21, 1)
  38784. #define WMI_HECAP_MAC_32BITBA_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 21, 1, value)
  38785. /* Set to 1 if the STA supports MU cascading operation */
  38786. #define WMI_HECAP_MAC_MUCASCADE_GET_D3(he_cap) WMI_GET_BITS(he_cap, 22, 1)
  38787. #define WMI_HECAP_MAC_MUCASCADE_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 22, 1, value)
  38788. /* Set to 1 when the STA supports reception of this multi-TID A-MPDU format */
  38789. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D3(he_cap) WMI_GET_BITS(he_cap, 23, 1)
  38790. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 23, 1, value)
  38791. /* bit 24 - reserved */
  38792. /* Set to 1 if the STA supports reception of the OMI A-Control field */
  38793. #define WMI_HECAP_MAC_OMI_GET_D3(he_cap) WMI_GET_BITS(he_cap, 25, 1)
  38794. #define WMI_HECAP_MAC_OMI_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 25, 1, value)
  38795. /*1 if OFDMA Random Access Supported */
  38796. #define WMI_HECAP_MAC_OFDMARA_GET_D3(he_cap) WMI_GET_BITS(he_cap, 26, 1)
  38797. #define WMI_HECAP_MAC_OFDMARA_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 26, 1, value)
  38798. /* Maximum AMPDU Length Exponent.
  38799. * If the HE STA includes a VHT Capabilities element, the Maximum A-MPDU Length Exponent subfield in
  38800. * HE Capabilities element combined with the Maximum A-MPDU Length Exponent subfield in VHT
  38801. * Capabilities element indicate the maximum length of A-MPDU that the STA can Receive where EOF
  38802. * padding is not included in this limit.
  38803. */
  38804. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D3(he_cap) WMI_GET_BITS(he_cap, 27, 2)
  38805. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 27, 2, value)
  38806. /* A-MSDU Fragmentation Support */
  38807. #define WMI_HECAP_MAC_AMSDUFRAG_GET_D3(he_cap) WMI_GET_BITS(he_cap, 29, 1)
  38808. #define WMI_HECAP_MAC_AMSDUFRAG_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 29, 1, value)
  38809. /* Flexible TWT Schedule Support */
  38810. #define WMI_HECAP_MAC_FLEXTWT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 30, 1)
  38811. #define WMI_HECAP_MAC_FLEXTWT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 30, 1, value)
  38812. /* Rx Control Frame to MultiBSS */
  38813. #define WMI_HECAP_MAC_MBSS_GET_D3(he_cap) WMI_GET_BITS(he_cap, 31, 1)
  38814. #define WMI_HECAP_MAC_MBSS_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 31, 1, value)
  38815. /* 2nd DWORD of HE MAC Capabilities */
  38816. /* BSRP A-MPDU Aggregation
  38817. * maintaining compatibility since we don't support this now so not wasting memory
  38818. */
  38819. #define WMI_HECAP_MAC_BSRPAMPDU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 0, 1)
  38820. #define WMI_HECAP_MAC_BSRPAMPDU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 0, 1, value)
  38821. /* Quiet Time Period (QTP) operation
  38822. * maintaining compatibility since we don't support this now so not wasting memory
  38823. */
  38824. #define WMI_HECAP_MAC_QTP_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 1, 1)
  38825. #define WMI_HECAP_MAC_QTP_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 1, 1, value)
  38826. /* support by an AP for receiving an (A-)MPDU that contains a BQR in the
  38827. * A-Control subfield and support by a non-AP STA for generating an (A-)MPDU
  38828. * that contains a BQR in the A-Control subfield
  38829. * maintaining compatibility since we don't support this now so not wasting memory
  38830. */
  38831. #define WMI_HECAP_MAC_ABQR_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 2, 1)
  38832. #define WMI_HECAP_MAC_ABQR_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 2, 1, value)
  38833. /* Indicates support by the STA for the role of SRP Responder.*/
  38834. #define WMI_HECAP_MAC_SRPRESP_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 3, 1)
  38835. #define WMI_HECAP_MAC_SRPRESP_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 3, 1, value)
  38836. /* Indicates support for a non-AP STA to follow the NDP feedback report procedure and respond to
  38837. * the NDP Feedback Report Poll Trigger frame.
  38838. */
  38839. #define WMI_HECAP_MAC_NDPFDBKRPT_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 4, 1)
  38840. #define WMI_HECAP_MAC_NDPFDBKRPT_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 4, 1, value)
  38841. /* Indicates support for an AP to encode OPS information to TIM element of the FILS Discovery
  38842. * frames or TIM frames as described in AP operation for opportunistic power save.
  38843. * Indicates support for a non-AP STA to receive the opportunistic power save encoded TIM elements
  38844. */
  38845. #define WMI_HECAP_MAC_OPS_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 5, 1)
  38846. #define WMI_HECAP_MAC_OPS_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 5, 1, value)
  38847. /* Indicates support by a STA to receive an ack-enabled A-MPDU in which an A-MSDU is carried in
  38848. * a QoS Data frame for which no block ack agreement exists.
  38849. */
  38850. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 6, 1)
  38851. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 6, 1, value)
  38852. /* Indicates the number of TIDs of QoS Data frames that an HE STA can transmit in a multi-TID AMPDU */
  38853. #define WMI_HECAP_MAC_MTID_TX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 7, 3)
  38854. #define WMI_HECAP_MAC_MTID_TX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 7, 3, value)
  38855. /* Indicates whether an HE STA supports an HE subchannel selective transmission operation */
  38856. #define WMI_HECAP_MAC_SUBCHANSELTX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 10, 1)
  38857. #define WMI_HECAP_MAC_SUBCHANSELTX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 10, 1, value)
  38858. /* Indicates support by a STA to receive a TRS Control subfield or a Trigger frame with a User Info
  38859. * field addressed to the STA with the RU Allocation subfield of the TRS Control subfield or the User
  38860. * Info field indicating 2x996-tone.
  38861. */
  38862. #define WMI_HECAP_MAC_UL2X996RU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 11, 1)
  38863. #define WMI_HECAP_MAC_UL2X996RU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 11, 1, value)
  38864. /* Indicates whether an AP supports interpretation of the UL MU Data Disable subfield of the OM Control subfield */
  38865. #define WMI_HECAP_MAC_OMCULMUDDIS_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 12, 1)
  38866. #define WMI_HECAP_MAC_OMCULMUDDIS_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 12, 1, value)
  38867. /* Indicates the spatial multiplexing power save mode after receiving a
  38868. * Trigger frame that is in operation immediately after (re)association.
  38869. */
  38870. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 13, 1)
  38871. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 13, 1, value)
  38872. /* Indicates support for Punctured Sounding */
  38873. #define WMI_HECAP_MAC_PUNCSOUNDING_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 14, 1)
  38874. #define WMI_HECAP_MAC_PUNCSOUNDING_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 14, 1, value)
  38875. /* Indicates support for receiving a Trigger frame in an HT PPDU and
  38876. * receiving a Trigger frame in a VHT PPDU
  38877. */
  38878. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 15, 1)
  38879. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 15, 1, value)
  38880. /*
  38881. * The following conditionally-defined macros can be used in systems
  38882. * which only support either 802.11ax draft 2 or 802.11ax draft 3,
  38883. * but not both, and which make this D2 vs. D3 selection at build time.
  38884. */
  38885. #ifdef SUPPORT_11AX_D3
  38886. #define WMI_HEOPS_COLOR_GET WMI_HEOPS_COLOR_GET_D3
  38887. #define WMI_HEOPS_COLOR_SET WMI_HEOPS_COLOR_SET_D3
  38888. #define WMI_HEOPS_DEFPE_GET WMI_HEOPS_DEFPE_GET_D3
  38889. #define WMI_HEOPS_DEFPE_SET WMI_HEOPS_DEFPE_SET_D3
  38890. #define WMI_HEOPS_TWT_REQUIRED_GET WMI_HEOPS_TWT_REQUIRED_GET_D3
  38891. #define WMI_HEOPS_TWT_REQUIRED_SET WMI_HEOPS_TWT_REQUIRED_SET_D3
  38892. #define WMI_HEOPS_TWT_GET WMI_HEOPS_TWT_REQUIRED_GET_D3 /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_GET */
  38893. #define WMI_HEOPS_TWT_SET WMI_HEOPS_TWT_REQUIRED_SET_D3 /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_SET */
  38894. #define WMI_HEOPS_RTSTHLD_GET WMI_HEOPS_RTSTHLD_GET_D3
  38895. #define WMI_HEOPS_RTSTHLD_SET WMI_HEOPS_RTSTHLD_SET_D3
  38896. #define WMI_HEOPS_PARTBSSCOLOR_GET WMI_HEOPS_PARTBSSCOLOR_GET_D3
  38897. #define WMI_HEOPS_PARTBSSCOLOR_SET WMI_HEOPS_PARTBSSCOLOR_SET_D3
  38898. #define WMI_HEOPS_COLOCBSS_GET WMI_HEOPS_COLOCBSS_GET_D3
  38899. #define WMI_HEOPS_COLOCBSS_SET WMI_HEOPS_COLOCBSS_SET_D3
  38900. #define WMI_HEOPS_VHTOPSPRSNT_GET WMI_HEOPS_VHTOPSPRSNT_GET_D3
  38901. #define WMI_HEOPS_VHTOPSPRSNT_SET WMI_HEOPS_VHTOPSPRSNT_SET_D3
  38902. #define WMI_HEOPS_ERSUDIS_GET WMI_HEOPS_ERSUDIS_GET_D3
  38903. #define WMI_HEOPS_ERSUDIS_SET WMI_HEOPS_ERSUDIS_SET_D3
  38904. #define WMI_HEOPS_BSSCOLORDISABLE_GET WMI_HEOPS_BSSCOLORDISABLE_GET_D3
  38905. #define WMI_HEOPS_BSSCOLORDISABLE_SET WMI_HEOPS_BSSCOLORDISABLE_SET_D3
  38906. #define WMI_HEOPS_TXBSSID_GET(he_ops) (0) /* DEPRECATED - DO NOT USE */
  38907. #define WMI_HEOPS_TXBSSID_SET(he_ops, value) /* DEPRECATED - DO NOT USE */
  38908. #define WMI_HECAP_PHY_CBW_GET WMI_HECAP_PHY_CBW_GET_D3
  38909. #define WMI_HECAP_PHY_CBW_SET WMI_HECAP_PHY_CBW_SET_D3
  38910. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D3
  38911. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D3
  38912. #define WMI_HECAP_PHY_COD_GET WMI_HECAP_PHY_COD_GET_D3
  38913. #define WMI_HECAP_PHY_COD_SET WMI_HECAP_PHY_COD_SET_D3
  38914. #define WMI_HECAP_PHY_LDPC_GET WMI_HECAP_PHY_LDPC_GET_D3
  38915. #define WMI_HECAP_PHY_LDPC_SET WMI_HECAP_PHY_LDPC_SET_D3
  38916. #define WMI_HECAP_PHY_TXLDPC_GET WMI_HECAP_PHY_LDPC_GET /* Deprecated use WMI_HECAP_PHY_LDPC */
  38917. #define WMI_HECAP_PHY_TXLDPC_SET WMI_HECAP_PHY_LDPC_SET /* Deprecated use WMI_HECAP_PHY_LDPC */
  38918. #define WMI_HECAP_PHY_RXLDPC_GET WMI_HECAP_PHY_LDPC_GET /* Deprecated use WMI_HECAP_PHY_LDPC */
  38919. #define WMI_HECAP_PHY_RXLDPC_SET WMI_HECAP_PHY_LDPC_SET /* Deprecated use WMI_HECAP_PHY_LDPC */
  38920. #define WMI_HECAP_PHY_LTFGIFORHE_GET WMI_HECAP_PHY_LTFGIFORHE_GET_D3
  38921. #define WMI_HECAP_PHY_LTFGIFORHE_SET WMI_HECAP_PHY_LTFGIFORHE_SET_D3
  38922. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3
  38923. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3
  38924. #define WMI_HECAP_PHY_LTFGIFORNDP_GET WMI_HECAP_PHY_LTFGIFORNDP_GET_D3
  38925. #define WMI_HECAP_PHY_LTFGIFORNDP_SET WMI_HECAP_PHY_LTFGIFORNDP_SET_D3
  38926. #define WMI_HECAP_PHY_TXSTBC_GET WMI_HECAP_PHY_TXSTBC_GET_D3
  38927. #define WMI_HECAP_PHY_TXSTBC_SET WMI_HECAP_PHY_TXSTBC_SET_D3
  38928. #define WMI_HECAP_PHY_RXSTBC_GET WMI_HECAP_PHY_RXSTBC_GET_D3
  38929. #define WMI_HECAP_PHY_RXSTBC_SET WMI_HECAP_PHY_RXSTBC_SET_D3
  38930. #define WMI_HECAP_PHY_TXDOPPLER WMI_HECAP_PHY_TXDOPPLER_GET_D3
  38931. #define WMI_HECAP_PHY_TXDOPPLER_SET WMI_HECAP_PHY_TXDOPPLER_SET_D3
  38932. #define WMI_HECAP_PHY_RXDOPPLER_GET WMI_HECAP_PHY_RXDOPPLER_GET_D3
  38933. #define WMI_HECAP_PHY_RXDOPPLER_SET WMI_HECAP_PHY_RXDOPPLER_SET_D3
  38934. #define WMI_HECAP_PHY_UL_MU_MIMO_GET WMI_HECAP_PHY_UL_MU_MIMO_GET_D3
  38935. #define WMI_HECAP_PHY_UL_MU_MIMO_SET WMI_HECAP_PHY_UL_MU_MIMO_SET_D3
  38936. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D3
  38937. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D3
  38938. #define WMI_HECAP_PHY_DCMTX_GET WMI_HECAP_PHY_DCMTX_GET_D3
  38939. #define WMI_HECAP_PHY_DCMTX_SET WMI_HECAP_PHY_DCMTX_SET_D3
  38940. #define WMI_HECAP_PHY_DCMRX_GET WMI_HECAP_PHY_DCMRX_GET_D3
  38941. #define WMI_HECAP_PHY_DCMRX_SET WMI_HECAP_PHY_DCMRX_SET_D3
  38942. /* DEPRECATED - use WMI_HECAP_PHY_DCMRX or WMI_HECAP_PHY_DCMTX */
  38943. #define WMI_HECAP_PHY_DCM_GET WMI_HECAP_PHY_DCMRX_GET_D3
  38944. #define WMI_HECAP_PHY_DCM_SET WMI_HECAP_PHY_DCMRX_SET_D3
  38945. #define WMI_HECAP_PHY_ULHEMU_GET WMI_HECAP_PHY_ULHEMU_GET_D3
  38946. #define WMI_HECAP_PHY_ULHEMU_SET WMI_HECAP_PHY_ULHEMU_SET_D3
  38947. #define WMI_HECAP_PHY_SUBFMR_GET WMI_HECAP_PHY_SUBFMR_GET_D3
  38948. #define WMI_HECAP_PHY_SUBFMR_SET WMI_HECAP_PHY_SUBFMR_SET_D3
  38949. #define WMI_HECAP_PHY_SUBFME_GET WMI_HECAP_PHY_SUBFME_GET_D3
  38950. #define WMI_HECAP_PHY_SUBFME_SET WMI_HECAP_PHY_SUBFME_SET_D3
  38951. #define WMI_HECAP_PHY_MUBFMR_GET WMI_HECAP_PHY_MUBFMR_GET_D3
  38952. #define WMI_HECAP_PHY_MUBFMR_SET WMI_HECAP_PHY_MUBFMR_SET_D3
  38953. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3
  38954. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3
  38955. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3
  38956. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3
  38957. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3
  38958. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3
  38959. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3
  38960. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3
  38961. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D3
  38962. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D3
  38963. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D3
  38964. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D3
  38965. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D3
  38966. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D3
  38967. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D3
  38968. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D3
  38969. #define WMI_HECAP_PHY_CODBK42SU_GET WMI_HECAP_PHY_CODBK42SU_GET_D3
  38970. #define WMI_HECAP_PHY_CODBK42SU_SET WMI_HECAP_PHY_CODBK42SU_SET_D3
  38971. #define WMI_HECAP_PHY_CODBK75MU_GET WMI_HECAP_PHY_CODBK75MU_GET_D3
  38972. #define WMI_HECAP_PHY_CODBK75MU_SET WMI_HECAP_PHY_CODBK75MU_SET_D3
  38973. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D3
  38974. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D3
  38975. #define WMI_HECAP_PHY_HEERSU_GET WMI_HECAP_PHY_HEERSU_GET_D3
  38976. #define WMI_HECAP_PHY_HEERSU_SET WMI_HECAP_PHY_HEERSU_SET_D3
  38977. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D3
  38978. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D3
  38979. #define WMI_HECAP_PHY_PETHRESPRESENT_GET WMI_HECAP_PHY_PETHRESPRESENT_GET_D3
  38980. #define WMI_HECAP_PHY_PETHRESPRESENT_SET WMI_HECAP_PHY_PETHRESPRESENT_SET_D3
  38981. #define WMI_HECAP_PHY_SRPSPRESENT_GET WMI_HECAP_PHY_SRPSPRESENT_GET_D3
  38982. #define WMI_HECAP_PHY_SRPPRESENT_SET WMI_HECAP_PHY_SRPPRESENT_SET_D3
  38983. #define WMI_HECAP_PHY_PWRBOOSTAR_GET WMI_HECAP_PHY_PWRBOOSTAR_GET_D3
  38984. #define WMI_HECAP_PHY_PWRBOOSTAR_SET WMI_HECAP_PHY_PWRBOOSTAR_SET_D3
  38985. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D3
  38986. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D3
  38987. #define WMI_HECAP_PHY_MAXNC_GET WMI_HECAP_PHY_MAXNC_GET_D3
  38988. #define WMI_HECAP_PHY_MAXNC_SET WMI_HECAP_PHY_MAXNC_SET_D3
  38989. #define WMI_HECAP_PHY_STBCTXGT80_GET WMI_HECAP_PHY_STBCTXGT80_GET_D3
  38990. #define WMI_HECAP_PHY_STBCTXGT80_SET WMI_HECAP_PHY_STBCTXGT80_SET_D3
  38991. #define WMI_HECAP_PHY_STBCRXGT80_GET WMI_HECAP_PHY_STBCRXGT80_GET_D3
  38992. #define WMI_HECAP_PHY_STBCRXGT80_SET WMI_HECAP_PHY_STBCRXGT80_SET_D3
  38993. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D3
  38994. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D3
  38995. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D3
  38996. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D3
  38997. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D3
  38998. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D3
  38999. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D3
  39000. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D3
  39001. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D3
  39002. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D3
  39003. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET_D3
  39004. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET_D3
  39005. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET /* DEPRECATED */
  39006. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET /* DEPRECATED */
  39007. #define WMI_HECAP_PHY_DCMMAXBW_GET WMI_HECAP_PHY_DCMMAXBW_GET_D3
  39008. #define WMI_HECAP_PHY_DCMMAXBW_SET WMI_HECAP_PHY_DCMMAXBW_SET_D3
  39009. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET_D3
  39010. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET_D3
  39011. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET_D3
  39012. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET_D3
  39013. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET_D3
  39014. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET_D3
  39015. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET_D3
  39016. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET_D3
  39017. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET_D3
  39018. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET_D3
  39019. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET_D3
  39020. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET_D3
  39021. #define WMI_HECAP_PHY_DB_GET(he_phy_cap) (0) /* DEPRECATED - DO NOT USE */
  39022. #define WMI_HECAP_PHY_DB_SET(he_phy_cap, value) /* DEPRECATED - DO NOT USE */
  39023. #define WMI_HECAP_MAC_HECTRL_GET WMI_HECAP_MAC_HECTRL_GET_D3
  39024. #define WMI_HECAP_MAC_HECTRL_SET WMI_HECAP_MAC_HECTRL_SET_D3
  39025. #define WMI_HECAP_MAC_TWTREQ_GET WMI_HECAP_MAC_TWTREQ_GET_D3
  39026. #define WMI_HECAP_MAC_TWTREQ_SET WMI_HECAP_MAC_TWTREQ_SET_D3
  39027. #define WMI_HECAP_MAC_TWTRSP_GET WMI_HECAP_MAC_TWTRSP_GET_D3
  39028. #define WMI_HECAP_MAC_TWTRSP_SET WMI_HECAP_MAC_TWTRSP_SET_D3
  39029. #define WMI_HECAP_MAC_HEFRAG_GET WMI_HECAP_MAC_HEFRAG_GET_D3
  39030. #define WMI_HECAP_MAC_HEFRAG_SET WMI_HECAP_MAC_HEFRAG_SET_D3
  39031. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET WMI_HECAP_MAC_MAXFRAGMSDU_GET_D3
  39032. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET WMI_HECAP_MAC_MAXFRAGMSDU_SET_D3
  39033. #define WMI_HECAP_MAC_MINFRAGSZ_GET WMI_HECAP_MAC_MINFRAGSZ_GET_D3
  39034. #define WMI_HECAP_MAC_MINFRAGSZ_SET WMI_HECAP_MAC_MINFRAGSZ_SET_D3
  39035. #define WMI_HECAP_MAC_TRIGPADDUR_GET WMI_HECAP_MAC_TRIGPADDUR_GET_D3
  39036. #define WMI_HECAP_MAC_TRIGPADDUR_SET WMI_HECAP_MAC_TRIGPADDUR_SET_D3
  39037. #define WMI_HECAP_MAC_MTID_RX_GET WMI_HECAP_MAC_MTID_RX_GET_D3
  39038. #define WMI_HECAP_MAC_MTID_RX_SET WMI_HECAP_MAC_MTID_RX_SET_D3
  39039. #define WMI_HECAP_MAC_HELINK_ADPT_GET WMI_HECAP_MAC_HELINK_ADPT_GET_D3
  39040. #define WMI_HECAP_MAC_HELINK_ADPT_SET WMI_HECAP_MAC_HELINK_ADPT_SET_D3
  39041. #define WMI_HECAP_MAC_AACK_GET WMI_HECAP_MAC_AACK_GET_D3
  39042. #define WMI_HECAP_MAC_AACK_SET WMI_HECAP_MAC_AACK_SET_D3
  39043. #define WMI_HECAP_MAC_TRS_GET WMI_HECAP_MAC_TRS_GET_D3
  39044. #define WMI_HECAP_MAC_TRS_SET WMI_HECAP_MAC_TRS_SET_D3
  39045. #define WMI_HECAP_MAC_ULMURSP_GET(he_cap) (0) /* DEPRECATED, DO NOT USE */
  39046. #define WMI_HECAP_MAC_ULMURSP_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
  39047. #define WMI_HECAP_MAC_BSR_GET WMI_HECAP_MAC_BSR_GET_D3
  39048. #define WMI_HECAP_MAC_BSR_SET WMI_HECAP_MAC_BSR_SET_D3
  39049. #define WMI_HECAP_MAC_BCSTTWT_GET WMI_HECAP_MAC_BCSTTWT_GET_D3
  39050. #define WMI_HECAP_MAC_BCSTTWT_SET WMI_HECAP_MAC_BCSTTWT_SET_D3
  39051. #define WMI_HECAP_MAC_32BITBA_GET WMI_HECAP_MAC_32BITBA_GET_D3
  39052. #define WMI_HECAP_MAC_32BITBA_SET WMI_HECAP_MAC_32BITBA_SET_D3
  39053. #define WMI_HECAP_MAC_MUCASCADE_GET WMI_HECAP_MAC_MUCASCADE_GET_D3
  39054. #define WMI_HECAP_MAC_MUCASCADE_SET WMI_HECAP_MAC_MUCASCADE_SET_D3
  39055. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D3
  39056. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D3
  39057. #define WMI_HECAP_MAC_GROUPMSTABA_GET(he_cap) (0) /* DEPRECATED, DO NOT USE */
  39058. #define WMI_HECAP_MAC_GROUPMSTABA_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
  39059. #define WMI_HECAP_MAC_OMI_GET WMI_HECAP_MAC_OMI_GET_D3
  39060. #define WMI_HECAP_MAC_OMI_SET WMI_HECAP_MAC_OMI_SET_D3
  39061. #define WMI_HECAP_MAC_OFDMARA_GET WMI_HECAP_MAC_OFDMARA_GET_D3
  39062. #define WMI_HECAP_MAC_OFDMARA_SET WMI_HECAP_MAC_OFDMARA_SET_D3
  39063. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D3
  39064. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D3
  39065. #define WMI_HECAP_MAC_AMSDUFRAG_GET WMI_HECAP_MAC_AMSDUFRAG_GET_D3
  39066. #define WMI_HECAP_MAC_AMSDUFRAG_SET WMI_HECAP_MAC_AMSDUFRAG_SET_D3
  39067. #define WMI_HECAP_MAC_FLEXTWT_GET WMI_HECAP_MAC_FLEXTWT_GET_D3
  39068. #define WMI_HECAP_MAC_FLEXTWT_SET WMI_HECAP_MAC_FLEXTWT_SET_D3
  39069. #define WMI_HECAP_MAC_MBSS_GET WMI_HECAP_MAC_MBSS_GET_D3
  39070. #define WMI_HECAP_MAC_MBSS_SET WMI_HECAP_MAC_MBSS_SET_D3
  39071. #define WMI_HECAP_MAC_BSRPAMPDU_GET WMI_HECAP_MAC_BSRPAMPDU_GET_D3
  39072. #define WMI_HECAP_MAC_BSRPAMPDU_SET WMI_HECAP_MAC_BSRPAMPDU_SET_D3
  39073. #define WMI_HECAP_MAC_QTP_GET WMI_HECAP_MAC_QTP_GET_D3
  39074. #define WMI_HECAP_MAC_QTP_SET WMI_HECAP_MAC_QTP_SET_D3
  39075. #define WMI_HECAP_MAC_ABQR_GET WMI_HECAP_MAC_ABQR_GET_D3
  39076. #define WMI_HECAP_MAC_ABQR_SET WMI_HECAP_MAC_ABQR_SET_D3
  39077. #define WMI_HECAP_MAC_SRPRESP_GET WMI_HECAP_MAC_SRPRESP_GET_D3
  39078. #define WMI_HECAP_MAC_SRPRESP_SET WMI_HECAP_MAC_SRPRESP_SET_D3
  39079. #define WMI_HECAP_MAC_SRRESP_GET(he_cap2) (0) /* DEPRECATED, DO NOT USE */
  39080. #define WMI_HECAP_MAC_SRRESP_SET(he_cap2, value) /* DEPRECATED, DO NOT USE */
  39081. #define WMI_HECAP_MAC_NDPFDBKRPT_GET WMI_HECAP_MAC_NDPFDBKRPT_GET_D3
  39082. #define WMI_HECAP_MAC_NDPFDBKRPT_SET WMI_HECAP_MAC_NDPFDBKRPT_SET_D3
  39083. #define WMI_HECAP_MAC_OPS_GET WMI_HECAP_MAC_OPS_GET_D3
  39084. #define WMI_HECAP_MAC_OPS_SET WMI_HECAP_MAC_OPS_SET_D3
  39085. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET WMI_HECAP_MAC_AMSDUINAMPDU_GET_D3
  39086. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET WMI_HECAP_MAC_AMSDUINAMPDU_SET_D3
  39087. #define WMI_HECAP_MAC_MTID_TX_GET WMI_HECAP_MAC_MTID_TX_GET_D3
  39088. #define WMI_HECAP_MAC_MTID_TX_SET WMI_HECAP_MAC_MTID_TX_SET_D3
  39089. #define WMI_HECAP_MAC_SUBCHANSELTX_GET WMI_HECAP_MAC_SUBCHANSELTX_GET_D3
  39090. #define WMI_HECAP_MAC_SUBCHANSELTX_SET WMI_HECAP_MAC_SUBCHANSELTX_SET_D3
  39091. #define WMI_HECAP_MAC_UL2X996RU_GET WMI_HECAP_MAC_UL2X996RU_GET_D3
  39092. #define WMI_HECAP_MAC_UL2X996RU_SET WMI_HECAP_MAC_UL2X996RU_SET_D3
  39093. #define WMI_HECAP_MAC_OMCULMUDDIS_GET WMI_HECAP_MAC_OMCULMUDDIS_GET_D3
  39094. #define WMI_HECAP_MAC_OMCULMUDDIS_SET WMI_HECAP_MAC_OMCULMUDDIS_SET_D3
  39095. #define WMI_HECAP_MAC_HELKAD_GET(he_cap) (0) /* DEPRECATED, DO NOT USE */
  39096. #define WMI_HECAP_MAC_HELKAD_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
  39097. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3 /* DEPRECATED - DO NOT USE */
  39098. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3 /* DEPRECATED - DO NOT USE */
  39099. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D3
  39100. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D3
  39101. #define WMI_HECAP_MAC_PUNCSOUNDING_GET WMI_HECAP_MAC_PUNCSOUNDING_GET_D3
  39102. #define WMI_HECAP_MAC_PUNCSOUNDING_SET WMI_HECAP_MAC_PUNCSOUNDING_SET_D3
  39103. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET WMI_HECAP_MAC_HTVHTTRIGRX_GET_D3
  39104. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET WMI_HECAP_MAC_HTVHTTRIGRX_SET_D3
  39105. #else /* SUPPORT_11AX_D3 vs. D2 */
  39106. /* D2 and D2- */
  39107. #define WMI_HEOPS_COLOR_GET WMI_HEOPS_COLOR_GET_D2
  39108. #define WMI_HEOPS_COLOR_SET WMI_HEOPS_COLOR_SET_D2
  39109. #define WMI_HEOPS_DEFPE_GET WMI_HEOPS_DEFPE_GET_D2
  39110. #define WMI_HEOPS_DEFPE_SET WMI_HEOPS_DEFPE_SET_D2
  39111. #define WMI_HEOPS_TWT_REQUIRED_GET WMI_HEOPS_TWT_REQUIRED_GET_D2
  39112. #define WMI_HEOPS_TWT_REQUIRED_SET WMI_HEOPS_TWT_REQUIRED_SET_D2
  39113. #define WMI_HEOPS_TWT_GET WMI_HEOPS_TWT_GET_D2 /* Deprecated */
  39114. #define WMI_HEOPS_TWT_SET WMI_HEOPS_TWT_SET_D2 /* Deprecated */
  39115. #define WMI_HEOPS_RTSTHLD_GET WMI_HEOPS_RTSTHLD_GET_D2
  39116. #define WMI_HEOPS_RTSTHLD_SET WMI_HEOPS_RTSTHLD_SET_D2
  39117. #define WMI_HEOPS_PARTBSSCOLOR_GET WMI_HEOPS_PARTBSSCOLOR_GET_D2
  39118. #define WMI_HEOPS_PARTBSSCOLOR_SET WMI_HEOPS_PARTBSSCOLOR_SET_D2
  39119. #define WMI_HEOPS_MAXBSSID_GET WMI_HEOPS_MAXBSSID_GET_D2
  39120. #define WMI_HEOPS_MAXBSSID_SET WMI_HEOPS_MAXBSSID_SET_D2
  39121. #define WMI_HEOPS_TXBSSID_GET WMI_HEOPS_TXBSSID_GET_D2
  39122. #define WMI_HEOPS_TXBSSID_SET WMI_HEOPS_TXBSSID_SET_D2
  39123. #define WMI_HEOPS_BSSCOLORDISABLE_GET WMI_HEOPS_BSSCOLORDISABLE_GET_D2
  39124. #define WMI_HEOPS_BSSCOLORDISABLE_SET WMI_HEOPS_BSSCOLORDISABLE_SET_D2
  39125. #define WMI_HEOPS_DUALBEACON_GET WMI_HEOPS_DUALBEACON_GET_D2
  39126. #define WMI_HEOPS_DUALBEACON_SET WMI_HEOPS_DUALBEACON_SET_D2
  39127. #define WMI_HECAP_PHY_DB_GET WMI_HECAP_PHY_DB_GET_D2
  39128. #define WMI_HECAP_PHY_DB_SET WMI_HECAP_PHY_DB_SET_D2
  39129. #define WMI_HECAP_PHY_CBW_GET WMI_HECAP_PHY_CBW_GET_D2
  39130. #define WMI_HECAP_PHY_CBW_SET WMI_HECAP_PHY_CBW_SET_D2
  39131. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D2
  39132. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D2
  39133. #define WMI_HECAP_PHY_COD_GET WMI_HECAP_PHY_COD_GET_D2
  39134. #define WMI_HECAP_PHY_COD_SET WMI_HECAP_PHY_COD_SET_D2
  39135. #define WMI_HECAP_PHY_LDPC_GET WMI_HECAP_PHY_LDPC_GET_D2
  39136. #define WMI_HECAP_PHY_LDPC_SET WMI_HECAP_PHY_LDPC_SET_D2
  39137. #define WMI_HECAP_PHY_TXLDPC_GET WMI_HECAP_PHY_TXLDPC_GET_D2
  39138. #define WMI_HECAP_PHY_TXLDPC_SET WMI_HECAP_PHY_TXLDPC_SET_D2
  39139. #define WMI_HECAP_PHY_RXLDPC_GET WMI_HECAP_PHY_RXLDPC_GET_D2
  39140. #define WMI_HECAP_PHY_RXLDPC_SET WMI_HECAP_PHY_RXLDPC_SET_D2
  39141. #define WMI_HECAP_PHY_LTFGIFORHE_GET WMI_HECAP_PHY_LTFGIFORHE_GET_D2
  39142. #define WMI_HECAP_PHY_LTFGIFORHE_SET WMI_HECAP_PHY_LTFGIFORHE_SET_D2
  39143. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET_D2
  39144. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET_D2
  39145. #define WMI_HECAP_PHY_LTFGIFORNDP_GET WMI_HECAP_PHY_LTFGIFORNDP_GET_D2
  39146. #define WMI_HECAP_PHY_LTFGIFORNDP_SET WMI_HECAP_PHY_LTFGIFORNDP_SET_D2
  39147. #define WMI_HECAP_PHY_TXSTBC_GET WMI_HECAP_PHY_TXSTBC_GET_D2
  39148. #define WMI_HECAP_PHY_TXSTBC_SET WMI_HECAP_PHY_TXSTBC_SET_D2
  39149. #define WMI_HECAP_PHY_RXSTBC_GET WMI_HECAP_PHY_RXSTBC_GET_D2
  39150. #define WMI_HECAP_PHY_RXSTBC_SET WMI_HECAP_PHY_RXSTBC_SET_D2
  39151. #define WMI_HECAP_PHY_TXDOPPLER_GET WMI_HECAP_PHY_TXDOPPLER_GET_D2
  39152. #define WMI_HECAP_PHY_TXDOPPLER_SET WMI_HECAP_PHY_TXDOPPLER_SET_D2
  39153. #define WMI_HECAP_PHY_RXDOPPLER_GET WMI_HECAP_PHY_RXDOPPLER_GET_D2
  39154. #define WMI_HECAP_PHY_RXDOPPLER_SET WMI_HECAP_PHY_RXDOPPLER_SET_D2
  39155. #define WMI_HECAP_PHY_UL_MU_MIMO_GET WMI_HECAP_PHY_UL_MU_MIMO_GET_D2
  39156. #define WMI_HECAP_PHY_UL_MU_MIMO_SET WMI_HECAP_PHY_UL_MU_MIMO_SET_D2
  39157. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2
  39158. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2
  39159. #define WMI_HECAP_PHY_DCMTX_GET WMI_HECAP_PHY_DCMTX_GET_D2
  39160. #define WMI_HECAP_PHY_DCMTX_SET WMI_HECAP_PHY_DCMTX_SET_D2
  39161. #define WMI_HECAP_PHY_DCMRX_GET WMI_HECAP_PHY_DCMRX_GET_D2
  39162. #define WMI_HECAP_PHY_DCMRX_SET WMI_HECAP_PHY_DCMRX_SET_D2
  39163. #define WMI_HECAP_PHY_ULHEMU_GET WMI_HECAP_PHY_ULHEMU_GET_D2
  39164. #define WMI_HECAP_PHY_ULHEMU_SET WMI_HECAP_PHY_ULHEMU_SET_D2
  39165. #define WMI_HECAP_PHY_SUBFMR_GET WMI_HECAP_PHY_SUBFMR_GET_D2
  39166. #define WMI_HECAP_PHY_SUBFMR_SET WMI_HECAP_PHY_SUBFMR_SET_D2
  39167. #define WMI_HECAP_PHY_SUBFME_GET WMI_HECAP_PHY_SUBFME_GET_D2
  39168. #define WMI_HECAP_PHY_SUBFME_SET WMI_HECAP_PHY_SUBFME_SET_D2
  39169. #define WMI_HECAP_PHY_MUBFMR_GET WMI_HECAP_PHY_MUBFMR_GET_D2
  39170. #define WMI_HECAP_PHY_MUBFMR_SET WMI_HECAP_PHY_MUBFMR_SET_D2
  39171. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2
  39172. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2
  39173. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D2
  39174. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D2
  39175. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D2
  39176. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D2
  39177. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D2
  39178. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D2
  39179. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D2
  39180. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D2
  39181. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D2
  39182. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D2
  39183. #define WMI_HECAP_PHY_CODBK42SU_GET WMI_HECAP_PHY_CODBK42SU_GET_D2
  39184. #define WMI_HECAP_PHY_CODBK42SU_SET WMI_HECAP_PHY_CODBK42SU_SET_D2
  39185. #define WMI_HECAP_PHY_CODBK75MU_GET WMI_HECAP_PHY_CODBK75MU_GET_D2
  39186. #define WMI_HECAP_PHY_CODBK75MU_SET WMI_HECAP_PHY_CODBK75MU_SET_D2
  39187. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D2
  39188. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D2
  39189. #define WMI_HECAP_PHY_HEERSU_GET WMI_HECAP_PHY_HEERSU_GET_D2
  39190. #define WMI_HECAP_PHY_HEERSU_SET WMI_HECAP_PHY_HEERSU_SET_D2
  39191. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D2
  39192. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D2
  39193. #define WMI_HECAP_PHY_PETHRESPRESENT_GET WMI_HECAP_PHY_PETHRESPRESENT_GET_D2
  39194. #define WMI_HECAP_PHY_PETHRESPRESENT_SET WMI_HECAP_PHY_PETHRESPRESENT_SET_D2
  39195. #define WMI_HECAP_PHY_SRPSPRESENT_GET WMI_HECAP_PHY_SRPSPRESENT_GET_D2
  39196. #define WMI_HECAP_PHY_SRPPRESENT_SET WMI_HECAP_PHY_SRPPRESENT_SET_D2
  39197. #define WMI_HECAP_PHY_PWRBOOSTAR_GET WMI_HECAP_PHY_PWRBOOSTAR_GET_D2
  39198. #define WMI_HECAP_PHY_PWRBOOSTAR_SET WMI_HECAP_PHY_PWRBOOSTAR_SET_D2
  39199. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D2
  39200. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D2
  39201. #define WMI_HECAP_PHY_MAXNC_GET WMI_HECAP_PHY_MAXNC_GET_D2
  39202. #define WMI_HECAP_PHY_MAXNC_SET WMI_HECAP_PHY_MAXNC_SET_D2
  39203. #define WMI_HECAP_PHY_STBCTXGT80_GET WMI_HECAP_PHY_STBCTXGT80_GET_D2
  39204. #define WMI_HECAP_PHY_STBCTXGT80_SET WMI_HECAP_PHY_STBCTXGT80_SET_D2
  39205. #define WMI_HECAP_PHY_STBCRXGT80_GET WMI_HECAP_PHY_STBCRXGT80_GET_D2
  39206. #define WMI_HECAP_PHY_STBCRXGT80_SET WMI_HECAP_PHY_STBCRXGT80_SET_D2
  39207. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D2
  39208. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D2
  39209. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D2
  39210. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D2
  39211. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D2
  39212. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D2
  39213. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D2
  39214. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D2
  39215. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D2
  39216. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D2
  39217. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET_D2
  39218. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET_D2
  39219. #define WMI_HECAP_MAC_HECTRL_GET WMI_HECAP_MAC_HECTRL_GET_D2
  39220. #define WMI_HECAP_MAC_HECTRL_SET WMI_HECAP_MAC_HECTRL_SET_D2
  39221. #define WMI_HECAP_MAC_TWTREQ_GET WMI_HECAP_MAC_TWTREQ_GET_D2
  39222. #define WMI_HECAP_MAC_TWTREQ_SET WMI_HECAP_MAC_TWTREQ_SET_D2
  39223. #define WMI_HECAP_MAC_TWTRSP_GET WMI_HECAP_MAC_TWTRSP_GET_D2
  39224. #define WMI_HECAP_MAC_TWTRSP_SET WMI_HECAP_MAC_TWTRSP_SET_D2
  39225. #define WMI_HECAP_MAC_HEFRAG_GET WMI_HECAP_MAC_HEFRAG_GET_D2
  39226. #define WMI_HECAP_MAC_HEFRAG_SET WMI_HECAP_MAC_HEFRAG_SET_D2
  39227. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET WMI_HECAP_MAC_MAXFRAGMSDU_GET_D2
  39228. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET WMI_HECAP_MAC_MAXFRAGMSDU_SET_D2
  39229. #define WMI_HECAP_MAC_MINFRAGSZ_GET WMI_HECAP_MAC_MINFRAGSZ_GET_D2
  39230. #define WMI_HECAP_MAC_MINFRAGSZ_SET WMI_HECAP_MAC_MINFRAGSZ_SET_D2
  39231. #define WMI_HECAP_MAC_TRIGPADDUR_GET WMI_HECAP_MAC_TRIGPADDUR_GET_D2
  39232. #define WMI_HECAP_MAC_TRIGPADDUR_SET WMI_HECAP_MAC_TRIGPADDUR_SET_D2
  39233. #define WMI_HECAP_MAC_MTID_GET WMI_HECAP_MAC_MTID_GET_D2
  39234. #define WMI_HECAP_MAC_MTID_SET WMI_HECAP_MAC_MTID_SET_D2
  39235. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET WMI_HECAP_MAC_AMSDUINAMPDU_GET_D2
  39236. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET WMI_HECAP_MAC_AMSDUINAMPDU_SET_D2
  39237. #define WMI_HECAP_MAC_HELKAD_GET WMI_HECAP_MAC_HELKAD_GET_D2
  39238. #define WMI_HECAP_MAC_HELKAD_SET WMI_HECAP_MAC_HELKAD_SET_D2
  39239. #define WMI_HECAP_MAC_AACK_GET WMI_HECAP_MAC_AACK_GET_D2
  39240. #define WMI_HECAP_MAC_AACK_SET WMI_HECAP_MAC_AACK_SET_D2
  39241. #define WMI_HECAP_MAC_ULMURSP_GET WMI_HECAP_MAC_ULMURSP_GET_D2
  39242. #define WMI_HECAP_MAC_ULMURSP_SET WMI_HECAP_MAC_ULMURSP_SET_D2
  39243. #define WMI_HECAP_MAC_BSR_GET WMI_HECAP_MAC_BSR_GET_D2
  39244. #define WMI_HECAP_MAC_BSR_SET WMI_HECAP_MAC_BSR_SET_D2
  39245. #define WMI_HECAP_MAC_BCSTTWT_GET WMI_HECAP_MAC_BCSTTWT_GET_D2
  39246. #define WMI_HECAP_MAC_BCSTTWT_SET WMI_HECAP_MAC_BCSTTWT_SET_D2
  39247. #define WMI_HECAP_MAC_32BITBA_GET WMI_HECAP_MAC_32BITBA_GET_D2
  39248. #define WMI_HECAP_MAC_32BITBA_SET WMI_HECAP_MAC_32BITBA_SET_D2
  39249. #define WMI_HECAP_MAC_MUCASCADE_GET WMI_HECAP_MAC_MUCASCADE_GET_D2
  39250. #define WMI_HECAP_MAC_MUCASCADE_SET WMI_HECAP_MAC_MUCASCADE_SET_D2
  39251. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D2
  39252. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D2
  39253. #define WMI_HECAP_MAC_GROUPMSTABA_GET WMI_HECAP_MAC_GROUPMSTABA_GET_D2
  39254. #define WMI_HECAP_MAC_GROUPMSTABA_SET WMI_HECAP_MAC_GROUPMSTABA_SET_D2
  39255. #define WMI_HECAP_MAC_OMI_GET WMI_HECAP_MAC_OMI_GET_D2
  39256. #define WMI_HECAP_MAC_OMI_SET WMI_HECAP_MAC_OMI_SET_D2
  39257. #define WMI_HECAP_MAC_OFDMARA_GET WMI_HECAP_MAC_OFDMARA_GET_D2
  39258. #define WMI_HECAP_MAC_OFDMARA_SET WMI_HECAP_MAC_OFDMARA_SET_D2
  39259. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D2
  39260. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D2
  39261. #define WMI_HECAP_MAC_AMSDUFRAG_GET WMI_HECAP_MAC_AMSDUFRAG_GET_D2
  39262. #define WMI_HECAP_MAC_AMSDUFRAG_SET WMI_HECAP_MAC_AMSDUFRAG_SET_D2
  39263. #define WMI_HECAP_MAC_FLEXTWT_GET WMI_HECAP_MAC_FLEXTWT_GET_D2
  39264. #define WMI_HECAP_MAC_FLEXTWT_SET WMI_HECAP_MAC_FLEXTWT_SET_D2
  39265. #define WMI_HECAP_MAC_MBSS_GET WMI_HECAP_MAC_MBSS_GET_D2
  39266. #define WMI_HECAP_MAC_MBSS_SET WMI_HECAP_MAC_MBSS_SET_D2
  39267. #define WMI_HECAP_MAC_BSRPAMPDU_GET WMI_HECAP_MAC_BSRPAMPDU_GET_D2
  39268. #define WMI_HECAP_MAC_BSRPAMPDU_SET WMI_HECAP_MAC_BSRPAMPDU_SET_D2
  39269. #define WMI_HECAP_MAC_QTP_GET WMI_HECAP_MAC_QTP_GET_D2
  39270. #define WMI_HECAP_MAC_QTP_SET WMI_HECAP_MAC_QTP_SET_D2
  39271. #define WMI_HECAP_MAC_ABQR_GET WMI_HECAP_MAC_ABQR_GET_D2
  39272. #define WMI_HECAP_MAC_ABQR_SET WMI_HECAP_MAC_ABQR_SET_D2
  39273. #define WMI_HECAP_MAC_SRRESP_GET WMI_HECAP_MAC_SRRESP_GET_D2
  39274. #define WMI_HECAP_MAC_SRRESP_SET WMI_HECAP_MAC_SRRESP_SET_D2
  39275. #define WMI_HECAP_MAC_OPS_GET WMI_HECAP_MAC_OPS_GET_D2
  39276. #define WMI_HECAP_MAC_OPS_SET WMI_HECAP_MAC_OPS_SET_D2
  39277. #define WMI_HECAP_MAC_NDPFDBKRPT_GET WMI_HECAP_MAC_NDPFDBKRPT_GET_D2
  39278. #define WMI_HECAP_MAC_NDPFDBKRPT_SET WMI_HECAP_MAC_NDPFDBKRPT_SET_D2
  39279. #define WMI_HECAP_MAC_MBAHECTRL_GET WMI_HECAP_MAC_MBAHECTRL_GET_D2
  39280. #define WMI_HECAP_MAC_MBAHECTRL_SET WMI_HECAP_MAC_MBAHECTRL_SET_D2
  39281. #define WMI_HECAP_MAC_MURTS_GET WMI_HECAP_MAC_MURTS_GET_D2
  39282. #define WMI_HECAP_MAC_MURTS_SET WMI_HECAP_MAC_MURTS_SET_D2
  39283. #define WMI_HECAP_PHY_CBMODE_GET WMI_HECAP_PHY_CBMODE_GET_D2
  39284. #define WMI_HECAP_PHY_CBMODE_SET WMI_HECAP_PHY_CBMODE_SET_D2
  39285. #define WMI_HECAP_PHY_OLTF_GET WMI_HECAP_PHY_OLTF_GET_D2
  39286. #define WMI_HECAP_PHY_OLTF_SET WMI_HECAP_PHY_OLTF_SET_D2
  39287. #define WMI_HECAP_PHY_SUBFMESTS_GET WMI_HECAP_PHY_SUBFMESTS_GET_D2
  39288. #define WMI_HECAP_PHY_SUBFMESTS_SET WMI_HECAP_PHY_SUBFMESTS_SET_D2
  39289. #define WMI_HECAP_PHY_PADDING_GET WMI_HECAP_PHY_PADDING_GET_D2
  39290. #define WMI_HECAP_PHY_PADDING_SET WMI_HECAP_PHY_PADDING_SET_D2
  39291. #define WMI_HECAP_PHY_DLOFMAMUMIMO_GET WMI_HECAP_PHY_DLOFMAMUMIMO_GET_D2
  39292. #define WMI_HECAP_PHY_DLOFDMAMUMIO_SET WMI_HECAP_PHY_DLOFDMAMUMIO_SET_D2
  39293. #define WMI_HECAP_PHY_32GI_GET WMI_HECAP_PHY_32GI_GET_D2
  39294. #define WMI_HECAP_PHY_32GI_SET WMI_HECAP_PHY_32GI_SET_D2
  39295. #define WMI_HECAP_PHY_NOSUNDIMENS_GET WMI_HECAP_PHY_NOSUNDIMENS_GET_D2
  39296. #define WMI_HECAP_PHY_NOSUNDIMENS_SET WMI_HECAP_PHY_NOSUNDIMENS_SET_D2
  39297. #define WMI_HECAP_PHY_40MHZNSS_GET WMI_HECAP_PHY_40MHZNSS_GET_D2
  39298. #define WMI_HECAP_PHY_40MHZNSS_SET WMI_HECAP_PHY_40MHZNSS_SET_D2
  39299. #define WMI_HECAP_PHY_ULOFDMA_GET WMI_HECAP_PHY_ULOFDMA_GET_D2
  39300. #define WMI_HECAP_PHY_ULOFDMA_SET WMI_HECAP_PHY_ULOFDMA_SET_D2
  39301. #define WMI_HECAP_PHY_DCM_GET WMI_HECAP_PHY_DCM_GET_D2
  39302. #define WMI_HECAP_PHY_DCM_SET WMI_HECAP_PHY_DCM_SET_D2
  39303. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET WMI_HECAP_PHY_NSTSLT80MHZ_GET_D2
  39304. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET WMI_HECAP_PHY_NSTSLT80MHZ_SET_D2
  39305. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET WMI_HECAP_PHY_NSTSGT80MHZ_GET_D2
  39306. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET WMI_HECAP_PHY_NSTSGT80MHZ_SET_D2
  39307. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D2
  39308. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D2
  39309. #define WMI_HECAP_MAC_PUNCSOUNDING_GET WMI_HECAP_MAC_PUNCSOUNDING_GET_D2
  39310. #define WMI_HECAP_MAC_PUNCSOUNDING_SET WMI_HECAP_MAC_PUNCSOUNDING_SET_D2
  39311. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET WMI_HECAP_MAC_HTVHTTRIGRX_GET_D2
  39312. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET WMI_HECAP_MAC_HTVHTTRIGRX_SET_D2
  39313. #endif /* SUPPORT_11AX_D3 */
  39314. /****** 11BE EHT PHY Capabilities Information field ******/
  39315. /* Bit 0: reserved */
  39316. /* Bit 1: support for 320Mhz in 6 GHz */
  39317. #define WMI_EHTCAP_PHY_320MHZIN6GHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 1, 1)
  39318. #define WMI_EHTCAP_PHY_320MHZIN6GHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 1, 1, value)
  39319. /* Bit 2: support for 242-tone RU in BW wider than 20Mhz */
  39320. #define WMI_EHTCAP_PHY_242TONERUBWLT20MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 2, 1)
  39321. #define WMI_EHTCAP_PHY_242TONERUBWLT20MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 2, 1, value)
  39322. /* Bit 3: NDP with 4x EHT-LTF and 3.2us GI */
  39323. #define WMI_EHTCAP_PHY_NDP4XEHTLTFAND320NSGI_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 3, 1)
  39324. #define WMI_EHTCAP_PHY_NDP4XEHTLTFAND320NSGI_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 3, 1, value)
  39325. /* Bit 4: partial bandwidth UL MU-MIMO */
  39326. #define WMI_EHTCAP_PHY_PARTIALBWULMU_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 4, 1)
  39327. #define WMI_EHTCAP_PHY_PARTIALBWULMU_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 4, 1, value)
  39328. /* Bit 5: SU beamformer */
  39329. #define WMI_EHTCAP_PHY_SUBFMR_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 5, 1)
  39330. #define WMI_EHTCAP_PHY_SUBFMR_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 5, 1, value)
  39331. /* Bit 6: SU beamformee */
  39332. #define WMI_EHTCAP_PHY_SUBFME_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 6, 1)
  39333. #define WMI_EHTCAP_PHY_SUBFME_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 6, 1, value)
  39334. /* Bit 7-9: beamformee SS (<=80Mhz) */
  39335. #define WMI_EHTCAP_PHY_BFMESSLT80MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 7, 3)
  39336. #define WMI_EHTCAP_PHY_BFMESSLT80MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 7, 3, value)
  39337. /* Bit 10-12: beamformee SS (=160Mhz) */
  39338. #define WMI_EHTCAP_PHY_BFMESS160MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 10, 3)
  39339. #define WMI_EHTCAP_PHY_BFMESS160MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 10, 3, value)
  39340. /* Bit 13-15: beamformee SS (=320Mhz) */
  39341. #define WMI_EHTCAP_PHY_BFMESS320MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 13, 3)
  39342. #define WMI_EHTCAP_PHY_BFMESS320MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 13, 3, value)
  39343. /* Bit 16-18: number of sounding dimensions (<=80Mhz) */
  39344. #define WMI_EHTCAP_PHY_NUMSOUNDLT80MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 16, 3)
  39345. #define WMI_EHTCAP_PHY_NUMSOUNDLT80MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 16, 3, value)
  39346. /* Bit 19-21: number of sounding dimensions (=160Mhz) */
  39347. #define WMI_EHTCAP_PHY_NUMSOUND160MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 19, 3)
  39348. #define WMI_EHTCAP_PHY_NUMSOUND160MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 19, 3, value)
  39349. /* Bit 22-24: number of sounding dimensions (=320Mhz) */
  39350. #define WMI_EHTCAP_PHY_NUMSOUND320MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 22, 3)
  39351. #define WMI_EHTCAP_PHY_NUMSOUND320MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 22, 3, value)
  39352. /* Bit 25: ng = 16 SU feedback */
  39353. #define WMI_EHTCAP_PHY_NG16SUFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 25, 1)
  39354. #define WMI_EHTCAP_PHY_NG16SUFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 25, 1, value)
  39355. /* Bit 26: ng = 16 MU feedback */
  39356. #define WMI_EHTCAP_PHY_NG16MUFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 26, 1)
  39357. #define WMI_EHTCAP_PHY_NG16MUFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 26, 1, value)
  39358. /* Bit 27: codebook size {4,2} SU feedback */
  39359. #define WMI_EHTCAP_PHY_CODBK42SUFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 27, 1)
  39360. #define WMI_EHTCAP_PHY_CODBK42SUFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 27, 1, value)
  39361. /* Bit 28: codebook size {7,5} MU feedback */
  39362. #define WMI_EHTCAP_PHY_CODBK75MUFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 28, 1)
  39363. #define WMI_EHTCAP_PHY_CODBK75MUFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 28, 1, value)
  39364. /* Bit 29: triggered SU beamforming feedback */
  39365. #define WMI_EHTCAP_PHY_TRIGSUBFFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 29, 1)
  39366. #define WMI_EHTCAP_PHY_TRIGSUBFFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 29, 1, value)
  39367. /* Bit 30: triggered MU beamforming partial BW feedback */
  39368. #define WMI_EHTCAP_PHY_TRIGMUBFPARTBWFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 30, 1)
  39369. #define WMI_EHTCAP_PHY_TRIGMUBFPARTBWFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 30, 1, value)
  39370. /* Bit 31: triggered CQI feedback */
  39371. #define WMI_EHTCAP_PHY_TRIGCQIFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 31, 1)
  39372. #define WMI_EHTCAP_PHY_TRIGCQIFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 31, 1, value)
  39373. /* Bit 32: partial bandwidth DL MU-MIMO */
  39374. #define WMI_EHTCAP_PHY_PARTBWDLMUMIMO_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 0, 1)
  39375. #define WMI_EHTCAP_PHY_PARTBWDLMUMIMO_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 0, 1, value)
  39376. /* Bit 33: PSR-based SR support */
  39377. #define WMI_EHTCAP_PHY_PSRSR_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 1, 1)
  39378. #define WMI_EHTCAP_PHY_PSRSR_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 1, 1, value)
  39379. /* Bit 34: power boost factor support */
  39380. #define WMI_EHTCAP_PHY_PWRBSTFACTOR_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 2, 1)
  39381. #define WMI_EHTCAP_PHY_PWRBSTFACTOR_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 2, 1, value)
  39382. /* Bit 35: EHT MU PPDU with 4xEHT-LTF and 0.8us GI */
  39383. #define WMI_EHTCAP_PHY_4XEHTLTFAND800NSGI_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 3, 1)
  39384. #define WMI_EHTCAP_PHY_4XEHTLTFAND800NSGI_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 3, 1, value)
  39385. /* Bit 36-39: max NC */
  39386. #define WMI_EHTCAP_PHY_MAXNC_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 4, 4)
  39387. #define WMI_EHTCAP_PHY_MAXNC_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 4, 4, value)
  39388. /* Bit 40: non-triggered CQI feedback */
  39389. #define WMI_EHTCAP_PHY_NONTRIGCQIFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 8, 1)
  39390. #define WMI_EHTCAP_PHY_NONTRIGCQIFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 8, 1, value)
  39391. /* Bit 41: Tx 1024-QAM and 4096-QAM < 242-tone RU support */
  39392. #define WMI_EHTCAP_PHY_TX1024AND4096QAMLS242TONERU_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 9, 1)
  39393. #define WMI_EHTCAP_PHY_TX1024AND4096QAMLS242TONERU_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 9, 1, value)
  39394. /* Bit 42: Rx 1024-QAM and 4096-QAM < 242-tone RU support */
  39395. #define WMI_EHTCAP_PHY_RX1024AND4096QAMLS242TONERU_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 10, 1)
  39396. #define WMI_EHTCAP_PHY_RX1024AND4096QAMLS242TONERU_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 10, 1, value)
  39397. /* Bit 43: PPE thresholds present */
  39398. #define WMI_EHTCAP_PHY_PPETHRESPRESENT_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 11, 1)
  39399. #define WMI_EHTCAP_PHY_PPETHRESPRESENT_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 11, 1, value)
  39400. /* Bit 44-45: common nominal packet padding */
  39401. #define WMI_EHTCAP_PHY_CMNNOMPKTPAD_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 12, 2)
  39402. #define WMI_EHTCAP_PHY_CMNNOMPKTPAD_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 12, 2, value)
  39403. /* Bit 46-50: max number of supported EHT-LTFs */
  39404. #define WMI_EHTCAP_PHY_MAXNUMEHTLTF_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 14, 5)
  39405. #define WMI_EHTCAP_PHY_MAXNUMEHTLTF_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 14, 5, value)
  39406. /* Bit 51-54: support of MCS 15 */
  39407. #define WMI_EHTCAP_PHY_SUPMCS15_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 19, 4)
  39408. #define WMI_EHTCAP_PHY_SUPMCS15_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 19, 4, value)
  39409. /* Bit 55: support of EHT DUP in 6 GHz */
  39410. #define WMI_EHTCAP_PHY_EHTDUPIN6GHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 23, 1)
  39411. #define WMI_EHTCAP_PHY_EHTDUPIN6GHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 23, 1, value)
  39412. /* Bit 56: support for 20Mhz operating STA receiving NDP with wider bandwidth */
  39413. #define WMI_EHTCAP_PHY_20MHZOPSTARXNDPWIDERBW_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 24, 1)
  39414. #define WMI_EHTCAP_PHY_20MHZOPSTARXNDPWIDERBW_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 24, 1, value)
  39415. /* Bit 57: non-OFDMA UL MU-MIMO (bw <= 80Mhz) */
  39416. #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMOLT80MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 25, 1)
  39417. #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMOLT80MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 25, 1, value)
  39418. /* Bit 58: non-OFDMA UL MU-MIMO (bw = 160Mhz) */
  39419. #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMO160MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 26, 1)
  39420. #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMO160MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 26, 1, value)
  39421. /* Bit 59: non-OFDMA UL MU-MIMO (bw = 320Mhz) */
  39422. #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMO320MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 27, 1)
  39423. #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMO320MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 27, 1, value)
  39424. /* Bit 60: MU beamformer (bw <= 80Mhz) */
  39425. #define WMI_EHTCAP_PHY_MUBFMRLT80MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 28, 1)
  39426. #define WMI_EHTCAP_PHY_MUBFMRLT80MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 28, 1, value)
  39427. /* Bit 61: MU beamformer (bw = 160Mhz) */
  39428. #define WMI_EHTCAP_PHY_MUBFMR160MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 29, 1)
  39429. #define WMI_EHTCAP_PHY_MUBFMR160MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 29, 1, value)
  39430. /* Bit 62: MU beamformer (bw = 320Mhz) */
  39431. #define WMI_EHTCAP_PHY_MUBFMR320MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 30, 1)
  39432. #define WMI_EHTCAP_PHY_MUBFMR320MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 30, 1, value)
  39433. /* Bit 63: TB sounding feedback rate limit */
  39434. #define WMI_EHTCAP_PHY_TBSUNDFBRATELIMIT_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 31, 1)
  39435. #define WMI_EHTCAP_PHY_TBSUNDFBRATELIMIT_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 31, 1, value)
  39436. /* Bit 64: Rx 1024-QAM in wider bandwidth DL OFDMA support */
  39437. #define WMI_EHTCAP_PHY_RX1024QAMWIDERBWDLOFDMA_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[2], 0, 1)
  39438. #define WMI_EHTCAP_PHY_RX1024QAMWIDERBWDLOFDMA_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[2], 0, 1, value)
  39439. /* Bit 65: Rx 4096-QAM in wider bandwidth DL OFDMA support */
  39440. #define WMI_EHTCAP_PHY_RX4096QAMWIDERBWDLOFDMA_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[2], 1, 1)
  39441. #define WMI_EHTCAP_PHY_RX4096QAMWIDERBWDLOFDMA_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[2], 1, 1, value)
  39442. /* Bit 66: 20Mhz-only limited capabilities support */
  39443. #define WMI_EHTCAP_PHY_20MHZ_ONLY_CAPS_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[2], 2, 1)
  39444. #define WMI_EHTCAP_PHY_20MHZ_ONLY_CAPS_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[2], 2, 1, value)
  39445. /* Bit 67: 20Mhz-only triggered MU beamforming full BW feedback and DL MU-MIMO */
  39446. #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)
  39447. #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)
  39448. /* Bit 68: 20Mhz-only M-RU support */
  39449. #define WMI_EHTCAP_PHY_20MHZ_ONLY_MRU_SUPP_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[2], 4, 1)
  39450. #define WMI_EHTCAP_PHY_20MHZ_ONLY_MRU_SUPP_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[2], 4, 1, value)
  39451. /* Bits 69-71: reserved */
  39452. /****** End of 11BE EHT PHY Capabilities Information field ******/
  39453. /****** 11BE EHT MAC Capabilities Information field ******/
  39454. /* Bit 0: NSEP/EPCS priority access supported: draft1.4 change the name from NSEP to EPCS
  39455. * To compatible with <= draft 1.4 ver, we keep 2 define there, but same bit.
  39456. */
  39457. #define WMI_EHTCAP_MAC_NSEPPRIACCESS_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 0, 1)
  39458. #define WMI_EHTCAP_MAC_NSEPPRIACCESS_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 0, 1, value)
  39459. #define WMI_EHTCAP_MAC_EPCSPRIACCESS_GET(eht_cap_mac) WMI_EHTCAP_MAC_NSEPPRIACCESS_GET(eht_cap_mac)
  39460. #define WMI_EHTCAP_MAC_EPCSPRIACCESS_SET(eht_cap_mac, value) WMI_EHTCAP_MAC_NSEPPRIACCESS_SET(eht_cap_mac, value)
  39461. /* Bit 1: EHT OM control support */
  39462. #define WMI_EHTCAP_MAC_EHTOMCTRL_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 1, 1)
  39463. #define WMI_EHTCAP_MAC_EHTOMCTRL_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 1, 1, value)
  39464. /* Bit 2: triggered TXOP mode 1 support
  39465. * As in draft 1.4, we define mode2 and to compatible with old version, we keep 2 define there, but same bit.
  39466. */
  39467. #define WMI_EHTCAP_MAC_TRIGTXOP_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 2, 1)
  39468. #define WMI_EHTCAP_MAC_TRIGTXOP_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 2, 1, value)
  39469. #define WMI_EHTCAP_MAC_TRIGTXOPMODE1_GET(eht_cap_mac) WMI_EHTCAP_MAC_TRIGTXOP_GET(eht_cap_mac)
  39470. #define WMI_EHTCAP_MAC_TRIGTXOPMODE1_SET(eht_cap_mac, value) WMI_EHTCAP_MAC_TRIGTXOP_SET(eht_cap_mac, value)
  39471. /* Bit 3: triggered TXOP mode 2 support */
  39472. #define WMI_EHTCAP_MAC_TRIGTXOPMODE2_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 3, 1)
  39473. #define WMI_EHTCAP_MAC_TRIGTXOPMODE2_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 3, 1, value)
  39474. /* Bit 4: restricted TWT support */
  39475. #define WMI_EHTCAP_MAC_RESTRICTTWT_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 4, 1)
  39476. #define WMI_EHTCAP_MAC_RESTRICTTWT_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 4, 1, value)
  39477. /* Bit 5: SCS traffic description support */
  39478. #define WMI_EHTCAP_MAC_SCSTRAFFICDESC_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 5, 1)
  39479. #define WMI_EHTCAP_MAC_SCSTRAFFICDESC_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 5, 1, value)
  39480. /* Bit 6-7: maximum MPDU length */
  39481. #define WMI_EHTCAP_MAC_MAXMPDULEN_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 6, 2)
  39482. #define WMI_EHTCAP_MAC_MAXMPDULEN_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 6, 2, value)
  39483. /* Bit 8: Maximum A-MPDU Length Exponent Extension */
  39484. #define WMI_EHTCAP_MAC_MAXAMPDULEN_EXP_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 8, 1)
  39485. #define WMI_EHTCAP_MAC_MAXAMPDULEN_EXP_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 8, 1, value)
  39486. /* Bit 9: EHT TRS support */
  39487. #define WMI_EHTCAP_MAC_TRS_SUPPORT_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 9, 1)
  39488. #define WMI_EHTCAP_MAC_TRS_SUPPORT_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 9, 1, value)
  39489. /* Bit 10: TXOP return support in txop sharing mode 2 */
  39490. #define WMI_EHTCAP_MAC_TXOP_RETURN_SUPP_IN_SHARINGMODE2_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 10, 1)
  39491. #define WMI_EHTCAP_MAC_TXOP_RETURN_SUPP_IN_SHARINGMODE2_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 10, 1, value)
  39492. /* Bit 11: two BQRs support */
  39493. #define WMI_EHTCAP_MAC_TWO_BQRS_SUPP_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 11, 1)
  39494. #define WMI_EHTCAP_MAC_TWO_BQRS_SUPP_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 11, 1, value)
  39495. /* Bit 12-13: EHT link adaptation support */
  39496. #define WMI_EHTCAP_MAC_EHT_LINK_ADAPTATION_SUPP_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 12, 2)
  39497. #define WMI_EHTCAP_MAC_EHT_LINK_ADAPTATION_SUPP_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 12, 2, value)
  39498. /* Bit 14-15: reserved */
  39499. /****** End of 11BE EHT MAC Capabilities Information field ******/
  39500. typedef struct {
  39501. /** TLV tag and len; tag equals
  39502. * WMITLV_TAG_STRUC_wmi_cfr_capture_event_fixed_param */
  39503. A_UINT32 tlv_header;
  39504. /* Method used to capture CFR - of type WMI_PEER_CFR_CAPTURE_METHOD */
  39505. A_UINT32 capture_method;
  39506. /* VDEV identifier */
  39507. A_UINT32 vdev_id;
  39508. /* Peer MAC address. In AP mode, this is the address of the connected peer
  39509. * for which CFR capture is needed. In case of STA mode, this is the address
  39510. * of the AP to which the STA is connected
  39511. */
  39512. wmi_mac_addr mac_addr;
  39513. /* primary 20 MHz channel frequency in mhz */
  39514. A_UINT32 chan_mhz;
  39515. /* BW of measurement - of type WMI_PEER_CFR_CAPTURE_BW */
  39516. A_UINT32 bandwidth;
  39517. /* phy mode WLAN_PHY_MODE of the channel defined in wlan_defs.h*/
  39518. A_UINT32 phy_mode;
  39519. /* Center frequency 1 in MHz*/
  39520. A_UINT32 band_center_freq1;
  39521. /* Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
  39522. A_UINT32 band_center_freq2;
  39523. /* Number of spatial streams */
  39524. A_UINT32 sts_count;
  39525. /* Bits 31:0: address of data from wmi_dma_buf_release_entry [31:0] */
  39526. A_UINT32 correlation_info_1;
  39527. /* Bits 11:0: address of data from wmi_dma_buf_release_entry [43:32]
  39528. * Bits 15:12: reserved (set to 0x0)
  39529. * Bits 31:16: hardware PPDU ID [15:0]
  39530. */
  39531. A_UINT32 correlation_info_2;
  39532. /* Bits 1:0: TX status (if any); values defined in enum
  39533. * WMI_FRAME_TX_STATUS
  39534. * Bits 30:2: reserved (set to 0x0)
  39535. * Bit 31: Status of the CFR capture of the peer
  39536. * 1 (True) - Successful; 0 (False) - Not successful
  39537. */
  39538. A_UINT32 status;
  39539. /* Timestamp in microseconds at which the CFR was captured in the hardware.
  39540. * The clock used for this timestamp is private to the target and
  39541. * is not visible to the host i.e., Host can interpret only the
  39542. * relative timestamp deltas from one message to the next,
  39543. * but can't interpret the absolute timestamp from a single message.
  39544. */
  39545. A_UINT32 timestamp_us;
  39546. /*
  39547. * Count of the current CFR capture from FW.
  39548. * This is helpful to identify any drops in FW.
  39549. */
  39550. A_UINT32 counter;
  39551. /* Per chain RSSI of the peer, for up to WMI_MAX_CHAINS.
  39552. * Each chain's entry reports the RSSI for different bands in dBm units.
  39553. * Use WMI_UNIFIED_CHAIN_RSSI_GET to extract the value for a particular
  39554. * band.
  39555. * A band value of 0x80 (-128) is invalid.
  39556. */
  39557. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  39558. /* Carrier frequency offset
  39559. It is Difference between down conversion oscillator frequency at the receiver
  39560. versus carrier frequency of the received signal. To convert to ppm, below
  39561. equation needs to be used. Here, Fc is carrier frequency (primary 20 channel frequency) in Hz:
  39562. PPM = cfo_measurement(13 bits)/((2^13)/(800e-9)/2/Fc*1e6)
  39563. PPM ranges from -40 to +40
  39564. Bits 0 : 0 Set to 1 to indicate cfo measurement value is valid
  39565. Bits 1 : 14 14 bits cfo measurement raw data. 14 bit is signed bit.
  39566. For the above ppm equation , use the first 13 bits to calculate.
  39567. */
  39568. A_UINT32 cfo_measurement_valid :1,
  39569. cfo_measurement :14,
  39570. reserved :17;
  39571. /* RX packet start timestamp.
  39572. * It reports the time the first L-STF ADC sample arrived at RX antenna
  39573. * It is in units of 480 MHz clock, i.e. number of clock cycles at 480 MHz.
  39574. */
  39575. A_UINT32 rx_start_ts;
  39576. /*
  39577. * The rx_ts_reset flag will be set to 1 upon every reset of rx_start_ts.
  39578. */
  39579. A_UINT32 rx_ts_reset;
  39580. /*
  39581. * MCS and Guard Interval.
  39582. * MCS: For legacy mode only
  39583. * 0: 48 Mbps
  39584. * 1: 24 Mbps
  39585. * 2: 12 Mbps
  39586. * 3: 6 Mbps
  39587. * 4: 54 Mbps
  39588. * 5: 36 Mbps
  39589. * 6: 18 Mbps
  39590. * 7: 9 Mbps
  39591. * 8-254: reserved
  39592. * 255: invalid entry
  39593. *
  39594. * GI: For Legacy mode only
  39595. * 0: 0.8 us
  39596. * 1: 0.4 us
  39597. * 2: 1.6 us
  39598. * 3: 3.2 us
  39599. * 4-254: reserved
  39600. * 255: invalid entry
  39601. *
  39602. * Bits 0:7 mcs
  39603. * Bits 8:15 gi_type
  39604. * Bits 16:31 reserved
  39605. */
  39606. A_UINT32 mcs_gi_info;
  39607. } wmi_peer_cfr_capture_event_fixed_param;
  39608. #define WMI_CFR_MCS_GET(mcs_gi_info) \
  39609. WMI_GET_BITS(mcs_gi_info, 0, 8)
  39610. #define WMI_CFR_MCS_SET(mcs_gi_info, value) \
  39611. WMI_SET_BITS(mcs_gi_info, 0, 8, value)
  39612. #define WMI_CFR_GI_TYPE_GET(mcs_gi_info) \
  39613. WMI_GET_BITS(mcs_gi_info, 8, 8)
  39614. #define WMI_CFR_GI_TYPE_SET(mcs_gi_info, value) \
  39615. WMI_SET_BITS(mcs_gi_info, 8, 8, value)
  39616. #define WMI_UNIFIED_CHAIN_PHASE_MASK 0x0000ffff
  39617. #define WMI_UNIFIED_CHAIN_PHASE_GET(tlv, chain_idx) \
  39618. ((A_UINT16) ((tlv)->chain_phase[chain_idx] & WMI_UNIFIED_CHAIN_PHASE_MASK))
  39619. #define WMI_UNIFIED_CHAIN_PHASE_SET(tlv, chain_idx, value) \
  39620. (tlv)->chain_phase[chain_idx] = (WMI_UNIFIED_CHAIN_PHASE_MASK & (value))
  39621. #define WMI_CFR_AGC_GAIN_CHAINS_PER_U32 4
  39622. #define WMI_UNIFIED_AGC_GAIN_MASK 0x000000ff
  39623. #define WMI_UNIFIED_AGC_GAIN_GET(tlv, chain_idx) \
  39624. ((A_UINT8) ((tlv)->agc_gain_index[(chain_idx)/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] >> \
  39625. ((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8) & WMI_UNIFIED_AGC_GAIN_MASK)
  39626. #define WMI_UNIFIED_AGC_GAIN_SET(tlv, chain_idx, value) \
  39627. (tlv)->agc_gain_index[chain_idx/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] = \
  39628. (tlv)->agc_gain_index[chain_idx/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] & \
  39629. ~(0xff << (((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8)) | \
  39630. (((value)<<((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8))
  39631. #define WMI_UNIFIED_AGC_GAIN_TBL_IDX_GET(tlv, chain_idx) \
  39632. ((A_UINT8) ((tlv)->agc_gain_tbl_index[(chain_idx)/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] >> \
  39633. ((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8) & WMI_UNIFIED_AGC_GAIN_MASK)
  39634. #define WMI_UNIFIED_AGC_GAIN_TBL_IDX_SET(tlv, chain_idx, value) \
  39635. (tlv)->agc_gain_tbl_index[chain_idx/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] = \
  39636. (tlv)->agc_gain_tbl_index[chain_idx/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] & \
  39637. ~(0xff << (((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8)) | \
  39638. (((value)<<((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8))
  39639. typedef struct {
  39640. /** TLV tag and len; tag equals
  39641. * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_event_phase_fixed_param */
  39642. A_UINT32 tlv_header;
  39643. /* Per chain AoA phase data of the Peer, for up to WMI_MAX_CHAINS.
  39644. * USE WMI_UNIFIED_CHAIN_PHASE_GET to extract the phase value for
  39645. * a particular chain.
  39646. * Only lower 2 bytes will contain phase data for a particular chain.
  39647. * The values in phase data will be from 0 1023 as mapping of
  39648. * 0-359 degrees using the formula -
  39649. * phase data = phase in degrees * 1024 / 360
  39650. *
  39651. * Target will set 0xFFFF for all invalid chains.
  39652. *
  39653. * The WMI_UNIFIED_CHAIN_PHASE_GET/SET macros can be used to access
  39654. * the valid portion of the 4-byte word containing the chain phase data.
  39655. */
  39656. A_UINT32 chain_phase[WMI_MAX_CHAINS];
  39657. /* agc_gain_index
  39658. * It shows an index in the AGC gain LUT.
  39659. * agc gain should be in range between 0 to 62.
  39660. * 4 AGC gain index values are packed into each A_UINT32 word;
  39661. * use the WMI_UNITIFED_AGC_GAIN_GET/SET macros to read/write
  39662. * the AGC gain indices for individual chains.
  39663. */
  39664. A_UINT32 agc_gain_index[WMI_MAX_CHAINS/WMI_CFR_AGC_GAIN_CHAINS_PER_U32];
  39665. /*
  39666. * Each chain is provided with 8 bits within agc_gain_tbl_index.
  39667. * The value for each of these 8-bit portions is between 0 to 2:
  39668. * 0 : Default Gain Table
  39669. * 1 : Low RF Gain Table.
  39670. * Low gain applied at RF as compared to gains applied when
  39671. * gain_table _idx = 0 is selected.
  39672. * 2 : Very Low RF Gain Table.
  39673. * It's similar to above with even lower gains applied.
  39674. *
  39675. * AoA should use the normal/regular GLUT, thus GAIN_TABLE_IDX
  39676. * should always be 0. If it is not 0, it means that there was
  39677. * out-of-band blocker causing the hardware to pick a different
  39678. * gain table. In that case, AoA result will not be reliable.
  39679. * Therefore, the recommendation is to stop doing AoA if
  39680. * GAIN_TABLE_IDX != 0 and indicate error.
  39681. */
  39682. A_UINT32 agc_gain_tbl_index[WMI_MAX_CHAINS/WMI_CFR_AGC_GAIN_CHAINS_PER_U32];
  39683. } wmi_peer_cfr_capture_event_phase_fixed_param;
  39684. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_OK 0x80000000
  39685. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_OK_S 31
  39686. /* Failed to capture CFR as peer is in power save mode */
  39687. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_PS_FAILED 0x40000000
  39688. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_PS_FAILED_S 30
  39689. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_TX 0x00000003
  39690. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_TX_S 0
  39691. /**
  39692. * wmi_cold_boot_cal_data config flags
  39693. * BIT 0 : 1 means more data will come, 0 means last event
  39694. * BIT 1-31 : Reserved
  39695. */
  39696. #define WMI_COLD_BOOT_CAL_DATA_SET_IS_MORE_DATA(flags, val) WMI_SET_BITS(flags, 0, 1, val)
  39697. #define WMI_COLD_BOOT_CAL_DATA_GET_IS_MORE_DATA(flags) WMI_GET_BITS(flags, 0, 1)
  39698. typedef struct {
  39699. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_cold_boot_cal_data_fixed_param */
  39700. A_UINT32 data_len; /** length in byte of data[]. */
  39701. A_UINT32 flags; /** config flags : Only 0th bit is used, bit 1-31 are reserved */
  39702. /* Following this structure is the TLV:
  39703. * A_UINT8 data[]; <-- length in byte given by field data_len.
  39704. * This data array contains cold boot data calibration raw data.
  39705. */
  39706. } wmi_cold_boot_cal_data_fixed_param;
  39707. typedef struct {
  39708. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_rap_info_event_fixed_param */
  39709. /** pdev_id for identifying the MAC, the default value is WMI_PDEV_ID_SOC
  39710. * See macros starting with WMI_PDEV_ID_ for values.
  39711. */
  39712. A_UINT32 pdev_id;
  39713. A_UINT32 type; /** type of the rogue ap, see WMI_ROGUE_AP_TYPE */
  39714. wmi_mac_addr bssid; /** bssid of the rogue ap */
  39715. } wmi_pdev_rap_info_event_fixed_param;
  39716. typedef struct {
  39717. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sched_tidq_susp_info_event_fixed_param */
  39718. A_UINT32 pdev_id; /** pdev id */
  39719. A_UINT32 tid_num; /** tid_num that is suspended */
  39720. A_UINT32 suspended_time_ms; /** time for which tid has been suspended in ms */
  39721. } wmi_pdev_sched_tidq_susp_info_event_fixed_param;
  39722. /*
  39723. * WMI API for Firmware to indicate iface combinations which Firmware
  39724. * support to Host
  39725. */
  39726. typedef struct {
  39727. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_wlanfw_iface_cmb_ind_event_fixed_param */
  39728. /* common part */
  39729. /* Consider DBS/DBDC for this new implementation */
  39730. A_UINT32 pdev_n;
  39731. /* iface combinations part -
  39732. * Use subsequent TLV arrays to list supported combinations of interfaces.
  39733. */
  39734. /*
  39735. * The TLVs listing interface combinations, will follow this TLV.
  39736. * The number of combinations can be calculated by dividing the
  39737. * TLV array length by the TLV array element length.
  39738. *
  39739. * The fixed_param TLV is directly followed by a list of
  39740. * wlanfw_iface_combination elements:
  39741. * wlanfw_iface_combination combinations[0];
  39742. * wlanfw_iface_combination combinations[1];
  39743. * ...
  39744. * wlanfw_iface_combination combinations[N];
  39745. *
  39746. * After the list of wlanfw_iface_combinations is a list of interface limits.
  39747. * The cmb_limits field of each wlanfw_iface_combination show which of the
  39748. * limits within the "wlanfw_ifact_limit limits" list belong to that
  39749. * iface_combination:
  39750. * limits[0] <- cmb 0, limit 0
  39751. * ...
  39752. * limits[cmb[0].cmb_limits-1] <- cmb 0, limit N
  39753. * limits[cmb[0].cmb_limits] <- cmb 1, limit 0
  39754. * ...
  39755. * limits[cmb[0].cmb_limits+cmb[1].cmb_limits-1] <- cmb 1, limit N
  39756. * limits[cmb[0].cmb_limits+cmb[1].cmb_limits] <- cmb 2, limit 0
  39757. * ...
  39758. */
  39759. } wmi_wlanfw_iface_cmb_ind_event_fixed_param;
  39760. typedef struct {
  39761. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_wlanfw_iface_limit_param */
  39762. /*
  39763. * How many vdevs can work as below vdev_type/vdev_subtype
  39764. * in one combination.
  39765. */
  39766. A_UINT32 vdev_limit_n;
  39767. /*
  39768. * Indicate what role above vdevs can work as.
  39769. * Refer to "WMI_VDEV_TYPE_xx, WMI_UNIFIED_VDEV_SUBTYPE_xx"
  39770. * for roles definition.
  39771. */
  39772. A_UINT32 vdev_type;
  39773. A_UINT32 vdev_subtype;
  39774. } wlanfw_iface_limit;
  39775. /**
  39776. * @brief specific configuration of valid_fields for host.
  39777. * These flags are used for indicating which fields in wlanfw_iface_combination
  39778. * contains valid value for Host Driver.
  39779. * 0: Host can ignore this field
  39780. * 1: field contains valid value for Host Driver
  39781. */
  39782. #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_S 0
  39783. #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_M 0x1
  39784. #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_S 1
  39785. #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_M 0x2
  39786. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_S 2
  39787. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_M 0x4
  39788. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_S 3
  39789. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_M 0x8
  39790. #define WMI_CMB_VALID_FIELDS_FLAG_SET(word32, flag, value) \
  39791. do { \
  39792. (word32) &= ~WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M; \
  39793. (word32) |= ((value) << WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _S) & \
  39794. WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M; \
  39795. } while (0)
  39796. #define WMI_CMB_VALID_FIELDS_FLAG_GET(word32, flag) \
  39797. (((word32) & WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M) >> \
  39798. WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _S)
  39799. #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_SET(word32, value) \
  39800. WMI_CMB_VALID_FIELDS_FLAG_SET((word32), PEER_MAX, (value))
  39801. #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_GET(word32) \
  39802. WMI_CMB_VALID_FIELDS_FLAG_GET((word32), PEER_MAX)
  39803. #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_SET(word32, value) \
  39804. WMI_CMB_VALID_FIELDS_FLAG_SET((word32), STA_AP_BCN_INT_MATCH, (value))
  39805. #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_GET(word32) \
  39806. WMI_CMB_VALID_FIELDS_FLAG_GET((word32), STA_AP_BCN_INT_MATCH)
  39807. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_SET(word32, value) \
  39808. WMI_CMB_VALID_FIELDS_FLAG_SET((word32), BCN_INT_MIN, (value))
  39809. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_GET(word32) \
  39810. WMI_CMB_VALID_FIELDS_FLAG_GET((word32), BCN_INT_MIN)
  39811. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_SET(word32, value) \
  39812. WMI_CMB_VALID_FIELDS_FLAG_SET((word32), BCN_INT_N, (value))
  39813. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_GET(word32) \
  39814. WMI_CMB_VALID_FIELDS_FLAG_GET((word32), BCN_INT_N)
  39815. typedef struct {
  39816. A_UINT32 tlv_header;
  39817. /*
  39818. * Max num Peers can be supported in this combination.
  39819. * It excludes the self-peers associated with each vdev.
  39820. * It's the number of real remote peers.
  39821. * eg: when working as AP mode, indicating how many clients can be
  39822. * supported to connect with this AP.
  39823. */
  39824. A_UINT32 peer_max;
  39825. /* Home Channels supported on one single phy concurrently */
  39826. A_UINT32 channel_n;
  39827. /*
  39828. * The number of "wlanfw_iface_limit" for a specified combination.
  39829. * eg: there is 2 vdev, including 1 AP vdev and 1 STA vdev, then this
  39830. * cmb_limits will be 2 for this combination.
  39831. */
  39832. A_UINT32 cmb_limits;
  39833. /*
  39834. * Beacon intervals for STA and AP types need to be match or not.
  39835. * 1: need to be match
  39836. * 0: not need
  39837. */
  39838. A_UINT32 sta_ap_bcn_int_match;
  39839. /*
  39840. * This combination supports different beacon intervals or not.
  39841. * 0: Beacon interval is same for all interface
  39842. * !0: STA Beacon interval AND GCD of AP Beacon intervals
  39843. * should be greater or equal to this value.
  39844. */
  39845. A_UINT32 bcn_int_min;
  39846. /*
  39847. * Number of different Beacon intervals
  39848. */
  39849. A_UINT32 bcn_int_n;
  39850. /*
  39851. * This indicates which field in this struct
  39852. * contains valid value for Host Driver.
  39853. * Refer to definitions for "WMI_CMB_VALID_FIELDS_FLAG_xx".
  39854. */
  39855. A_UINT32 valid_fields;
  39856. } wlanfw_iface_combination;
  39857. typedef struct {
  39858. /** TLV tag and len; tag equals
  39859. * WMITLV_TAG_STRUC_wmi_set_elna_bypass_cmd_fixed_param */
  39860. A_UINT32 tlv_header;
  39861. /* VDEV identifier */
  39862. A_UINT32 vdev_id;
  39863. /** 1-Enable, 0-Disable */
  39864. A_UINT32 en_dis;
  39865. } wmi_set_elna_bypass_cmd_fixed_param;
  39866. typedef struct {
  39867. /** TLV tag and len; tag equals
  39868. * WMITLV_TAG_STRUC_wmi_get_elna_bypass_cmd_fixed_param */
  39869. A_UINT32 tlv_header;
  39870. /* VDEV identifier */
  39871. A_UINT32 vdev_id;
  39872. } wmi_get_elna_bypass_cmd_fixed_param;
  39873. typedef struct {
  39874. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_elna_bypass_event_fixed_param */
  39875. /* VDEV identifier */
  39876. A_UINT32 vdev_id;
  39877. /** 1-Enable, 0-Disable */
  39878. A_UINT32 en_dis;
  39879. } wmi_get_elna_bypass_event_fixed_param;
  39880. typedef struct {
  39881. /** TLV tag and len; tag equals
  39882. * WMITLV_TAG_STRUC_wmi_get_channel_ani_cmd_fixed_param
  39883. */
  39884. A_UINT32 tlv_header;
  39885. /**
  39886. * TLV (tag length value) parameters follow the
  39887. * structure. The TLV's are:
  39888. * list of channels (center freq of primary 20 MHz of the channel, in MHz)
  39889. * A_UINT32 channel_list[];
  39890. */
  39891. } wmi_get_channel_ani_cmd_fixed_param;
  39892. typedef struct {
  39893. /** TLV tag and len; tag equals
  39894. * WMITLV_TAG_STRUC_wmi_get_channel_ani_event_fixed_param
  39895. */
  39896. A_UINT32 tlv_header;
  39897. /**
  39898. * TLV (tag length value) parameters follow the
  39899. * structure. The TLV's are:
  39900. * wmi_channel_ani_info_tlv_param ani_info[];
  39901. */
  39902. } wmi_get_channel_ani_event_fixed_param;
  39903. typedef struct {
  39904. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_ani_info_tlv_param */
  39905. A_UINT32 tlv_header;
  39906. /** channel freq (center of 20 MHz primary channel) in MHz */
  39907. A_UINT32 chan_freq;
  39908. /**
  39909. * ANI (noise interference) level corresponding to the channel.
  39910. * Values range from [0-9], with higher values indicating more
  39911. * noise interference.
  39912. */
  39913. A_UINT32 ani_level;
  39914. } wmi_channel_ani_info_tlv_param;
  39915. /* This command is to specify to enable/disable audio frame aggr */
  39916. typedef struct {
  39917. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_enable_cmd_fixed_param */
  39918. A_UINT32 aggr_enable; /* enable aggregation for audio frame */
  39919. A_UINT32 tbd_enable; /* enable time_based discarding for audio frame */
  39920. A_UINT32 vdev_id;
  39921. } wmi_audio_aggr_enable_cmd_fixed_param;
  39922. typedef struct wmi_audio_aggr_rate_set_s {
  39923. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_audio_aggr_rate_set */
  39924. A_UINT32 mcs;
  39925. A_UINT32 bandwidth; /* 0 for 20M, 1 for 40M and 2 for 80M, etc. */
  39926. A_UINT32 vdev_id;
  39927. } WMI_AUDIO_AGGR_RATE_SET_T;
  39928. typedef struct {
  39929. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_add_group */
  39930. A_UINT32 group_id; /* id of audio group */
  39931. wmi_mac_addr multicast_addr; /* multicast address of audio group */
  39932. A_UINT32 vdev_id;
  39933. } wmi_audio_aggr_add_group_cmd_fixed_param;
  39934. typedef struct {
  39935. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_del_group */
  39936. A_UINT32 group_id;
  39937. A_UINT32 vdev_id;
  39938. } wmi_audio_aggr_del_group_cmd_fixed_param;
  39939. typedef struct {
  39940. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_set_group_rate */
  39941. A_UINT32 group_id;
  39942. A_UINT32 vdev_id;
  39943. /**
  39944. * TLV (tag length value) parameters follow the
  39945. * structure. The TLV's are:
  39946. * WMI_AUDIO_AGGR_RATE_SET_T rate_set[];
  39947. **/
  39948. } wmi_audio_aggr_set_group_rate_cmd_fixed_param;
  39949. typedef struct {
  39950. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_set_group_retry */
  39951. A_UINT32 group_id;
  39952. A_UINT32 retry_thresh;
  39953. A_UINT32 vdev_id;
  39954. } wmi_audio_aggr_set_group_retry_cmd_fixed_param;
  39955. typedef struct {
  39956. A_UINT32 tlv_header;
  39957. A_UINT32 vdev_id;
  39958. A_UINT32 group_id;
  39959. /*
  39960. * bit0: if set, Enable HT20
  39961. * bit1: if set, Enable HT40
  39962. * bit2, bit3: Reserved
  39963. * bit4: if set, Enable VHT20
  39964. * bit5: if set, Enable VHT40
  39965. * bit6: if set, Enable VHT80
  39966. * bit7 ~ bit31: Reserved
  39967. */
  39968. A_UINT32 bw;
  39969. A_UINT32 mcs_min;
  39970. A_UINT32 mcs_max;
  39971. A_UINT32 mcs_offset;
  39972. A_UINT32 nss;
  39973. } wmi_audio_aggr_set_group_auto_rate_cmd_fixed_param;
  39974. typedef struct {
  39975. A_UINT32 tlv_header;
  39976. A_UINT32 vdev_id;
  39977. A_UINT32 group_id;
  39978. A_UINT32 interval;
  39979. } wmi_audio_aggr_set_group_probe_cmd_fixed_param;
  39980. typedef struct {
  39981. /**
  39982. * TLV tag and len;
  39983. * tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_update_sta_group_info */
  39984. A_UINT32 tlv_header;
  39985. /* vdev id */
  39986. A_UINT32 vdev_id; /* which STA/vdev's group membership is being specified */
  39987. /* bitmap that indicates which groups this sta belongs to */
  39988. A_UINT32 group_bmap;
  39989. /*
  39990. * This fixed_param struct is followed by a TLV array of wmi_mac_addr,
  39991. * which specifies the multi-cast MAC address used for each group.
  39992. * The number of elements within the TLV array matches the number of bits
  39993. * set within group_bmap.
  39994. */
  39995. } wmi_audio_aggr_update_sta_group_info_cmd_fixed_param;
  39996. typedef struct {
  39997. /** TLV tag and len **/
  39998. A_UINT32 tlv_header;
  39999. /* VDEV identifier */
  40000. A_UINT32 vdev_id;
  40001. /*
  40002. * Identifier from Host to indicate how many this cmd been sent to FW.
  40003. * This value will be echoed back in the response_id field
  40004. * of the WMI_AUDIO_AGGR_REPORT_STATISTICS_EVENTID.
  40005. */
  40006. A_UINT32 request_id;
  40007. } wmi_audio_aggr_get_statistics_cmd_fixed_param;
  40008. typedef struct {
  40009. /** TLV tag and len **/
  40010. A_UINT32 tlv_header;
  40011. /* VDEV identifier */
  40012. A_UINT32 vdev_id;
  40013. } wmi_audio_aggr_reset_statistics_cmd_fixed_param;
  40014. typedef struct {
  40015. /** TLV tag and len **/
  40016. A_UINT32 tlv_header;
  40017. /* VDEV identifier */
  40018. A_UINT32 vdev_id;
  40019. /*
  40020. * The user_mode and user_profile fields are passed through
  40021. * the host driver to the target FW, but are never interpreted
  40022. * by the host driver. The values for these fields are opaque
  40023. * to the host, and are only interpreted by the FW.
  40024. */
  40025. A_UINT32 user_mode;
  40026. A_UINT32 user_profile;
  40027. } wmi_audio_aggr_set_rtscts_config_cmd_fixed_param;
  40028. typedef enum {
  40029. /* audio aggr scheduler method list */
  40030. WMI_AUDIO_AGGR_SCHED_METHOD_HOST_CONTROL = 1,
  40031. WMI_AUDIO_AGGR_SCHED_METHOD_HOST_CONTROL_PER_CYCLE = 2,
  40032. WMI_AUDIO_AGGR_SCHED_METHOD_MAX,
  40033. } WMI_AUDIO_AGGR_SCHED_METHOD_TYPE;
  40034. typedef enum {
  40035. /* audio aggr RTS-CTS Config */
  40036. WMI_AUDIO_AGGR_RTS_CTS_CONFIG_DISABLED = 0,
  40037. WMI_AUDIO_AGGR_RTS_CTS_CONFIG_PPDU = 1,
  40038. WMI_AUDIO_AGGR_RTS_CTS_CONFIG_CYCLE = 2,
  40039. WMI_AUDIO_AGGR_RTS_CTS_MAX,
  40040. } WMI_AUDIO_AGGR_RTS_CTS_CONFIG_TYPE;
  40041. typedef struct {
  40042. /* TLV tag and len */
  40043. A_UINT32 tlv_header;
  40044. /* VDEV identifier */
  40045. A_UINT32 vdev_id;
  40046. /* selected audio aggr scheduler method
  40047. * valid methods can be found in WMI_AUDIO_AGGR_SCHED_METHOD_TYPE
  40048. */
  40049. A_UINT32 sched_method;
  40050. /* rts-cts config
  40051. * valid config can be found in WMI_AUDIO_AGGR_RTS_CTS_CONFIG_TYPE
  40052. */
  40053. A_UINT32 rtscts_config;
  40054. } wmi_audio_aggr_set_sched_method_cmd_fixed_param;
  40055. typedef struct {
  40056. /* TLV tag and len */
  40057. A_UINT32 tlv_header;
  40058. /* VDEV identifier */
  40059. A_UINT32 vdev_id;
  40060. } wmi_audio_aggr_get_sched_method_cmd_fixed_param;
  40061. typedef struct {
  40062. /** TLV tag and len; tag equals
  40063. * WMITLV_TAG_STRUC_wmi_set_ocl_cmd_fixed_param */
  40064. A_UINT32 tlv_header;
  40065. /* VDEV identifier */
  40066. A_UINT32 vdev_id;
  40067. /** enable/disable OCL, 1 - enable, 0 - disable*/
  40068. A_UINT32 en_dis_chain;
  40069. } wmi_set_ocl_cmd_fixed_param;
  40070. typedef enum {
  40071. /* HPA Handshake Stages */
  40072. WMI_HPA_SMCK_REQUEST = 0,
  40073. WMI_HPA_SMCK_RESPONSE = 1,
  40074. WMI_HPA_SIGN_REQUEST = 2,
  40075. WMI_HPA_SIGN_RESPONSE = 3,
  40076. WMI_HPA_HANDSHAKE_STAGE_MAX,
  40077. } WMI_HPA_STAGE_TYPE;
  40078. typedef struct {
  40079. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hpa_cmd_fixed_param */
  40080. /* stage:
  40081. * HPA Handshake Stage, filled with a WMI_HPA_STAGE_TYPE enum value
  40082. */
  40083. A_UINT32 stage;
  40084. /* the base address and length of data on host memory */
  40085. A_UINT32 base_paddr_low; /* bits 31:0 */
  40086. A_UINT32 base_paddr_high; /* bits 63:32 */
  40087. A_UINT32 len; /* units = bytes */
  40088. } wmi_hpa_cmd_fixed_param;
  40089. typedef struct {
  40090. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hpa_evt_fixed_param */
  40091. /* stage:
  40092. * HPA Handshake Stage, filled with a WMI_HPA_STAGE_TYPE enum value
  40093. */
  40094. A_UINT32 stage;
  40095. A_UINT32 nonce;
  40096. } wmi_hpa_evt_fixed_param;
  40097. typedef struct {
  40098. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_sync_qtimer */
  40099. A_UINT32 vdev_id;
  40100. A_UINT32 qtimer_l32;
  40101. A_UINT32 qtimer_u32;
  40102. } wmi_audio_sync_qtimer_cmd_fixed_param;
  40103. typedef struct {
  40104. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_sync_trigger */
  40105. A_UINT32 vdev_id;
  40106. /* agg_relation:
  40107. * indicates whether host needs only one pair of Qmaster and Qslave,
  40108. * or Qmaster and Qslave pairs derived for each FTM frame exchange.
  40109. * 0 indicates one pair for each FTM frame exchanged
  40110. * 1 indicates only one pair of Qmaster and Qslave times.
  40111. */
  40112. A_UINT32 agg_relation;
  40113. } wmi_audio_sync_trigger_cmd_fixed_param;
  40114. typedef struct {
  40115. /** TLV tag and len; tag equals
  40116. * WMITLV_TAG_STRUC_wmi_pdev_mec_aging_timer_config_cmd_fixed_param
  40117. */
  40118. A_UINT32 tlv_header;
  40119. /** SOC level Command. pdev_id - WMI_PDEV_ID_SOC is used.
  40120. */
  40121. A_UINT32 pdev_id;
  40122. /* The Threshold for mec aging timer in ms
  40123. */
  40124. A_UINT32 mec_aging_timer_threshold;
  40125. } wmi_pdev_mec_aging_timer_config_cmd_fixed_param;
  40126. #define WMI_CFR_GROUP_TA_ADDR_VALID_BIT_POS 0
  40127. #define WMI_CFR_GROUP_TA_ADDR_MASK_VALID_BIT_POS 1
  40128. #define WMI_CFR_GROUP_RA_ADDR_VALID_BIT_POS 2
  40129. #define WMI_CFR_GROUP_RA_ADDR_MASK_VALID_BIT_POS 3
  40130. #define WMI_CFR_GROUP_BW_VALID_BIT_POS 4
  40131. #define WMI_CFR_GROUP_NSS_VALID_BIT_POS 5
  40132. #define WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_BIT_POS 6
  40133. #define WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_BIT_POS 7
  40134. #define WMI_CFR_GROUP_DATA_SUBTYPE_VALID_BIT_POS 8
  40135. /* The bits in this mask mapped to WMI_PEER_CFR_CAPTURE_BW enum */
  40136. #define WMI_CFR_GROUP_BW_MASK_NUM_BITS 6
  40137. #define WMI_CFR_GROUP_BW_BIT_POS 0
  40138. /* The bits in this mask correspond to the values as below
  40139. * bit 0 -> Nss 1
  40140. * bit 1 -> Nss 2
  40141. * ...
  40142. * bit 7 -> Nss 8
  40143. */
  40144. #define WMI_CFR_GROUP_NSS_MASK_NUM_BITS 8
  40145. #define WMI_CFR_GROUP_NSS_BIT_POS 16
  40146. #define WMI_CFR_GROUP_TA_ADDR_VALID_SET(param, value) \
  40147. WMI_SET_BITS(param, WMI_CFR_GROUP_TA_ADDR_VALID_BIT_POS, 1, value)
  40148. #define WMI_CFR_GROUP_TA_ADDR_VALID_GET(param) \
  40149. WMI_GET_BITS(param, WMI_CFR_GROUP_TA_ADDR_VALID_BIT_POS, 1)
  40150. #define WMI_CFR_GROUP_TA_ADDR_MASK_VALID_SET(param, value) \
  40151. WMI_SET_BITS(param, WMI_CFR_GROUP_TA_ADDR_MASK_VALID_BIT_POS, 1, value)
  40152. #define WMI_CFR_GROUP_TA_ADDR_MASK_VALID_GET(param) \
  40153. WMI_GET_BITS(param, WMI_CFR_GROUP_TA_ADDR_MASK_VALID_BIT_POS, 1)
  40154. #define WMI_CFR_GROUP_RA_ADDR_VALID_SET(param, value) \
  40155. WMI_SET_BITS(param, WMI_CFR_GROUP_RA_ADDR_VALID_BIT_POS, 1, value)
  40156. #define WMI_CFR_GROUP_RA_ADDR_VALID_GET(param) \
  40157. WMI_GET_BITS(param, WMI_CFR_GROUP_RA_ADDR_VALID_BIT_POS, 1)
  40158. #define WMI_CFR_GROUP_RA_ADDR_MASK_VALID_SET(param, value) \
  40159. WMI_SET_BITS(param, WMI_CFR_GROUP_RA_ADDR_MASK_VALID_BIT_POS, 1, value)
  40160. #define WMI_CFR_GROUP_RA_ADDR_MASK_VALID_GET(param) \
  40161. WMI_GET_BITS(param, WMI_CFR_GROUP_RA_ADDR_MASK_VALID_BIT_POS, 1)
  40162. #define WMI_CFR_GROUP_BW_VALID_SET(param, value) \
  40163. WMI_SET_BITS(param, WMI_CFR_GROUP_BW_VALID_BIT_POS, 1, value)
  40164. #define WMI_CFR_GROUP_BW_VALID_GET(param) \
  40165. WMI_GET_BITS(param, WMI_CFR_GROUP_BW_VALID_BIT_POS, 1)
  40166. #define WMI_CFR_GROUP_NSS_VALID_SET(param, value) \
  40167. WMI_SET_BITS(param, WMI_CFR_GROUP_NSS_VALID_BIT_POS, 1, value)
  40168. #define WMI_CFR_GROUP_NSS_VALID_GET(param) \
  40169. WMI_GET_BITS(param, WMI_CFR_GROUP_NSS_VALID_BIT_POS, 1)
  40170. #define WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_SET(param, value) \
  40171. WMI_SET_BITS(param, WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_BIT_POS, 1, value)
  40172. #define WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_GET(param) \
  40173. WMI_GET_BITS(param, WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_BIT_POS, 1)
  40174. #define WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_SET(param, value) \
  40175. WMI_SET_BITS(param, WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_BIT_POS, 1, value)
  40176. #define WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_GET(param) \
  40177. WMI_GET_BITS(param, WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_BIT_POS, 1)
  40178. #define WMI_CFR_GROUP_DATA_SUBTYPE_VALID_SET(param, value) \
  40179. WMI_SET_BITS(param, WMI_CFR_GROUP_DATA_SUBTYPE_VALID_BIT_POS, 1, value)
  40180. #define WMI_CFR_GROUP_DATA_SUBTYPE_VALID_GET(param) \
  40181. WMI_GET_BITS(param, WMI_CFR_GROUP_DATA_SUBTYPE_VALID_BIT_POS, 1)
  40182. #define WMI_CFR_GROUP_BW_SET(param, value) \
  40183. WMI_SET_BITS(param, WMI_CFR_GROUP_BW_BIT_POS, WMI_CFR_GROUP_BW_MASK_NUM_BITS, value)
  40184. #define WMI_CFR_GROUP_BW_GET(param) \
  40185. WMI_GET_BITS(param, WMI_CFR_GROUP_BW_BIT_POS, WMI_CFR_GROUP_BW_MASK_NUM_BITS)
  40186. #define WMI_CFR_GROUP_NSS_SET(param, value) \
  40187. WMI_SET_BITS(param, WMI_CFR_GROUP_NSS_BIT_POS, WMI_CFR_GROUP_NSS_MASK_NUM_BITS, value)
  40188. #define WMI_CFR_GROUP_NSS_GET(param) \
  40189. WMI_GET_BITS(param, WMI_CFR_GROUP_NSS_BIT_POS, WMI_CFR_GROUP_NSS_MASK_NUM_BITS)
  40190. typedef struct {
  40191. /** TLV tag and len; tag equals
  40192. * WMITLV_TAG_STRUC_wmi_cfr_filter_group_config */
  40193. A_UINT32 tlv_header;
  40194. /* Filter group number for which the below filters needs to be applied */
  40195. A_UINT32 filter_group_id;
  40196. /* Indicates which of the below filter's value is valid
  40197. * Bit 0: Ta_addr is valid if set
  40198. * Bit 1: Ta_addr_mask is valid if set
  40199. * Bit 2: Ra_addr is valid if set
  40200. * Bit 3: Ra_addr_mask is valid if set
  40201. * Bit 4: Bandwidth is valid if set
  40202. * Bit 5: NSS is valid if set
  40203. * Bit 6: Mgmt_subtype is valid if set
  40204. * Bit 7: Ctrl_subtype is valid if set
  40205. * Bit 8: Data_subtype is valid if set
  40206. * Bits 31:9 Reserved for future use
  40207. */
  40208. A_UINT32 filter_set_valid_mask;
  40209. /* ta_addr:
  40210. * Packets matching the TA_mac addr will be filtered in by MAC
  40211. * for CFR capture.
  40212. */
  40213. wmi_mac_addr ta_addr;
  40214. /* ta_addr_mask:
  40215. * Packets matching the TA_mac addr Mask will be filtered in by MAC
  40216. * for CFR capture.
  40217. */
  40218. wmi_mac_addr ta_addr_mask;
  40219. /* ra_addr:
  40220. * Packets matching the RA_mac addr will be filtered in by MAC
  40221. * for CFR capture.
  40222. */
  40223. wmi_mac_addr ra_addr;
  40224. /* ra_addr_mask:
  40225. * Packets matching the RA_mac addr Mask will be filtered in by MAC
  40226. * for CFR capture.
  40227. */
  40228. wmi_mac_addr ra_addr_mask;
  40229. /* bw_nss_filter:
  40230. * Indicates which bw and nss packets will be filtered for CFR capture
  40231. * Bits 4:0 CFR capture will be done for packets matching the bandwidths
  40232. * specified within this bitmask
  40233. * Bits 15:5 Reserved for future
  40234. * Bits 23:16 CFR capture will be done for packets matching the Nss
  40235. * specified within this bitmask
  40236. * Bits 31:24 Reserved for future
  40237. */
  40238. A_UINT32 bw_nss_filter;
  40239. /* mgmt_subtype_filter:
  40240. * Managments Packets matching the subtype filter categories will be
  40241. * filtered in by MAC for CFR capture.
  40242. * This is a bitmask, in which each bit represents the corresponding
  40243. * mgmt subtype value as per ieee80211_defs.h
  40244. */
  40245. A_UINT32 mgmt_subtype_filter;
  40246. /* ctrl_subtype_filter:
  40247. * Control Packets matching the subtype filter category will be
  40248. * filtered in by MAC for CFR capture.
  40249. * This is a bitmask, in which each bit represents the corresponding
  40250. * ctrl subtype value as per ieee80211_defs.h
  40251. */
  40252. A_UINT32 ctrl_subtype_filter;
  40253. /* data_subtype_filter:
  40254. * Data Packets matching the subtype filter category will be
  40255. * filtered in by MAC for CFR capture.
  40256. * This is a bitmask, in which each bit represents the corresponding
  40257. * data subtype value as per ieee80211_defs.h
  40258. */
  40259. A_UINT32 data_subtype_filter;
  40260. } wmi_cfr_filter_group_config;
  40261. #define WMI_CFR_DIRECTED_FTM_ACK_EN_BIT_POS 0
  40262. #define WMI_CFR_ALL_FTM_ACK_EN_BIT_POS 1
  40263. #define WMI_CFR_NDPA_NDP_DIRECTED_EN_BIT_POS 2
  40264. #define WMI_CFR_NDPA_NDP_ALL_EN_BIT_POS 3
  40265. #define WMI_CFR_TA_RA_TYPE_FILTER_EN_BIT_POS 4
  40266. #define WMI_CFR_ALL_PACKET_EN_BIT_POS 5
  40267. #define WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_BIT_POS 6
  40268. #define WMI_CFR_CAPTURE_INTERVAL_NUM_BITS 24
  40269. #define WMI_CFR_CAPTURE_INTERVAL_BIT_POS 0
  40270. #define WMI_CFR_CAPTURE_DURATION_NUM_BITS 24
  40271. #define WMI_CFR_CAPTURE_DURATION_BIT_POS 0
  40272. #define WMI_CFR_FILTER_GROUP_BITMAP_NUM_BITS 16
  40273. #define WMI_CFR_FILTER_GROUP_BITMAP_BIT_POS 0
  40274. #define WMI_CFR_UL_MU_USER_UPPER_NUM_BITS 5
  40275. #define WMI_CFR_UL_MU_USER_UPPER_BIT_POS 0
  40276. #define WMI_CFR_FREEZE_DELAY_CNT_EN_MASK 1
  40277. #define WMI_CFR_FREEZE_DELAY_CNT_EN_BIT_POS 0
  40278. #define WMI_CFR_FREEZE_DELAY_CNT_THR_NUM_BITS 8
  40279. #define WMI_CFR_FREEZE_DELAY_CNT_THR_BIT_POS 1
  40280. #define WMI_CFR_CAPTURE_COUNT_NUM_BITS 16
  40281. #define WMI_CFR_CAPTURE_COUNT_BIT_POS 0
  40282. #define WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_NUM_BITS 1
  40283. #define WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_BIT_POS 16
  40284. #define WMI_CFR_DIRECTED_FTM_ACK_EN_SET(param, value) \
  40285. WMI_SET_BITS(param, WMI_CFR_DIRECTED_FTM_ACK_EN_BIT_POS, 1, value)
  40286. #define WMI_CFR_DIRECTED_FTM_ACK_EN_GET(param) \
  40287. WMI_GET_BITS(param, WMI_CFR_DIRECTED_FTM_ACK_EN_BIT_POS, 1)
  40288. #define WMI_CFR_ALL_FTM_ACK_EN_SET(param, value) \
  40289. WMI_SET_BITS(param, WMI_CFR_ALL_FTM_ACK_EN_BIT_POS, 1, value)
  40290. #define WMI_CFR_ALL_FTM_ACK_EN_GET(param) \
  40291. WMI_GET_BITS(param, WMI_CFR_ALL_FTM_ACK_EN_BIT_POS, 1)
  40292. #define WMI_CFR_NDPA_NDP_DIRECTED_EN_SET(param, value) \
  40293. WMI_SET_BITS(param, WMI_CFR_NDPA_NDP_DIRECTED_EN_BIT_POS, 1, value)
  40294. #define WMI_CFR_NDPA_NDP_DIRECTED_EN_GET(param) \
  40295. WMI_GET_BITS(param, WMI_CFR_NDPA_NDP_DIRECTED_EN_BIT_POS, 1)
  40296. #define WMI_CFR_NDPA_NDP_ALL_EN_SET(param, value) \
  40297. WMI_SET_BITS(param, WMI_CFR_NDPA_NDP_ALL_EN_BIT_POS, 1, value)
  40298. #define WWMI_CFR_NDPA_NDP_ALL_EN_GET WMI_CFR_NDPA_NDP_ALL_EN_GET
  40299. #define WMI_CFR_NDPA_NDP_ALL_EN_GET(param) \
  40300. WMI_GET_BITS(param, WMI_CFR_NDPA_NDP_ALL_EN_BIT_POS, 1)
  40301. #define WMI_CFR_TA_RA_TYPE_FILTER_EN_SET(param, value) \
  40302. WMI_SET_BITS(param, WMI_CFR_TA_RA_TYPE_FILTER_EN_BIT_POS, 1, value)
  40303. #define WMI_CFR_TA_RA_TYPE_FILTER_EN_GET(param) \
  40304. WMI_GET_BITS(param, WMI_CFR_TA_RA_TYPE_FILTER_EN_BIT_POS, 1)
  40305. #define WWMI_CFR_ALL_PACKET_EN_SET WMI_CFR_ALL_PACKET_EN_SET
  40306. #define WMI_CFR_ALL_PACKET_EN_SET(param, value) \
  40307. WMI_SET_BITS(param, WMI_CFR_ALL_PACKET_EN_BIT_POS, 1, value)
  40308. #define WMI_CFR_ALL_PACKET_EN_GET(param) \
  40309. WMI_GET_BITS(param, WMI_CFR_ALL_PACKET_EN_BIT_POS, 1)
  40310. #define WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_SET(param, value) \
  40311. WMI_SET_BITS(param, WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_BIT_POS, 1, value)
  40312. #define WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_GET(param) \
  40313. WMI_GET_BITS(param, WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_BIT_POS, 1)
  40314. #define WMI_CFR_CAPTURE_INTERVAL_SET(param, value) \
  40315. WMI_SET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_NUM_BITS, value)
  40316. #define WMI_CFR_CAPTURE_INTERVAL_GET(param) \
  40317. WMI_GET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_NUM_BITS)
  40318. #define WMI_CFR_CAPTURE_DURATION_SET(param, value) \
  40319. WMI_SET_BITS(param, WMI_CFR_CAPTURE_DURATION_BIT_POS, WMI_CFR_CAPTURE_DURATION_NUM_BITS, value)
  40320. #define WMI_CFR_CAPTURE_DURATION_GET(param) \
  40321. WMI_GET_BITS(param, WMI_CFR_CAPTURE_DURATION_BIT_POS, WMI_CFR_CAPTURE_DURATION_NUM_BITS)
  40322. #define WMI_CFR_FILTER_GROUP_BITMAP_SET(param, value) \
  40323. WMI_SET_BITS(param, WMI_CFR_FILTER_GROUP_BITMAP_BIT_POS, WMI_CFR_FILTER_GROUP_BITMAP_NUM_BITS, value)
  40324. #define WMI_CFR_FILTER_GROUP_BITMAP_GET(param) \
  40325. WMI_GET_BITS(param, WMI_CFR_FILTER_GROUP_BITMAP_BIT_POS, WMI_CFR_FILTER_GROUP_BITMAP_NUM_BITS)
  40326. #define WMI_CFR_UL_MU_USER_UPPER_SET(param, value) \
  40327. WMI_SET_BITS(param, WMI_CFR_UL_MU_USER_UPPER_BIT_POS, WMI_CFR_UL_MU_USER_UPPER_NUM_BITS, value)
  40328. #define WMI_CFR_UL_MU_USER_UPPER_GET(param) \
  40329. WMI_GET_BITS(param, WMI_CFR_UL_MU_USER_UPPER_BIT_POS, WMI_CFR_UL_MU_USER_UPPER_NUM_BITS)
  40330. #define WMI_CFR_FREEZE_DELAY_CNT_EN_SET(param, value) \
  40331. WMI_SET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_EN_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_EN_MASK, value)
  40332. #define WMI_CFR_FREEZE_DELAY_CNT_EN_GET(param) \
  40333. WMI_GET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_EN_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_EN_MASK)
  40334. #define WMI_CFR_FREEZE_DELAY_CNT_THR_SET(param, value) \
  40335. WMI_SET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_THR_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_THR_NUM_BITS, value)
  40336. #define WMI_CFR_FREEZE_DELAY_CNT_THR_GET(param) \
  40337. WMI_GET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_THR_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_THR_NUM_BITS)
  40338. #define WMI_CFR_CAPTURE_COUNT_SET(param, value) \
  40339. WMI_SET_BITS(param, WMI_CFR_CAPTURE_COUNT_BIT_POS, WMI_CFR_CAPTURE_COUNT_NUM_BITS, value)
  40340. #define WMI_CFR_CAPTURE_COUNT_GET(param) \
  40341. WMI_GET_BITS(param, WMI_CFR_CAPTURE_COUNT_BIT_POS, WMI_CFR_CAPTURE_COUNT_NUM_BITS)
  40342. #define WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_SET(param, value) \
  40343. WMI_SET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_NUM_BITS, value)
  40344. #define WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_GET(param) \
  40345. WMI_GET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_NUM_BITS)
  40346. typedef struct {
  40347. /** TLV tag and len; tag equals
  40348. * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_filter_cmd_fixed_param */
  40349. A_UINT32 tlv_header;
  40350. /** pdev_id for identifying the MAC
  40351. * See macros starting with WMI_PDEV_ID_ for values.
  40352. * In non-DBDC case host should set it to 0
  40353. */
  40354. A_UINT32 pdev_id;
  40355. /* filter_type:
  40356. * Indicates the type of filter to be enabled
  40357. * Bit 0: Filter Directed FTM ACK frames for CFR capture
  40358. * Bit 1: Filter All FTM ACK frames for CFR capture
  40359. * Bit 2: Filter NDPA NDP Directed Frames for CFR capture
  40360. * Bit 3: Filter NDPA NDP All Frames for CFR capture
  40361. * Bit 4: Filter Frames based on TA/RA/Subtype as provided
  40362. * in CFR Group config
  40363. * Bit 5: Filter in All packets for CFR Capture
  40364. * Bit 6: Filter in TA/RA frames as FP if this bit is set else as MO
  40365. * Bits 31:7 Reserved for future use
  40366. */
  40367. A_UINT32 filter_type;
  40368. /* capture_interval:
  40369. * Capture interval field which is time in between consecutive
  40370. * CFR capture, in microsecond units
  40371. * Bits 23:0 Capture interval
  40372. * Bits 31:24 Reserved for future use
  40373. */
  40374. A_UINT32 capture_interval;
  40375. /* capture_duration:
  40376. * Capture Duration field for which CFR capture has to happen,
  40377. * in microsecond units
  40378. * Bits 23:0 Capture Duration
  40379. * Bits 31:24 Reserved for future use
  40380. */
  40381. A_UINT32 capture_duration;
  40382. /* Bitfields set indicates which of the CFR group config is enabled
  40383. * Bits 15:0 Filter Group enable Bits
  40384. * Bits 31:16 Reserved for future use
  40385. * If Bit 0 is set, then CFR filter group 0 alone is enabled and so on
  40386. */
  40387. A_UINT32 filter_group_bitmap;
  40388. /* ul_mu_user_mask_lower:
  40389. * Bitfields indicates which of the users in the current UL MU
  40390. * transmission are enabled for CFR capture.
  40391. * Bits 31 to 0 indicates user indexes for 32 users in a UL MU transmission.
  40392. * If bit 0 is set, then the CFR capture will happen for user index 0
  40393. * in the current UL MU Transmission.
  40394. * If bits 0,2 are set, then CFR capture for UL MU TX corresponds to
  40395. * user indices 0 and 2.
  40396. */
  40397. A_UINT32 ul_mu_user_mask_lower;
  40398. /* ul_mu_user_mask_upper:
  40399. * This is continuation of the above lower mask.
  40400. * Bits 4:0 Bitfields indicates user indices from 33 to 37 users.
  40401. * Bits 31:5 Reserved for future use
  40402. * If bit 0 is set, then CFR capture is enabled for user index 33
  40403. * in a UL MU transmission.
  40404. */
  40405. A_UINT32 ul_mu_user_mask_upper;
  40406. /* freeze_tlv_delay_cnt
  40407. * Indicates the number of consecutive Rx packets to be skipped
  40408. * before CFR capture is enabled again.
  40409. * Bits 8:0 Freeze Delay Count value
  40410. * Bits 31:9 Reserved for future use
  40411. */
  40412. A_UINT32 freeze_tlv_delay_cnt;
  40413. /* capture_count:
  40414. * Indicates the number of consecutive packets for which CFR capture
  40415. * is to be enabled.
  40416. * Interpretation of capture_interval_mode_select (bit 16):
  40417. * Value 0: capture_interval + capture_duration fields are used
  40418. * to capture CFR for capture_duration after every
  40419. * capture_interval.
  40420. * Value 1: capture_interval + capture_count fields are used to
  40421. * capture CFR for capture_count+1 number of packets
  40422. * after every capture interval
  40423. * Bit 15:0 : capture_count
  40424. * Refer to WMI_CFR_CAPTURE_COUNT_GET/SET macros.
  40425. * Bit 16 : capture_interval_mode_select
  40426. * Refer to WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_GET/SET macros.
  40427. * Bits 31:17 : Reserved
  40428. */
  40429. A_UINT32 capture_count;
  40430. /*
  40431. * A variable-length TLV array of wmi_cfr_filter_group_config will
  40432. * follow this fixed_param TLV
  40433. * wmi_cfr_filter_group_config filter_group_config[];
  40434. */
  40435. } wmi_cfr_capture_filter_cmd_fixed_param;
  40436. enum wmi_oem_data_evt_cause {
  40437. WMI_OEM_DATA_EVT_CAUSE_UNSPECIFIED = 0,
  40438. WMI_OEM_DATA_EVT_CAUSE_CMD_REQ = 1,
  40439. WMI_OEM_DATA_EVT_CAUSE_ASYNC = 2,
  40440. WMI_OEM_DATA_EVT_CAUSE_QMS = 3, /* DEPRECATED */
  40441. WMI_OEM_DATA_EVT_CAUSE_SMEM_MAILBOX = 3,
  40442. };
  40443. typedef struct {
  40444. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_data_event_fixed_param */
  40445. A_UINT32 data_len; /** length in byte of data[]. */
  40446. /* Event Cause reason from enum wmi_oem_data_evt_cause */
  40447. A_UINT32 event_cause;
  40448. /* Following this structure is the TLV:
  40449. * A_UINT8 data[]; <-- length in byte given by field data_len.
  40450. * This data array contains OEM data, the payload begins with a field to tell the HOST regarding the kind of the OEM data.
  40451. * A_UINT8 file_name[]; <-- Name of the file to which HOST needs to write this OEM specific data.
  40452. */
  40453. } wmi_oem_data_event_fixed_param;
  40454. #define WMI_VLAN_TX_BIT_POS 0
  40455. #define WMI_VLAN_RX_BIT_POS 1
  40456. #define WMI_TX_INSERT_OR_STRIP_BIT_POS 2
  40457. #define WMI_TX_STRIP_INSERT_VLAN_INNER_BIT_POS 3
  40458. #define WMI_TX_STRIP_INSERT_VLAN_OUTER_BIT_POS 4
  40459. #define WMI_RX_STRIP_VLAN_C_TAG_BIT_POS 5
  40460. #define WMI_RX_STRIP_VLAN_S_TAG_BIT_POS 6
  40461. #define WMI_RX_INSERT_VLAN_C_TAG_BIT_POS 7
  40462. #define WMI_RX_INSERT_VLAN_S_TAG_BIT_POS 8
  40463. #define WMI_TX_INSERT_VLAN_INNER_TCI_NUM_BITS 16
  40464. #define WMI_TX_INSERT_VLAN_INNER_TCI_BIT_POS 0
  40465. #define WMI_TX_INSERT_VLAN_OUTER_TCI_NUM_BITS 16
  40466. #define WMI_TX_INSERT_VLAN_OUTER_TCI_BIT_POS 16
  40467. #define WMI_VLAN_TX_SET(param, value) \
  40468. WMI_SET_BITS(param, WMI_VLAN_TX_BIT_POS, 1, value)
  40469. #define WMI_VLAN_TX_GET(param) \
  40470. WMI_GET_BITS(param, WMI_VLAN_TX_BIT_POS, 1)
  40471. #define WMI_VLAN_RX_SET(param, value) \
  40472. WMI_SET_BITS(param, WMI_VLAN_RX_BIT_POS, 1, value)
  40473. #define WMI_VLAN_RX_GET(param) \
  40474. WMI_GET_BITS(param, WMI_VLAN_RX_BIT_POS, 1)
  40475. #define WMI_TX_INSERT_OR_STRIP_SET(param, value) \
  40476. WMI_SET_BITS(param, WMI_TX_INSERT_OR_STRIP_BIT_POS, 1, value)
  40477. #define WMI_TX_INSERT_OR_STRIP_GET(param) \
  40478. WMI_GET_BITS(param, WMI_TX_INSERT_OR_STRIP_BIT_POS, 1)
  40479. #define WMI_TX_STRIP_INSERT_VLAN_INNER_SET(param, value) \
  40480. WMI_SET_BITS(param, WMI_TX_STRIP_INSERT_VLAN_INNER_BIT_POS, 1, value)
  40481. #define WMI_TX_STRIP_INSERT_VLAN_INNER_GET(param) \
  40482. WMI_GET_BITS(param, WMI_TX_STRIP_INSERT_VLAN_INNER_BIT_POS, 1)
  40483. #define WMI_TX_STRIP_INSERT_VLAN_OUTER_SET(param, value) \
  40484. WMI_SET_BITS(param, WMI_TX_STRIP_INSERT_VLAN_OUTER_BIT_POS, 1, value)
  40485. #define WMI_TX_STRIP_INSERT_VLAN_OUTER_GET(param) \
  40486. WMI_GET_BITS(param, WMI_TX_STRIP_INSERT_VLAN_OUTER_BIT_POS, 1)
  40487. #define WMI_RX_STRIP_VLAN_C_TAG_SET(param, value) \
  40488. WMI_SET_BITS(param, WMI_RX_STRIP_VLAN_C_TAG_BIT_POS, 1, value)
  40489. #define WMI_RX_STRIP_VLAN_C_TAG_GET(param) \
  40490. WMI_GET_BITS(param, WMI_RX_STRIP_VLAN_C_TAG_BIT_POS, 1)
  40491. #define WMI_RX_STRIP_VLAN_S_TAG_SET(param, value) \
  40492. WMI_SET_BITS(param, WMI_RX_STRIP_VLAN_S_TAG_BIT_POS, 1, value)
  40493. #define WMI_RX_STRIP_VLAN_S_TAG_GET(param) \
  40494. WMI_GET_BITS(param, WMI_RX_STRIP_VLAN_S_TAG_BIT_POS, 1)
  40495. #define WMI_RX_INSERT_VLAN_C_TAG_SET(param, value) \
  40496. WMI_SET_BITS(param, WMI_RX_INSERT_VLAN_C_TAG_BIT_POS, 1, value)
  40497. #define WMI_RX_INSERT_VLAN_C_TAG_GET(param) \
  40498. WMI_GET_BITS(param, WMI_RX_INSERT_VLAN_C_TAG_BIT_POS, 1)
  40499. #define WMI_RX_INSERT_VLAN_S_TAG_SET(param, value) \
  40500. WMI_SET_BITS(param, WMI_RX_INSERT_VLAN_S_TAG_BIT_POS, 1, value)
  40501. #define WMI_RX_INSERT_VLAN_S_TAG_GET(param) \
  40502. WMI_GET_BITS(param, WMI_RX_INSERT_VLAN_S_TAG_BIT_POS, 1)
  40503. #define WMI_TX_INSERT_VLAN_INNER_TCI_SET(param, value) \
  40504. WMI_SET_BITS(param, WMI_TX_INSERT_VLAN_INNER_TCI_BIT_POS, WMI_TX_INSERT_VLAN_INNER_TCI_NUM_BITS, value)
  40505. #define WMI_TX_INSERT_VLAN_INNER_TCI_GET(param) \
  40506. WMI_GET_BITS(param, WMI_TX_INSERT_VLAN_INNER_TCI_BIT_POS, WMI_TX_INSERT_VLAN_INNER_TCI_NUM_BITS)
  40507. #define WMI_TX_INSERT_VLAN_OUTER_TCI_SET(param, value) \
  40508. WMI_SET_BITS(param, WMI_TX_INSERT_VLAN_OUTER_TCI_BIT_POS, WMI_TX_INSERT_VLAN_OUTER_TCI_NUM_BITS, value)
  40509. #define WMI_TX_INSERT_VLAN_OUTER_TCI_GET(param) \
  40510. WMI_GET_BITS(param, WMI_TX_INSERT_VLAN_OUTER_TCI_BIT_POS, WMI_TX_INSERT_VLAN_OUTER_TCI_NUM_BITS)
  40511. typedef struct {
  40512. /** TLV tag and len; tag equals
  40513. * WMITLV_TAG_STRUC_wmi_peer_config_vlan_cmd_fixed_param */
  40514. A_UINT32 tlv_header;
  40515. /** peer MAC address */
  40516. wmi_mac_addr peer_macaddr;
  40517. /* peer_vlan_config_mask:
  40518. * Field indicates VLAN settings that need to set in RX and TX peer
  40519. * Bit 0: Indicates if the settings are present for TX peer
  40520. * [1 - present for TX peer]
  40521. * Bit 1: Indicates if the settings are present for RX peer
  40522. * [1 - present for RX peer]
  40523. * Bit 2: Setting the insert_or_strip bit in TX peer
  40524. * [0 - Strip, 1 - Insert]
  40525. * Bit 3: Setting the strip_insert_vlan_inner bit in TX peer
  40526. * [0 - Strip, 1 - Insert]
  40527. * Bit 4: Setting the strip_insert_vlan_outer bit in TX peer
  40528. * [0 - Strip, 1 - Insert]
  40529. * Bit 5: Setting the strip_vlan_c_tag_decap bit in RX peer [1 - Strip]
  40530. * Bit 6: Setting the strip_vlan_s_tag_decap bit in RX peer [1 - Strip]
  40531. * Bit 7: Setting the rx_insert_vlan_c_tag_padding bit in RX peer
  40532. * [1 - Insert]
  40533. * Bit 8: Setting the rx_insert_vlan_s_tag_padding bit in RX peer
  40534. * [1 - Insert]
  40535. */
  40536. A_UINT32 peer_vlan_config_mask;
  40537. /* insert_vlan_tci:
  40538. * Field indicates the word that needs to be inserted in the
  40539. * inner or outer tag, if insertion is enabled by the
  40540. * TX peer strip_insert_vlan_{inner,outer} fields along with
  40541. * insert_or_strip field
  40542. * Bits 0:15 insert_vlan_inner_tci
  40543. * Bits 16:31 insert_vlan_outer_tci
  40544. */
  40545. A_UINT32 insert_vlan_tci;
  40546. /* VDEV identifier */
  40547. A_UINT32 vdev_id;
  40548. } wmi_peer_config_vlan_cmd_fixed_param;
  40549. typedef struct {
  40550. /** TLV tag and len; tag equals
  40551. * WMITLV_TAG_STRUC_wmi_peer_config_ppe_ds_cmd_fixed_param */
  40552. A_UINT32 tlv_header;
  40553. wmi_mac_addr peer_macaddr;
  40554. A_UINT32 ppe_routing_enable; /* enum WMI_PPE_ROUTING_TYPE */
  40555. /* The processing stages in PPE that this packet buffer need to go through
  40556. * and on to which PPE queues these buffers should be mapped to.
  40557. * Refer pkg/ppe/src/ppe_sc.h for service code types
  40558. */
  40559. A_UINT32 service_code;
  40560. A_UINT32 priority_valid;
  40561. /* Unique number that represents a VAP's vdev_id in PPE domain */
  40562. A_UINT32 src_info;
  40563. /* VDEV identifier */
  40564. A_UINT32 vdev_id;
  40565. } wmi_peer_config_ppe_ds_cmd_fixed_param;
  40566. typedef enum {
  40567. WMI_PPE_ROUTING_DISABLED = 0,
  40568. WMI_AST_USE_PPE_ENABLED = 1,
  40569. WMI_AST_USE_PPE_DISABLED = 2,
  40570. WMI_PPE_ROUTING_TYPE_MAX,
  40571. } WMI_PPE_ROUTING_TYPE;
  40572. typedef struct {
  40573. /** TLV tag and len; tag equals
  40574. * WMITLV_TAG_STRUC_wmi_pdev_multiple_vdev_restart_resp_event_fixed_param */
  40575. A_UINT32 tlv_header;
  40576. A_UINT32 pdev_id; /* ID of the pdev this response belongs to */
  40577. A_UINT32 requestor_id;
  40578. /** Return status. As per WMI_VDEV_START_RESPONSE_XXXXX */
  40579. A_UINT32 status;
  40580. /* The TLVs follows this structure:
  40581. * A_UINT32 vdev_ids_bitmap[]; <--- Array of VDEV id bitmap.
  40582. */
  40583. } wmi_pdev_multiple_vdev_restart_resp_event_fixed_param;
  40584. /** WMI event for Firmware to report soundbar audio frame statistics to Host **/
  40585. typedef struct {
  40586. /** TLV tag and len **/
  40587. A_UINT32 tlv_header;
  40588. A_UINT32 vdev_id; /* ID of the vdev this response belongs to */
  40589. /** identify which request this responds to **/
  40590. A_UINT32 response_id;
  40591. /* audio frame statistics part -
  40592. * Use subsequent TLV arrays to list group_stats and peer_stats.
  40593. */
  40594. /*
  40595. * The TLVs listing group_stats, will follow this TLV.
  40596. * The number of group_stats can be calculated by dividing the
  40597. * TLV array length by the TLV array element length.
  40598. *
  40599. * The fixed_param TLV is directly followed by a list of
  40600. * wmi_audio_aggr_group_stats elements:
  40601. * wmi_audio_aggr_group_stats group_stats[0];
  40602. * wmi_audio_aggr_group_stats group_stats[1];
  40603. * ...
  40604. * wmi_audio_aggr_group_stats group_stats[N];
  40605. *
  40606. * After the list of wmi_audio_aggr_group_stats is a list of peer_stats.
  40607. * wmi_audio_aggr_peer_stats peer_stats[0];
  40608. * wmi_audio_aggr_peer_stats peer_stats[1];
  40609. * ...
  40610. * wmi_audio_aggr_peer_stats peer_stats[N];
  40611. *
  40612. */
  40613. } wmi_audio_aggr_statistics_event_fixed_param;
  40614. typedef struct {
  40615. /** TLV tag and len **/
  40616. A_UINT32 tlv_header;
  40617. /* Group mac_address */
  40618. wmi_mac_addr group_addr;
  40619. /* Group identity */
  40620. A_UINT32 group_id;
  40621. /* Multicast MSDU Data Packets received from Host for this Group */
  40622. A_UINT32 mcast_tx;
  40623. /*
  40624. * Multicast MSDU Data Packets sent to OTA.
  40625. * Customer defined SW Retry Packets not included, as these
  40626. * SW Retry packets generated in FW locally, but not from Host.
  40627. */
  40628. A_UINT32 mcast_tx_ok;
  40629. /*
  40630. * Multicast MSDU Data Packets sent to OTA.
  40631. * Only include Customer defined SW Retry Packets.
  40632. */
  40633. A_UINT32 mcast_tx_ok_retry;
  40634. /*
  40635. * Multicast MSDU Data Packets not sent to OTA,
  40636. * discarded by tbd function due to timeout.
  40637. * Customer defined SW Retry Packets not included.
  40638. */
  40639. A_UINT32 mcast_tx_tbd_lost;
  40640. /*
  40641. * Multicast MSDU Data Packets not sent to OTA,
  40642. * discarded by tbd function due to timeout.
  40643. * Only include Customer defined SW Retry Packets.
  40644. */
  40645. A_UINT32 mcast_tx_tbd_lost_retry;
  40646. } wmi_audio_aggr_group_stats;
  40647. typedef struct {
  40648. /** TLV tag and len **/
  40649. A_UINT32 tlv_header;
  40650. /* STA mac_address */
  40651. wmi_mac_addr peer_addr;
  40652. /* Unicast MSDU Data Packets received from peer STA */
  40653. A_UINT32 ucast_rx;
  40654. /* Unicast MSDU Data Packets received from Host for Peer STA */
  40655. A_UINT32 ucast_tx;
  40656. /*
  40657. * Unicast MSDU Data Packets received from Host,
  40658. * and SW retry times for these packets.
  40659. */
  40660. A_UINT32 ucast_tx_retry;
  40661. /*
  40662. * Unicast MSDU Data Packets received from Host,
  40663. * and sent to Peer STA successfully.
  40664. */
  40665. A_UINT32 ucast_tx_ok;
  40666. /*
  40667. * Unicast MSDU Data Packets received from Host,
  40668. * but sent to Peer STA fail. not OTA, or no ACK from Peer.
  40669. */
  40670. A_UINT32 ucast_tx_lost;
  40671. /*
  40672. * Periodic NULL Data frames for multicast tx rate auto control.
  40673. * Generated by FW locally, and sent to Peer STA successfully.
  40674. */
  40675. A_UINT32 null_frame_tx;
  40676. /*
  40677. * Periodic NULL Data frames for multicast tx rate auto control.
  40678. * Generated by FW locally, but sent to Peer STA fail.
  40679. */
  40680. A_UINT32 null_frame_tx_lost;
  40681. } wmi_audio_aggr_peer_stats;
  40682. typedef struct {
  40683. /** TLV tag and len **/
  40684. A_UINT32 tlv_header;
  40685. /* ID of the vdev this response belongs to */
  40686. A_UINT32 vdev_id;
  40687. /* selected audio aggr scheduler method
  40688. * valid methods can be found in WMI_AUDIO_AGGR_SCHED_METHOD_TYPE
  40689. */
  40690. A_UINT32 sched_method;
  40691. /* rts-cts config
  40692. * valid config can be found in WMI_AUDIO_AGGR_RTS_CTS_CONFIG_TYPE
  40693. */
  40694. A_UINT32 rtscts_config;
  40695. } wmi_audio_aggr_sched_method_event_fixed_param;
  40696. typedef struct {
  40697. /** TLV tag and len; tag equals
  40698. *WMITLV_TAG_STRUC_wmi_pdev_srg_bss_color_bitmap_cmd_fixed_param */
  40699. A_UINT32 tlv_header;
  40700. /** pdev_id for identifying the MAC
  40701. * See macros starting with WMI_PDEV_ID_ for values.
  40702. * In non-DBDC case host should set it to 0
  40703. */
  40704. A_UINT32 pdev_id;
  40705. /* 64 bit bss color bitmap used by SRG based spatial reuse feature
  40706. * bitmap[0] contains lower 32 bits and bitmap[1] contains
  40707. * upper 32 bits.
  40708. */
  40709. A_UINT32 srg_bss_color_bitmap[2];
  40710. } wmi_pdev_srg_bss_color_bitmap_cmd_fixed_param;
  40711. typedef struct {
  40712. /** TLV tag and len; tag equals
  40713. *WMITLV_TAG_STRUC_wmi_pdev_srg_partial_bssid_bitmap_cmd_fixed_param */
  40714. A_UINT32 tlv_header;
  40715. /** pdev_id for identifying the MAC
  40716. * See macros starting with WMI_PDEV_ID_ for values.
  40717. * In non-DBDC case host should set it to 0
  40718. */
  40719. A_UINT32 pdev_id;
  40720. /* 64 bit partial bssid bitmap used by SRG based spatial reuse feature
  40721. * bitmap[0] contains lower 32 bits and bitmap[1] contains
  40722. * upper 32 bits.
  40723. */
  40724. A_UINT32 srg_partial_bssid_bitmap[2];
  40725. } wmi_pdev_srg_partial_bssid_bitmap_cmd_fixed_param;
  40726. typedef struct {
  40727. /** TLV tag and len; tag equals
  40728. * WMITLV_TAG_STRUC_wmi_pdev_srg_obss_color_enable_bitmap_cmd_fixed_param */
  40729. A_UINT32 tlv_header;
  40730. /** pdev_id for identifying the MAC
  40731. * See macros starting with WMI_PDEV_ID_ for values.
  40732. * In non-DBDC case host should set it to 0
  40733. */
  40734. A_UINT32 pdev_id;
  40735. /* 64 bit SRG obss color enable bitmap used by SRG based spatial reuse feature
  40736. * bitmap[0] contains lower 32 bits and bitmap[1] contains
  40737. * upper 32 bits.
  40738. */
  40739. A_UINT32 srg_obss_en_color_bitmap[2];
  40740. } wmi_pdev_srg_obss_color_enable_bitmap_cmd_fixed_param;
  40741. typedef struct {
  40742. /** TLV tag and len; tag equals
  40743. * WMITLV_TAG_STRUC_wmi_pdev_srg_obss_bssid_enable_bitmap_cmd_fixed_param */
  40744. A_UINT32 tlv_header;
  40745. /** pdev_id for identifying the MAC
  40746. * See macros starting with WMI_PDEV_ID_ for values.
  40747. * In non-DBDC case host should set it to 0
  40748. */
  40749. A_UINT32 pdev_id;
  40750. /* 64 bit obss bssid enable bitmap used by SRG based spatial reuse feature
  40751. * bitmap[0] contains lower 32 bits and bitmap[1] contains
  40752. * upper 32 bits.
  40753. */
  40754. A_UINT32 srg_obss_en_bssid_bitmap[2];
  40755. } wmi_pdev_srg_obss_bssid_enable_bitmap_cmd_fixed_param;
  40756. typedef struct {
  40757. /** TLV tag and len; tag equals
  40758. * WMITLV_TAG_STRUC_wmi_pdev_non_srg_obss_color_enable_bitmap_cmd_fixed_param */
  40759. A_UINT32 tlv_header;
  40760. /** pdev_id for identifying the MAC
  40761. * See macros starting with WMI_PDEV_ID_ for values.
  40762. * In non-DBDC case host should set it to 0
  40763. */
  40764. A_UINT32 pdev_id;
  40765. /* 64 bit Non_SRG obss color enable bitmap used by Non_SRG based spatial reuse feature
  40766. * bitmap[0] contains lower 32 bits and bitmap[1] contains
  40767. * upper 32 bits.
  40768. */
  40769. A_UINT32 non_srg_obss_en_color_bitmap[2];
  40770. } wmi_pdev_non_srg_obss_color_enable_bitmap_cmd_fixed_param;
  40771. typedef struct {
  40772. /** TLV tag and len; tag equals
  40773. * WMITLV_TAG_STRUC_wmi_pdev_non_srg_obss_bssid_enable_bitmap_cmd_fixed_param */
  40774. A_UINT32 tlv_header;
  40775. /** pdev_id for identifying the MAC
  40776. * See macros starting with WMI_PDEV_ID_ for values.
  40777. * In non-DBDC case host should set it to 0
  40778. */
  40779. A_UINT32 pdev_id;
  40780. /* 64 bit obss bssid enable bitmap used by Non_SRG based spatial reuse feature
  40781. * bitmap[0] contains lower 32 bits and bitmap[1] contains
  40782. * upper 32 bits.
  40783. */
  40784. A_UINT32 non_srg_obss_en_bssid_bitmap[2];
  40785. } wmi_pdev_non_srg_obss_bssid_enable_bitmap_cmd_fixed_param;
  40786. typedef struct {
  40787. /** TLV tag and len; tag equals
  40788. * WMITLV_TAG_STRUC_wmi_pdev_enable_duration_based_tx_mode_selection_cmd_fixed_param
  40789. */
  40790. A_UINT32 tlv_header;
  40791. /** pdev_id for identifying the MAC
  40792. * See macros starting with WMI_PDEV_ID_ for values.
  40793. * In non-DBDC case host should set it to 0
  40794. */
  40795. A_UINT32 pdev_id;
  40796. /* enable/disable Duration based Tx Mode selection */
  40797. A_UINT32 duration_based_tx_mode_selection;
  40798. } wmi_pdev_enable_duration_based_tx_mode_selection_cmd_fixed_param;
  40799. typedef enum {
  40800. /* Simulation test command types */
  40801. WMI_SIM_TEST_FRAME_CONTENT_CHANGE_CMD,
  40802. WMI_SIM_TEST_DROP_FRAME_CMD,
  40803. WMI_SIM_TEST_DELAY_FRAME_CMD,
  40804. WMI_SIM_TEST_CONFIGURATION_CMD,
  40805. WMI_SIM_TEST_CMD_UNKNOWN = 255,
  40806. } WMI_SIMULATION_TEST_CMD_TYPE;
  40807. typedef enum {
  40808. /* Simulation test sub-command types */
  40809. WMI_SIM_TEST_SUB_CMD_UNKNOWN = 255,
  40810. } WMI_SIMULATION_TEST_SUB_CMD_TYPE;
  40811. #define WMI_SIM_FRAME_TYPE_BIT_POS 0
  40812. #define WMI_SIM_FRAME_SUBTYPE_BIT_POS 8
  40813. #define WMI_SIM_FRAME_SEQ_BIT_POS 16
  40814. #define WMI_SIM_FRAME_OFFSET_BIT_POS 0
  40815. #define WMI_SIM_FRAME_LENGTH_BIT_POS 16
  40816. #define WMI_SIM_FRAME_TYPE_SET(param, value) \
  40817. WMI_SET_BITS(param, WMI_SIM_FRAME_TYPE_BIT_POS, 8, value)
  40818. #define WMI_SIM_FRAME_TYPE_GET(param) \
  40819. WMI_GET_BITS(param, WMI_SIM_FRAME_TYPE_BIT_POS, 8)
  40820. #define WMI_SIM_FRAME_SUBTYPE_SET(param, value) \
  40821. WMI_SET_BITS(param, WMI_SIM_FRAME_SUBTYPE_BIT_POS, 8, value)
  40822. #define WMI_SIM_FRAME_SUBTYPE_GET(param) \
  40823. WMI_GET_BITS(param, WMI_SIM_FRAME_SUBTYPE_BIT_POS, 8)
  40824. #define WMI_SIM_FRAME_SEQ_SET(param, value) \
  40825. WMI_SET_BITS(param, WMI_SIM_FRAME_SEQ_BIT_POS, 8, value)
  40826. #define WMI_SIM_FRAME_SEQ_GET(param) \
  40827. WMI_GET_BITS(param, WMI_SIM_FRAME_SEQ_BIT_POS, 8)
  40828. #define WMI_SIM_FRAME_OFFSET_SET(param, value) \
  40829. WMI_SET_BITS(param, WMI_SIM_FRAME_OFFSET_BIT_POS, 16, value)
  40830. #define WMI_SIM_FRAME_OFFSET_GET(param) \
  40831. WMI_GET_BITS(param, WMI_SIM_FRAME_OFFSET_BIT_POS, 16)
  40832. #define WMI_SIM_FRAME_LENGTH_SET(param, value) \
  40833. WMI_SET_BITS(param, WMI_SIM_FRAME_LENGTH_BIT_POS, 16, value)
  40834. #define WMI_SIM_FRAME_LENGTH_GET(param) \
  40835. WMI_GET_BITS(param, WMI_SIM_FRAME_LENGTH_BIT_POS, 16)
  40836. typedef struct {
  40837. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_simulation_test_cmd_fixed_param */
  40838. A_UINT32 tlv_header;
  40839. /** pdev_id for identifying the MAC.
  40840. * See macros starting with WMI_PDEV_ID_ for values.
  40841. * In non-DBDC case host should set it to 0.
  40842. */
  40843. A_UINT32 pdev_id;
  40844. /** vdev_id for identifying the vap simulation command needs to be applied.
  40845. * This is for future purpose, currently only 1 vap is supported for
  40846. * simulation test mode.
  40847. * Host will always set it to 0 for now.
  40848. */
  40849. A_UINT32 vdev_id;
  40850. /** peer MAC address for identifying the peer for which the simulation
  40851. * command needs to be applied.
  40852. * peer_macaddr needs to be set to '0' for simulation commands which
  40853. * needs to be applied at pdev or vdev level.
  40854. */
  40855. wmi_mac_addr peer_macaddr;
  40856. /** test command type, as per WMI_SIMULATION_TEST_CMD_TYPE */
  40857. A_UINT32 test_cmd_type;
  40858. /** test command type, as per WMI_SIMULATION_TEST_SUB_CMD_TYPE */
  40859. A_UINT32 test_subcmd_type;
  40860. /**
  40861. * The frame type, frame subtype, and frame sequence number
  40862. * are stored as bitfields within the below A_UINT32 "word".
  40863. * Use the WMI_SIM_xxx_GET/SET macros to read and
  40864. * write these bitfields.
  40865. **/
  40866. A_UINT32 frame_type_subtype_seq;
  40867. /**
  40868. * The frame offset and frame length,
  40869. * are stored as bitfields within the below A_UINT32 "word".
  40870. * Use the WMI_SIM_xxx_GET/SET macros to read and
  40871. * write these bitfields.
  40872. **/
  40873. A_UINT32 frame_offset_length;
  40874. /** buf_len: Buffer length in bytes
  40875. * In some cases buf_len == frame_length, but not always.
  40876. * For example, a DELAY_FRAME command will not involve any frame
  40877. * contents, so frame_length will be zero, but buf_len will be
  40878. * non-zero because it will contain command-specific parameters.
  40879. */
  40880. A_UINT32 buf_len;
  40881. /* This TLV is followed by array of bytes:
  40882. * A_UINT8 bufp[];
  40883. * For FRAME_CONTENT_CHANGE commands, bufp contains the first 64 bytes
  40884. * of the frame.
  40885. */
  40886. } wmi_simulation_test_cmd_fixed_param;
  40887. typedef struct {
  40888. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_rsnxe */
  40889. A_UINT32 tlv_header;
  40890. /* rsnxe_param
  40891. * Override RSNXE Used bit in FT reassoc request.
  40892. * Possible values from host are:
  40893. * 0 use default value based on capability
  40894. * 1 override with 1
  40895. * 2 override with 0
  40896. */
  40897. A_UINT32 rsnxe_param;
  40898. } wmi_wfa_config_rsnxe;
  40899. typedef struct {
  40900. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_csa */
  40901. A_UINT32 tlv_header;
  40902. /* ignore_csa
  40903. * Ignore CSA from AP and keep STA in current channel and don't deauth AP.
  40904. * Possible values from host are:
  40905. * 0 default behavior
  40906. * 1 ignore CSA
  40907. */
  40908. A_UINT32 ignore_csa;
  40909. } wmi_wfa_config_csa;
  40910. typedef enum {
  40911. WMI_WFA_CONFIG_OCV_FRMTYPE_SAQUERY_REQ = 0x00000001,
  40912. WMI_WFA_CONFIG_OCV_FRMTYPE_SAQUERY_RSP = 0x00000002,
  40913. WMI_WFA_CONFIG_OCV_FRMTYPE_FT_REASSOC_REQ = 0x00000004,
  40914. WMI_WFA_CONFIG_OCV_FRMTYPE_FILS_REASSOC_REQ = 0x00000008,
  40915. } WMI_WFA_CONFIG_OCV_FRMTYPE;
  40916. typedef struct {
  40917. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_ocv */
  40918. A_UINT32 tlv_header;
  40919. /* frame_types
  40920. * Override OCI channel number in specified frames.
  40921. * Possible frame types from host are enum WMI_WFA_CONFIG_OCV_FRMTYPE.
  40922. */
  40923. A_UINT32 frame_types;
  40924. /* Frequency value in mhz to override in specified frame type */
  40925. A_UINT32 chan_freq;
  40926. } wmi_wfa_config_ocv;
  40927. typedef struct {
  40928. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_saquery */
  40929. A_UINT32 tlv_header;
  40930. /* remain_connect_on_saquery_timeout
  40931. * Don't send deauth on SA Query response timeout.
  40932. * Possible values from host are:
  40933. * 0 default behavior
  40934. * 1 don't send deauth on SA Query response timeout
  40935. */
  40936. A_UINT32 remain_connect_on_saquery_timeout;
  40937. } wmi_wfa_config_saquery;
  40938. typedef struct {
  40939. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_ofdma */
  40940. A_UINT32 tlv_header;
  40941. /* force_he_trigger_to_eht_sta
  40942. * Possible values from host are:
  40943. * 0 default behavior
  40944. * 1 instead of sending EHT triggers to EHT stations, send HE triggers
  40945. */
  40946. A_UINT32 force_he_trigger_to_eht_sta;
  40947. } wmi_wfa_config_ofdma;
  40948. typedef struct {
  40949. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_cmd_fixed_param */
  40950. A_UINT32 tlv_header;
  40951. /** VDEV identifier */
  40952. A_UINT32 vdev_id;
  40953. /* The below TLV arrays follow this structure:
  40954. * wmi_wfa_config_rsnxe wfa_config_rsnxe[]; (0 or 1 elements)
  40955. * wmi_wfa_config_csa wfa_config_csa[]; (0 or 1 elements)
  40956. * wmi_wfa_config_ocv wfa_config_ocv[]; (0 or 1 elements)
  40957. * wmi_wfa_config_saquery wfa_config_saquery[]; (0 or 1 elements)
  40958. * wmi_wfa_config_ofdma wfa_config_ofdma[]; (0 or 1 elements)
  40959. */
  40960. } wmi_wfa_config_cmd_fixed_param;
  40961. #define WMI_TWT_SESSION_FLAG_FLOW_ID_GET(_var) WMI_GET_BITS(_var, 0, 16)
  40962. #define WMI_TWT_SESSION_FLAG_FLOW_ID_SET(_var, _val) WMI_SET_BITS(_var, 0, 16, _val)
  40963. #define WMI_TWT_SESSION_FLAG_BCAST_TWT_GET(_var) WMI_GET_BITS(_var, 16, 1)
  40964. #define WMI_TWT_SESSION_FLAG_BCAST_TWT_SET(_var, _val) WMI_SET_BITS(_var, 16, 1, _val)
  40965. #define WMI_TWT_SESSION_FLAG_TRIGGER_TWT_GET(_var) WMI_GET_BITS(_var, 17, 1)
  40966. #define WMI_TWT_SESSION_FLAG_TRIGGER_TWT_SET(_var, _val) WMI_SET_BITS(_var, 17, 1, _val)
  40967. #define WMI_TWT_SESSION_FLAG_ANNOUN_TWT_GET(_var) WMI_GET_BITS(_var, 18, 1)
  40968. #define WMI_TWT_SESSION_FLAG_ANNOUN_TWT_SET(_var, _val) WMI_SET_BITS(_var, 18, 1, _val)
  40969. #define WMI_TWT_SESSION_FLAG_TWT_PROTECTION_GET(_var) WMI_GET_BITS(_var, 19, 1)
  40970. #define WMI_TWT_SESSION_FLAG_TWT_PROTECTION_SET(_var, _val) WMI_SET_BITS(_var, 19, 1, _val)
  40971. #define WMI_TWT_SESSION_FLAG_TWT_INFO_FRAME_DISABLED_GET(_var) WMI_GET_BITS(_var, 20, 1)
  40972. #define WMI_TWT_SESSION_FLAG_TWT_INFO_FRAME_DISABLED_SET(_var, _val) WMI_SET_BITS(_var, 20, 1, _val)
  40973. #define WMI_TWT_SESSION_FLAG_TWT_PM_RESPONDER_MODE_VALID_GET(_var) WMI_GET_BITS(_var, 21, 1)
  40974. #define WMI_TWT_SESSION_FLAG_TWT_PM_RESPONDER_MODE_VALID_SET(_var, _val) WMI_SET_BITS(_var, 21, 1, _val)
  40975. #define WMI_TWT_SESSION_FLAG_TWT_PM_RESPONDER_MODE_GET(_var) WMI_GET_BITS(_var, 22, 1)
  40976. #define WMI_TWT_SESSION_FLAG_TWT_PM_RESPONDER_MODE_SET(_var, _val) WMI_SET_BITS(_var, 22, 1, _val)
  40977. #define WMI_TWT_SESSION_FLAG_RESTRICTED_TWT_GET(_var) WMI_GET_BITS(_var, 23, 1)
  40978. #define WMI_TWT_SESSION_FLAG_RESTRICTED_TWT_SET(_var, _val) WMI_SET_BITS(_var, 23, 1, _val)
  40979. typedef struct {
  40980. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_session_stats_info */
  40981. A_UINT32 tlv_hdr;
  40982. A_UINT32 vdev_id;
  40983. wmi_mac_addr peer_mac;
  40984. A_UINT32 event_type; /* event type - defined in enum wmi_twt_session_stats_type */
  40985. /*
  40986. * Flags to provide information on TWT session and session types.
  40987. * This field is filled with the bitwise combination of the flag values
  40988. * defined by WMI_TWT_SESSION_FLAG_xxx
  40989. */
  40990. A_UINT32 flow_id_flags;
  40991. A_UINT32 dialog_id;
  40992. A_UINT32 wake_dura_us;
  40993. A_UINT32 wake_intvl_us;
  40994. /* this long time after TWT resumed the 1st Service Period will start */
  40995. A_UINT32 sp_offset_us;
  40996. /* service period start TSF */
  40997. A_UINT32 sp_tsf_us_lo; /* bits 31:0 */
  40998. A_UINT32 sp_tsf_us_hi; /* bits 63:32 */
  40999. /* Current TSF */
  41000. A_UINT32 curr_tsf_us_lo; /* bits 31:0 */
  41001. A_UINT32 curr_tsf_us_hi; /* bits 63:32 */
  41002. } wmi_twt_session_stats_info;
  41003. enum wmi_twt_session_stats_type {
  41004. WMI_TWT_SESSION_SETUP = 1,
  41005. WMI_TWT_SESSION_TEARDOWN = 2,
  41006. WMI_TWT_SESSION_UPDATE = 3,
  41007. WMI_TWT_SESSION_QUERY_RSP = 4,
  41008. };
  41009. typedef struct {
  41010. /** TLV tag and len; tag equals
  41011. * WMITLV_TAG_STRUC_wmi_pdev_twt_session_stats_event_fixed_param */
  41012. A_UINT32 tlv_header;
  41013. A_UINT32 pdev_id; /* ID of the pdev this response belongs to */
  41014. /* The TLVs follows this structure:
  41015. * wmi_twt_session_stats_info twt_sessions[]; <--- Array of twt_session.
  41016. */
  41017. } wmi_pdev_twt_session_stats_event_fixed_param;
  41018. typedef struct wmi_pdev_vendor_event
  41019. {
  41020. /* type is WMITLV_TAG_STRUC_wmi_vendor_pdev_event_fixed_param */
  41021. A_UINT32 tlv_header;
  41022. /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. */
  41023. A_UINT32 pdev_id;
  41024. /* Any vendor specialization cases will need to add sub_type enum defs. */
  41025. A_UINT32 sub_type;
  41026. wmi_pdev_vendor_event_val evt;
  41027. /* NOTE:
  41028. * Future changes may increase the size of pdev_vendor_event.
  41029. * Consequently, no fields can be added here after pdev_vendor_event,
  41030. * because their offsets within wmi_pdev_vendor_event_fixed_param
  41031. * would change, causing backwards incompatibilities.
  41032. */
  41033. /*
  41034. * This fixed_param TLV may be followed by the below TLVs:
  41035. * - A_UINT32 opaque_vendor_var_len_data[]:
  41036. * Variable-length array of opaque data.
  41037. * The _fixed_param.sub_type value clarifies how to interpret the
  41038. * contents of this opaque data.
  41039. */
  41040. } wmi_pdev_vendor_event_fixed_param;
  41041. typedef wmi_pdev_vendor_event_fixed_param wmi_vendor_pdev_event_fixed_param;
  41042. typedef struct wmi_vdev_vendor_event
  41043. {
  41044. /* type is WMITLV_TAG_STRUC_wmi_vendor_vdev_event_fixed_param */
  41045. A_UINT32 tlv_header;
  41046. /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. */
  41047. A_UINT32 pdev_id;
  41048. /* unique id identifying the VDEV, generated by the caller */
  41049. A_UINT32 vdev_id;
  41050. /* Any vendor specialization cases will need to add sub_type enum defs. */
  41051. A_UINT32 sub_type;
  41052. wmi_vdev_vendor_event_val evt;
  41053. /* NOTE:
  41054. * Future changes may increase the size of vdev_vendor_event.
  41055. * Consequently, no fields can be added here after vdev_vendor_event,
  41056. * because their offsets within wmi_vdev_vendor_event_fixed_param
  41057. * would change, causing backwards incompatibilities.
  41058. */
  41059. /*
  41060. * This fixed_param TLV may be followed by the below TLVs:
  41061. * - A_UINT32 opaque_vendor_var_len_data[]:
  41062. * Variable-length array of opaque data.
  41063. * The _fixed_param.sub_type value clarifies how to interpret the
  41064. * contents of this opaque data.
  41065. */
  41066. } wmi_vdev_vendor_event_fixed_param;
  41067. typedef wmi_vdev_vendor_event_fixed_param wmi_vendor_vdev_event_fixed_param;
  41068. typedef struct wmi_peer_vendor_event
  41069. {
  41070. /* type is WMITLV_TAG_STRUC_wmi_vendor_peer_event_fixed_param */
  41071. A_UINT32 tlv_header;
  41072. /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. */
  41073. A_UINT32 pdev_id;
  41074. /* unique id identifying the VDEV, generated by the caller */
  41075. A_UINT32 vdev_id;
  41076. /* peer MAC address */
  41077. wmi_mac_addr peer_macaddr;
  41078. /* Any vendor specialization cases will need to add sub_type enum defs. */
  41079. A_UINT32 sub_type;
  41080. wmi_peer_vendor_event_val evt;
  41081. /* NOTE:
  41082. * Future changes may increase the size of peer_vendor_event.
  41083. * Consequently, no fields can be added here after peer_vendor_event,
  41084. * because their offsets within wmi_peer_vendor_event_fixed_param
  41085. * would change, causing backwards incompatibilities.
  41086. */
  41087. /*
  41088. * This fixed_param TLV may be followed by the below TLVs:
  41089. * - A_UINT32 opaque_vendor_var_len_data[]:
  41090. * Variable-length array of opaque data.
  41091. * The _fixed_param.sub_type value clarifies how to interpret the
  41092. * contents of this opaque data.
  41093. */
  41094. } wmi_peer_vendor_event_fixed_param;
  41095. typedef wmi_peer_vendor_event_fixed_param wmi_vendor_peer_event_fixed_param;
  41096. typedef struct wmi_pdev_vendor_cmd
  41097. {
  41098. /* type is WMITLV_TAG_STRUC_wmi_vendor_pdev_cmd_fixed_param */
  41099. A_UINT32 tlv_header;
  41100. /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. */
  41101. A_UINT32 pdev_id;
  41102. /* Any vendor specialization cases will need to add sub_type enum defs. */
  41103. A_UINT32 sub_type;
  41104. wmi_pdev_vendor_cmd_val cmd;
  41105. /* NOTE:
  41106. * Future changes may increase the size of pdev_vendor_cmd.
  41107. * Consequently, no fields can be added here after pdev_vendor_cmd,
  41108. * because their offsets within wmi_pdev_vendor_cmd_fixed_param
  41109. * would change, causing backwards incompatibilities.
  41110. */
  41111. /*
  41112. * This fixed_param TLV may be followed by the below TLVs:
  41113. * - A_UINT32 opaque_vendor_var_len_data[]:
  41114. * Variable-length array of opaque data.
  41115. * The _fixed_param.sub_type value clarifies how to interpret the
  41116. * contents of this opaque data.
  41117. */
  41118. } wmi_pdev_vendor_cmd_fixed_param;
  41119. typedef wmi_pdev_vendor_cmd_fixed_param wmi_vendor_pdev_cmd_fixed_param;
  41120. typedef struct wmi_vdev_vendor_cmd
  41121. {
  41122. /* type is WMITLV_TAG_STRUC_wmi_vendor_vdev_cmd_fixed_param */
  41123. A_UINT32 tlv_header;
  41124. /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. */
  41125. A_UINT32 pdev_id;
  41126. /* unique id identifying the VDEV, generated by the caller */
  41127. A_UINT32 vdev_id;
  41128. /* Any vendor specialization cases will need to add sub_type enum defs. */
  41129. A_UINT32 sub_type;
  41130. wmi_vdev_vendor_cmd_val cmd;
  41131. /* NOTE:
  41132. * Future changes may increase the size of vdev_vendor_cmd.
  41133. * Consequently, no fields can be added here after vdev_vendor_cmd,
  41134. * because their offsets within wmi_vdev_vendor_cmd_fixed_param
  41135. * would change, causing backwards incompatibilities.
  41136. */
  41137. /*
  41138. * This fixed_param TLV may be followed by the below TLVs:
  41139. * - A_UINT32 opaque_vendor_var_len_data[]:
  41140. * Variable-length array of opaque data.
  41141. * The _fixed_param.sub_type value clarifies how to interpret the
  41142. * contents of this opaque data.
  41143. */
  41144. } wmi_vdev_vendor_cmd_fixed_param;
  41145. typedef wmi_vdev_vendor_cmd_fixed_param wmi_vendor_vdev_cmd_fixed_param;
  41146. typedef struct wmi_peer_vendor_cmd
  41147. {
  41148. /* type is WMITLV_TAG_STRUC_wmi_vendor_peer_cmd_fixed_param */
  41149. A_UINT32 tlv_header;
  41150. /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. */
  41151. A_UINT32 pdev_id;
  41152. /* unique id identifying the VDEV, generated by the caller */
  41153. A_UINT32 vdev_id;
  41154. /* peer MAC address */
  41155. wmi_mac_addr peer_macaddr;
  41156. /* Any vendor specialization cases will need to add sub_type enum defs. */
  41157. A_UINT32 sub_type;
  41158. wmi_peer_vendor_cmd_val cmd;
  41159. /* NOTE:
  41160. * Future changes may increase the size of peer_vendor_cmd.
  41161. * Consequently, no fields can be added here after peer_vendor_cmd,
  41162. * because their offsets within wmi_peer_vendor_cmd_fixed_param
  41163. * would change, causing backwards incompatibilities.
  41164. */
  41165. /*
  41166. * This fixed_param TLV may be followed by the below TLVs:
  41167. * - A_UINT32 opaque_vendor_var_len_data[]:
  41168. * Variable-length array of opaque data.
  41169. * The _fixed_param.sub_type value clarifies how to interpret the
  41170. * contents of this opaque data.
  41171. */
  41172. } wmi_peer_vendor_cmd_fixed_param;
  41173. typedef wmi_peer_vendor_cmd_fixed_param wmi_vendor_peer_cmd_fixed_param;
  41174. typedef enum {
  41175. WMI_MLO_LINK_FORCE_ACTIVE = 1, /* Force specific links active */
  41176. WMI_MLO_LINK_FORCE_INACTIVE = 2, /* Force specific links inactive */
  41177. WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM = 3, /* Force active a number of links, firmware to decide which links to inactive */
  41178. WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM = 4, /* Force inactive a number of links, firmware to decide which links to inactive */
  41179. WMI_MLO_LINK_NO_FORCE = 5, /* Cancel the force operation of specific links, allow firmware to decide */
  41180. WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE = 6, /* combination of force specific links active & force specific links inactive */
  41181. WMI_MLO_LINK_NON_FORCE_UPDATE = 7, /* Used when host wants to update other fields like disallow_mlo_mode_bmap */
  41182. } WMI_MLO_LINK_FORCE_MODE;
  41183. typedef enum {
  41184. WMI_MLO_LINK_FORCE_REASON_NEW_CONNECT = 1, /* Set force specific links because of new connection */
  41185. WMI_MLO_LINK_FORCE_REASON_NEW_DISCONNECT = 2, /* Set force specific links because of new dis-connection */
  41186. WMI_MLO_LINK_FORCE_REASON_LINK_REMOVAL = 3, /* Set force specific links because of AP-side link removal */
  41187. WMI_MLO_LINK_FORCE_REASON_TDLS = 4, /* Set force specific links because of 11BE MLO TDLS setup/teardown */
  41188. WMI_MLO_LINK_FORCE_REASON_REVERT_FAILURE = 5, /* Set force specific links for revert previous failed due to host reject */
  41189. } WMI_MLO_LINK_FORCE_REASON;
  41190. #define WMI_MLO_CONTROL_FLAGS_GET_OVERWRITE_FORCE_ACTIVE(mlo_flags) \
  41191. WMI_GET_BITS(control_flags, 0, 1)
  41192. #define WMI_MLO_CONTROL_FLAGS_SET_OVERWRITE_FORCE_ACTIVE(mlo_flags, value) \
  41193. WMI_SET_BITS(control_flags, 0, 1, value)
  41194. #define WMI_MLO_CONTROL_FLAGS_GET_OVERWRITE_FORCE_INACTIVE(mlo_flags) \
  41195. WMI_GET_BITS(control_flags, 1, 1)
  41196. #define WMI_MLO_CONTROL_FLAGS_SET_OVERWRITE_FORCE_INACTIVE(mlo_flags, value) \
  41197. WMI_SET_BITS(control_flags, 1, 1, value)
  41198. #define WMI_MLO_CONTROL_FLAGS_GET_DYNAMIC_FORCE_LINK_NUM(mlo_flags) \
  41199. WMI_GET_BITS(control_flags, 2, 1)
  41200. #define WMI_MLO_CONTROL_FLAGS_SET_DYNAMIC_FORCE_LINK_NUM(mlo_flags, value) \
  41201. WMI_SET_BITS(control_flags, 2, 1, value)
  41202. /*
  41203. * This structure is used for passing wmi_mlo_control_flags.
  41204. *
  41205. * - When force_mode is WMI_MLO_LINK_FORCE_ACTIVE or
  41206. * WMI_MLO_LINK_FORCE_INACTIVE host can pass below control flags,
  41207. * to indicate if FW need to clear earlier force bitmap config.
  41208. *
  41209. * - When force mode is WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
  41210. * WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM, host can pass below control flags,
  41211. * to indicate if FW need to use force link number instead of force link
  41212. * bitmap.
  41213. */
  41214. typedef struct {
  41215. union {
  41216. struct {
  41217. A_UINT32 overwrite_force_active_bitmap:1, /* indicate overwrite all earlier force_active bitmaps */
  41218. overwrite_force_inactive_bitmap:1, /* indicate overwrite all earlier force_inactive bitmaps */
  41219. dynamic_force_link_num:1, /* indicate fw to use force link number instead of force link bitmap */
  41220. unused: 29;
  41221. };
  41222. A_UINT32 control_flags;
  41223. };
  41224. } wmi_mlo_control_flags;
  41225. typedef struct wmi_mlo_link_set_active_cmd
  41226. {
  41227. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_set_active_cmd_fixed_param; */
  41228. A_UINT32 tlv_header;
  41229. /** enum WMI_MLO_LINK_FORCE_MODE */
  41230. A_UINT32 force_mode;
  41231. /** reason of force link active / inactive, enum WMI_MLO_LINK_FORCE_REASON */
  41232. A_UINT32 reason;
  41233. /* indicate use vdev_id bitmap or link_id_bitmap */
  41234. A_UINT32 use_ieee_link_id_bitmap;
  41235. wmi_mac_addr ap_mld_mac_addr;
  41236. wmi_mlo_control_flags ctrl_flags;
  41237. /* The TLVs follows this structure:
  41238. * wmi_mlo_set_active_link_number_param link_number_param[];
  41239. * Link number parameters, optional TLV.
  41240. * Present when force type is WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
  41241. * WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM.
  41242. * In other cases the length of array should be 0.
  41243. *---
  41244. * If use_ieee_link_id_bitmap equals 0 vdev_id_bitmap[] & vdev_id_bitmap2[]
  41245. * are valid.
  41246. * A_UINT32 vdev_id_bitmap[];
  41247. * Optional TLV, present when force type is WMI_MLO_LINK_FORCE_ACTIVE
  41248. * or WMI_MLO_LINK_FORCE_INACTIVE or WMI_MLO_LINK_NO_FORCE,
  41249. * to specific the vdevs to configure.
  41250. * For force mode WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE vdev_id_bitmap[]
  41251. * carry the active vdev bitmap.
  41252. * In other cases the length of the array should be 0.
  41253. * A_UINT32 vdev_id_bitmap2[];
  41254. * For force mode WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE vdev_id_bitmap2[]
  41255. * carry the inactive vdev bitmap.
  41256. * In other cases the length of the array should be 0.
  41257. *---
  41258. * If use_ieee_link_id_bitmap equals 1 ieee_link_id_bitmap[] &
  41259. * ieee_link_id_bitmap2[] are valid.
  41260. * A_UINT32 ieee_link_id_bitmap[];
  41261. * present for WMI_MLO_LINK_FORCE_ACTIVE
  41262. * or WMI_MLO_LINK_FORCE_INACTIVE or WMI_MLO_LINK_NO_FORCE
  41263. * or WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
  41264. * WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM
  41265. * A_UINT32 ieee_link_id_bitmap2[];
  41266. * For force mode WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE ieee_link_id_bitmap2[]
  41267. * carry the inactive linkid bitmap.
  41268. * In other cases the length of the array should be 0.
  41269. *---
  41270. * wmi_disallowed_mlo_mode_bitmap_param_t disallow_mlo_mode_bmap[];
  41271. */
  41272. } wmi_mlo_link_set_active_cmd_fixed_param;
  41273. typedef struct wmi_mlo_set_active_link_number_param
  41274. {
  41275. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_set_active_link_number_param */
  41276. A_UINT32 tlv_header;
  41277. /** number of link to be config */
  41278. A_UINT32 num_of_link;
  41279. /** VDEV type, see values for vdev_type (WMI_VDEV_TYPE_AP,WMI_VDEV_TYPE_STA,
  41280. * WMI_VDEV_TYPE_IBSS, WMI_VDEV_TYPE_MONITOR,WMI_VDEV_TYPE_NAN,WMI_VDEV_TYPE_NDI ...)
  41281. */
  41282. A_UINT32 vdev_type;
  41283. /** VDEV subtype, see values for vdev_subtype (WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE,
  41284. * WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT, WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO ...)*/
  41285. A_UINT32 vdev_subtype;
  41286. /** home channel frequency in MHz of the vdev*/
  41287. A_UINT32 home_freq;
  41288. } wmi_mlo_set_active_link_number_param;
  41289. #define WMI_MLO_MODE_MLMR 0x1
  41290. #define WMI_MLO_MODE_EMLSR 0x2
  41291. #define WMI_MLO_IEEE_LINK_ID_INVALID 0xFF
  41292. #define WMI_MLO_IEEE_LINK_ID_COMB_GET_LINK_ID1(ieee_link_id_comb) WMI_GET_BITS(ieee_link_id_comb, 0, 8)
  41293. #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)
  41294. #define WMI_MLO_IEEE_LINK_ID_COMB_GET_LINK_ID2(ieee_link_id_comb) WMI_GET_BITS(ieee_link_id_comb, 8, 8)
  41295. #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)
  41296. #define WMI_MLO_IEEE_LINK_ID_COMB_GET_LINK_ID3(ieee_link_id_comb) WMI_GET_BITS(ieee_link_id_comb, 16, 8)
  41297. #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)
  41298. #define WMI_MLO_IEEE_LINK_ID_COMB_GET_LINK_ID4(ieee_link_id_comb) WMI_GET_BITS(ieee_link_id_comb, 24, 8)
  41299. #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)
  41300. typedef struct wmi_disallowed_mlo_mode_bitmap_param
  41301. {
  41302. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_disallowed_mlo_mode_bitmap_param */
  41303. A_UINT32 tlv_header;
  41304. /** disallowed_mode_bitmap:
  41305. * Bitmap of MLO Modes like MLMR, eMLSR which are not allowed.
  41306. * Refer to WMI_MLO_MODE_*
  41307. * disallowed_mode_bitmap Meaning
  41308. * ====================== =================
  41309. * 0x0 No restriction
  41310. * 0x1 MLMR is not allowed
  41311. * 0x2 EMLSR is not allowed
  41312. * 0x3 MLMR and EMLSR are not allowed
  41313. */
  41314. A_UINT32 disallowed_mode_bitmap;
  41315. /** ieee_link_id_comb:
  41316. * Give combination of IEEE link IDs for which above disallowed_mode_bitmap
  41317. * is applicable.
  41318. * Each 8-bits in ieee_link_id_comb represents one link ID.
  41319. * A link ID is an integer value between 0 and 14.
  41320. * Please set WMI_MLO_IEEE_LINK_ID_INVALID (0xff) if 8-bits is not used.
  41321. * Use WMI_MLO_IEEE_LINK_ID_COMB_GET_LINK_ID* and _SET_LINK_ID* to get/set
  41322. * link IDs in this field.
  41323. */
  41324. A_UINT32 ieee_link_id_comb;
  41325. /** Example:
  41326. * Say there are 3 MLO links with ieee link IDs as 1,2 and 10.
  41327. * Say host wants to disallow MLMR between links with IDs 1 and 2,
  41328. * disallow eMLSR between links with IDs 1 and 10,
  41329. * disallow MLMR and eMLSR for links with IDs 2 and 10.
  41330. * There will be 3 TLVs of type wmi_disallowed_mlo_mode_bitmap_param
  41331. * like below.
  41332. *
  41333. * wmi_disallowed_mlo_mode_bitmap_param[0]:
  41334. * disallowed_mode_bitmap = 0x1,
  41335. * ieee_link_id_comb = 0xFFFF0201
  41336. * WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID1(ieee_link_id_comb, 0x01)
  41337. * WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID2(ieee_link_id_comb, 0x02)
  41338. *
  41339. * wmi_disallowed_mlo_mode_bitmap_param[1]
  41340. * disallowed_mode_bitmap = 0x2,
  41341. * ieee_link_id_comb = 0xFFFF0A01
  41342. * WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID1(ieee_link_id_comb, 0x01)
  41343. * WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID2(ieee_link_id_comb, 0x0a)
  41344. *
  41345. * wmi_disallowed_mlo_mode_bitmap_param[2]
  41346. * disallowed_mode_bitmap = 0x3,
  41347. * ieee_link_id_comb = 0xFFFF0A02
  41348. * WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID1(ieee_link_id_comb, 0x02)
  41349. * WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID2(ieee_link_id_comb, 0x0a)
  41350. */
  41351. } wmi_disallowed_mlo_mode_bitmap_param;
  41352. typedef enum {
  41353. WMI_MLO_LINK_SET_ACTIVE_STATUS_SUCCESS = 0,
  41354. WMI_MLO_LINK_SET_ACTIVE_STATUS_HOST_REJECT = 1,
  41355. } WMI_MLO_LINK_SET_ACTIVE_STATUS;
  41356. typedef struct wmi_mlo_link_set_active_resp_event
  41357. {
  41358. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_set_active_resp_event_fixed_param; */
  41359. A_UINT32 tlv_header;
  41360. /** Return status. 0 for success, non-zero otherwise */
  41361. A_UINT32 status;
  41362. /* indicate use vdev_id bitmap or link_id_bitmap */
  41363. A_UINT32 use_ieee_link_id_bitmap;
  41364. wmi_mac_addr ap_mld_mac_addr;
  41365. /* The TLVs follows this structure:
  41366. *---
  41367. * If use_ieee_link_id_bitmap equals 0, vdev_bitmap[] are valid.
  41368. * A_UINT32 force_active_vdev_bitmap[]; <-- current force active vdev.
  41369. * A_UINT32 force_inactive_vdev_bitmap[]; <-- current force inactive vdevs
  41370. *---
  41371. * If use_ieee_link_id_bitmap equals 1, ieee_link_id_bitmap[] are valid.
  41372. * A_UINT32 force_active_ieee_link_id_bitmap[];
  41373. * A_UINT32 force_inactive_ieee_link_id_bitmap[];
  41374. *---
  41375. * current active ieee link id bitmap & inactive ieee link id bitmap
  41376. * A_UINT32 current_active_ieee_link_id_bitmap[];
  41377. * A_UINT32 current_inactive_ieee_link_id_bitmap[];
  41378. */
  41379. } wmi_mlo_link_set_active_resp_event_fixed_param;
  41380. typedef struct {
  41381. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_setup_cmd_fixed_param; */
  41382. A_UINT32 tlv_header;
  41383. /** Unique ID representing the hw_links part of the MLD */
  41384. A_UINT32 mld_group_id;
  41385. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  41386. A_UINT32 pdev_id;
  41387. /*
  41388. * Followed by TLVs:
  41389. * A_UINT32 hw_link_ids[];
  41390. */
  41391. } wmi_mlo_setup_cmd_fixed_param;
  41392. typedef struct {
  41393. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_setup_complete_event_fixed_param; */
  41394. A_UINT32 tlv_header;
  41395. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  41396. A_UINT32 pdev_id;
  41397. /** Return status. 0 for success, non-zero otherwise */
  41398. A_UINT32 status;
  41399. /** max_ml_peer_ids:
  41400. * Max number of ml_peerids across the SOC, Derived as
  41401. * max_mlo_peer * num chips.
  41402. * (Max_mlo_peer and num_chips are provided by Host Platform
  41403. * in QMI exchange).
  41404. */
  41405. A_UINT32 max_ml_peer_ids;
  41406. } wmi_mlo_setup_complete_event_fixed_param;
  41407. typedef struct {
  41408. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_ready_cmd_fixed_param; */
  41409. A_UINT32 tlv_header;
  41410. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  41411. A_UINT32 pdev_id;
  41412. } wmi_mlo_ready_cmd_fixed_param;
  41413. typedef enum wmi_mlo_tear_down_reason_code_type {
  41414. WMI_MLO_TEARDOWN_REASON_SSR,
  41415. /* keep old name as alias for new name */
  41416. WMI_MLO_TEARDOWN_SSR_REASON = WMI_MLO_TEARDOWN_REASON_SSR,
  41417. WMI_MLO_TEARDOWN_REASON_HOST_INITIATED,
  41418. /* keep old name as alias for new name */
  41419. WMI_MLO_TEARDOWN_HOST_INITIATED_REASON =
  41420. WMI_MLO_TEARDOWN_REASON_HOST_INITIATED,
  41421. WMI_MLO_TEARDOWN_REASON_STANDBY_DOWN,
  41422. WMI_MLO_TEARDOWN_REASON_DYNAMIC_WSI_REMAP,
  41423. } WMI_MLO_TEARDOWN_REASON_TYPE;
  41424. typedef struct {
  41425. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_teardown_fixed_param; */
  41426. A_UINT32 tlv_header;
  41427. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  41428. A_UINT32 pdev_id;
  41429. /** reason_code: of type WMI_TEARDOWN_REASON_TYPE */
  41430. A_UINT32 reason_code;
  41431. /* trigger_umac_reset : of type A_BOOL to indicate the umac reset for the partner chip. */
  41432. A_UINT32 trigger_umac_reset;
  41433. /* erp_standby_mode : of type A_BOOL to indicate the chip is going to be active in ERP */
  41434. A_UINT32 erp_standby_mode;
  41435. } wmi_mlo_teardown_fixed_param;
  41436. typedef struct {
  41437. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_teardown_complete_fixed_param; */
  41438. A_UINT32 tlv_header;
  41439. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  41440. A_UINT32 pdev_id;
  41441. /** Return status. 0 for success, non-zero otherwise */
  41442. A_UINT32 status;
  41443. } wmi_mlo_teardown_complete_fixed_param;
  41444. typedef struct {
  41445. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_peer_recommended_links; */
  41446. A_UINT32 tlv_header;
  41447. /** AID (association id) of this station */
  41448. A_UINT32 assoc_id;
  41449. /** Request link id set to disable */
  41450. A_UINT32 linkid_bitmap;
  41451. } wmi_mlo_peer_recommended_links;
  41452. typedef struct {
  41453. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_recommendation_fixed_param */
  41454. A_UINT32 tlv_header;
  41455. /* unique id identifying the VDEV, generated by the caller */
  41456. A_UINT32 vdev_id;
  41457. /* DTIM specified in units of num beacon intervals */
  41458. A_UINT32 dtim_period;
  41459. /* The TLVs follows this structure:
  41460. * wmi_mlo_peer_recommended_links recommended_links[];
  41461. */
  41462. } wmi_mlo_link_recommendation_fixed_param;
  41463. #define WMI_TID_TO_LINK_MAP_TID_NUM_GET(_var) WMI_GET_BITS(_var, 0, 5)
  41464. #define WMI_TID_TO_LINK_MAP_TID_NUM_SET(_var, _val) WMI_SET_BITS(_var, 0, 5, _val)
  41465. #define WMI_TID_TO_LINK_MAP_DIR_GET(_var) WMI_GET_BITS(_var, 5, 2)
  41466. #define WMI_TID_TO_LINK_MAP_DIR_SET(_var, _val) WMI_SET_BITS(_var, 5, 2, _val)
  41467. #define WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_GET(_var) WMI_GET_BITS(_var, 7, 1)
  41468. #define WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_SET(_var, _val) WMI_SET_BITS(_var, 7, 1, _val)
  41469. #define WMI_TID_TO_LINK_MAP_LINK_MASK_GET(_var) WMI_GET_BITS(_var, 8, 16)
  41470. #define WMI_TID_TO_LINK_MAP_LINK_MASK_SET(_var, _val) WMI_SET_BITS(_var, 8, 16, _val)
  41471. enum {
  41472. WMI_TID_TO_LINK_MAP_DIR_DL,
  41473. WMI_TID_TO_LINK_MAP_DIR_UL,
  41474. WMI_TID_TO_LINK_MAP_DIR_BIDI,
  41475. };
  41476. typedef struct {
  41477. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tid_to_link_map */
  41478. A_UINT32 tlv_header;
  41479. /**
  41480. * A_UINT32
  41481. * WMI_TID_TO_LINK_MAP_TID_NUM_GET / WMI_TID_TO_LINK_MAP_TID_NUM_SET
  41482. * tid_num:5,
  41483. *
  41484. * WMI_TID_TO_LINK_MAP_DIR_GET / WMI_TID_TO_LINK_MAP_DIR_SET
  41485. * dir:2, // 0 - DL, 1 - UL, 2 - BiDi
  41486. *
  41487. * WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_GET /
  41488. * WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_SET
  41489. * default_link_mapping:1, // If this is set to 1, ignore
  41490. * // link_mapping_mask for the specific tid
  41491. *
  41492. * WMI_TID_TO_LINK_MAP_LINK_MASK_GET / WMI_TID_TO_LINK_MAP_LINK_MASK_SET
  41493. * link_mapping_mask:16,
  41494. *
  41495. * rsvd:8;
  41496. */
  41497. A_UINT32 tid_to_link_map_info;
  41498. } wmi_tid_to_link_map;
  41499. #define WMI_MAX_NUM_PREFERRED_LINKS 4
  41500. /* NOTE:
  41501. * wmi_peer_preferred_link_map will be deprecated and replaced
  41502. * by wmi_mlo_peer_link_control_param.
  41503. */
  41504. typedef struct {
  41505. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_preferred_link_map */
  41506. A_UINT32 tlv_header;
  41507. /* num_preferred_links:
  41508. * If it is 0, all links are equally preferred and which link to be used
  41509. * in each schedule is decided by FW.
  41510. */
  41511. A_UINT32 num_preferred_links;
  41512. /* [0] - highest preferred link, [1] - 2nd preferred link, etc. */
  41513. A_UINT32 preferred_link_order[WMI_MAX_NUM_PREFERRED_LINKS];
  41514. /* expected_max_latency_ms:
  41515. * 0 - Expected Max Latency to be estimated in Firmware
  41516. * Non 0 - Firmware should try to achieve given max latency
  41517. * in first preferred link.
  41518. * If unable to meet in first preferred link, start scheduling
  41519. * in next preferred link and so on.
  41520. */
  41521. A_UINT32 expected_max_latency_ms[WLAN_MAX_AC];
  41522. } wmi_peer_preferred_link_map;
  41523. #define WMI_MLO_PEER_LINK_CONTROL_PARAM_SET_TX_LINK_TUPLE_CONFIG(comp, value) \
  41524. WMI_SET_BITS(comp, 0, 1, value)
  41525. #define WMI_MLO_PEER_LINK_CONTROL_PARAM_GET_TX_LINK_TUPLE_CONFIG(comp) \
  41526. WMI_GET_BITS(comp, 0, 1)
  41527. #define WMI_MLO_PEER_LINK_CONTROL_PARAM_SET_PREFERRED_LINK_CONFIG(comp, value) \
  41528. WMI_SET_BITS(comp, 1, 1, value)
  41529. #define WMI_MLO_PEER_LINK_CONTROL_PARAM_GET_PREFERRED_LINK_CONFIG(comp) \
  41530. WMI_GET_BITS(comp, 1, 1)
  41531. #define WMI_MAX_NUM_MLO_LINKS 5
  41532. typedef struct {
  41533. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_preferred_link_map */
  41534. A_UINT32 tlv_header;
  41535. /** flags:
  41536. * Bit0 : tx_link_tuple enable/disable.
  41537. * When enabled, f/w picks the links in tx_link_tuple_bitmap
  41538. * for TX scheduling.
  41539. * Bit1 : preferred_link enable/disable.
  41540. * When enabled, f/w schedules the data on preferred link first.
  41541. * If it fails to deliver within a timeout, it additionally
  41542. * starts attempting TX on non-preferred links.
  41543. * Bit2-31 : reserved
  41544. */
  41545. A_UINT32 flags;
  41546. /* num_links: number of links present in link_priority_order array below.
  41547. * 0 - we dont have sorted list of link priority
  41548. * non zero - this should be the max number of links that the peer supports.
  41549. */
  41550. A_UINT32 num_links;
  41551. /* link_priority_order:
  41552. * [0] - ID of highest priority link,
  41553. * [1] - ID of 2nd highest priority link, etc.
  41554. */
  41555. A_UINT32 link_priority_order[WMI_MAX_NUM_MLO_LINKS];
  41556. /* tx_link_tuple_bitmap:
  41557. * bitmap of indices within link_priority_order array that needs to be
  41558. * selected in the TX link tuple.
  41559. * FW will not attempt scheduling on a link if it is not part of the
  41560. * tx_link_tuple.
  41561. */
  41562. A_UINT32 tx_link_tuple_bitmap;
  41563. /* max_timeout_ms: applicable only when preferred_link is enabled
  41564. * 0 - max_timeout_ms to be estimated in Firmware
  41565. * Non 0 - value beyond which, firmware should additionally start
  41566. * scheduling on non preferred links
  41567. */
  41568. A_UINT32 max_timeout_ms[WLAN_MAX_AC];
  41569. } wmi_mlo_peer_link_control_param;
  41570. typedef struct {
  41571. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_to_link_map_fixed_param */
  41572. A_UINT32 tlv_header;
  41573. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  41574. A_UINT32 pdev_id;
  41575. /** MLO Peer's current link MAC address */
  41576. wmi_mac_addr link_macaddr;
  41577. /** mapping_switch_time from the T2LM IE */
  41578. A_UINT32 mapping_switch_time;
  41579. /** expected_duration from the T2LM IE, in units of TUs */
  41580. A_UINT32 expected_duration;
  41581. /**
  41582. * Following this structure is the TLV:
  41583. * - struct wmi_tid_to_link_map tid_to_link_map[];
  41584. * - struct wmi_peer_preferred_link_map peer_preferred_link_map[];
  41585. * Note - TLV array of peer_preferred_link_map has either 0 or 1
  41586. * entries, not multiple entries.
  41587. * - struct wmi_mlo_peer_link_control_param[];
  41588. * Note: can have 0 or 1 entry.
  41589. */
  41590. } wmi_peer_tid_to_link_map_fixed_param;
  41591. typedef struct{
  41592. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_ap_vdev_tid_to_link_map_cmd_fixed_param */
  41593. A_UINT32 tlv_header;
  41594. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  41595. A_UINT32 pdev_id;
  41596. /** vdev_id for identifying the MLO Vap */
  41597. A_UINT32 vdev_id;
  41598. /** DEPRECATED: disabled link bits */
  41599. A_UINT32 disabled_link_bitmap; /* DEPRECATED */
  41600. /**
  41601. * Following this structure is the TLV:
  41602. * struct wmi_mlo_ap_vdev_tid_to_link_map_ie_info[];
  41603. */
  41604. } wmi_mlo_ap_vdev_tid_to_link_map_cmd_fixed_param;
  41605. typedef enum {
  41606. /* Mapping Switch TSF */
  41607. WMI_MAP_SWITCH_TIMER_TSF,
  41608. /* Mapping Switch Timer Expired */
  41609. WMI_MAP_SWITCH_TIMER_EXPIRED,
  41610. /* Expected Duration Expired */
  41611. WMI_EXPECTED_DUR_EXPIRED,
  41612. } WMI_MLO_TID_TO_LINK_MAP_STATUS;
  41613. #define WMI_BCAST_T2LM_MAX 16 /* max number of vdevs covered by T2LM stats */
  41614. typedef struct {
  41615. /* TLV tag and len; tag equals
  41616. * WMITLV_TAG_STRUC_wmi_ctrl_path_t2lm_stats_struct
  41617. */
  41618. A_UINT32 tlv_header;
  41619. /*
  41620. * The below arrays store per-vdev counters, and are indexed by vdev ID.
  41621. * The number of valid elements is min(WMI_BCAST_T2LM_MAX, num vdevs).
  41622. */
  41623. A_UINT32 bcast_t2lm_wmi_cmd[WMI_BCAST_T2LM_MAX];
  41624. A_UINT32 bcast_t2lm_wmi_evt_map_swt_tme_tsf[WMI_BCAST_T2LM_MAX];
  41625. A_UINT32 bcast_t2lm_wmi_evt_map_swt_tme_exp[WMI_BCAST_T2LM_MAX];
  41626. A_UINT32 bcast_t2lm_wmi_evt_exp_dur_exp[WMI_BCAST_T2LM_MAX];
  41627. } wmi_ctrl_path_t2lm_stats_struct;
  41628. typedef struct{
  41629. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_ap_vdev_tid_to_link_map_evt_fixed_param */
  41630. A_UINT32 tlv_header;
  41631. /* vdev_id of AP MLO vap */
  41632. A_UINT32 vdev_id;
  41633. /* containts mapping status of WMI_MLO_TID_TO_LINK_MAP_STATUS */
  41634. A_UINT32 status_type;
  41635. /* Mapping switch time of current TSF value */
  41636. A_UINT32 mapping_switch_tsf;
  41637. } wmi_mlo_ap_vdev_tid_to_link_map_evt_fixed_param;
  41638. /* CTRL Field bit-5-7 reserved */
  41639. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DIR_GET(_var) WMI_GET_BITS(_var, 0, 2)
  41640. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DIR_SET(_var, _val) WMI_SET_BITS(_var, 0, 2, _val)
  41641. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DEF_LINK_GET(_var) WMI_GET_BITS(_var, 2, 1)
  41642. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DEF_LINK_SET(_var, _val) WMI_SET_BITS(_var, 2, 1, _val)
  41643. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_SWT_TIME_GET(_var) WMI_GET_BITS(_var, 3, 1)
  41644. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_SWT_TIME_SET(_var, _val) WMI_SET_BITS(_var, 3, 1, _val)
  41645. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DUR_TIME_GET(_var) WMI_GET_BITS(_var, 4, 1)
  41646. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DUR_TIME_SET(_var, _val) WMI_SET_BITS(_var, 4, 1, _val)
  41647. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_SIZE_GET(_var) WMI_GET_BITS(_var, 5, 1)
  41648. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_SIZE_SET(_var, _val) WMI_SET_BITS(_var, 5, 1, _val)
  41649. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_PRE_GET(_var) WMI_GET_BITS(_var, 8, 8)
  41650. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_PRE_SET(_var, _val) WMI_SET_BITS(_var, 8, 8, _val)
  41651. /* IEEE Link ID 15 bits on each link id 1 bit is reserved */
  41652. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_0_GET(_var) WMI_GET_BITS(_var, 0, 15)
  41653. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_0_SET(_var, _val) WMI_SET_BITS(_var, 0, 15, _val)
  41654. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_1_GET(_var) WMI_GET_BITS(_var, 16, 15)
  41655. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_1_SET(_var, _val) WMI_SET_BITS(_var, 16, 15, _val)
  41656. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_2_GET(_var) WMI_GET_BITS(_var, 0, 15)
  41657. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_2_SET(_var, _val) WMI_SET_BITS(_var, 0, 15, _val)
  41658. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_3_GET(_var) WMI_GET_BITS(_var, 16, 15)
  41659. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_3_SET(_var, _val) WMI_SET_BITS(_var, 16, 15, _val)
  41660. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_4_GET(_var) WMI_GET_BITS(_var, 0, 15)
  41661. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_4_SET(_var, _val) WMI_SET_BITS(_var, 0, 15, _val)
  41662. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_5_GET(_var) WMI_GET_BITS(_var, 16, 15)
  41663. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_5_SET(_var, _val) WMI_SET_BITS(_var, 16, 15, _val)
  41664. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_6_GET(_var) WMI_GET_BITS(_var, 0, 15)
  41665. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_6_SET(_var, _val) WMI_SET_BITS(_var, 0, 15, _val)
  41666. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_7_GET(_var) WMI_GET_BITS(_var, 16, 15)
  41667. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_7_SET(_var, _val) WMI_SET_BITS(_var, 16, 15, _val)
  41668. /* HW Link ID each hw link with 16-bit */
  41669. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_0_GET(_var) WMI_GET_BITS(_var, 0, 16)
  41670. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_0_SET(_var, _val) WMI_SET_BITS(_var, 0, 16, _val)
  41671. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_1_GET(_var) WMI_GET_BITS(_var, 16, 16)
  41672. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_1_SET(_var, _val) WMI_SET_BITS(_var, 16, 16, _val)
  41673. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_2_GET(_var) WMI_GET_BITS(_var, 0, 16)
  41674. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_2_SET(_var, _val) WMI_SET_BITS(_var, 0, 16, _val)
  41675. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_3_GET(_var) WMI_GET_BITS(_var, 16, 16)
  41676. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_3_SET(_var, _val) WMI_SET_BITS(_var, 16, 16, _val)
  41677. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_4_GET(_var) WMI_GET_BITS(_var, 0, 16)
  41678. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_4_SET(_var, _val) WMI_SET_BITS(_var, 0, 16, _val)
  41679. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_5_GET(_var) WMI_GET_BITS(_var, 16, 16)
  41680. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_5_SET(_var, _val) WMI_SET_BITS(_var, 16, 16, _val)
  41681. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_6_GET(_var) WMI_GET_BITS(_var, 0, 16)
  41682. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_6_SET(_var, _val) WMI_SET_BITS(_var, 0, 16, _val)
  41683. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_7_GET(_var) WMI_GET_BITS(_var, 16, 16)
  41684. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_7_SET(_var, _val) WMI_SET_BITS(_var, 16, 16, _val)
  41685. typedef struct {
  41686. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tid_to_link_map */
  41687. A_UINT32 tlv_header;
  41688. /*
  41689. * A_UINT32
  41690. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DIR_GET /
  41691. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DIR_SET
  41692. * direction: 2 // 0 - DL, 1 - UL, 2 - BiDi
  41693. *
  41694. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DEF_LINK_GET /
  41695. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DEF_LINK_SET
  41696. * default_link_mapping:1 // 1 - Default Link Mapping Present
  41697. * // 0 - Default Link Mapping not present
  41698. *
  41699. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_SWT_TIME_GET /
  41700. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_SWT_TIME_SET
  41701. * mapping_switch_time_present:1 // 1 - Mapping Switch Time
  41702. * // Field Present
  41703. * // 0 - Mapping Switch Time
  41704. * // Field not Present
  41705. *
  41706. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DUR_TIME_GET /
  41707. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DUR_TIME_SET
  41708. * expected_duration_present:1 // 1 - Expected Duration Field Present
  41709. * // 0 - Expected Duration Field
  41710. * // not Present
  41711. *
  41712. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_SIZE_GET
  41713. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_SIZE_SET
  41714. * link_mapping_size:1 // 1 - Link Mapping Size 1 Octets
  41715. * // 0 - Link Mapping Size 2 Octets
  41716. *
  41717. * reserved:2
  41718. *
  41719. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_PRE_GET /
  41720. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_PRE_SET
  41721. * link_mapping_presence_indicator:8 // Link mapping presence indicator
  41722. *
  41723. * reserved2:16 // upper 16 bits are unused
  41724. */
  41725. A_UINT32 tid_to_link_map_ctrl;
  41726. /*
  41727. * Mapping Switch time represents TSF time for the New TID_TO_LINK Mapping
  41728. * will be established
  41729. * 16 bit of TSF time ( from bits 10 to 25)
  41730. *
  41731. * Default to Non-Default: One TID_TO_LINK Mapping IE
  41732. * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
  41733. * Mapping switch time present for New Non-Default Mapping
  41734. *
  41735. * Non-Default to Non-Default: Two TID_TO_LINK Mapping IE
  41736. * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
  41737. * Mapping switch time not present for 1st TID_TO_LINK Mapping
  41738. * (Current Non-Default Mapping) value would be zero
  41739. * Mapping switch time present for 2nd TID_TO_LINK Mapping
  41740. * (New Non-Default Mapping)
  41741. *
  41742. * Non_Default to Default: One TID_TO_LINK Mapping IE
  41743. * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
  41744. * Mapping switch time not present value would be zero
  41745. */
  41746. A_UINT32 map_switch_time;
  41747. /*
  41748. * Expected duration would be either duration/remaining duration of Mapping
  41749. *
  41750. * Default to Non-Default: One TID_TO_LINK Mapping IE
  41751. * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
  41752. * Expected duration represents duration of New Non-Default Mapping
  41753. * will be effective
  41754. *
  41755. * Non-Default to Non-Default: Two TID_TO_LINK Mapping IE
  41756. * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
  41757. * Expected duration represents remaing duration of 1st TID_TO_LINK
  41758. * Mapping (Current Non-Default Mapping)
  41759. * Expected duration represents duration of the 2nd TID_TO_LINK
  41760. * Mapping (New Non-Default Mapping ) will be effective
  41761. *
  41762. * Non_Default to Default: One TID_TO_LINK Mapping IE
  41763. * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
  41764. * Expected duration represents remaing duration of Current Non-Default
  41765. * Mapping
  41766. */
  41767. A_UINT32 expected_duration;
  41768. /*
  41769. * for default_link_mapping ieee_tid_0_1_link_map value would be zero
  41770. * which means IE should not include this param
  41771. * A_UINT32
  41772. *
  41773. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_0_GET /
  41774. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_0_SET
  41775. * tid_0_link_id:15 // TID_0 Link IDs (0 to 14)
  41776. * // Non-Zero value represents links mapped
  41777. * // to this TID.
  41778. * // Zero value represents links are not mapped
  41779. * // to this TID.
  41780. *
  41781. * reserved:1
  41782. *
  41783. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_1_GET /
  41784. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_1_SET
  41785. * tid_1_link_id:15 // TID_1 Link IDs (0 to 14)
  41786. * // Non-Zero value represents links mapped
  41787. * // to this TID.
  41788. * // Zero value represents links are not mapped
  41789. * // to this TID.
  41790. *
  41791. * reserved:1
  41792. */
  41793. A_UINT32 ieee_tid_0_1_link_map;
  41794. /*
  41795. * for default_link_mapping ieee_tid_2_3_link_map value would be zero
  41796. * which means IE should not include this param
  41797. * A_UINT32
  41798. *
  41799. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_2_GET /
  41800. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_2_SET
  41801. * tid_2_link_id:15 // TID_2 Link IDs (0 to 14)
  41802. * // Non-Zero value represents links mapped
  41803. * // to this TID.
  41804. * // Zero value represents links are not mapped
  41805. * // to this TID.
  41806. *
  41807. * reserved:1
  41808. *
  41809. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_3_GET /
  41810. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_3_SET
  41811. * tid_3_link_id:15 // TID_3 Link IDs (0 to 14)
  41812. * // Non-Zero value represents links mapped
  41813. * // to this TID.
  41814. * // Zero value represents links are not mapped
  41815. * // to this TID.
  41816. *
  41817. * reserved:1
  41818. */
  41819. A_UINT32 ieee_tid_2_3_link_map;
  41820. /*
  41821. * for default_link_mapping ieee_tid_4_5_link_map value would be zero
  41822. * which means IE should not include this param
  41823. * A_UINT32
  41824. *
  41825. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_4_GET /
  41826. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_4_SET
  41827. * tid_4_link_id:15 // TID_4 Link IDs (0 to 14)
  41828. * // Non-Zero value represents links mapped
  41829. * // to this TID.
  41830. * // Zero value represents links are not mapped
  41831. * // to this TID.
  41832. *
  41833. * reserved:1
  41834. *
  41835. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_5_GET /
  41836. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_5_SET
  41837. * tid_5_link_id:15 // TID_5 Link IDs (0 to 14)
  41838. * // Non-Zero value represents links mapped
  41839. * // to this TID.
  41840. * // Zero value represents links are not mapped
  41841. * // to this TID.
  41842. *
  41843. * reserved:1
  41844. */
  41845. A_UINT32 ieee_tid_4_5_link_map;
  41846. /*
  41847. * for default_link_mapping ieee_tid_6_7_link_map value would be zero
  41848. * which means IE should not include this param
  41849. * A_UINT32
  41850. *
  41851. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_6_GET /
  41852. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_6_SET
  41853. * tid_6_link_id:15 // TID_6 Link IDs (0 to 14)
  41854. * // Non-Zero value represents links mapped
  41855. * // to this TID.
  41856. * // Zero value represents links are not mapped
  41857. * // to this TID.
  41858. *
  41859. * reserved:1
  41860. *
  41861. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_7_GET /
  41862. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_7_SET
  41863. * tid_7_link_id:15 // TID_7 Link IDs (0 to 14)
  41864. * // Non-Zero value represents links mapped
  41865. * // to this TID.
  41866. * // Zero value represents links are not mapped
  41867. * // to this TID.
  41868. *
  41869. * reserved:1
  41870. */
  41871. A_UINT32 ieee_tid_6_7_link_map;
  41872. /*
  41873. * hw_link_map will be used by the FW to pause or unpause the TIDs
  41874. * in all the associated MLD STAs in the corresponsing MLD VAP
  41875. * A_UINT32
  41876. *
  41877. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_0_GET /
  41878. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_0_SET
  41879. * hw_tid_0_link_map:16
  41880. *
  41881. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_1_GET /
  41882. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_1_SET
  41883. * hw_tid_1_link_map:16
  41884. */
  41885. A_UINT32 hw_tid_0_1_link_map;
  41886. /*
  41887. * hw_link_map will be used by the FW to pause or unpause the TIDs
  41888. * in all the associated MLD STAs in the corresponsing MLD VAP
  41889. * A_UINT32
  41890. *
  41891. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_2_GET /
  41892. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_2_SET
  41893. * hw_tid_2_link_map:16
  41894. *
  41895. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_3_GET /
  41896. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_3_SET
  41897. * hw_tid_3_link_map:16
  41898. */
  41899. A_UINT32 hw_tid_2_3_link_map;
  41900. /*
  41901. * hw_link_map will be used by the FW to pause or unpause the TIDs
  41902. * in all the associated MLD STAs in the corresponsing MLD VAP
  41903. * A_UINT32
  41904. *
  41905. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_4_GET /
  41906. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_4_SET
  41907. * hw_tid_4_link_map:16
  41908. *
  41909. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_5_GET /
  41910. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_5_SET
  41911. * hw_tid_5_link_map:16
  41912. */
  41913. A_UINT32 hw_tid_4_5_link_map;
  41914. /*
  41915. * hw_link_map will be used by the FW to pause or unpause the TIDs
  41916. * in all the associated MLD STAs in the corresponsing MLD VAP
  41917. * A_UINT32
  41918. *
  41919. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_6_GET /
  41920. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_6_SET
  41921. * hw_tid_6_link_map:16
  41922. *
  41923. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_7_GET /
  41924. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_7_SET
  41925. * hw_tid_7_link_map:16
  41926. */
  41927. A_UINT32 hw_tid_6_7_link_map;
  41928. /* Indicates the disabled link map for 802.11be T2LM */
  41929. A_UINT32 disabled_link_bitmap;
  41930. } wmi_mlo_ap_vdev_tid_to_link_map_ie_info;
  41931. #define WMI_NUM_TID_PER_AC 2
  41932. typedef struct {
  41933. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_removal_evt_fixed_param */
  41934. A_UINT32 tlv_header;
  41935. wmi_mac_addr mld_mac;
  41936. /* hwlink_priority:
  41937. * Based on capacity, hw chip is ordered here.
  41938. * hwlink_priority[0] holds the HW chip ID which is the top priority,
  41939. * hwlink_priority[1] holds the HW chip ID which is the 2nd priority,
  41940. * etc.
  41941. */
  41942. A_UINT32 hwlink_priority[WMI_MAX_NUM_MLO_LINKS];
  41943. /* link_bmap:
  41944. * Bitmap segments for the primary TIDs (0/1/4/6)
  41945. * are provided in link_bmap[0].
  41946. * Bitmap segments for the secondary TIDs (3/2/5/7)
  41947. * are provided in link_bmap[1].
  41948. * link_bmap[0]:
  41949. * bits 4:0 are used to indicate which links are used for TID 0
  41950. * bits 9:5 are used to indicate which links are used for TID 1
  41951. * bits 14:10 are used to indicate which links are used for TID 4
  41952. * bits 19:15 are used to indicate which links are used for TID 6
  41953. * bits 31:20 are unused
  41954. * link_bmap[0]:
  41955. * bits 4:0 are used to indicate which links are used for TID 3
  41956. * bits 9:5 are used to indicate which links are used for TID 2
  41957. * bits 14:10 are used to indicate which links are used for TID 5
  41958. * bits 19:15 are used to indicate which links are used for TID 7
  41959. * bits 31:20 are unused
  41960. */
  41961. A_UINT32 link_bmap[WMI_NUM_TID_PER_AC];
  41962. } wmi_mlo_tlt_selection_for_tid_spray_event_fixed_param;
  41963. #define WMI_IGMP_OFFLOAD_SUPPORT_DISABLE_BITMASK 0x0
  41964. #define WMI_IGMP_V1_OFFLOAD_SUPPORT_BITMASK 0x1
  41965. #define WMI_IGMP_V2_OFFLOAD_SUPPORT_BITMASK 0x2
  41966. #define WMI_IGMP_V3_OFFLOAD_SUPPORT_BITMASK 0x4
  41967. #define WMI_IGMP_OFFLOAD_SUPPORT_ALL_VERSION 0x7
  41968. typedef struct {
  41969. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_igmp_offload_fixed_param */
  41970. A_UINT32 vdev_id; /** VDEV identifier */
  41971. A_UINT32 enable; /** IGMP offload support enable/disable */
  41972. A_UINT32 version_support_bitmask; /** IGMP version support v1, v2 and/or v3*/
  41973. /* Following this structure are the TLVs:
  41974. * WMI_IPV4_ADDR grp_ip_address[num_mcast_ipv4_addr];
  41975. */
  41976. } wmi_igmp_offload_fixed_param;
  41977. /* flags for ICMP Offload IP4,IP6 */
  41978. #define WMI_ICMP_OFFLOAD_IPV4_ENABLED_BIT 0
  41979. #define WMI_ICMP_OFFLOAD_IPV6_ENABLED_BIT 1
  41980. /* set IPv4 enabled/disabled flag and get the flag */
  41981. #define WMI_SET_ICMP_OFFLOAD_IPV4_ENABLED_BIT(valid_bitmask) \
  41982. WMI_SET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV4_ENABLED_BIT, 1, 1)
  41983. #define WMI_SET_ICMP_OFFLOAD_IPV4_DISABLED_BIT(valid_bitmask) \
  41984. WMI_SET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV4_ENABLED_BIT, 1, 0)
  41985. #define WMI_GET_ICMP_OFFLOAD_IPV4_ENABLED(valid_bitmask) \
  41986. WMI_GET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV4_ENABLED_BIT, 1)
  41987. /* set IPv6 enabled flag, disabled and get the flag */
  41988. #define WMI_SET_ICMP_OFFLOAD_IPV6_ENABLED_BIT(valid_bitmask) \
  41989. WMI_SET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV6_ENABLED_BIT, 1, 1)
  41990. #define WMI_SET_ICMP_OFFLOAD_IPV6_DISABLED_BIT(valid_bitmask) \
  41991. WMI_SET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV6_ENABLED_BIT, 1, 0)
  41992. #define WMI_GET_ICMP_OFFLOAD_IPV6_ENABLED(valid_bitmask) \
  41993. WMI_GET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV6_ENABLED_BIT, 1)
  41994. typedef struct {
  41995. /** TLV tag and len; tag equals
  41996. * WMITLV_TAG_STRUC_wmi_vdev_icmp_offload_cmd_fixed_param
  41997. */
  41998. A_UINT32 tlv_header;
  41999. A_UINT32 vdev_id;
  42000. A_UINT32 enable;
  42001. /* bitmask for valid ipv4/ipv6 address */
  42002. A_UINT32 valid_bitmask;
  42003. WMI_IPV4_ADDR ipv4_addr;
  42004. /* Following this structure are the TLVs:
  42005. * WMI_IPV6_ADDR ipv6_addr[num_ipv6_addr];
  42006. */
  42007. } wmi_icmp_offload_fixed_param;
  42008. typedef struct {
  42009. /** TLV tag and len; tag equals
  42010. * WMITLV_TAG_STRUC_wmi_vdev_smart_monitor_event_fixed_param */
  42011. A_UINT32 tlv_header;
  42012. /* VDEV identifier */
  42013. A_UINT32 vdev_id;
  42014. /** Average RSSI value of Data Frames */
  42015. A_INT32 avg_rssi_data_dbm;
  42016. /** rx_vht_sgi:
  42017. * Short guard interval state of Data frames obtaining from rx PPDU TLV
  42018. * of VHTSIGA buf.
  42019. * 0: Default (No sgi set)
  42020. * 1: sgi set
  42021. */
  42022. A_UINT32 rx_vht_sgi;
  42023. } wmi_vdev_smart_monitor_event_fixed_param;
  42024. typedef struct {
  42025. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_multiple_vdev_set_param_cmd_fixed_param */
  42026. A_UINT32 pdev_id;
  42027. /** parameter id */
  42028. A_UINT32 param_id;
  42029. /** parameter value */
  42030. A_UINT32 param_value;
  42031. /* The TLVs follows this structure:
  42032. * A_UINT32 vdev_ids[]; <--- Array of VDEV ids.
  42033. */
  42034. } wmi_pdev_multiple_vdev_set_param_cmd_fixed_param;
  42035. typedef struct {
  42036. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_param_info */
  42037. /** ID of the parameter being set */
  42038. A_UINT32 param_id;
  42039. /** value of the parameter being set */
  42040. A_UINT32 param_value;
  42041. } wmi_set_param_info;
  42042. typedef struct {
  42043. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_multiple_pdev_vdev_param_cmd_fixed_param */
  42044. /** Command is for vdev or pdev: 0 = pdev, 1 = vdev */
  42045. A_UINT32 is_vdev;
  42046. /** unique dev_id identifying the VDEV/PDEV */
  42047. A_UINT32 dev_id;
  42048. /*
  42049. * Following this structure is the TLV:
  42050. * wmi_set_param_info param_info[];
  42051. */
  42052. } wmi_set_multiple_pdev_vdev_param_cmd_fixed_param;
  42053. typedef enum {
  42054. WMI_MU_SNIF_DISABLE,
  42055. WMI_MU_SNIF_USER_INPUT,
  42056. WMI_MU_SNIF_WILDCARD,
  42057. } WMI_MU_SNIF_MODE;
  42058. typedef struct {
  42059. /** TLV tag and len; tag equals
  42060. * WMITLV_TAG_STRUC_wmi_vdev_set_mu_snif_cmd_param */
  42061. A_UINT32 tlv_header;
  42062. /* VDEV identifier */
  42063. A_UINT32 vdev_id;
  42064. /* MU sniffer mode - refer to WMI_MU_SNIF_MODE enum */
  42065. A_UINT32 mode;
  42066. /* max num of user to decode */
  42067. A_UINT32 max_num_user;
  42068. /**
  42069. * TLV (tag length value) parameters follow setting MU sniffer command
  42070. * structure. The TLV's are:
  42071. * A_UINT32 aids[];
  42072. */
  42073. } wmi_vdev_set_mu_snif_cmd_param;
  42074. typedef struct {
  42075. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dbs_or_sbs_cap_ext*/
  42076. A_UINT32 tlv_header;
  42077. /* hw_mode_id: refer to WMI_HW_MODE_CAPABILITIES */
  42078. A_UINT32 hw_mode_id;
  42079. /*
  42080. * If sbs_lower_band_end_freq is set to non-zero, it indicates
  42081. * async SBS mode is supported, and lower-band/higher band to MAC
  42082. * mapping is switch-able. unit: MHz. examples 5180, 5320
  42083. * If sbs_mid_band_end_freq is set to non-zero, it indicates
  42084. * async flexible SBS mode is supported, lower/higher band cutoff frequency
  42085. * can be selected from sbs_lower_band_end_freq or sbs_mid_band_end_freq.
  42086. * unit: MHz, examples 5900.
  42087. */
  42088. A_UINT32 sbs_lower_band_end_freq;
  42089. A_UINT32 sbs_mid_band_end_freq;
  42090. } wmi_dbs_or_sbs_cap_ext;
  42091. typedef struct {
  42092. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_cust_bdf_version_capabilities*/
  42093. /* Cust bdf Major version in bdf */
  42094. A_UINT32 cust_bdf_ver_major;
  42095. /* Cust bdf Minor version in bdf */
  42096. A_UINT32 cust_bdf_ver_minor;
  42097. } wmi_cust_bdf_version_capabilities;
  42098. enum WMI_CODEL_ENABLE_VALUES {
  42099. WMI_CODEL_DISABLED,
  42100. WMI_CODEL_ENABLED,
  42101. /* WMI_CODEL_DEBUG:
  42102. * partly enabled – track interval and check target, but don’t drop
  42103. */
  42104. WMI_CODEL_DEBUG,
  42105. };
  42106. typedef enum {
  42107. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_MIN_THRUPUT = 0,
  42108. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_MAX_THRUPUT = 0xffffffff,
  42109. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_BURST_SIZE = 0,
  42110. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_SVC_INTERVAL = 0xffffffff,
  42111. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_DELAY_BOUND = 0xffffffff,
  42112. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_TIME_TO_LIVE = 0xffffffff,
  42113. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_PRIORITY = 0,
  42114. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_TID = 0xffffffff,
  42115. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_MSDU_LOSS_RATE = 0,
  42116. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_DISABLED_SCHED_MODE = 0,
  42117. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_ENABLED = WMI_CODEL_DISABLED,
  42118. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_LATENCY_TARGET_MS = 0xffffffff,
  42119. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_INTERVAL_MS = 0xffffffff,
  42120. } WMI_SAWF_SVC_CLASS_PARAM_DEFAULTS;
  42121. #define WMI_CODEL_INTERVAL_MAX_MS 0x0000ffff
  42122. #define WMI_CODEL_LATENCY_TARGET_MAX_MS 0x00003fff
  42123. typedef struct {
  42124. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sawf_svc_class_cfg_cmd_fixed_param */
  42125. A_UINT32 svc_class_id; /* which service class is being configured */
  42126. /*-----
  42127. * The below fields specify the values for the parameters of the
  42128. * service class being configured.
  42129. * Each such service class parameter has a default value specified in the
  42130. * above WMI_SAWF_SVC_CLASS_PARAM_DEFAULTS enum.
  42131. * This default value shall be specified for service classes where
  42132. * the parameter in question is not applicable.
  42133. * For example, for service classes that have no minimum throughput
  42134. * requirement, the min_thruput_kbps field should be set to
  42135. * WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_MIN_THRUPUT, i.e. 0.
  42136. *-----*/
  42137. /* min_thruput_kbps:
  42138. * How much throughput should be "guaranteed" for each MSDU queue
  42139. * belonging to this service class.
  42140. * Units are kilobits per second.
  42141. */
  42142. A_UINT32 min_thruput_kbps;
  42143. /* max_thruput_kbps:
  42144. * What upper limit on throughput shall be applied to MSDU queues belonging
  42145. * to this service class, if other peer-TIDs are not meeting their QoS
  42146. * service goals.
  42147. * Units are kilobits per second.
  42148. */
  42149. A_UINT32 max_thruput_kbps;
  42150. /* burst_size_bytes:
  42151. * How much data (i.e. how many MSDUs) should be pulled from a
  42152. * MSDU queue belonging to this service class to be formed into MPDUs
  42153. * and enqueued for transmission.
  42154. * Similarly, how long should a tx op be for MPDUs containing MSDUs from
  42155. * this service class, to ensure that the necessary amount of data gets
  42156. * delivered to the peer.
  42157. * Units are bytes.
  42158. */
  42159. A_UINT32 burst_size_bytes;
  42160. /* svc_interval_ms:
  42161. * How frequently MSDUs belonging to this service class should be
  42162. * formed into MPDUs and enqueued for transmission.
  42163. * The svc_interval_ms parameter is expected to be <= the delay_bound_ms
  42164. * parameter.
  42165. * Units are milliseconds.
  42166. */
  42167. A_UINT32 svc_interval_ms;
  42168. /* delay_bound_ms:
  42169. * How promptly the MSDUs belonging to this service class need to be
  42170. * delivered to the recipient peer.
  42171. * Units are milliseconds.
  42172. */
  42173. A_UINT32 delay_bound_ms;
  42174. /* time_to_live_ms:
  42175. * How long MSDUs belonging to this service class remain valid.
  42176. * If the MSDU has not been successfully transmitted before this
  42177. * time-to-live time has elapsed, the MSDU should be discarded.
  42178. * The time_to_live_ms parameter is expected to be >= the delay_bound_ms
  42179. * parameter.
  42180. * Units are milliseconds.
  42181. */
  42182. A_UINT32 time_to_live_ms;
  42183. /* priority:
  42184. * What degree of precedence shall the WLAN FW's tx scheduler use
  42185. * when considering whether to transmit MPDUs generated from MSDUs
  42186. * belonging to this service class.
  42187. */
  42188. A_UINT32 priority;
  42189. /* tid:
  42190. * Which WLAN TID shall be used for delivering traffic of this
  42191. * service class.
  42192. */
  42193. A_UINT32 tid;
  42194. /* msdu_loss_rate_ppm:
  42195. * This parameter indicates the acceptable rate of MSDU loss.
  42196. * Units are parts per million.
  42197. * E.g. if it is acceptable for 1 MSDU of every 10000 to be lost,
  42198. * the msdu_loss_rate_ppm value would be 100,
  42199. * since 100 / 1000000 = 1 / 10000.
  42200. */
  42201. A_UINT32 msdu_loss_rate_ppm;
  42202. /*
  42203. * The disabled DL and UL scheduler modes bitmap.
  42204. *
  42205. * Each bit in the "disabled_sched_modes" bitmap indicates whether a
  42206. * specific scheduler mode may be selected by the fast loop scheduler. A
  42207. * "1" bit indicates that mode is disabled, and a "0" bit indicates the
  42208. * mode is enabled.
  42209. *
  42210. * The WMI_SCHED_MODE_FLAGS enum defines the bit positions for each mode.
  42211. */
  42212. A_UINT32 disabled_sched_modes;
  42213. A_UINT32 codel_enabled; /* contains a WMI_CODEL_ENABLE_VALUES enum value */
  42214. /* codel_latency_target_ms:
  42215. * The codel_latency_target_ms field specifies the latency target for
  42216. * MSDU queues belonging to this service class.
  42217. * The latency of each such MSDU queue will periodically be checked
  42218. * (with the periodicity controlled by the code_interval_ms parameter).
  42219. * If the MSDU queue's latency is above this target latency, a MSDU will
  42220. * be dropped from the head of the queue, to attempt to get the flow's
  42221. * producer to scale down its rate of MSDU production.
  42222. * This value should be roughly 10% to 30% of the codel_interval_ms value.
  42223. * This value must be <= WMI_CODEL_LATENCY_TARGET_MAX_MS (or must equal
  42224. * WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_LATENCY_TARGET_MS).
  42225. */
  42226. A_UINT32 codel_latency_target_ms;
  42227. /* codel_interval_ms:
  42228. * The codel_interval_ms field specifies the baseline interval between
  42229. * successive checks that a given MSDU queue's latency is under the
  42230. * CoDel target latency.
  42231. * If in a given interval a MSDU queue has a latency exceeding the target,
  42232. * the duration of the subsequent interval for that MSDU queue will be
  42233. * reduced. The interval will get reset to the baseline interval when
  42234. * the MSDU queue's latency is again under the CoDel target latency.
  42235. * This value must be <= WMI_CODEL_INTERVAL_MAX_MS (or must equal
  42236. * WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_INTERVAL_MS).
  42237. */
  42238. A_UINT32 codel_interval_ms;
  42239. } wmi_sawf_svc_class_cfg_cmd_fixed_param;
  42240. typedef struct {
  42241. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sawf_svc_class_disable_cmd_fixed_param */
  42242. A_UINT32 svc_class_id; /* which service class is being disabled */
  42243. } wmi_sawf_svc_class_disable_cmd_fixed_param;
  42244. typedef struct {
  42245. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sw_cal_ver_cap */
  42246. A_UINT32 bdf_cal_ver; /* SW cal version in BDF */
  42247. A_UINT32 ftm_cal_ver; /* SW cal version in factory data */
  42248. A_UINT32 status; /* Return status. 0 for success, non-zero otherwise */
  42249. } wmi_sw_cal_ver_cap;
  42250. typedef struct {
  42251. /** TLV tag and len; tag equals
  42252. * WMITLV_TAG_STRUC_wmi_soc_tqm_reset_enable_disable_cmd_fixed_param
  42253. */
  42254. A_UINT32 tlv_header;
  42255. /** 0 - disable TQM-reset feature, 1 - enable TQM-reset feature */
  42256. A_UINT32 enable;
  42257. } wmi_soc_tqm_reset_enable_disable_cmd_fixed_param;
  42258. typedef struct {
  42259. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_multiple_peer_group_cmd_fixed_param */
  42260. A_UINT32 vdev_id;
  42261. A_UINT32 pdev_id;
  42262. /** Sub command id - populated with a WMI_CMD_ID value.
  42263. * Currently supported command ids are WMI_PEER_REMOVE_WDS_ENTRY_CMDID.
  42264. */
  42265. A_UINT32 sub_cmd_id;
  42266. /* The TLVs follows this structure:
  42267. * wmi_mac_addr wds_macaddr[]; <--- Array of wds mac addresses.
  42268. */
  42269. } wmi_vdev_multiple_peer_group_cmd_fixed_param;
  42270. /* WMI_VDEV_PN_MGMT_RX_FILTER_CMDID */
  42271. typedef struct {
  42272. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_pn_mgmt_rx_filter_cmd_fixed_param */
  42273. A_UINT32 vdev_id;
  42274. /* RX Filter - MGMT/Action frame type is specified in each bit as per 802.11 spec
  42275. * PN check will be done for all MGMT frames irrespective of RX Filter.
  42276. * Rx filter is only used to decide whether PN failed frames should be forwarded to host
  42277. * Example for forwarding beacon and de-auth pkt alone to host then bit 8(Beacon) and 12(De-auth) must be set */
  42278. A_UINT32 pn_rx_filter;
  42279. } wmi_vdev_pn_mgmt_rx_filter_cmd_fixed_param; /* Filter for Neighbor Rx Packets */
  42280. typedef struct {
  42281. A_UINT32 tlv_header;
  42282. /* egid_info:
  42283. * Identify which ESL group is active and the duty cycle configured
  42284. * for each group.
  42285. * This is a 128-bit bitmap to represent 16 ESL sets, with each set
  42286. * having 8 members.
  42287. * For a given set, the 1-values within the 8-bit bitmap identify
  42288. * which groups are active. The number of active groups within each
  42289. * set of 8 indirectly determines the WLAN/BT duty cycle:
  42290. * number of 1-bits |
  42291. * within 8-bit bitmap | WLAN / BT duty cycle
  42292. * --------------------+----------------
  42293. * 0 | 100 ms WLAN
  42294. * 1 | 87.5 ms WLAN, 12.5 ms BT
  42295. * 2 | 75 ms WLAN, 25 ms BT
  42296. * 3 | 62.5 ms WLAN, 37.5 ms BT
  42297. * 4 | 50 ms WLAN, 50 ms BT
  42298. * 5 | 37.5 ms WLAN, 62.5 ms BT
  42299. * 6 | 25 ms WLAN, 75 ms BT
  42300. * 7 | 12.5 ms WLAN, 87.5 ms BT
  42301. * 8 | 100 ms BT
  42302. * The lowest bits in the bitmap represent the highest ESL groups,
  42303. * E.g. bitmap bit 0 corresponds to ESL group 127, bit 1 corresponds
  42304. * to ESL group 126, bit 7 corresponds to ESL group 120, bit 8
  42305. * corresponds to ESL group 119, etc.
  42306. *
  42307. * So for example, if the lowest 8 bits of egid_info are 0x07, this
  42308. * indicates that groups 125-127 are active and 120-124 are inactive,
  42309. * and that the duty cycle is 62.5 ms WLAN + 37.5 ms BT.
  42310. */
  42311. A_UINT32 egid_info[4];
  42312. } wmi_esl_egid_cmd_fixed_param;
  42313. #define WMI_RTT_PASN_PEER_CREATE_SECURITY_MODE_GET(flag) WMI_GET_BITS(flag, 0, 2)
  42314. #define WMI_RTT_PASN_PEER_CREATE_SECURITY_MODE_SET(flag,val) WMI_SET_BITS(flag, 0, 2, val)
  42315. #define WMI_RTT_PASN_PEER_CREATE_FORCE_SELF_MAC_USE_GET(flag) WMI_GET_BITS(flag, 2, 1)
  42316. #define WMI_RTT_PASN_PEER_CREATE_FORCE_SELF_MAC_USE_SET(flag,val) WMI_SET_BITS(flag, 2, 1, val)
  42317. typedef struct {
  42318. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_peer_create_req_event_fixed_param */
  42319. /** unique id identifying the VDEV, generated by the caller */
  42320. A_UINT32 vdev_id;
  42321. /**
  42322. * The following TLV will follow this fixed_param TLV:
  42323. *
  42324. * wmi_rtt_pasn_peer_create_req_param rtt_pasn_peer_param[]
  42325. */
  42326. } wmi_rtt_pasn_peer_create_req_event_fixed_param;
  42327. typedef struct {
  42328. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_peer_create_req_param */
  42329. wmi_mac_addr self_mac_addr; /* self MAC address (can be vdev address or random mac address) */
  42330. wmi_mac_addr dest_mac_addr; /* MAC address of the peer */
  42331. A_UINT32 control_flag; /* some control information here */
  42332. /*********************************************************************************
  42333. * Bits 1:0: Security mode, check wmi_rtt_security_mode for detail.
  42334. * Host driver to request supplicant to derive and install PASN keys if security mode is set.
  42335. * Bit 2: Force_self_mac_addr_use, To indicate supplicant/hostapd to use this self mac addr to (re)generate PASN keys,
  42336. * and flush old cache( if it exists) for dest_mac_addr with old self_mac_addr.
  42337. * Bits 31:3: Reserved
  42338. */
  42339. } wmi_rtt_pasn_peer_create_req_param;
  42340. typedef struct {
  42341. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_auth_status_cmd_fixed_param */
  42342. /**
  42343. * The following TLV will follow this fixed_param TLV:
  42344. *
  42345. * wmi_rtt_pasn_auth_status_param pasn_auth_status_param[]
  42346. */
  42347. } wmi_rtt_pasn_auth_status_cmd_fixed_param;
  42348. typedef struct {
  42349. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_auth_status_param */
  42350. /* MAC address of the peer */
  42351. wmi_mac_addr peer_mac_addr;
  42352. /* Return status. 0 for success, non-zero otherwise */
  42353. A_UINT32 status;
  42354. /* Source address used for doing PASN authentication */
  42355. wmi_mac_addr source_mac_addr;
  42356. } wmi_rtt_pasn_auth_status_param;
  42357. #define WMI_RTT_PASN_PEER_DELETE_DELETED_BIT_GET(flag) WMI_GET_BITS(flag, 0, 1)
  42358. #define WMI_RTT_PASN_PEER_DELETE_DELETED_BIT_SET(flag,val) WMI_SET_BITS(flag, 0, 1, val)
  42359. #define WMI_RTT_PASN_PEER_DELETE_FLUSH_KEYS_GET(flag) WMI_GET_BITS(flag, 1, 1)
  42360. #define WMI_RTT_PASN_PEER_DELETE_FLUSH_KEYS_SET(flag,val) WMI_SET_BITS(flag, 1, 1, val)
  42361. typedef struct {
  42362. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_peer_delete_event_fixed_param */
  42363. /** unique id identifying the VDEV, generated by the caller */
  42364. A_UINT32 vdev_id;
  42365. /**
  42366. * The following TLV will follow this fixed_param TLV:
  42367. *
  42368. * wmi_rtt_pasn_peer_delete_param rtt_pasn_peer_param[]
  42369. */
  42370. } wmi_rtt_pasn_peer_delete_event_fixed_param;
  42371. typedef struct {
  42372. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_peer_delete_param */
  42373. /* MAC address of the peer */
  42374. wmi_mac_addr peer_mac_addr;
  42375. /* some control information here */
  42376. A_UINT32 control_flag;
  42377. /**********************************************************************************
  42378. * Bit 0: peer_deleted (This is set to 1 if peer has already been deleted by the target)
  42379. * Bit 1: flush keys (This is set to 1 if target wants the cached PASN keys to be flushed)
  42380. * Bits 31:2: reserved
  42381. */
  42382. } wmi_rtt_pasn_peer_delete_param;
  42383. typedef struct {
  42384. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_deauth_cmd_fixed_param */
  42385. /* MAC address of the peer */
  42386. wmi_mac_addr peer_mac_addr;
  42387. } wmi_rtt_pasn_deauth_cmd_fixed_param;
  42388. typedef struct {
  42389. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmm_scratch_reg_info */
  42390. /** what the register is used for - see WFSS_PMM_SCRATCH_REG_PURPOSE enum */
  42391. A_UINT32 pmm_scratch_reg_purpose;
  42392. /** Address of scratch register */
  42393. A_UINT32 pmm_scratch_reg_address;
  42394. } wmi_pmm_scratch_reg_info;
  42395. typedef struct {
  42396. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmm_scratch_reg_allocation_cmd_fixed_param */
  42397. /** pdev_id for identifying the MAC */
  42398. A_UINT32 pdev_id;
  42399. /*
  42400. * Following this structure is the TLV:
  42401. * wmi_pmm_scratch_reg_info scratch_reg_info[];
  42402. */
  42403. } wmi_pmm_scratch_reg_allocation_cmd_fixed_param;
  42404. typedef struct {
  42405. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmm_available_scratch_reg_info */
  42406. /** Scratch register address */
  42407. A_UINT32 pmm_scratch_reg_address;
  42408. } wmi_pmm_available_scratch_reg_info;
  42409. typedef struct {
  42410. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmm_available_scratch_reg_event_fixed_param */
  42411. /** pdev_id for identifying the MAC */
  42412. A_UINT32 pdev_id;
  42413. /*
  42414. * Following this structure is the TLV:
  42415. * wmi_pmm_available_scratch_reg_info pmm_available_scratch_reg_info[];
  42416. */
  42417. } wmi_pmm_available_scratch_reg_event_fixed_param;
  42418. typedef struct {
  42419. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmm_scratch_reg_allocation_complete_event_fixed_param */
  42420. /** pdev_id for identifying the MAC */
  42421. A_UINT32 pdev_id;
  42422. /** 1 - success, 0 - failed */
  42423. A_UINT32 is_allocated;
  42424. } wmi_pmm_scratch_reg_allocation_complete_event_fixed_param;
  42425. typedef enum {
  42426. WMI_NO_FLUSH,
  42427. WMI_TWT_FLUSH,
  42428. /* Add new flush policies above */
  42429. WMI_MAX_FLUSH_POLICY
  42430. } wmi_peer_flush_policy;
  42431. typedef struct {
  42432. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_policy_cmd_fixed_param */
  42433. A_UINT32 vdev_id;
  42434. /** peer MAC address */
  42435. wmi_mac_addr peer_macaddr;
  42436. /** The tids to flush */
  42437. A_UINT32 peer_tid_bitmap;
  42438. /* wmi_peer_flush_policy */
  42439. A_UINT32 flush_policy;
  42440. /* n_TWT_SPs_to_expire:
  42441. * Expire / drop packets whose age is greater than this specified number
  42442. * of TWT service periods.
  42443. */
  42444. A_UINT32 n_TWT_SPs_to_expire;
  42445. } wmi_peer_flush_policy_cmd_fixed_param;
  42446. /* health monitor infra Def */
  42447. typedef struct {
  42448. /** TLV tag and len */
  42449. A_UINT32 tlv_header;
  42450. A_UINT32 ring_buf_paddr_low;
  42451. A_UINT32 ring_buf_paddr_high;
  42452. A_UINT32 initial_upload_period_ms;
  42453. } wmi_health_mon_init_done_fixed_param;
  42454. /** ODD **/
  42455. /* Livedump Data structures */
  42456. #define WMI_ODD_LIVEDUMP_RESP_SET_STATUS(status, val) \
  42457. WMI_SET_BITS(status, 0, 4, val)
  42458. #define WMI_ODD_LIVEDUMP_RESP_GET_STATUS(status) \
  42459. WMI_GET_BITS(status, 0, 4)
  42460. typedef enum {
  42461. ODD_LIVEDUMP_STATUS_SUCCESS = 0,
  42462. ODD_LIVEDUMP_STATUS_FAILURE,
  42463. ODD_MAX_LIVEDUMP_STATUS,
  42464. } odd_livedump_resp_status;
  42465. typedef struct {
  42466. A_UINT32 tlv_header;
  42467. A_UINT32 odd_livedump_request_id;
  42468. /* Following this structure is the TLV:
  42469. * A_UINT32 odd_livedump_id_list[]; <-- array livedump_id list
  42470. */
  42471. } wmi_livedump_request_cmd_fixed_param;
  42472. typedef struct {
  42473. A_UINT32 tlv_header;
  42474. /* odd_livedump_request_id:
  42475. * this echoes the request id that was sent in the wmi_livedump_cmd_param
  42476. */
  42477. A_UINT32 odd_livedump_request_id;
  42478. /*
  42479. * 4 LSB's to indicate status of the odd_livedump_request_id processed
  42480. * by the FW, the other 28bits to kept for future enhancements.
  42481. * The status will be defined in the enum odd_livedump_resp_status
  42482. * 0 - SUCCESS
  42483. * 1 - FAILURE
  42484. * Refer to the WMI_ODD_LIVEDUMP_RESP_SET,_GET_STATUS macros.
  42485. */
  42486. A_UINT32 status;
  42487. } wmi_livedump_response_event_fixed_param;
  42488. #define WMI_MLO_LINK_REMOVAL_GET_VDEVID(tbtt_info) WMI_GET_BITS(tbtt_info, 0, 8)
  42489. #define WMI_MLO_LINK_REMOVAL_SET_VDEVID(tbtt_info, value) WMI_SET_BITS(tbtt_info, 0, 8, value)
  42490. #define WMI_MLO_LINK_REMOVAL_GET_LINKID(tbtt_info) WMI_GET_BITS(tbtt_info, 8, 8)
  42491. #define WMI_MLO_LINK_REMOVAL_SET_LINKID(tbtt_info, value) WMI_SET_BITS(tbtt_info, 8, 8, value)
  42492. #define WMI_MLO_LINK_REMOVAL_GET_TBTT_COUNT(tbtt_info) WMI_GET_BITS(tbtt_info, 16, 16)
  42493. #define WMI_MLO_LINK_REMOVAL_SET_TBTT_COUNT(tbtt_info, value) WMI_SET_BITS(tbtt_info, 16, 16, value)
  42494. typedef struct {
  42495. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_removal_tbtt_count; */
  42496. A_UINT32 tlv_header;
  42497. union {
  42498. struct {
  42499. A_UINT32 vdev_id:8,
  42500. link_id:8,
  42501. tbtt_count:16;
  42502. };
  42503. A_UINT32 tbtt_info;
  42504. };
  42505. } wmi_mlo_link_removal_tbtt_count;
  42506. typedef struct {
  42507. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_removal_tbtt_update; */
  42508. A_UINT32 tlv_header;
  42509. A_UINT32 tbtt_count;
  42510. A_UINT32 qtimer_ts_low; /* lower-32 bits */
  42511. A_UINT32 qtimer_ts_high; /* higher-32 bits */
  42512. A_UINT32 tsf_low; /* lower-32 bits */
  42513. A_UINT32 tsf_high; /* higher-32 bits */
  42514. } wmi_mlo_link_removal_tbtt_update;
  42515. typedef struct {
  42516. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_removal_evt_fixed_param; */
  42517. A_UINT32 tlv_header;
  42518. A_UINT32 vdev_id;
  42519. /*
  42520. * Followed by TLVs:
  42521. * wmi_mlo_link_removal_tbtt_update
  42522. */
  42523. } wmi_mlo_link_removal_evt_fixed_param;
  42524. typedef struct {
  42525. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_removal_cmd_fixed_param */
  42526. A_UINT32 tlv_header;
  42527. A_UINT32 vdev_id;
  42528. A_UINT32 reconfig_ml_ie_num_bytes_valid;
  42529. /* This TLV is followed by array of bytes:
  42530. * A_UINT8 reconfig_ml_ie[]; <-- Entire reconfiguration element (multi-link control + common-info + 1 per-sta profile)
  42531. */
  42532. } wmi_mlo_link_removal_cmd_fixed_param;
  42533. typedef struct {
  42534. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_per_peer_sched_mode_disable */
  42535. /* Peer MAC Address */
  42536. wmi_mac_addr peer_macaddr;
  42537. /*
  42538. * The disabled DL and UL scheduler modes bitmap.
  42539. *
  42540. * This command is not supported in STA mode.
  42541. *
  42542. * A value of 1 in a given bit position disables the corresponding mode,
  42543. * and a value of 0 enables the mode. The WMI_SCHED_MODE_FLAGS enum defines
  42544. * the bit positions for each mode.
  42545. *
  42546. * A single 32 bit value is used to store the following configuration
  42547. * bitmap.
  42548. *
  42549. * bit | sched mode
  42550. * ---------------
  42551. * 0 | DL MU-MIMO
  42552. * 1 | UL MU-MIMO
  42553. * 2 | DL OFDMA
  42554. * 3 | UL OFDMA
  42555. * 4..31 | RESERVED
  42556. */
  42557. A_UINT32 disabled_sched_modes;
  42558. } wmi_per_peer_sched_mode_disable;
  42559. typedef struct {
  42560. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sched_mode_disable_fixed_param */
  42561. A_UINT32 pdev_id;
  42562. /* The TLVs for each peer follows:
  42563. * wmi_per_peer_sched_mode_disable per_peer_sched_mode_disable[];
  42564. */
  42565. } wmi_peer_sched_mode_disable_fixed_param;
  42566. typedef enum {
  42567. /*
  42568. * No timestamp source is used, and the start_timestamp field should be
  42569. * ignored. FW will start the probing of the requested mode ASAP after
  42570. * receiving this message.
  42571. */
  42572. WMI_SCHED_MODE_PROBE_TSTAMP_SRC_NONE = 0,
  42573. } WMI_SCHED_MODE_PROBE_TSTAMP_SRC;
  42574. typedef struct {
  42575. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_sched_mode_probe_req_fixed_param */
  42576. A_UINT32 vdev_id;
  42577. /*
  42578. * The scheduler mode to probe. Only a single mode may currently be
  42579. * specified in this WMI command (separate commands must be sent to probe
  42580. * multiple modes). This limitation may be removed in a future version of
  42581. * FW.
  42582. *
  42583. * This command is not supported in STA mode.
  42584. *
  42585. * The WMI_SCHED_MODE_FLAGS enum defines the scheduler mode values.
  42586. */
  42587. A_UINT32 sched_mode_to_probe;
  42588. /*
  42589. * 32-bit cookie that will be sent back in the probing completion / stats
  42590. * WMI message. FW does not interpret any bits in this field, and simply
  42591. * replays it back to the host.
  42592. */
  42593. A_UINT32 cookie;
  42594. /*
  42595. * The clock reference to use for the start_timestamp field. The enum
  42596. * WMI_SCHED_MODE_PROBE_TSTAMP_SRC defines the valid timestamp sources.
  42597. */
  42598. A_UINT32 timestamp_source;
  42599. /*
  42600. * The start timestamp indicating when the FW scheduler should start the
  42601. * probing period. Note that although the FW tries to honor this start
  42602. * time, it may not always be possible to. For instance, if the command
  42603. * arrives after the indicated start timestamp, or if channel congestion
  42604. * delays the APs ability to transmit over the air.
  42605. *
  42606. * If the timestamp_source field is set to
  42607. * WMI_SCHED_MODE_PROBE_TSTAMP_SRC_NONE, then the value of this field is
  42608. * ignored by FW.
  42609. */
  42610. A_UINT32 start_timestamp_lo;
  42611. A_UINT32 start_timestamp_hi;
  42612. /*
  42613. * The on and off duration of the probing mode.
  42614. *
  42615. * The scheduler will turn the mode on first for the specified
  42616. * "on_duration_ms", and then turn it off for the specified
  42617. * "off_duration_ms".
  42618. *
  42619. * During the on and off duration, FW will collect delivered bytes
  42620. * statistics to estimate the vdev level throughput achieved for both the
  42621. * on and off region. These statistics will be delivered in the
  42622. * wmi_vdev_sched_mode_probe_resp WMI message after both the "on" and "off"
  42623. * durations have elapsed.
  42624. */
  42625. A_UINT32 on_duration_ms;
  42626. A_UINT32 off_duration_ms;
  42627. } wmi_vdev_sched_mode_probe_req_fixed_param;
  42628. typedef struct {
  42629. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_sched_mode_probe_resp_fixed_param */
  42630. A_UINT32 vdev_id;
  42631. /*
  42632. * The 32-bit cookie copied from the wmi_vdev_sched_mode_probe_req
  42633. * message.
  42634. */
  42635. A_UINT32 cookie;
  42636. /*
  42637. * The observed throughput at the vdev level during the mode-enabled
  42638. * portion of the mode probe.
  42639. */
  42640. A_UINT32 tput_mbps_on;
  42641. /*
  42642. * The observed throughput at the vdev level during the mode-disabled
  42643. * portion of the mode probe.
  42644. */
  42645. A_UINT32 tput_mbps_off;
  42646. } wmi_vdev_sched_mode_probe_resp_fixed_param;
  42647. /** Coordinated-AP TDMA **/
  42648. #define WMI_TDMA_MAX_ACTIVE_SCHEDULES 10
  42649. typedef struct {
  42650. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdma_schedule_request_cmd_fixed_param **/
  42651. /** pdev_id
  42652. * PDEV ID for identifying the MAC for which this schedule
  42653. * is being requested.
  42654. */
  42655. A_UINT32 pdev_id;
  42656. /** schedule_type
  42657. * 0 = Reserved
  42658. * 1 = Restricted
  42659. * UINT32_MAX = Cancel all TDMA schedules and ignore other parameters below.
  42660. */
  42661. A_UINT32 schedule_type;
  42662. /** schedule_handle_id
  42663. * Unique ID to identify this TDMA schedule
  42664. */
  42665. A_UINT32 schedule_handle_id;
  42666. /** owner_bssid
  42667. * The BSSID this TDMA schedule is reserved for
  42668. */
  42669. wmi_mac_addr owner_bssid;
  42670. /** start_time_tsf_low
  42671. * Lower 32-bits of Synchronized Start time for the first busy slot
  42672. * in this TDMA schedule.
  42673. * It should be a PMM global FW TSF reference
  42674. */
  42675. A_UINT32 start_time_tsf_low;
  42676. /** start_time_tsf_high
  42677. * Higher 32-bits of Synchronized Start time for the first busy slot
  42678. * in this TDMA schedule.
  42679. * It should be a PMM global FW TSF reference
  42680. */
  42681. A_UINT32 start_time_tsf_high;
  42682. /** num_busy_slots
  42683. * Number of busy periods in this schedule
  42684. */
  42685. A_UINT32 num_busy_slots;
  42686. /** busy_slot_dur_ms
  42687. * The fixed duration of each busy slot in milliseconds
  42688. */
  42689. A_UINT32 busy_slot_dur_ms;
  42690. /** busy_slot_intvl_ms
  42691. * The fixed interval between the start of two consecutive busy slots
  42692. * in milliseconds.
  42693. */
  42694. A_UINT32 busy_slot_intvl_ms;
  42695. /** edca_params_valid
  42696. * Indicates whether the following EDCA fields aifsn, ecwmin, ecwmax
  42697. * are valid or not
  42698. * 1 = Valid. 0 = Not Valid.
  42699. */
  42700. A_UINT32 edca_params_valid;
  42701. /** aifsn
  42702. * Arbitration inter frame spacing number for this schedule type.
  42703. * Range: 2-15.
  42704. * For voice, video, best-effort, background ACs
  42705. */
  42706. A_UINT32 aifsn[WMI_AC_MAX];
  42707. /** ecwmin
  42708. * Exponent form of Contention Window minimum value for this schedule type.
  42709. * Range: 2 - 1024.
  42710. * For voice, video, best-effort, background ACs
  42711. */
  42712. A_UINT32 ecwmin[WMI_AC_MAX];
  42713. /** ecwmax
  42714. * Exponent form of Contention Window maximum value for this schedule type.
  42715. * Range: 2 - 1024.
  42716. * For voice, video, best-effort, background ACs
  42717. */
  42718. A_UINT32 ecwmax[WMI_AC_MAX];
  42719. } wmi_tdma_schedule_request_cmd_fixed_param;
  42720. typedef struct {
  42721. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_tgtr2p_table _fixed_param */
  42722. A_UINT32 pdev_id;
  42723. /* freq_band:
  42724. * Indicates the intended FreqBand for updating targetPowerR2PTable.
  42725. * 0: 5G
  42726. * 1: 2G
  42727. * 2: 6G
  42728. */
  42729. A_UINT32 freq_band;
  42730. /* sub_band:
  42731. * Denotes band defined in targetPowerR2PFreqRangexG BDF fields.
  42732. * Valid values for each target is listed below
  42733. * For 11AX targets,
  42734. * 2G - 0
  42735. * 5G/6G - 0/1/2
  42736. *
  42737. * For 11BE targets,
  42738. * 2G - 0
  42739. * 5G/6G - 0/1
  42740. */
  42741. A_UINT32 sub_band;
  42742. /* is_ext:
  42743. * Applicable only for 11BE targets
  42744. * 0 - Default targetPowerR2PTable
  42745. * 1 - To update targetPowerR2PTable in extension fields
  42746. * For 11AX targets, value is expected to be 0.
  42747. */
  42748. A_UINT32 is_ext;
  42749. A_UINT32 target_type; /* 0 - IPQ95xx, 1 - QCN90xx, 0x10 - QCN92xx */
  42750. A_UINT32 r2p_array_len; /* length of targetPowerR2PTable */
  42751. /* end_of_r2ptable_update:
  42752. * This field can be used to indicate FW to trigger update of SW structures
  42753. * once user has updated for all the sub-bands of the Frequency band.
  42754. * This would be used when there are multiple sub-bands.
  42755. */
  42756. A_UINT32 end_of_r2ptable_update;
  42757. /*
  42758. * Following this structure is the TLV containing targetPowerR2PTablexG
  42759. * of type INT8 and with a unit of 0.25dBm.
  42760. */
  42761. } wmi_pdev_set_tgtr2p_table_cmd_fixed_param;
  42762. typedef enum {
  42763. WMI_PDEV_TGTR2P_SUCCESS = 0,
  42764. WMI_PDEV_TGTR2P_SUCCESS_WAITING_FOR_END_OF_UPDATE,
  42765. WMI_PDEV_TGTR2P_ERROR_INVALID_FREQ_BAND,
  42766. WMI_PDEV_TGTR2P_ERROR_INVALID_SUB_BAND,
  42767. WMI_PDEV_TGTR2P_ERROR_EXTENSION_FIELDS_NOT_ENABLED_IN_BDF,
  42768. WMI_PDEV_TGTR2P_ERROR_INVALID_TARGET_TPYE,
  42769. WMI_PDEV_TGTR2P_ERROR_R2P_ARRAY_LEN_MISMATCH,
  42770. } wmi_pdev_set_tgtr2p_event_status_type;
  42771. typedef struct {
  42772. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_tgtr2p_table_event_fixed_param */
  42773. /* status:
  42774. * enum wmi_pdev_set_tgtr2p_event_status_type to indicate the status
  42775. * code/result
  42776. */
  42777. A_UINT32 status;
  42778. A_UINT32 pdev_id; /* to identify for which pdev the response is received */
  42779. } wmi_pdev_set_tgtr2p_table_event_fixed_param;
  42780. #define WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_CHAIN_NUM 4
  42781. #define WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_2G_RATE_NUM 18
  42782. #define WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_2G_RATE_NUM_EXT 8
  42783. #define WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_5G_6G_RATE_NUM 24
  42784. typedef struct {
  42785. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_custom_tx_power_per_mcs_cmd_fixed_param */
  42786. A_UINT32 pdev_id;
  42787. /* Every band's bitmap is per chain per mcs, the bit set indicate the txpower value existed
  42788. * in txpower_array, otherwise, it means no setting from up-layer and need treat the setting
  42789. * txpower as zero
  42790. */
  42791. /* currently 2GHz band has 2 chains (though space is allocated for up
  42792. * to 4 chains) and each chain has 18 rates and 8 extended rates.
  42793. * bitmap_of_2GHz_band[0] -> chain 0 bitmap:
  42794. * |bit 0|bit 1|......|bit 17| bit 18 |......| bit 25 |
  42795. * |rate 0|rate 1|......|rate 17|ext rate 0|......|ext rate 7|
  42796. *
  42797. * bitmap_of_2GHz_band[1] -> chain 1 bitmap:
  42798. * |bit 0|bit 1|......|bit 17| bit 18 |......| bit 25 |
  42799. * |rate 0|rate 1|......|rate 17|ext rate 0|......|ext rate 7|
  42800. *
  42801. * bitmap_of_2GHz_band[2] -> reserved
  42802. * bitmap_of_2GHz_band[3] -> reserved
  42803. */
  42804. A_UINT32 bitmap_of_2GHz_band[WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_CHAIN_NUM];
  42805. /* 5GHz band has 4 chains and each chain has 24 rates.
  42806. * bitmap_of_5GHz_band[0] -> chain 0 bitmap:
  42807. * |bit 0|bit 1|......|bit 23|
  42808. * |rate 0|rate 1|......|rate 23|
  42809. *
  42810. * bitmap_of_5GHz_band[1] -> chain 1 bitmap:
  42811. * |bit 0|bit 1|......|bit 23|
  42812. * |rate 0|rate 1|......|rate 23|
  42813. *
  42814. * bitmap_of_5GHz_band[2] -> chain 2 bitmap:
  42815. * |bit 0|bit 1|......|bit 23|
  42816. * |rate 0|rate 1|......|rate 23|
  42817. *
  42818. * bitmap_of_5GHz_band[3] -> chain 3 bitmap:
  42819. * |bit 0|bit 1|......|bit 23|
  42820. * |rate 0|rate 1|......|rate 23|
  42821. */
  42822. A_UINT32 bitmap_of_5GHz_band[WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_CHAIN_NUM];
  42823. /* 6GHz band has 4 chains and each chain has 24 rates.
  42824. * bitmap_of_6GHz_band[0] -> chain 0 bitmap:
  42825. * |bit 0|bit 1|......|bit 23|
  42826. * |rate 0|rate 1|......|rate 23|
  42827. *
  42828. * bitmap_of_6GHz_band[1] -> chain 1 bitmap:
  42829. * |bit 0|bit 1|......|bit 23|
  42830. * |rate 0|rate 1|......|rate 23|
  42831. *
  42832. * bitmap_of_6GHz_band[2] -> chain 2 bitmap:
  42833. * |bit 0|bit 1|......|bit 23|
  42834. * |rate 0|rate 1|......|rate 23|
  42835. *
  42836. * bitmap_of_6GHz_band[3] -> chain 3 bitmap:
  42837. * |bit 0|bit 1|......|bit 23|
  42838. * |rate 0|rate 1|......|rate 23|
  42839. */
  42840. A_UINT32 bitmap_of_6GHz_band[WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_CHAIN_NUM];
  42841. A_UINT32 txpower_array_len;
  42842. /* This TLV is followed by array of bytes:
  42843. * A_UINT8 txpower_bkoff_array[]:
  42844. * The txpower backoff value for each bit set within the per-band bitmaps
  42845. * above, in dB units.
  42846. * The elements from the 2GHz band occur first, then the elements from the
  42847. * 5GHz band, then the elements from the 6GHz band.
  42848. * Within each band, the elements from the lower chain numbers (i.e. the
  42849. * lower words within the bitmap array) occur first.
  42850. * Within each chain of each band, the element from the lower rate indices
  42851. * (i.e. the least significant bits within the bitmap word) occur first.
  42852. */
  42853. } wmi_pdev_set_custom_tx_power_per_mcs_cmd_fixed_param;
  42854. typedef struct {
  42855. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_vdev_get_link_info_cmd_fixed_param */
  42856. A_UINT32 vdev_id;
  42857. wmi_mac_addr mld_macaddr; /* MLD MAC address */
  42858. } wmi_mlo_vdev_get_link_info_cmd_fixed_param;
  42859. typedef enum {
  42860. WMI_LINK_INFO_EVENT_SUCCESS = 0,
  42861. /* reject due to common failure reason */
  42862. WMI_LINK_INFO_EVENT_REJECT_FAILURE,
  42863. /* reject as vdev is not up */
  42864. WMI_LINK_INFO_EVENT_REJECT_VDEV_NOT_UP,
  42865. /* reject as roaming is in progress */
  42866. WMI_LINK_INFO_EVENT_REJECT_ROAMING_IN_PROGRESS,
  42867. /* reject as it's not MLO connection */
  42868. WMI_LINK_INFO_EVENT_REJECT_NON_MLO_CONNECTION,
  42869. } wmi_mlo_vdev_link_info_event_status_type;
  42870. typedef struct {
  42871. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_vdev_link_info_event_fixed_param */
  42872. /* status:
  42873. * enum wmi_mlo_vdev_link_info_event_status_type to indicate the status
  42874. */
  42875. A_UINT32 status;
  42876. /* vdev_id:
  42877. * unique id identifying the VDEV, generated by the caller
  42878. */
  42879. A_UINT32 vdev_id;
  42880. wmi_mac_addr mld_macaddr; /* MLD MAC address */
  42881. /* hw_mode_index:
  42882. * current hardware mode index, see soc_hw_mode_t for values
  42883. */
  42884. A_UINT32 hw_mode_index;
  42885. } wmi_mlo_vdev_link_info_event_fixed_param;
  42886. #define WMI_MLO_VDEV_LINK_INFO_GET_VDEVID(link_info) WMI_GET_BITS(link_info, 0, 8)
  42887. #define WMI_MLO_VDEV_LINK_INFO_SET_VDEVID(link_info, value) WMI_SET_BITS(link_info, 0, 8, value)
  42888. #define WMI_MLO_VDEV_LINK_INFO_GET_LINKID(link_info) WMI_GET_BITS(link_info, 8, 8)
  42889. #define WMI_MLO_VDEV_LINK_INFO_SET_LINKID(link_info, value) WMI_SET_BITS(link_info, 8, 8, value)
  42890. #define WMI_MLO_VDEV_LINK_INFO_GET_LINK_STATUS(link_info) WMI_GET_BITS(link_info, 16, 2)
  42891. #define WMI_MLO_VDEV_LINK_INFO_SET_LINK_STATUS(link_info, value) WMI_SET_BITS(link_info, 16, 2, value)
  42892. typedef struct {
  42893. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_vdev_link_info */
  42894. union {
  42895. struct {
  42896. A_UINT32 vdev_id:8, /* vdev id for this link */
  42897. link_id:8, /* link id defined as in 802.11 BE spec. */
  42898. link_status:2, /* link_status - 0: inactive, 1: active */
  42899. reserved:14;
  42900. };
  42901. A_UINT32 link_info;
  42902. };
  42903. A_UINT32 chan_freq; /* Channel frequency in MHz */
  42904. } wmi_mlo_vdev_link_info;
  42905. /* Manual UL OFDMA trigger frame data structures */
  42906. typedef enum {
  42907. WMI_UL_OFDMA_MANUAL_TRIG_TXERR_NONE,
  42908. WMI_UL_OFDMA_MANUAL_TRIG_TXERR_RESP, /* response timeout, mismatch,
  42909. * BW mismatch, mimo ctrl mismatch,
  42910. * CRC error.. */
  42911. WMI_UL_OFDMA_MANUAL_TRIG_TXERR_FILT, /* blocked by tx filtering */
  42912. WMI_UL_OFDMA_MANUAL_TRIG_TXERR_FIFO, /* fifo, misc errors in HW */
  42913. WMI_UL_OFDMA_MANUAL_TRIG_TXERR_SWABORT, /* software initiated abort
  42914. * (TX_ABORT) */
  42915. WMI_UL_OFDMA_MANUAL_TRIG_TXERR_MAX = 0xff,
  42916. WMI_UL_OFDMA_MANUAL_TRIG_TXERR_INVALID =
  42917. WMI_UL_OFDMA_MANUAL_TRIG_TXERR_MAX
  42918. } wmi_ul_ofdma_manual_trig_txerr_t;
  42919. typedef struct {
  42920. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_manual_ul_ofdma_trig_feedback_evt_fixed_param */
  42921. A_UINT32 tlv_header;
  42922. /* VDEV identifier */
  42923. A_UINT32 vdev_id;
  42924. /* To indicate whether feedback event is for SU (0) or MU trigger (1) */
  42925. A_UINT32 feedback_trig_type;
  42926. /* Feedback Params */
  42927. A_UINT32 curr_su_manual_trig_count;
  42928. A_UINT32 remaining_su_manual_trig;
  42929. A_UINT32 remaining_mu_trig_peers;
  42930. A_UINT32 manual_trig_status; /* holds a wmi_ul_ofdma_manual_trig_txerr_t */
  42931. /**
  42932. * This TLV is followed by TLVs below:
  42933. * wmi_mac_addr peer_macaddr[];
  42934. * Array length corresponds to the number of triggered peers
  42935. */
  42936. } wmi_manual_ul_ofdma_trig_feedback_evt_fixed_param;
  42937. typedef struct {
  42938. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_manual_mu_trig_cmd_fixed_param */
  42939. A_UINT32 tlv_header;
  42940. /* VDEV identifier */
  42941. A_UINT32 vdev_id;
  42942. /* Configurable Parameters for manual UL OFDMA Multi-User Trigger frame */
  42943. A_UINT32 manual_trig_preferred_ac;
  42944. /**
  42945. * This TLV is followed by TLVs below:
  42946. * wmi_mac_addr peer_macaddr[];
  42947. * The array has one element for each peer to be included in the
  42948. * manually-triggered UL MU transmission.
  42949. */
  42950. } wmi_vdev_set_manual_mu_trig_cmd_fixed_param;
  42951. typedef struct {
  42952. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_manual_su_trig_cmd_fixed_param */
  42953. A_UINT32 tlv_header;
  42954. /* VDEV identifier */
  42955. A_UINT32 vdev_id;
  42956. /* Configurable Parameters for manual UL OFDMA Single-User Trigger frame */
  42957. wmi_mac_addr peer_macaddr;
  42958. A_UINT32 manual_trig_preferred_ac;
  42959. A_UINT32 num_su_manual_trig;
  42960. A_UINT32 manual_trig_length;
  42961. A_UINT32 manual_trig_mcs;
  42962. A_UINT32 manual_trig_nss;
  42963. A_INT32 manual_trig_target_rssi; /* units = dBm */
  42964. } wmi_vdev_set_manual_su_trig_cmd_fixed_param;
  42965. #define CQI_UPLOAD_META_DATA_NC_IDX(idx) \
  42966. (MAX_NUM_CQI_USERS_IN_STANDALONE_SND + (idx * 2))
  42967. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_ASNR_LENGTH(asnr_params, value) \
  42968. WMI_SET_BITS(asnr_params, 0, 16, value)
  42969. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_ASNR_LENGTH(asnr_params) \
  42970. WMI_GET_BITS(asnr_params, 0, 16)
  42971. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_ASNR_OFFSET(asnr_params, value) \
  42972. WMI_SET_BITS(asnr_params, 16, 16, value)
  42973. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_ASNR_OFFSET(asnr_params) \
  42974. WMI_GET_BITS(asnr_params, 16, 16)
  42975. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_DSNR_LENGTH(dsnr_params, value) \
  42976. WMI_SET_BITS(dsnr_params, 0, 16, value)
  42977. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_DSNR_LENGTH(dsnr_params) \
  42978. WMI_GET_BITS(dsnr_params, 0, 16)
  42979. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_DSNR_OFFSET(dsnr_params, value) \
  42980. WMI_SET_BITS(dsnr_params, 16, 16, value)
  42981. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_DSNR_OFFSET(dsnr_params) \
  42982. WMI_GET_BITS(dsnr_params, 16, 16)
  42983. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_FB_PARAMS_NC(fb_params, value) \
  42984. WMI_SET_BITS(fb_params, 0, 2, value)
  42985. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_FB_PARAMS_NC(fb_params) \
  42986. WMI_GET_BITS(fb_params, 0, 2)
  42987. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_FB_PARAMS_NSS_NUM(fb_params, value) \
  42988. WMI_SET_BITS(fb_params, 2, 2, value)
  42989. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_FB_PARAMS_NSS_NUM(fb_params) \
  42990. WMI_GET_BITS(fb_params, 2, 2)
  42991. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_DDR_BUF_IDX(ddr_buffer_idx, value) \
  42992. WMI_SET_BITS(ddr_buffer_idx, 4, 2, value)
  42993. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_DDR_BUF_IDX(ddr_buffer_idx) \
  42994. WMI_GET_BITS(ddr_buffer_idx, 4, 2)
  42995. #define WMI_SET_STANDALONE_SOUND_PARAMS_FB_TYPE(snd_params, value) \
  42996. WMI_SET_BITS(snd_params, 0, 2, value)
  42997. #define WMI_GET_STANDALONE_SOUND_PARAMS_FB_TYPE(snd_params) \
  42998. WMI_GET_BITS(snd_params, 0, 2)
  42999. #define WMI_SET_STANDALONE_SOUND_PARAMS_NG(snd_params, value) \
  43000. WMI_SET_BITS(snd_params, 2, 2, value)
  43001. #define WMI_GET_STANDALONE_SOUND_PARAMS_NG(snd_params) \
  43002. WMI_GET_BITS(snd_params, 2, 2)
  43003. #define WMI_SET_STANDALONE_SOUND_PARAMS_CB(snd_params, value) \
  43004. WMI_SET_BITS(snd_params, 4, 1, value)
  43005. #define WMI_GET_STANDALONE_SOUND_PARAMS_CB(snd_params) \
  43006. WMI_GET_BITS(snd_params, 4, 1)
  43007. #define WMI_SET_STANDALONE_SOUND_PARAMS_BW(snd_params, value) \
  43008. WMI_SET_BITS(snd_params, 5, 3, value)
  43009. #define WMI_GET_STANDALONE_SOUND_PARAMS_BW(snd_params) \
  43010. WMI_GET_BITS(snd_params, 5, 3)
  43011. #define WMI_SET_STANDALONE_SOUND_PARAMS_CQI_TYPE(snd_params, value) \
  43012. WMI_SET_BITS(snd_params, 8, 1, value)
  43013. #define WMI_GET_STANDALONE_SOUND_PARAMS_CQI_TYPE(snd_params) \
  43014. WMI_GET_BITS(snd_params, 8, 1)
  43015. #define WMI_DMA_BUF_RELEASE_CQI_UPLOAD_SET_FB_PARAMS_IS_VALID(fb_params_cqi, value, idx) \
  43016. WMI_SET_BITS(fb_params_cqi, idx, 1, value)
  43017. #define WMI_DMA_BUF_RELEASE_CQI_UPLOAD_GET_FB_PARAMS_IS_VALID(fb_params_cqi, idx) \
  43018. WMI_GET_BITS(fb_params_cqi, idx, 1)
  43019. #define WMI_DMA_BUF_RELEASE_CQI_UPLOAD_SET_FB_PARAMS_NC(fb_params_cqi, value, idx) \
  43020. WMI_SET_BITS(fb_params_cqi, CQI_UPLOAD_META_DATA_NC_IDX(idx), 2, value)
  43021. #define WMI_DMA_BUF_RELEASE_CQI_UPLOAD_GET_FB_PARAMS_NC(fb_params_cqi, idx) \
  43022. WMI_GET_BITS(fb_params_cqi, CQI_UPLOAD_META_DATA_NC_IDX(idx), 2)
  43023. typedef enum _WMI_STANDALONE_SOUND_STATUS_T {
  43024. WMI_STANDALONE_SOUND_STATUS_OK,
  43025. WMI_STANDALONE_SOUND_STATUS_ERR_NUM_PEERS_EXCEEDED,
  43026. WMI_STANDALONE_SOUND_STATUS_ERR_NG_INVALID,
  43027. WMI_STANDALONE_SOUND_STATUS_ERR_NUM_REPEAT_EXCEEDED,
  43028. WMI_STANDALONE_SOUND_STATUS_ERR_PEER_DOESNOT_SUPPORT_BW,
  43029. WMI_STANDALONE_SOUND_STATUS_ERR_INVALID_PEER,
  43030. WMI_STANDALONE_SOUND_STATUS_ERR_INVALID_VDEV,
  43031. WMI_STANDALONE_SOUND_STATUS_ERR_PEER_DOES_NOT_SUPPORT_MU_FB,
  43032. WMI_STANDALONE_SOUND_STATUS_ERR_DMA_NOT_CONFIGURED,
  43033. WMI_STANDALONE_SOUND_STATUS_ERR_COMPLETE_FAILURE,
  43034. } WMI_STANDALONE_SOUND_STATUS_T;
  43035. typedef struct {
  43036. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_cv_upload_meta_data */
  43037. /** Set if the CV is valid */
  43038. A_UINT32 is_valid;
  43039. /** Feedback type */
  43040. A_UINT32 fb_type;
  43041. /**
  43042. * [15:0] ASNR length
  43043. * [31:16] ASNR offset
  43044. */
  43045. A_UINT32 asnr_params;
  43046. /**
  43047. * [15:0] DSNR length
  43048. * [31:16] DSNR offset
  43049. */
  43050. A_UINT32 dsnr_params;
  43051. /** Peer mac address */
  43052. wmi_mac_addr peer_mac_address;
  43053. /** fb_params:
  43054. * [1:0] Nc
  43055. * Refer to WMI_DMA_BUF_RELEASE_CV_UPLOAD_[SET,GET]_FB_PARAMS_NC
  43056. * [3:2] nss_num
  43057. * Refer to WMI_DMA_BUF_RELEASE_CV_UPLOAD_[SET,GET]_FB_PARAMS_NSS_NUM
  43058. * [5:4] ddr_buffer_idx
  43059. * Refer to WMI_DMA_BUF_RELEASE_CV_UPLOAD_[SET,GET]_DDR_BUF_IDX
  43060. */
  43061. A_UINT32 fb_params;
  43062. } wmi_dma_buf_release_cv_upload_meta_data;
  43063. typedef struct {
  43064. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_radar_meta_data */
  43065. /* timestamp at the time of the capture */
  43066. A_UINT32 timestamp_us;
  43067. /* phy mode WLAN_PHY_MODE of the channel defined in wlan_defs.h */
  43068. A_UINT32 phy_mode;
  43069. /* frequency (in MHz) of the primary 20 MHz channel */
  43070. A_UINT32 chan_mhz;
  43071. /* Center frequency 1 in MHz */
  43072. A_UINT32 band_center_freq1;
  43073. /* Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode */
  43074. A_UINT32 band_center_freq2;
  43075. /* tx chain mask */
  43076. A_UINT32 tx_chain_mask;
  43077. /* rx chain mask */
  43078. A_UINT32 rx_chain_mask;
  43079. /* number of LTFs sent for capture */
  43080. A_UINT32 num_ltf_tx;
  43081. /* number of LTFs skipped in rx */
  43082. A_UINT32 num_skip_ltf_rx;
  43083. /* number of LTFs used for accumulation */
  43084. A_UINT32 num_ltf_accumulation;
  43085. } wmi_dma_buf_release_wifi_radar_meta_data;
  43086. typedef struct {
  43087. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_cqi_upload_meta_data */
  43088. A_UINT32 tlv_header;
  43089. /**
  43090. * [15:0] ASNR length
  43091. * [31:16] ASNR offset
  43092. */
  43093. A_UINT32 asnr_params;
  43094. /** Peer mac address */
  43095. wmi_mac_addr peer_mac_address[MAX_NUM_CQI_USERS_IN_STANDALONE_SND];
  43096. /**
  43097. * [0] is_user0_valid
  43098. * [1] is_user1_valid
  43099. * [2] is_user2_valid
  43100. * [4:3] User0_Nc
  43101. * [6:5] User1_Nc
  43102. * [8:7] User2_Nc
  43103. */
  43104. A_UINT32 fb_params_cqi : 9,
  43105. reserved : 23;
  43106. } wmi_dma_buf_release_cqi_upload_meta_data;
  43107. typedef struct {
  43108. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_standalone_sounding_cmd_fixed_param */
  43109. /** vdev identifier */
  43110. A_UINT32 vdev_id;
  43111. /** sounding_params:
  43112. * [1:0] Feedback type
  43113. * [3:2] Ng
  43114. * [4] Codebook
  43115. * [7:5] BW
  43116. * 0 = 20 MHz
  43117. * 1 = 40 MHz
  43118. * 2 = 80 MHz
  43119. * 3 = 160 MHz
  43120. * 4 = 320 MHz
  43121. * [8] Triggered/Non-Triggered CQI
  43122. * [31:9] Reserved
  43123. */
  43124. A_UINT32 sounding_params;
  43125. /** The number of sounding repeats */
  43126. A_UINT32 num_sounding_repeats;
  43127. /**
  43128. * TLV (tag length value) parameters follow the
  43129. * structure. The TLV's are:
  43130. * wmi_mac_addr peer_list[num_peers];
  43131. */
  43132. } wmi_standalone_sounding_cmd_fixed_param;
  43133. typedef struct {
  43134. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_standalone_sounding_evt_fixed_param */
  43135. /** vdev identifier */
  43136. A_UINT32 vdev_id;
  43137. /** status:
  43138. * standalone sounding command status -
  43139. * refer to WMI_STANDALONE_SOUND_STATUS_T
  43140. */
  43141. A_UINT32 status;
  43142. /** number of CV buffers uploaded */
  43143. A_UINT32 buffer_uploaded;
  43144. /** TLV (tag length value) parameters follow the
  43145. * structure. The TLV's are:
  43146. * A_UINT32 snd_failed[num_sounding_repeats];
  43147. * snd_failed[] array's elements hold the number of failures
  43148. * for each sounding.
  43149. */
  43150. } wmi_standalone_sounding_evt_fixed_param;
  43151. typedef struct {
  43152. /*
  43153. * TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rf_path_cmd_fixed_param
  43154. */
  43155. A_UINT32 tlv_header;
  43156. /* pdev_id for identifying the MAC */
  43157. A_UINT32 pdev_id;
  43158. /*
  43159. * rf_path :
  43160. * 0 - primary RF path
  43161. * 1 - secondary RF path
  43162. */
  43163. A_UINT32 rf_path;
  43164. } wmi_pdev_set_rf_path_cmd_fixed_param;
  43165. typedef struct {
  43166. /*
  43167. * TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rf_path_event_fixed_param
  43168. */
  43169. A_UINT32 tlv_header;
  43170. /* pdev_id for identifying the MAC */
  43171. A_UINT32 pdev_id;
  43172. /*
  43173. * rf_path :
  43174. * 0 - primary RF path
  43175. * 1 - secondary RF path
  43176. */
  43177. A_UINT32 rf_path;
  43178. /*
  43179. * status :
  43180. * TRUE (0) - for recieved and cache the value in FW
  43181. * FALSE (1) :
  43182. * a. pdev_id for which secondary RF path is not available
  43183. * b. caching of the rf_path got failed in FW
  43184. */
  43185. A_UINT32 status;
  43186. } wmi_pdev_set_rf_path_event_fixed_param;
  43187. #define WMI_SET_RX_PEER_STATS_RESP_TYPE(rx_params, value) \
  43188. WMI_SET_BITS(rx_params, 0, 1, value)
  43189. #define WMI_GET_RX_PEER_STATS_RESP_TYPE(rx_params) \
  43190. WMI_GET_BITS(rx_params, 0, 1)
  43191. #define WMI_SET_RX_PEER_STATS_MCS(rx_params, value) \
  43192. WMI_SET_BITS(rx_params, 1, 5, value)
  43193. #define WMI_GET_RX_PEER_STATS_MCS(rx_params) \
  43194. WMI_GET_BITS(rx_params, 1, 5)
  43195. #define WMI_SET_RX_PEER_STATS_NSS(rx_params, value) \
  43196. WMI_SET_BITS(rx_params, 6, 4, value)
  43197. #define WMI_GET_RX_PEER_STATS_NSS(rx_params) \
  43198. WMI_GET_BITS(rx_params, 6, 4)
  43199. #define WMI_SET_RX_PEER_STATS_GI_LTF_TYPE(rx_params, value) \
  43200. WMI_SET_BITS(rx_params, 10, 4, value)
  43201. #define WMI_GET_RX_PEER_STATS_GI_LTF_TYPE(rx_params) \
  43202. WMI_GET_BITS(rx_params, 10, 4)
  43203. typedef enum {
  43204. WMI_PEER_RX_RESP_SU = 0,
  43205. WMI_PEER_RX_RESP_MIMO = 1,
  43206. WMI_PEER_RX_RESP_OFDMA = 2,
  43207. } WMI_PEER_RX_RESP_TYPE;
  43208. typedef struct {
  43209. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_manual_ul_ofdma_trig_rx_peer_userinfo */
  43210. A_UINT32 tlv_header;
  43211. /* Peer mac address */
  43212. wmi_mac_addr peer_macaddr;
  43213. /* Per peer RX parameters */
  43214. /* [0] - Flag to indicate if peer responded with QoS Data or QoS NULL.
  43215. * 0 -> indicates QoS NULL, 1-> indicates QoS Data response
  43216. * [5:1] - MCS - Peer response MCS
  43217. * [9:6] - NSS - Peer response NSS
  43218. * [13:10] - GI LTF Type - Peer response GI/LTF type
  43219. * 0 => gi == GI_1600 && ltf == 1x LTF
  43220. * 1 => gi == GI_1600 && ltf == 2x LTF
  43221. * 2 => gi == GI_3200 && ltf == 4x LTF
  43222. * [31:14] - Reserved
  43223. */
  43224. A_UINT32 rx_peer_stats;
  43225. /* Peer response per chain RSSI */
  43226. A_INT32 peer_per_chain_rssi[WMI_MAX_CHAINS];
  43227. } wmi_manual_ul_ofdma_trig_rx_peer_userinfo;
  43228. typedef struct {
  43229. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_manual_ul_ofdma_trig_rx_peer_userinfo_evt_fixed_param */
  43230. A_UINT32 tlv_header;
  43231. A_UINT32 vdev_id; /* VDEV identifier */
  43232. /* combined_rssi:
  43233. * RX Combined RSSI in dBm
  43234. * Value indicates the average RSSI per 20MHz by averaging the total RSSI
  43235. * across entire BW for each OFDMA STA
  43236. */
  43237. A_INT32 combined_rssi;
  43238. /* rx_ppdu_resp_type:
  43239. * RX PPDU Response Type
  43240. * Refer WMI_PEER_RX_RESP_TYPE for possible values
  43241. */
  43242. A_UINT32 rx_ppdu_resp_type;
  43243. /* rx_resp_bw:
  43244. * RX response bandwidth
  43245. * 0 = 20 MHz
  43246. * 1 = 40 MHz
  43247. * 2 = 80 MHz
  43248. * 3 = 160 MHz
  43249. * 4 = 320 MHz
  43250. */
  43251. A_UINT32 rx_resp_bw;
  43252. /**
  43253. * This TLV is followed by TLVs below:
  43254. * wmi_manual_ul_ofdma_trig_rx_peer_userinfo rx_peer_userinfo[]
  43255. * TLV length specified by number of peer responses for manual
  43256. * UL OFDMA trigger
  43257. */
  43258. } wmi_manual_ul_ofdma_trig_rx_peer_userinfo_evt_fixed_param;
  43259. typedef enum _WMI_VDEV_PAUSE_TYPE
  43260. {
  43261. WMI_VDEV_PAUSE_TYPE_UNKNOWN = 0,
  43262. WMI_VDEV_PAUSE_TYPE_MLO_LINK = 1,
  43263. WMI_VDEV_PAUSE_TYPE_TX = 2,
  43264. } WMI_VDEV_PAUSE_TYPE;
  43265. typedef struct {
  43266. /** TLV tag and len; tag equals
  43267. * WMITLV_TAG_STRUC_wmi_vdev_pause_cmd_fixed_param */
  43268. A_UINT32 tlv_header;
  43269. /* VDEV identifier */
  43270. A_UINT32 vdev_id;
  43271. /** type of pause, refer to WMI_VDEV_PAUSE_TYPE */
  43272. A_UINT32 pause_type;
  43273. /** duration of pause, in unit of ms */
  43274. A_UINT32 pause_dur_ms;
  43275. } wmi_vdev_pause_cmd_fixed_param;
  43276. typedef struct {
  43277. A_UINT32 tlv_header;
  43278. A_UINT32 ieee_link_id; /* key to identify a link */
  43279. wmi_channel wmi_chan;
  43280. } wmi_mlo_link_bss_param;
  43281. typedef struct {
  43282. A_UINT32 tlv_header;
  43283. wmi_mac_addr ap_mld_macaddr;
  43284. /* max num of active links recommended by AP or applications */
  43285. A_UINT32 recommended_max_num_simultaneous_links;
  43286. /*
  43287. * The TLVs listed below follow this fixed_param TLV:
  43288. * wmi_mlo_link_bss_param link_bss_params[]:
  43289. * an array of links to be updated
  43290. */
  43291. } wmi_mlo_set_link_bss_params_cmd_fixed_param;
  43292. typedef enum _WMI_LINK_SWITCH_REASON {
  43293. WMI_MLO_LINK_SWITCH_REASON_RSSI_CHANGE = 1,
  43294. WMI_MLO_LINK_SWITCH_REASON_LOW_QUALITY = 2,
  43295. WMI_MLO_LINK_SWITCH_REASON_C2_CHANGE = 3,
  43296. WMI_MLO_LINK_SWITCH_REASON_HOST_FORCE = 4,
  43297. WMI_MLO_LINK_SWITCH_REASON_T2LM = 5,
  43298. WMI_MLO_LINK_SWITCH_REASON_WLM = 6,
  43299. WMI_MLO_LINK_SWITCH_REASON_HOST_FORCE_FOLLOWUP = 7,
  43300. WMI_MLO_LINK_SWITCH_REASON_MAX,
  43301. } WMI_LINK_SWITCH_REASON;
  43302. typedef struct {
  43303. A_UINT32 tlv_header;
  43304. A_UINT32 vdev_id; /*the vdev id assigned to curr_ieee_link_id*/
  43305. A_UINT32 curr_ieee_link_id; /*current link id on above vdev_id*/
  43306. A_UINT32 new_ieee_link_id; /*new link id on above vdev_id*/
  43307. A_UINT32 new_primary_freq; /*primay_freq for the new link on the vdev, in units of MHZ*/
  43308. A_UINT32 new_phymode; /*phymode for the new link on the vdev, see WLAN_PHY_MODE for definitions*/
  43309. A_UINT32 reason; /*see WMI_LINK_SWITCH_REASON for definition*/
  43310. } wmi_mlo_link_switch_req_evt_fixed_param;
  43311. typedef enum _WMI_LINK_SWITCH_CNF_REASON{
  43312. WMI_MLO_LINK_SWITCH_CNF_REASON_BSS_PARAMS_CHANGED = 1,
  43313. WMI_MLO_LINK_SWITCH_CNF_REASON_CONCURRECNY_CONFLICT = 2,
  43314. WMI_MLO_LINK_SWITCH_CNF_REASON_HOST_INTERNAL_ERROR = 3,
  43315. WMI_MLO_LINK_SWITCH_CNF_REASON_HOST_RESTORE_FORCE = 4,
  43316. WMI_MLO_LINK_SWITCH_CNF_REASON_MAX,
  43317. } WMI_LINK_SWITCH_CNF_REASON;
  43318. typedef enum _WMI_LINK_SWITCH_CNF_STATUS{
  43319. WMI_MLO_LINK_SWITCH_CNF_STATUS_ACCEPT = 0,
  43320. WMI_MLO_LINK_SWITCH_CNF_STATUS_REJECT = 1,
  43321. } WMI_LINK_SWITCH_CNF_STATUS;
  43322. typedef struct {
  43323. A_UINT32 tlv_header;
  43324. A_UINT32 vdev_id;
  43325. A_UINT32 status; /* see definition of WMI_LINK_SWITCH_CNF_STATUS */
  43326. A_UINT32 reason; /* see definition of WMI_LINK_SWITCH_CNF_REASON */
  43327. /*
  43328. * The following optional TLVs may follow this fixed_praam TLV,
  43329. * depending on the value of the reason field.
  43330. *
  43331. * wmi_mlo_link_set_active_cmd_fixed_param set_link_params[];
  43332. * The set_link_params array has one element when reason is
  43333. * WMI_MLO_LINK_SWITCH_CNF_REASON_HOST_RESTORE_FORCE and
  43334. * use_ieee_link_id_bitmap should always be filled with 1.
  43335. * In other cases the length of the set_link_params array shall be 0.
  43336. *
  43337. * wmi_mlo_set_active_link_number_param link_number_param[];
  43338. * Link number parameters, optional TLV.
  43339. * Present when force type is WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
  43340. * WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM.
  43341. * In other cases the length of array shall be 0.
  43342. *
  43343. * A_UINT32 ieee_link_id_bitmap[];
  43344. * present for WMI_MLO_LINK_FORCE_ACTIVE
  43345. * or WMI_MLO_LINK_FORCE_INACTIVE or WMI_MLO_LINK_NO_FORCE
  43346. * or WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
  43347. * WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM
  43348. * In other cases the length of array shall be 0.
  43349. *
  43350. * A_UINT32 ieee_link_id_bitmap2[];
  43351. * For force mode WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE ieee_link_id_bitmap2[]
  43352. * carries the inactive linkid bitmap.
  43353. * In other cases the length of the array shall be 0.
  43354. */
  43355. } wmi_mlo_link_switch_cnf_fixed_param;
  43356. typedef struct {
  43357. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_state_switch_req_evt_fixed_param */
  43358. A_UINT32 link_state_switch_count; /* Number of link state switch event pending, MAX 5 iteration */
  43359. } wmi_mlo_link_state_switch_req_evt_fixed_param;
  43360. typedef struct {
  43361. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_state_switch_trigger_reason_tlv_param */
  43362. A_UINT32 cur_active_ieee_bitmap; /* current active ieee linkbitmap */
  43363. A_UINT32 prev_active_ieee_bitmap; /* previous active iee linkbitmap */
  43364. A_UINT32 host_ref_fw_timestamp_ms; /* fw time stamp on refrence of TIME_STAMP_SYNC_CMD */
  43365. A_UINT32 reason_code; /* reason for link state switch trigger -
  43366. * refer to WMI_LINK_STATE_SWITCH_REASON
  43367. */
  43368. wmi_mac_addr ml_bssid; /* mac address of mld device */
  43369. } wmi_mlo_link_state_switch_trigger_reason;
  43370. typedef enum _WMI_LINK_STATE_SWITCH_REASON {
  43371. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_VDEV_READY = 0,
  43372. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_ULL_MODE = 1,
  43373. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_T2LM_ENABLED = 2,
  43374. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_T2LM_DISABLED = 3,
  43375. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_FORCE_ENABLED = 4,
  43376. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_FORCE_DISABLED = 5,
  43377. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_LINK_QUALITY = 6,
  43378. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_LINK_CAPACITY = 7,
  43379. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_RSSI = 8,
  43380. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_BMISS = 9,
  43381. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_BT_STATUS = 10,
  43382. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_MAX,
  43383. } WMI_LINK_STATE_SWITCH_REASON;
  43384. #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_ML_PEER_ID_GET(new_link_info) WMI_GET_BITS(new_link_info, 0, 16)
  43385. #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_ML_PEER_ID_SET(new_link_info, value) WMI_SET_BITS(new_link_info, 0, 16, value)
  43386. #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_HW_LINK_ID_GET(new_link_info) WMI_GET_BITS(new_link_info, 16, 16)
  43387. #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_HW_LINK_ID_SET(new_link_info, value) WMI_SET_BITS(new_link_info, 16, 16, value)
  43388. typedef struct {
  43389. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_new_primary_link_peer_info */
  43390. A_UINT32 tlv_header;
  43391. union {
  43392. A_UINT32 new_link_info;
  43393. struct {
  43394. A_UINT32 ml_peer_id :16,
  43395. hw_link_id :16;
  43396. };
  43397. };
  43398. } wmi_mlo_new_primary_link_peer_info;
  43399. typedef struct {
  43400. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_fixed_param */
  43401. A_UINT32 tlv_header;
  43402. A_UINT32 vdev_id;
  43403. /**
  43404. * Following this structure is
  43405. * the array of "wmi_mlo_new_primary_link_peer_info" TLVs.
  43406. */
  43407. } wmi_mlo_primary_link_peer_migration_fixed_param;
  43408. #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_STATUS_ML_PEER_ID_GET(status_info) WMI_GET_BITS(status_info, 0, 16)
  43409. #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_STATUS_ML_PEER_ID_SET(status_info, value) WMI_SET_BITS(status_info, 0, 16, value)
  43410. #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_STATUS_STATUS_GET(status_info) WMI_GET_BITS(status_info, 16, 8)
  43411. #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_STATUS_STATUS_SET(status_info, value) WMI_SET_BITS(status_info, 16, 8, value)
  43412. typedef enum {
  43413. WMI_PRIMARY_LINK_PEER_MIGRATION_SUCCESS,
  43414. WMI_PRIMARY_LINK_PEER_MIGRATION_IN_PROGRESS,
  43415. WMI_PRIMARY_LINK_PEER_MIGRATION_DELETE_IN_PROGRESS,
  43416. WMI_PRIMARY_LINK_PEER_MIGRATION_DELETED,
  43417. WMI_PRIMARY_LINK_PEER_MIGRATION_TX_PIPES_FAILED,
  43418. WMI_PRIMARY_LINK_PEER_MIGRATION_RX_PIPES_FAILED,
  43419. /* Add any new status above this line */
  43420. WMI_PRIMARY_LINK_PEER_MIGRATION_FAIL = 255,
  43421. } WMI_PRIMARY_LINK_PEER_MIGRATION_STATUS;
  43422. typedef struct {
  43423. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_status */
  43424. A_UINT32 tlv_header;
  43425. union {
  43426. A_UINT32 status_info;
  43427. struct {
  43428. A_UINT32 ml_peer_id :16,
  43429. status :8, /* WMI_PRIMARY_LINK_PEER_MIGRATION_STATUS */
  43430. reserved :8;
  43431. };
  43432. };
  43433. } wmi_mlo_primary_link_peer_migration_status;
  43434. typedef struct {
  43435. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_compl_fixed_param */
  43436. A_UINT32 tlv_header;
  43437. A_UINT32 vdev_id;
  43438. /**
  43439. * Following the fixed param is
  43440. * the array of TLVs "wmi_mlo_primary_link_peer_migration_status".
  43441. */
  43442. } wmi_mlo_primary_link_peer_migration_compl_fixed_param;
  43443. /* WMI_AUX_DEV_CAPS_SUPPORTED_MODE:
  43444. * How many bits to shift for each supported mode.
  43445. * This works just like Linux file permission bits
  43446. * (i.e. user|group|other values for each rwx perms).
  43447. */
  43448. typedef enum _WMI_AUX_DEV_CAPS_SUPPORTED_MODE {
  43449. WMI_AUX_DEV_SUPPORTED_MODE_SCAN = 0,
  43450. WMI_AUX_DEV_SUPPORTED_MODE_LISTEN = 1,
  43451. WMI_AUX_DEV_SUPPORTED_MODE_EMLSR = 2,
  43452. } WMI_AUX_DEV_CAPS_SUPPORTED_MODE;
  43453. /* wmi_aux_dev_capabilities:
  43454. * TLV representing AUX mode capabilities
  43455. * A one-dimensional "flattened" array of these structs shall represent
  43456. * all AUX capabilities regardless of the actual AUX count.
  43457. *
  43458. * For example, if 2x AUX are present, then the array is expected to look
  43459. * something like this:
  43460. * wmi_aux_dev_capabilities caps[] = {
  43461. * // 4 elements for AUX_0 - one element for each HW mode:
  43462. * AUX_0_single_mac,
  43463. * AUX_0_dual_mac,
  43464. * AUX_0_single_mac_emlsr,
  43465. * AUX_0_split_emlsr,
  43466. * // 4 elements for AUX_1:
  43467. * AUX_1_single_mac,
  43468. * AUX_1_dual_mac,
  43469. * AUX_1_single_mac_emlsr,
  43470. * AUX_1_split_emlsr,
  43471. * };
  43472. * In effect, indexes 0 to 3 (inclusive) represent the first AUX,
  43473. * 4 to 7 (inclusive) represent the second, and so on.
  43474. * Note that each element explicitly identifies which AUX and HW mode it
  43475. * corresponds to, via the aux_index and hw_mode_id fields respectively.
  43476. * So the receiver should not assume the ordering will be as shown above
  43477. * (AUX0 single, AUX0 dual, AUX0 single emlsr, AUX0 split emlsr,
  43478. * AUX1 single, AUX1 dual, AUX1 single emlsr, AUX1 split emlsr)
  43479. * but instead should directly check each element's aux_index and hw_mode_id
  43480. * fields.
  43481. */
  43482. typedef struct {
  43483. /* tlv_header -- WMITLV_TAG_STRUC_wmi_aux_dev_capabilities */
  43484. A_UINT32 tlv_header;
  43485. /* aux_index -- Which AUX this TLV applies to.
  43486. Ex: aux_index=0 is first AUX, aux_index=1 is second AUX, etc */
  43487. A_UINT32 aux_index;
  43488. /*
  43489. * This TLV represents which AUX capabilities are supported by
  43490. * which MAC for the given HW mode.
  43491. * pdev ID value of 0x0 denotes that the AUX mode is not applicable
  43492. * for the given HW mode.
  43493. *
  43494. * hw_mode_id | Single DBS_OR_SBS AUX eMLSR AUX eMLSR
  43495. * | Phy single split
  43496. * --------------------------------------------------------------
  43497. * supported_modes | SCAN/ SCAN/ EMLSR EMLSR
  43498. * | LISTEN LISTEN
  43499. * listen_pdev_id_map | 0x1 0x2 0x0 0x0
  43500. * emlsr_pdev_id_map | 0x0 0x0 0x1 0x2
  43501. */
  43502. /* hw_mode_id:
  43503. * Which HW mode this TLV applies to.
  43504. * HW mode values are defined in WMI_HW_MODE_CONFIG_TYPE.
  43505. */
  43506. A_UINT32 hw_mode_id;
  43507. /* supported_modes:
  43508. * Which mode this AUX supports for the HW mode defined in hw_mode_id.
  43509. * Shift amounts are defined in WMI_AUX_DEV_CAPS_SUPPORTED_MODE.
  43510. * This works just like user|group|other bits for Linux file permissions:
  43511. * 0x1 = SCAN (0 0 1)
  43512. * 0x2 = LISTEN (0 1 0)
  43513. * 0x3 = SCAN+LISTEN (0 1 1)
  43514. * 0x4 = EMLSR (1 0 0)
  43515. */
  43516. A_UINT32 supported_modes_bitmap;
  43517. /* listen_pdev_id_map:
  43518. * Which AUX MAC can listen/scan for the HW mode described in hw_mode_id.
  43519. * 0x0 - AUX cannot be used for listen mode.
  43520. * 0x1 - AUX can be attached to MAC-0 in AUX listen mode.
  43521. * 0x2 - AUX can be attached to MAC-1 in AUX listen mode.
  43522. */
  43523. A_UINT32 listen_pdev_id_map;
  43524. /* emlsr_pdev_id_map:
  43525. * Which AUX MAC can perform eMLSR for the HW mode described in hw_mode_id.
  43526. * 0x0 - AUX cannot be used for eMLSR mode.
  43527. * 0x1 - AUX can be attached to MAC-0 in AUX eMLSR mode.
  43528. * 0x2 - AUX can be attached to MAC-1 in AUX eMLSR mode.
  43529. */
  43530. A_UINT32 emlsr_pdev_id_map;
  43531. } wmi_aux_dev_capabilities;
  43532. typedef struct {
  43533. /** TLV tag and len; tag equals
  43534. * WMITLV_TAG_STRUC_wmi_pdev_wsi_stats_info_cmd_fixed_param
  43535. */
  43536. A_UINT32 tlv_header;
  43537. A_UINT32 pdev_id; /* for identifying the MAC */
  43538. A_UINT32 wsi_ingress_load_info;
  43539. A_UINT32 wsi_egress_load_info;
  43540. } wmi_pdev_wsi_stats_info_cmd_fixed_param;
  43541. typedef struct {
  43542. /** TLV tag and len; tag equals
  43543. * WMITLV_TAG_STRUC_wmi_csa_event_status_ind_fixed_param
  43544. */
  43545. A_UINT32 tlv_header;
  43546. A_UINT32 vdev_id;
  43547. A_UINT32 status; /* accept: 1 reject : 0 */
  43548. } wmi_csa_event_status_ind_fixed_param;
  43549. typedef struct {
  43550. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_utf_cmd_fixed_param */
  43551. A_UINT32 tlv_header;
  43552. A_UINT32 pdev_id;
  43553. } wmi_pdev_utf_cmd_fixed_param;
  43554. typedef struct {
  43555. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_utf_event_fixed_param */
  43556. A_UINT32 tlv_header;
  43557. A_UINT32 pdev_id;
  43558. } wmi_pdev_utf_event_fixed_param;
  43559. typedef struct {
  43560. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_led_blink_rate_table */
  43561. A_UINT32 tlv_header;
  43562. A_UINT32 on_time; /* units = milliseconds */
  43563. A_UINT32 off_time; /* units = milliseconds */
  43564. } wmi_led_blink_rate_table;
  43565. typedef struct {
  43566. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enable_led_blink_download_rate_table_fixed_param */
  43567. A_UINT32 tlv_header;
  43568. /* Pdev Id 0 or 1 based on split phy */
  43569. A_UINT32 pdev_id;
  43570. /* Feature enable or disable flag 0-disable 1-enable */
  43571. A_UINT32 blink_enable_flag;
  43572. /* Bandwidth (Mbps) of each index in the blink rate table.
  43573. * This quantum specification tells the FW which of the blink rate table
  43574. * elements to use; the FW will divide the data rate by this bw_per_index
  43575. * and round down, to obtain the index into the rate table for the blink
  43576. * rate corresponding to the data rate.
  43577. */
  43578. A_UINT32 bw_per_index;
  43579. /**
  43580. * Following this fixed_param TLV are the following additional TLVs:
  43581. * - wmi_led_blink_rate_table led_blink_rate_table[]
  43582. * The led_blink_rate_table[] elements need to be ordered by
  43583. * increasing data rate, so that by dividing the data rate by
  43584. * bw_per_index, the FW can find which index/element of the
  43585. * led_blink_rate_table[] array to use.
  43586. */
  43587. } wmi_enable_led_blink_download_rate_table_fixed_param;
  43588. typedef enum {
  43589. /* Used when peer attempts connection with vdev */
  43590. VDEV_OOB_CONNECT_REQUEST = 0,
  43591. /* Used when upper layers wanted to cancel the connect request */
  43592. VDEV_OOB_CONNECT_CANCEL = 1,
  43593. /* Used as a response from FW that start request is accepted */
  43594. VDEV_OOB_CONNECT_STARTED = 2,
  43595. /*
  43596. * Used as a response when connection is complete, or as a response
  43597. * to cancel command.
  43598. */
  43599. VDEV_OOB_CONNECT_COMPLETED = 3,
  43600. /* Used as a response if connect request can not be honored in FW */
  43601. VDEV_OOB_CONNECT_CANCELLED = 4,
  43602. VDEV_OOB_CONNECT_INVALID = 255,
  43603. } VDEV_OOB_CONNECT_REQ_RESP_TYPE;
  43604. typedef struct {
  43605. /** TLV tag and len; tag equals
  43606. * WMITLV_TAG_STRUC_wmi_vdev_oob_connection_req_cmd_fixed_param */
  43607. A_UINT32 tlv_header;
  43608. /* VDEV identifier */
  43609. A_UINT32 vdev_id;
  43610. /* OOB connection request type based on VDEV_OOB_CONNECT_REQ_RESP_TYPE */
  43611. A_UINT32 connect_req_type;
  43612. /* vdev_available_duration:
  43613. * specifies duration in msecs for which device needs to be available
  43614. * on vdev chan
  43615. */
  43616. A_UINT32 vdev_available_duration;
  43617. } wmi_vdev_oob_connection_req_cmd_fixed_param;
  43618. typedef struct {
  43619. /** TLV tag and len; tag equals
  43620. * WMITLV_TAG_STRUC_wmi_vdev_oob_connection_resp_event_fixed_param */
  43621. A_UINT32 tlv_header;
  43622. /* VDEV identifier */
  43623. A_UINT32 vdev_id;
  43624. /* OOB connection response type based on VDEV_OOB_CONNECT_REQ_RESP_TYPE */
  43625. A_UINT32 connect_resp_type;
  43626. } wmi_vdev_oob_connection_resp_event_fixed_param;
  43627. typedef enum {
  43628. WMI_AUDIO_TRANSPORT_SWITCH_STATUS_FAIL = 0,
  43629. WMI_AUDIO_TRANSPORT_SWITCH_STATUS_SUCCESS,
  43630. WMI_AUDIO_TRANSPORT_SWITCH_STATUS_TIMEOUT,
  43631. } WMI_AUDIO_TRANSPORT_SWITCH_RESPONSE_STATUS;
  43632. typedef enum {
  43633. WMI_AUDIO_TRANSPORT_SWITCH_TYPE_NON_WLAN = 0,
  43634. WMI_AUDIO_TRANSPORT_SWITCH_TYPE_WLAN = 1,
  43635. } WMI_AUDIO_TRANSPORT_SWITCH_TYPE;
  43636. typedef struct {
  43637. /** TLV tag and len; tag equals
  43638. * WMITLV_TAG_STRUC_wmi_audio_transport_switch_type_event_fixed_param */
  43639. A_UINT32 tlv_header;
  43640. /** This indicates whether FW is requesting for switch to WLAN(XPAN) or non-WLAN(BLE) */
  43641. A_UINT32 switch_type; /*see definition of WMI_AUDIO_TRANSPORT_SWITCH_TYPE */
  43642. } wmi_audio_transport_switch_type_event_fixed_param;
  43643. typedef struct {
  43644. /** TLV tag and len; tag equals
  43645. * WMITLV_TAG_STRUC_wmi_audio_transport_switch_resp_status_cmd_fixed_param */
  43646. A_UINT32 tlv_header;
  43647. /** This indicates whether switch response status is success, fail, timeout */
  43648. A_UINT32 switch_response_status; /* see definition of WMI_AUDIO_TRANSPORT_SWITCH_RESPONSE_STATUS */
  43649. /** This indicates for which switch type (WLAN(XPAN) or non-WLAN(BLE)) the switch response status is intended to */
  43650. A_UINT32 switch_type; /* see definition of WMI_AUDIO_TRANSPORT_SWITCH_TYPE */
  43651. } wmi_audio_transport_switch_resp_status_cmd_fixed_param;
  43652. enum wmi_wifi_radar_cmd {
  43653. wmi_wifi_radar_capture_disable,
  43654. wmi_wifi_radar_capture_enable,
  43655. wmi_wifi_radar_rx_cal,
  43656. wmi_wifi_radar_tx_cal,
  43657. wmi_wifi_radar_cmd_max = 0xff
  43658. };
  43659. typedef struct {
  43660. /** TLV tag and len; tag equals
  43661. * WMITLV_TAG_STRUC_wmi_pdev_enable_wifi_radar_cmd_fixed_param
  43662. */
  43663. A_UINT32 tlv_header;
  43664. /* host pdev id */
  43665. A_UINT32 pdev_id;
  43666. /* tx_chain_mask:
  43667. * tx chain mask to use for wifi radar tx.
  43668. * Only one chain is supposed to be set.
  43669. */
  43670. A_UINT32 tx_chain_mask;
  43671. /* rx chain mask for wifi radar capture. Can have multiple bits set. */
  43672. A_UINT32 rx_chain_mask;
  43673. /* number of LTFs to send for capture */
  43674. A_UINT32 num_ltf_tx;
  43675. /* number of extra LTFs that are to be skipped for accumulation */
  43676. A_UINT32 num_skip_ltf_rx;
  43677. /* number of LTFs to use for accumulation. Must be power of 2. */
  43678. A_UINT32 num_ltf_accumulation;
  43679. /* bandwidth to use for capture
  43680. * 0 = 20 MHz
  43681. * 1 = 40 MHz
  43682. * 2 = 80 MHz
  43683. * 3 = 160 MHz
  43684. * 4 = 320 MHz
  43685. */
  43686. A_UINT32 bw;
  43687. /* enum wmi_wifi_radar_cmd */
  43688. A_UINT32 capture_calibrate;
  43689. /* periodicity of capture in milliseconds */
  43690. A_UINT32 capture_interval_ms;
  43691. } wmi_pdev_enable_wifi_radar_cmd_fixed_param;
  43692. #define WMI_PDEV_WIFI_RADAR_CAL_COMPLETION_STATUS_GET(cal_status_array, txchnIdx, rxchnIdx) WMI_GET_BITS(*(cal_status_array + txchnIdx), rxchnIdx, 1)
  43693. #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)
  43694. typedef struct {
  43695. /** TLV tag and len; tag equals
  43696. * WMITLV_TAG_STRUC_wmi_wifi_radar_cal_configuration
  43697. */
  43698. A_UINT32 tlv_header;
  43699. /* ID of pdev for which the calibration is completed */
  43700. A_UINT32 pdev_id;
  43701. /* Packet bandwidth of WiFi Radar packet used for calibration
  43702. * 0 = 20 MHz
  43703. * 1 = 40 MHz
  43704. * 2 = 80 MHz
  43705. * 3 = 160 MHz
  43706. * 4 = 320 MHz
  43707. */
  43708. A_UINT32 wifi_radar_pkt_bw;
  43709. /* Channel bandwidth
  43710. * 0 = 20 MHz
  43711. * 1 = 40 MHz
  43712. * 2 = 80 MHz
  43713. * 3 = 160 MHz
  43714. * 4 = 320 MHz
  43715. */
  43716. A_UINT32 channel_bw;
  43717. /* Channel Center frequency in MHz */
  43718. A_UINT32 band_center_freq;
  43719. /* Number of LTF configured in the WiFi Radar Tx packet during calibration */
  43720. A_UINT32 num_ltf_tx;
  43721. /* Number of LTF skipped during Rx of the calibration packet */
  43722. A_UINT32 num_skip_ltf_rx;
  43723. /* Number of LTF accumulated during Rx of the calibration packet */
  43724. A_UINT32 num_ltf_accumulation;
  43725. /* Calibration status for each chain combination
  43726. * Word 0: tx chain 0 cal statuses:
  43727. * Bit 0: rx chain 0 cal status
  43728. * Bit 1: rx chain 1 cal status
  43729. * etc.
  43730. * Word 1: tx chain 1 cal statuses:
  43731. * Bit 0: rx chain 0 cal status
  43732. * Bit 1: rx chain 1 cal status
  43733. * etc.
  43734. * etc.
  43735. * Cal status values: success = 1, Failure = 0
  43736. */
  43737. A_UINT32 per_chain_cal_status[WMI_MAX_CHAINS];
  43738. } wmi_pdev_wifi_radar_cal_completion_status_event_param;
  43739. typedef struct {
  43740. /* WMITLV_TAG_STRUC_wmi_pdev_enable_xlna_cmd_fixed_param */
  43741. A_UINT32 tlv_header;
  43742. /* ID of pdev for which the xLNA needs to be configured */
  43743. A_UINT32 pdev_id;
  43744. /* 1 - Enable, 0 - Disable */
  43745. A_UINT32 xLNA_enable;
  43746. } wmi_pdev_enable_xlna_cmd_fixed_param;
  43747. typedef struct {
  43748. /* WMITLV_TAG_STRUC_wmi_pdev_enable_xlna_event_fixed_param */
  43749. A_UINT32 tlv_header;
  43750. /* to identify for which pdev the response is received */
  43751. A_UINT32 pdev_id;
  43752. /* Return status: 0 - Success, else - Failure */
  43753. A_UINT32 status;
  43754. } wmi_pdev_enable_xlna_event_fixed_param;
  43755. /**
  43756. * bits 0-15 are used for non interative traffic types like video streaming,
  43757. * or ping
  43758. * bit 16-31 are reserved for interactive traffic types like gaming, VoIP,
  43759. * or video conferencing
  43760. */
  43761. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_STREAMING_M 0x00000001
  43762. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_STREAMING_S 0
  43763. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_PING_M 0x00000002
  43764. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_PING_S 1
  43765. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_BACKGROUND_M 0x00000004
  43766. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_BACKGROUND_S 2
  43767. /* bits 3-15 are reserved for new non-interactive traffic types */
  43768. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_GAMING_M 0x00010000
  43769. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_GAMING_S 16
  43770. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_VOIP_M 0x00020000
  43771. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_VOIP_S 17
  43772. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_VIDEO_CONF_M 0x00040000
  43773. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_VIDEO_CONF_S 18
  43774. /* bits 19-31 are reserved for new interactive traffic types */
  43775. typedef struct {
  43776. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_active_traffic_map_cmd_fixed_param */
  43777. A_UINT32 vdev_id;
  43778. wmi_mac_addr peer_macaddr; /* peer MAC address */
  43779. /* active_traffic_map:
  43780. * This field is a bitmap showing traffic types known to be currently
  43781. * present within the vdev.
  43782. * Refer to the WMI_PEER_ACTIVE_TRAFFIC_ definitions that specify which
  43783. * bits within the bitmap correspond to which traffic types.
  43784. */
  43785. A_UINT32 active_traffic_map;
  43786. } wmi_peer_active_traffic_map_cmd_fixed_param;
  43787. /*
  43788. * WMI_REQUEST_OPM_STATS_CMDID triggered by host to collect OPM stats for trafic types identified by STC
  43789. * in respose this FW will send OEM_respose_event_id WMI_OEM_DATA_CMD_OPM_STATS
  43790. *
  43791. */
  43792. typedef struct {
  43793. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_opm_stats_cmd_fixed_param */
  43794. A_UINT32 pdev_id; /** pdev_id for identifying the MAC */
  43795. } wmi_request_opm_stats_cmd_fixed_param;
  43796. /* wmi command to suspend SAP vdev */
  43797. typedef struct {
  43798. /** TLV tag and len; tag equals
  43799. * WMITLV_TAG_STRUC_wmi_set_ap_suspend_resume_cmd_fixed_param */
  43800. A_UINT32 tlv_header;
  43801. /* VDEV identifier */
  43802. A_UINT32 vdev_id; /* If 0xFF, find vdevs corresponding to MLD MAC address */
  43803. wmi_mac_addr mld_mac_address; /* MLD MAC address */
  43804. A_UINT32 is_ap_suspend; /* 1 = suspend, 0 = resume */
  43805. } wmi_set_ap_suspend_resume_fixed_param;
  43806. typedef struct {
  43807. /** TLV tag and len; tag equals
  43808. * WMITLV_TAG_STRUC_wmi_mgmt_srng_reap_event_fixed_param */
  43809. A_UINT32 tlv_header;
  43810. /** timestamp_tp_update_ms:
  43811. * This indicates the last time the tail pointer was updated by FW
  43812. * after filling MGMT SRNG entry.
  43813. * The timestamp is from the FW CPU's internal clock, in milliseconds units.
  43814. */
  43815. A_UINT32 timestamp_tp_update_ms;
  43816. /** This indicates the position of the tail pointer as last updated by FW */
  43817. A_UINT32 tail_pointer;
  43818. } wmi_mgmt_srng_reap_event_fixed_param;
  43819. typedef struct {
  43820. /** TLV tag and len; tag equals
  43821. * WMITLV_TAG_STRUC_wmi_mlo_peer_tid_to_link_map_event_fixed_param */
  43822. A_UINT32 tlv_header;
  43823. /* status takes values from WMI_MLO_TID_TO_LINK_MAP_STATUS */
  43824. A_UINT32 status;
  43825. /* Vdev_id on which T2LM command request is received */
  43826. A_UINT32 vdev_id;
  43827. } wmi_mlo_peer_tid_to_link_map_event_fixed_param;
  43828. /* ADD NEW DEFS HERE */
  43829. // {
  43830. /*****************************************************************************
  43831. * The following structures are deprecated. DO NOT USE THEM!
  43832. */
  43833. /** Max number of channels in the schedule. */
  43834. #define OCB_CHANNEL_MAX (5)
  43835. /* NOTE: Make sure these data structures are identical to those
  43836. * defined in sirApi.h */
  43837. typedef struct
  43838. {
  43839. /** Arbitration Inter-Frame Spacing. Range: 2-15 */
  43840. A_UINT32 aifsn;
  43841. /** Contention Window minimum. Range: 1 - 10 */
  43842. A_UINT32 cwmin;
  43843. /** Contention Window maximum. Range: 1 - 10 */
  43844. A_UINT32 cwmax;
  43845. } wmi_qos_params_t;
  43846. typedef struct {
  43847. A_UINT32 tlv_header;
  43848. A_UINT32 vdev_id;
  43849. A_UINT32 tidmap; /* Bitmap specifying the TIDs for which prohibit would be set/unset */
  43850. A_UINT32 prohibit_enable; /* 0 for Disable, 1 for Enable */
  43851. } wmi_vdev_param_enable_sr_prohibit_fixed_param;
  43852. typedef struct
  43853. {
  43854. /** Channel frequency in MHz */
  43855. A_UINT32 chan_freq;
  43856. /** Channel duration in ms */
  43857. A_UINT32 duration;
  43858. /** Start guard interval in ms */
  43859. A_UINT32 start_guard_interval;
  43860. /** End guard interval in ms */
  43861. A_UINT32 end_guard_interval;
  43862. /** Transmit power in dBm, range 0 - 23 */
  43863. A_UINT32 tx_power;
  43864. /** Transmit datarate in Mbps */
  43865. A_UINT32 tx_rate;
  43866. /** QoS parameters for each AC */
  43867. wmi_qos_params_t qos_params[WLAN_MAX_AC];
  43868. /** 1 to enable RX stats for this channel, 0 otherwise */
  43869. A_UINT32 rx_stats;
  43870. } wmi_ocb_channel_t;
  43871. typedef struct {
  43872. /** TLV tag and len; tag equals
  43873. * WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */
  43874. A_UINT32 tlv_header;
  43875. /* VDEV identifier */
  43876. A_UINT32 vdev_id;
  43877. /** Number of valid channels in the channels array */
  43878. A_UINT32 num_channels;
  43879. /** The array of channels */
  43880. wmi_ocb_channel_t channels[OCB_CHANNEL_MAX];
  43881. /** 1 to allow off-channel tx, 0 otherwise */
  43882. A_UINT32 off_channel_tx; /* Not supported */
  43883. } wmi_ocb_set_sched_cmd_fixed_param;
  43884. typedef struct {
  43885. /** Return status. 0 for success, non-zero otherwise */
  43886. A_UINT32 status;
  43887. } wmi_ocb_set_sched_event_fixed_param;
  43888. /*****************************************************************************
  43889. * END DEPRECATED
  43890. */
  43891. // }
  43892. /* ADD NEW DEFS ABOVE THIS DEPRECATED SECTION */
  43893. #ifdef __cplusplus
  43894. }
  43895. #endif
  43896. #endif /*_WMI_UNIFIED_H_*/
  43897. /**@}*/