wmi_unified.h 1.5 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838
  1. /*
  2. * Copyright (c) 2010-2021 The Linux Foundation. All rights reserved.
  3. *
  4. * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  5. *
  6. *
  7. * Permission to use, copy, modify, and/or distribute this software for
  8. * any purpose with or without fee is hereby granted, provided that the
  9. * above copyright notice and this permission notice appear in all
  10. * copies.
  11. *
  12. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  13. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  14. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  15. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  16. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  17. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  18. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  19. * PERFORMANCE OF THIS SOFTWARE.
  20. */
  21. /*
  22. * This file was originally distributed by Qualcomm Atheros, Inc.
  23. * under proprietary terms before Copyright ownership was assigned
  24. * to the Linux Foundation.
  25. */
  26. /**
  27. * @addtogroup WMIAPI
  28. *@{
  29. */
  30. /** @file
  31. * This file specifies the WMI interface for the Software Architecture.
  32. *
  33. * It includes definitions of all the commands and events. Commands are messages
  34. * from the host to the target. Events and Replies are messages from the target
  35. * to the host.
  36. *
  37. * Ownership of correctness in regards to WMI commands
  38. * belongs to the host driver and the target is not required to validate
  39. * parameters for value, proper range, or any other checking.
  40. *
  41. * Guidelines for extending this interface are below.
  42. *
  43. * 1. Add new WMI commands ONLY within the specified range - 0x9000 - 0x9fff
  44. * 2. Use ONLY A_UINT32 type for defining member variables within WMI command/event
  45. * structures. Do not use A_UINT8, A_UINT16, A_BOOL or enum types within these structures.
  46. * 3. DO NOT define bit fields within structures. Implement bit fields using masks
  47. * if necessary. Do not use the programming language's bit field definition.
  48. * 4. Define macros for encode/decode of A_UINT8, A_UINT16 fields within the A_UINT32
  49. * variables. Use these macros for set/get of these fields. Try to use this to
  50. * optimize the structure without bloating it with A_UINT32 variables for every lower
  51. * sized field.
  52. * 5. Do not use PACK/UNPACK attributes for the structures as each member variable is
  53. * already 4-byte aligned by virtue of being a A_UINT32 type.
  54. * 6. Comment each parameter part of the WMI command/event structure by using the
  55. * 2 stars at the begining of C comment instead of one star to enable HTML document
  56. * generation using Doxygen.
  57. *
  58. */
  59. #ifndef _WMI_UNIFIED_H_
  60. #define _WMI_UNIFIED_H_
  61. #ifdef __cplusplus
  62. extern "C" {
  63. #endif
  64. #include <wlan_defs.h>
  65. #include <wmi_services.h>
  66. /*
  67. * Include the defs of vendor-specific messages (or possibly dummy defs
  68. * if there are no actual vendor-specific message defs).
  69. */
  70. #include <wmi_unified_vendor.h>
  71. #define ATH_MAC_LEN 6 /**< length of MAC in bytes */
  72. #define WMI_EVENT_STATUS_SUCCESS 0 /* Success return status to host */
  73. #define WMI_EVENT_STATUS_FAILURE 1 /* Failure return status to host */
  74. #define MAX_TX_RATE_VALUES 10 /*Max Tx Rates*/
  75. #define MAX_RSSI_VALUES 10 /*Max Rssi values*/
  76. #define WMI_MAX_CHAINS 8
  77. #define WMI_MAX_CHAINS_FOR_AOA_RCC 2
  78. #define MAX_AOA_PHASEDELTA 31 /* 62 gain values */
  79. /* The WLAN_MAX_AC macro cannot be changed without breaking
  80. WMI compatibility. */
  81. /* The maximum value of access category */
  82. #define WLAN_MAX_AC 4
  83. /*
  84. * These don't necessarily belong here; but as the MS/SM macros require
  85. * ar6000_internal.h to be included, it may not be defined as yet.
  86. */
  87. #define WMI_F_MS(_v, _f) \
  88. (((_v) & (_f)) >> (_f##_S))
  89. /*
  90. * This breaks the "good macro practice" of only referencing each
  91. * macro field once (to avoid things like field++ from causing issues.)
  92. */
  93. #define WMI_F_RMW(_var, _v, _f) \
  94. do { \
  95. (_var) &= ~(_f); \
  96. (_var) |= (((_v) << (_f##_S)) & (_f)); \
  97. } while (0)
  98. #define WMI_GET_BITS(_val,_index,_num_bits) \
  99. (((_val) >> (_index)) & ((1 << (_num_bits)) - 1))
  100. #define WMI_SET_BITS(_var,_index,_num_bits,_val) do { \
  101. (_var) &= ~(((1 << (_num_bits)) - 1) << (_index)); \
  102. (_var) |= (((_val) & ((1 << (_num_bits)) - 1)) << (_index)); \
  103. } while (0)
  104. /**
  105. * A packed array is an array where each entry in the array is less than
  106. * or equal to 16 bits, and the entries are stuffed into an A_UINT32 array.
  107. * For example, if each entry in the array is 11 bits, then you can stuff
  108. * an array of 4 11-bit values into an array of 2 A_UINT32 values.
  109. * The first 2 11-bit values will be stored in the first A_UINT32,
  110. * and the last 2 11-bit values will be stored in the second A_UINT32.
  111. */
  112. #define WMI_PACKED_ARR_SIZE(num_entries,bits_per_entry) \
  113. (((num_entries) / (32 / (bits_per_entry))) + \
  114. (((num_entries) % (32 / (bits_per_entry))) ? 1 : 0))
  115. #define WMI_RETURN_STRING(str) case ((str)): return (A_UINT8 *)(# str);
  116. static INLINE A_UINT32 wmi_packed_arr_get_bits(A_UINT32 *arr,
  117. A_UINT32 entry_index, A_UINT32 bits_per_entry)
  118. {
  119. A_UINT32 entries_per_uint = (32 / bits_per_entry);
  120. A_UINT32 uint_index = (entry_index / entries_per_uint);
  121. A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
  122. A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
  123. A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
  124. return (arr[uint_index] >> start_bit_in_uint) &
  125. ((1 << bits_per_entry) - 1);
  126. }
  127. static INLINE void wmi_packed_arr_set_bits(A_UINT32 *arr, A_UINT32 entry_index,
  128. A_UINT32 bits_per_entry, A_UINT32 val)
  129. {
  130. A_UINT32 entries_per_uint = (32 / bits_per_entry);
  131. A_UINT32 uint_index = (entry_index / entries_per_uint);
  132. A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
  133. A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
  134. A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
  135. arr[uint_index] &= ~(((1 << bits_per_entry) - 1) << start_bit_in_uint);
  136. arr[uint_index] |=
  137. ((val & ((1 << bits_per_entry) - 1)) << start_bit_in_uint);
  138. }
  139. /** 2 word representation of MAC addr */
  140. typedef struct _wmi_mac_addr {
  141. /** upper 4 bytes of MAC address */
  142. A_UINT32 mac_addr31to0;
  143. /** lower 2 bytes of MAC address */
  144. A_UINT32 mac_addr47to32;
  145. } wmi_mac_addr;
  146. /** macro to convert MAC address from WMI word format to char array */
  147. #define WMI_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr,c_macaddr) do { \
  148. (c_macaddr)[0] = (((pwmi_mac_addr)->mac_addr31to0) >> 0) & 0xff; \
  149. (c_macaddr)[1] = (((pwmi_mac_addr)->mac_addr31to0) >> 8) & 0xff; \
  150. (c_macaddr)[2] = (((pwmi_mac_addr)->mac_addr31to0) >> 16) & 0xff; \
  151. (c_macaddr)[3] = (((pwmi_mac_addr)->mac_addr31to0) >> 24) & 0xff; \
  152. (c_macaddr)[4] = (((pwmi_mac_addr)->mac_addr47to32) >> 0) & 0xff; \
  153. (c_macaddr)[5] = (((pwmi_mac_addr)->mac_addr47to32) >> 8) & 0xff; \
  154. } while (0)
  155. /** macro to convert MAC address from char array to WMI word format */
  156. #define WMI_CHAR_ARRAY_TO_MAC_ADDR(c_macaddr,pwmi_mac_addr) do { \
  157. (pwmi_mac_addr)->mac_addr31to0 = \
  158. (((c_macaddr)[0] << 0) | \
  159. ((c_macaddr)[1] << 8) | \
  160. ((c_macaddr)[2] << 16) | \
  161. ((c_macaddr)[3] << 24)); \
  162. (pwmi_mac_addr)->mac_addr47to32 = ((c_macaddr)[4] | ((c_macaddr)[5] << 8));\
  163. } while (0)
  164. /*
  165. * The below function declarations are for implementations on some
  166. * platforms of the above macros, but in function form, to save code
  167. * memory by avoiding macro-inlining of a non-trivial amount of code.
  168. * These function versions of the above macros may not be available
  169. * on all host and target platforms.
  170. */
  171. void wmi_mac_addr_to_char_array(wmi_mac_addr *pwmi_mac_addr, A_UINT8 *c_macaddr);
  172. void wmi_char_array_to_mac_addr(A_UINT8 *c_macaddr, wmi_mac_addr *pwmi_mac_addr);
  173. /*
  174. * wmi command groups.
  175. */
  176. typedef enum {
  177. /* 0 to 2 are reserved */
  178. WMI_GRP_START = 0x3,
  179. WMI_GRP_SCAN = WMI_GRP_START, /* 0x3 */
  180. WMI_GRP_PDEV, /* 0x4 */
  181. WMI_GRP_VDEV, /* 0x5 */
  182. WMI_GRP_PEER, /* 0x6 */
  183. WMI_GRP_MGMT, /* 0x7 */
  184. WMI_GRP_BA_NEG, /* 0x8 */
  185. WMI_GRP_STA_PS, /* 0x9 */
  186. WMI_GRP_DFS, /* 0xa */
  187. WMI_GRP_ROAM, /* 0xb */
  188. WMI_GRP_OFL_SCAN, /* 0xc */
  189. WMI_GRP_P2P, /* 0xd */
  190. WMI_GRP_AP_PS, /* 0xe */
  191. WMI_GRP_RATE_CTRL, /* 0xf */
  192. WMI_GRP_PROFILE, /* 0x10 */
  193. WMI_GRP_SUSPEND, /* 0x11 */
  194. WMI_GRP_BCN_FILTER, /* 0x12 */
  195. WMI_GRP_WOW, /* 0x13 */
  196. WMI_GRP_RTT, /* 0x14 */
  197. WMI_GRP_SPECTRAL, /* 0x15 */
  198. WMI_GRP_STATS, /* 0x16 */
  199. WMI_GRP_ARP_NS_OFL, /* 0x17 */
  200. WMI_GRP_NLO_OFL, /* 0x18 */
  201. WMI_GRP_GTK_OFL, /* 0x19 */
  202. WMI_GRP_CSA_OFL, /* 0x1a */
  203. WMI_GRP_CHATTER, /* 0x1b */
  204. WMI_GRP_TID_ADDBA, /* 0x1c */
  205. WMI_GRP_MISC, /* 0x1d */
  206. WMI_GRP_GPIO, /* 0x1e */
  207. WMI_GRP_FWTEST, /* 0x1f */
  208. WMI_GRP_TDLS, /* 0x20 */
  209. WMI_GRP_RESMGR, /* 0x21 */
  210. WMI_GRP_STA_SMPS, /* 0x22 */
  211. WMI_GRP_WLAN_HB, /* 0x23 */
  212. WMI_GRP_RMC, /* 0x24 */
  213. WMI_GRP_MHF_OFL, /* 0x25 */
  214. WMI_GRP_LOCATION_SCAN, /* 0x26 */
  215. WMI_GRP_OEM, /* 0x27 */
  216. WMI_GRP_NAN, /* 0x28 */
  217. WMI_GRP_COEX, /* 0x29 */
  218. WMI_GRP_OBSS_OFL, /* 0x2a */
  219. WMI_GRP_LPI, /* 0x2b */
  220. WMI_GRP_EXTSCAN, /* 0x2c */
  221. WMI_GRP_DHCP_OFL, /* 0x2d */
  222. WMI_GRP_IPA, /* 0x2e */
  223. WMI_GRP_MDNS_OFL, /* 0x2f */
  224. WMI_GRP_SAP_OFL, /* 0x30 */
  225. WMI_GRP_OCB, /* 0x31 */
  226. WMI_GRP_SOC, /* 0x32 */
  227. WMI_GRP_PKT_FILTER, /* 0x33 */
  228. WMI_GRP_MAWC, /* 0x34 */
  229. WMI_GRP_PMF_OFFLOAD, /* 0x35 */
  230. WMI_GRP_BPF_OFFLOAD, /* 0x36 Berkeley Packet Filter */
  231. WMI_GRP_NAN_DATA, /* 0x37 */
  232. WMI_GRP_PROTOTYPE, /* 0x38 */
  233. WMI_GRP_MONITOR, /* 0x39 */
  234. WMI_GRP_REGULATORY, /* 0x3a */
  235. WMI_GRP_HW_DATA_FILTER, /* 0x3b */
  236. WMI_GRP_WLM, /* 0x3c WLAN Latency Manager */
  237. WMI_GRP_11K_OFFLOAD, /* 0x3d */
  238. WMI_GRP_TWT, /* 0x3e TWT (Target Wake Time) for STA and AP */
  239. WMI_GRP_MOTION_DET, /* 0x3f */
  240. WMI_GRP_SPATIAL_REUSE, /* 0x40 */
  241. WMI_GRP_ESP, /* 0x41 Estimate Service Parameters (802.11mc) */
  242. WMI_GRP_HPCS_PULSE, /* 0x42 */
  243. WMI_GRP_AUDIO, /* 0x43 */
  244. WMI_GRP_CFR_CAPTURE, /* 0x44 */
  245. WMI_GRP_ATM, /* 0x45 ATM (Air Time Management group) */
  246. WMI_GRP_VENDOR, /* 0x46 vendor specific group */
  247. WMI_GRP_LATENCY, /* 0x47 TID/AC level latency config */
  248. WMI_GRP_MLO, /* 0x48 MLO(Multiple Link Operation) management */
  249. } WMI_GRP_ID;
  250. #define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  251. #define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  252. /**
  253. * Command IDs and commange events
  254. */
  255. typedef enum {
  256. /** initialize the wlan sub system */
  257. WMI_INIT_CMDID = 0x1,
  258. /* Scan specific commands */
  259. /** start scan request to FW */
  260. WMI_START_SCAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SCAN),
  261. /** stop scan request to FW */
  262. WMI_STOP_SCAN_CMDID,
  263. /** full list of channels as defined by the regulatory that will be used by scanner */
  264. WMI_SCAN_CHAN_LIST_CMDID,
  265. /** overwrite default priority table in scan scheduler */
  266. WMI_SCAN_SCH_PRIO_TBL_CMDID,
  267. /** This command to adjust the priority and min.max_rest_time
  268. * of an on ongoing scan request.
  269. */
  270. WMI_SCAN_UPDATE_REQUEST_CMDID,
  271. /** set OUI to be used in probe request if enabled */
  272. WMI_SCAN_PROB_REQ_OUI_CMDID,
  273. /** config adaptive dwell scan */
  274. WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID,
  275. /** Only applicable to DBS capable product */
  276. WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID,
  277. /* PDEV(physical device) specific commands */
  278. /** set regulatorty ctl id used by FW to determine the exact ctl power limits */
  279. WMI_PDEV_SET_REGDOMAIN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PDEV),
  280. /** set channel. mainly used for supporting monitor mode */
  281. WMI_PDEV_SET_CHANNEL_CMDID,
  282. /** set pdev specific parameters */
  283. WMI_PDEV_SET_PARAM_CMDID,
  284. /** enable packet log */
  285. WMI_PDEV_PKTLOG_ENABLE_CMDID,
  286. /** disable packet log*/
  287. WMI_PDEV_PKTLOG_DISABLE_CMDID,
  288. /** set wmm parameters */
  289. WMI_PDEV_SET_WMM_PARAMS_CMDID,
  290. /** set HT cap ie that needs to be carried probe requests HT/VHT channels */
  291. WMI_PDEV_SET_HT_CAP_IE_CMDID,
  292. /** set VHT cap ie that needs to be carried on probe requests on VHT channels */
  293. WMI_PDEV_SET_VHT_CAP_IE_CMDID,
  294. /** Command to send the DSCP-to-TID map to the target */
  295. WMI_PDEV_SET_DSCP_TID_MAP_CMDID,
  296. /** set quiet ie parameters. primarily used in AP mode */
  297. WMI_PDEV_SET_QUIET_MODE_CMDID,
  298. /** Enable/Disable Green AP Power Save */
  299. WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
  300. /** get TPC config for the current operating channel */
  301. WMI_PDEV_GET_TPC_CONFIG_CMDID,
  302. /** set the base MAC address for the physical device before a VDEV is created.
  303. * For firmware that doesn't support this feature and this command, the pdev
  304. * MAC address will not be changed. */
  305. WMI_PDEV_SET_BASE_MACADDR_CMDID,
  306. /* eeprom content dump , the same to bdboard data */
  307. WMI_PDEV_DUMP_CMDID,
  308. /* set LED configuration */
  309. WMI_PDEV_SET_LED_CONFIG_CMDID,
  310. /* Get Current temprature of chip in Celcius degree*/
  311. WMI_PDEV_GET_TEMPERATURE_CMDID,
  312. /* Set LED flashing behavior */
  313. WMI_PDEV_SET_LED_FLASHING_CMDID,
  314. /** Enable/Disable Smart Antenna */
  315. WMI_PDEV_SMART_ANT_ENABLE_CMDID,
  316. /** Set Smart Antenna RX antenna*/
  317. WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
  318. /** Override the antenna switch table */
  319. WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
  320. /** Override the CTL table */
  321. WMI_PDEV_SET_CTL_TABLE_CMDID,
  322. /** Override the array gain table */
  323. WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID,
  324. /** FIPS test mode command */
  325. WMI_PDEV_FIPS_CMDID,
  326. /** get CCK ANI level */
  327. WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID,
  328. /** get OFDM ANI level */
  329. WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID,
  330. /** NF Cal Power dBr/dBm */
  331. WMI_PDEV_GET_NFCAL_POWER_CMDID,
  332. /** TxPPDU TPC */
  333. WMI_PDEV_GET_TPC_CMDID,
  334. /** Set to enable MIB stats collection */
  335. WMI_MIB_STATS_ENABLE_CMDID,
  336. /** Set preferred channel list for DBS Mgr */
  337. WMI_PDEV_SET_PCL_CMDID,
  338. /** Set HW mode. Eg: single MAC, DBS & SBS, see soc_hw_mode_t for values */
  339. WMI_PDEV_SET_HW_MODE_CMDID,
  340. /** Set DFS, SCAN modes and other FW configurations */
  341. WMI_PDEV_SET_MAC_CONFIG_CMDID,
  342. /** Set per band and per pdev antenna chains */
  343. WMI_PDEV_SET_ANTENNA_MODE_CMDID,
  344. /** Periodic channel stats request command */
  345. WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID,
  346. /** WMI command for power debug framework */
  347. WMI_PDEV_WAL_POWER_DEBUG_CMDID,
  348. /** set per-AC rx reorder timeouts */
  349. WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID,
  350. /** WMI command for WOW gpio and type */
  351. WMI_PDEV_SET_WAKEUP_CONFIG_CMDID,
  352. /* Get current ANT's per chain's RSSI info */
  353. WMI_PDEV_GET_ANTDIV_STATUS_CMDID,
  354. /** WMI command for getting Chip Power Stats */
  355. WMI_PDEV_GET_CHIP_POWER_STATS_CMDID,
  356. /** set stats reporting thresholds - see WMI_REPORT_STATS_EVENTID */
  357. WMI_PDEV_SET_STATS_THRESHOLD_CMDID,
  358. /** vdev restart request for multiple vdevs */
  359. WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID,
  360. /** Pdev update packet routing command */
  361. WMI_PDEV_UPDATE_PKT_ROUTING_CMDID,
  362. /** Get Calibration data version details */
  363. WMI_PDEV_CHECK_CAL_VERSION_CMDID,
  364. /** Set Diversity Gain */
  365. WMI_PDEV_SET_DIVERSITY_GAIN_CMDID,
  366. /** Get chain RSSI and antena index command */
  367. WMI_PDEV_DIV_GET_RSSI_ANTID_CMDID,
  368. /** get bss chan info */
  369. WMI_PDEV_BSS_CHAN_INFO_REQUEST_CMDID,
  370. /** update pmk cache info */
  371. WMI_PDEV_UPDATE_PMK_CACHE_CMDID,
  372. /** update fils HLP */
  373. WMI_PDEV_UPDATE_FILS_HLP_PKT_CMDID,
  374. /** update ctltable request **/
  375. WMI_PDEV_UPDATE_CTLTABLE_REQUEST_CMDID,
  376. /** Command to set beacon OUI **/
  377. WMI_PDEV_CONFIG_VENDOR_OUI_ACTION_CMDID,
  378. /** enable/disable per-AC tx queue optimizations */
  379. WMI_PDEV_SET_AC_TX_QUEUE_OPTIMIZED_CMDID,
  380. /** enable/disable rx promiscuous mode */
  381. WMI_PDEV_SET_RX_FILTER_PROMISCUOUS_CMDID,
  382. /* set a generic direct DMA ring config */
  383. WMI_PDEV_DMA_RING_CFG_REQ_CMDID,
  384. /* enable/disable Action frame response as HE TB PPDU */
  385. WMI_PDEV_HE_TB_ACTION_FRM_CMDID,
  386. /** filter packet log based on MAC address */
  387. WMI_PDEV_PKTLOG_FILTER_CMDID,
  388. /** wmi command for setting rogue ap configuration */
  389. WMI_PDEV_SET_RAP_CONFIG_CMDID,
  390. /** Specify DSM filters along with disallow bssid filters */
  391. WMI_PDEV_DSM_FILTER_CMDID,
  392. /** enable/disable periodic frame injection */
  393. WMI_PDEV_FRAME_INJECT_CMDID,
  394. /*
  395. * Pdev level command to:
  396. * a) solicit @WMI_TBTTOFFSET_EXT_UPDATE_EVENTID having TBTT in qtime
  397. * domain for all active vdevs or
  398. * b) update one pdevs tbtt offset to another pdev for use in
  399. * RNR TBTT offset calculation.
  400. */
  401. WMI_PDEV_TBTT_OFFSET_SYNC_CMDID,
  402. /** Bss color bitmap for SRG based spatial reuse feature */
  403. WMI_PDEV_SET_SRG_BSS_COLOR_BITMAP_CMDID,
  404. /** Partial BSSID bitmap for SRG based spatial reuse feature */
  405. WMI_PDEV_SET_SRG_PARTIAL_BSSID_BITMAP_CMDID,
  406. /** OBSS color enable bitmap for SRG based spatial reuse feature */
  407. WMI_PDEV_SET_SRG_OBSS_COLOR_ENABLE_BITMAP_CMDID,
  408. /** OBSS BSSID enable bitmap for SRG based spatial reuse feature */
  409. WMI_PDEV_SET_SRG_OBSS_BSSID_ENABLE_BITMAP_CMDID,
  410. /** OBSS color enable bitmap for NON_SRG based spatial reuse feature */
  411. WMI_PDEV_SET_NON_SRG_OBSS_COLOR_ENABLE_BITMAP_CMDID,
  412. /** OBSS BSSID enable bitmap for NON_SRG based spatial reuse feature */
  413. WMI_PDEV_SET_NON_SRG_OBSS_BSSID_ENABLE_BITMAP_CMDID,
  414. /** TPC stats display command */
  415. WMI_PDEV_GET_TPC_STATS_CMDID,
  416. /** ENABLE/DISABLE Duration based tx mode selection */
  417. WMI_PDEV_ENABLE_DURATION_BASED_TX_MODE_SELECTION_CMDID,
  418. /* Get DPD status from HALPHY */
  419. WMI_PDEV_GET_DPD_STATUS_CMDID,
  420. /* Set bios sar table */
  421. WMI_PDEV_SET_BIOS_SAR_TABLE_CMDID,
  422. /* Set bios geo table */
  423. WMI_PDEV_SET_BIOS_GEO_TABLE_CMDID,
  424. /* Get Calibration status from HALPHY */
  425. WMI_PDEV_GET_HALPHY_CAL_STATUS_CMDID,
  426. /* Set HALPHY CAL bitmap */
  427. WMI_PDEV_SET_HALPHY_CAL_BMAP_CMDID,
  428. /* WMI cmd to send vdev param for multiple vdev */
  429. WMI_PDEV_MULTIPLE_VDEV_SET_PARAM_CMDID,
  430. /* Configure MEC AGING TIMER */
  431. WMI_PDEV_MEC_AGING_TIMER_CONFIG_CMDID,
  432. /* VDEV (virtual device) specific commands */
  433. /** vdev create */
  434. WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VDEV),
  435. /** vdev delete */
  436. WMI_VDEV_DELETE_CMDID,
  437. /** vdev start request */
  438. WMI_VDEV_START_REQUEST_CMDID,
  439. /** vdev restart request (RX only, NO TX, used for CAC period)*/
  440. WMI_VDEV_RESTART_REQUEST_CMDID,
  441. /** vdev up request */
  442. WMI_VDEV_UP_CMDID,
  443. /** vdev stop request */
  444. WMI_VDEV_STOP_CMDID,
  445. /** vdev down request */
  446. WMI_VDEV_DOWN_CMDID,
  447. /* set a vdev param */
  448. WMI_VDEV_SET_PARAM_CMDID,
  449. /* set a key (used for setting per peer unicast and per vdev multicast) */
  450. WMI_VDEV_INSTALL_KEY_CMDID,
  451. /* wnm sleep mode command */
  452. WMI_VDEV_WNM_SLEEPMODE_CMDID,
  453. WMI_VDEV_WMM_ADDTS_CMDID,
  454. WMI_VDEV_WMM_DELTS_CMDID,
  455. WMI_VDEV_SET_WMM_PARAMS_CMDID,
  456. WMI_VDEV_SET_GTX_PARAMS_CMDID,
  457. WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID,
  458. WMI_VDEV_PLMREQ_START_CMDID,
  459. WMI_VDEV_PLMREQ_STOP_CMDID,
  460. /* TSF timestamp action for specified vdev */
  461. WMI_VDEV_TSF_TSTAMP_ACTION_CMDID,
  462. /** set the additional IEs in probe requests for scan or
  463. * assoc req etc for frames FW locally generates */
  464. WMI_VDEV_SET_IE_CMDID,
  465. WMI_VDEV_RATEMASK_CMDID,
  466. /** ATF VDEV REQUEST commands. */
  467. WMI_VDEV_ATF_REQUEST_CMDID,
  468. /** Command to send the DSCP-to-TID map to the target for VAP */
  469. WMI_VDEV_SET_DSCP_TID_MAP_CMDID,
  470. /* Configure filter for Neighbor Rx Pkt (smart mesh selective listening) */
  471. WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID,
  472. /** set quiet ie parameters. primarily used in AP mode */
  473. WMI_VDEV_SET_QUIET_MODE_CMDID,
  474. /** To set custom aggregation size for per vdev */
  475. WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID,
  476. /* DISA feature: Encrypt-decrypt data request */
  477. WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID,
  478. /** Command to enable mac randomizaton **/
  479. WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID,
  480. /** WMI commands related to dbg arp stats */
  481. WMI_VDEV_SET_ARP_STAT_CMDID,
  482. WMI_VDEV_GET_ARP_STAT_CMDID,
  483. /** get tx power for the current vdev */
  484. WMI_VDEV_GET_TX_POWER_CMDID,
  485. /* limit STA offchannel activity */
  486. WMI_VDEV_LIMIT_OFFCHAN_CMDID,
  487. /** To set custom software retries per-AC for vdev */
  488. WMI_VDEV_SET_CUSTOM_SW_RETRY_TH_CMDID,
  489. /** To set chainmask configuration for vdev */
  490. WMI_VDEV_CHAINMASK_CONFIG_CMDID,
  491. WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID,
  492. /* request LTE-Coex info */
  493. WMI_VDEV_GET_MWS_COEX_INFO_CMDID,
  494. /** delete all peer (excluding bss peer) */
  495. WMI_VDEV_DELETE_ALL_PEER_CMDID,
  496. /* To set bss max idle time related parameters */
  497. WMI_VDEV_BSS_MAX_IDLE_TIME_CMDID,
  498. /** Indicates FW to trigger Audio sync */
  499. WMI_VDEV_AUDIO_SYNC_TRIGGER_CMDID,
  500. /** Gives Qtimer value to FW */
  501. WMI_VDEV_AUDIO_SYNC_QTIMER_CMDID,
  502. /** Preferred channel list for each vdev */
  503. WMI_VDEV_SET_PCL_CMDID,
  504. /** VDEV_GET_BIG_DATA_CMD IS DEPRECATED - DO NOT USE */
  505. WMI_VDEV_GET_BIG_DATA_CMDID,
  506. /** Get per vdev BIG DATA stats phase 2 */
  507. WMI_VDEV_GET_BIG_DATA_P2_CMDID,
  508. /** set TPC PSD/non-PSD power */
  509. WMI_VDEV_SET_TPC_POWER_CMDID,
  510. /** IGMP OFFLOAD */
  511. WMI_VDEV_IGMP_OFFLOAD_CMDID,
  512. /** Enable/Disable Intra Bss for each vdev */
  513. WMI_VDEV_ENABLE_DISABLE_INTRA_BSS_CMDID,
  514. /* peer specific commands */
  515. /** create a peer */
  516. WMI_PEER_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PEER),
  517. /** delete a peer */
  518. WMI_PEER_DELETE_CMDID,
  519. /** flush specific tid queues of a peer */
  520. WMI_PEER_FLUSH_TIDS_CMDID,
  521. /** set a parameter of a peer */
  522. WMI_PEER_SET_PARAM_CMDID,
  523. /** set peer to associated state. will cary all parameters determined during assocication time */
  524. WMI_PEER_ASSOC_CMDID,
  525. /**add a wds (4 address) entry. used only for testing WDS feature on AP products */
  526. WMI_PEER_ADD_WDS_ENTRY_CMDID,
  527. /**remove wds (4 address) entry. used only for testing WDS feature on AP products */
  528. WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
  529. /** set up mcast group infor for multicast to unicast conversion */
  530. WMI_PEER_MCAST_GROUP_CMDID,
  531. /** request peer info from FW. FW shall respond with PEER_INFO_EVENTID */
  532. WMI_PEER_INFO_REQ_CMDID,
  533. /** request the estimated link speed for the peer. FW shall respond with
  534. * WMI_PEER_ESTIMATED_LINKSPEED_EVENTID.
  535. */
  536. WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID,
  537. /** Set the conditions to report peer justified rate to driver
  538. * The justified rate means the user-rate is justified by PER.
  539. */
  540. WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID,
  541. /** update a wds (4 address) entry */
  542. WMI_PEER_UPDATE_WDS_ENTRY_CMDID,
  543. /** add a proxy sta entry */
  544. WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID,
  545. /** Set Smart Antenna TX antenna */
  546. WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
  547. /** Set Smart Antenna TX train info */
  548. WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
  549. /** Set SA node config options */
  550. WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
  551. /** ATF PEER REQUEST commands */
  552. WMI_PEER_ATF_REQUEST_CMDID,
  553. /** bandwidth fairness (BWF) peer configuration request command */
  554. WMI_PEER_BWF_REQUEST_CMDID,
  555. /** rx reorder queue setup for peer/tid */
  556. WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
  557. /** rx reorder queue remove for peer/tid */
  558. WMI_PEER_REORDER_QUEUE_REMOVE_CMDID,
  559. /** specify a limit for rx A-MPDU block size */
  560. WMI_PEER_SET_RX_BLOCKSIZE_CMDID,
  561. /** request peer antdiv info from FW. FW shall respond with PEER_ANTDIV_INFO_EVENTID */
  562. WMI_PEER_ANTDIV_INFO_REQ_CMDID,
  563. /*
  564. * The WMI_PEER_OPER_MODE_CHANGE_EVENTID def was originally mistakenly
  565. * placed here, amongst the CMDID defs.
  566. * The WMI_PEER_OPER_MODE_CHANGE_EVENTID def has been moved to the
  567. * EVENTID section, but to preserve backwards compatibility, the value
  568. * here that had been used for WMI_PEER_OPER_MODE_CHANGE_EVENTID
  569. * is kept reserved/deprecated.
  570. *
  571. * This WMI_PEER_RESERVED0_CMDID value can be replaced with an actual
  572. * WMI peer event message ID, though it will be simpler to instead add
  573. * new WMI_PEER CMDID defs at the end of the WMI_GRP_PEER WMI_CMD_GRP.
  574. */
  575. WMI_PEER_RESERVED0_CMDID,
  576. /** Peer/Tid/Msduq threshold update */
  577. WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID,
  578. /** TID specific configurations per peer of type
  579. * wmi_peer_tid_configurations_cmd_fixed_param
  580. */
  581. WMI_PEER_TID_CONFIGURATIONS_CMDID,
  582. /** Peer configuration for Channel Frequency Response (CFR) capture
  583. * of type wmi_peer_cfr_capture_cmd.
  584. *
  585. * On targets that do not use the direct DMA framework,
  586. * completion of the CFR capture is communicated through
  587. * HTT_T2H_MSG_TYPE_CFR_DUMP_COMPL_IND.
  588. * Such targets will set WMI_SERVICE_CFR_CAPTURE_IND_MSG_TYPE_1
  589. * in WMI Service Ready.
  590. *
  591. * On targets that use direct DMA, completion of CFR capture is
  592. * communicated through WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID
  593. * using module ID WMI_DMA_RING_CONFIG_MODULE_RTT.
  594. * Such targets will set WMI_SERVICE_CFR_CAPTURE_IND_EVT_TYPE_1
  595. * in WMI Service Ready and enumerate WMI_DMA_RING_CONFIG_MODULE_RTT
  596. * in the dma_ring_caps entry of WMI_SERVICE_READY_EXT_EVENTID.
  597. * Additional MAC metadata is provided in WMI_PEER_CFR_CAPTURE_EVENTID.
  598. */
  599. WMI_PEER_CFR_CAPTURE_CMDID,
  600. /** WMI command related to AP channel width switching */
  601. WMI_PEER_CHAN_WIDTH_SWITCH_CMDID,
  602. /** WMI command to fetch current tx PN for the peer */
  603. WMI_PEER_TX_PN_REQUEST_CMDID,
  604. /** unmap response with peer ids */
  605. WMI_PEER_UNMAP_RESPONSE_CMDID,
  606. /** WMI command for per-peer configuration of VLAN header operations
  607. * during TX and RX
  608. */
  609. WMI_PEER_CONFIG_VLAN_CMDID,
  610. /** WMI command for per-peer configuration of PPE DS */
  611. WMI_PEER_CONFIG_PPE_DS_CMDID,
  612. /** Enable/Disable Intra Bss for the peer */
  613. WMI_PEER_ENABLE_DISABLE_INTRA_BSS_CMDID,
  614. /* beacon/management specific commands */
  615. /** transmit beacon by reference . used for transmitting beacon on low latency interface like pcie */
  616. WMI_BCN_TX_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MGMT),
  617. /** transmit beacon by value */
  618. WMI_PDEV_SEND_BCN_CMDID,
  619. /** set the beacon template. used in beacon offload mode to setup the
  620. * the common beacon template with the FW to be used by FW to generate beacons */
  621. WMI_BCN_TMPL_CMDID,
  622. /** set beacon filter with FW */
  623. WMI_BCN_FILTER_RX_CMDID,
  624. /* enable/disable filtering of probe requests in the firmware */
  625. WMI_PRB_REQ_FILTER_RX_CMDID,
  626. /** transmit management frame by value. will be deprecated */
  627. WMI_MGMT_TX_CMDID,
  628. /** set the probe response template. used in beacon offload mode to setup the
  629. * the common probe response template with the FW to be used by FW to generate
  630. * probe responses */
  631. WMI_PRB_TMPL_CMDID,
  632. /** Transmit Mgmt frame by reference */
  633. WMI_MGMT_TX_SEND_CMDID,
  634. /** Transmit data frame by reference */
  635. WMI_OFFCHAN_DATA_TX_SEND_CMDID,
  636. /** transmit FILS Discovery frame by value */
  637. WMI_PDEV_SEND_FD_CMDID,
  638. /** Cmd to enable/disable offloaded beacons */
  639. WMI_BCN_OFFLOAD_CTRL_CMDID,
  640. /** Cmd to enable FW handling BSS color change notification from AP. */
  641. WMI_BSS_COLOR_CHANGE_ENABLE_CMDID,
  642. /** To configure Beacon offload quiet-ie params */
  643. WMI_VDEV_BCN_OFFLOAD_QUIET_CONFIG_CMDID,
  644. /** set FILS Discovery frame template for FW to generate FD frames */
  645. WMI_FD_TMPL_CMDID,
  646. /** Transmit QoS null Frame over wmi interface */
  647. WMI_QOS_NULL_FRAME_TX_SEND_CMDID,
  648. /** WMI CMD to receive the management filter criteria from the host for RX REO */
  649. WMI_MGMT_RX_REO_FILTER_CONFIGURATION_CMDID,
  650. /** commands to directly control ba negotiation directly from host. only used in test mode */
  651. /** turn off FW Auto addba mode and let host control addba */
  652. WMI_ADDBA_CLEAR_RESP_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BA_NEG),
  653. /** send add ba request */
  654. WMI_ADDBA_SEND_CMDID,
  655. WMI_ADDBA_STATUS_CMDID,
  656. /** send del ba */
  657. WMI_DELBA_SEND_CMDID,
  658. /** set add ba response will be used by FW to generate addba response*/
  659. WMI_ADDBA_SET_RESP_CMDID,
  660. /** send single VHT MPDU with AMSDU */
  661. WMI_SEND_SINGLEAMSDU_CMDID,
  662. /** Station power save specific config */
  663. /** enable/disable station powersave */
  664. WMI_STA_POWERSAVE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_PS),
  665. /** set station power save specific parameter */
  666. WMI_STA_POWERSAVE_PARAM_CMDID,
  667. /** set station mimo powersave mode */
  668. WMI_STA_MIMO_PS_MODE_CMDID,
  669. /** config station TX cycle percentage in a beacon interval */
  670. WMI_STA_TDCC_CONFIG_CMDID,
  671. /** DFS-specific commands */
  672. /** enable DFS (radar detection)*/
  673. WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DFS),
  674. /** disable DFS (radar detection)*/
  675. WMI_PDEV_DFS_DISABLE_CMDID,
  676. /** enable DFS phyerr/parse filter offload */
  677. WMI_DFS_PHYERR_FILTER_ENA_CMDID,
  678. /** enable DFS phyerr/parse filter offload */
  679. WMI_DFS_PHYERR_FILTER_DIS_CMDID,
  680. /** enable DFS phyerr processing offload */
  681. WMI_PDEV_DFS_PHYERR_OFFLOAD_ENABLE_CMDID,
  682. /** disable DFS phyerr processing offload */
  683. WMI_PDEV_DFS_PHYERR_OFFLOAD_DISABLE_CMDID,
  684. /** set ADFS channel config */
  685. WMI_VDEV_ADFS_CH_CFG_CMDID,
  686. /** abort ADFS off-channel-availability-check currently in progress */
  687. WMI_VDEV_ADFS_OCAC_ABORT_CMDID,
  688. /* Roaming specific commands */
  689. /** set roam scan mode */
  690. WMI_ROAM_SCAN_MODE = WMI_CMD_GRP_START_ID(WMI_GRP_ROAM),
  691. /** set roam scan rssi threshold below which roam scan is enabled */
  692. WMI_ROAM_SCAN_RSSI_THRESHOLD,
  693. /** set roam scan period for periodic roam scan mode */
  694. WMI_ROAM_SCAN_PERIOD,
  695. /** set roam scan trigger rssi change threshold */
  696. WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
  697. /** set roam AP profile */
  698. WMI_ROAM_AP_PROFILE,
  699. /** set channel list for roam scans */
  700. WMI_ROAM_CHAN_LIST,
  701. /** Stop scan command */
  702. WMI_ROAM_SCAN_CMD,
  703. /** roaming sme offload sync complete */
  704. WMI_ROAM_SYNCH_COMPLETE,
  705. /** set ric request element for 11r roaming */
  706. WMI_ROAM_SET_RIC_REQUEST_CMDID,
  707. /** Invoke roaming forcefully */
  708. WMI_ROAM_INVOKE_CMDID,
  709. /** roaming filter cmd to allow further filtering of roaming candidate */
  710. WMI_ROAM_FILTER_CMDID,
  711. /** set gateway ip, mac and retries for subnet change detection */
  712. WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID,
  713. /** configure thresholds for MAWC */
  714. WMI_ROAM_CONFIGURE_MAWC_CMDID,
  715. /** configure MultiBand Operation(refer WFA MBO spec) parameter */
  716. WMI_ROAM_SET_MBO_PARAM_CMDID, /* DEPRECATED */
  717. /** configure packet error rate threshold for triggering roaming */
  718. WMI_ROAM_PER_CONFIG_CMDID,
  719. /** configure BSS Transition Management (BTM) offload for roaming */
  720. WMI_ROAM_BTM_CONFIG_CMDID,
  721. /** Enable or Disable Fast Initial Link Setup (FILS) feature */
  722. WMI_ENABLE_FILS_CMDID,
  723. /** Request for roam scan stats */
  724. WMI_REQUEST_ROAM_SCAN_STATS_CMDID,
  725. /** Configure BSS load parameters for roam trigger */
  726. WMI_ROAM_BSS_LOAD_CONFIG_CMDID,
  727. /** Configure deauth roam trigger parameters */
  728. WMI_ROAM_DEAUTH_CONFIG_CMDID,
  729. /** Configure idle roam trigger parameters */
  730. WMI_ROAM_IDLE_CONFIG_CMDID,
  731. /**
  732. * WMI_ROAM_DSM_FILTER_CMDID is deprecated and should be unused,
  733. * but leave it reserved just to be safe.
  734. */
  735. DEPRECATED__WMI_ROAM_DSM_FILTER_CMDID,
  736. /** Enable or disable roaming triggers */
  737. WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON_CMDID,
  738. /** Pre-Authentication completion status command */
  739. WMI_ROAM_PREAUTH_STATUS_CMDID,
  740. /** Command to get roam scan channels list */
  741. WMI_ROAM_GET_SCAN_CHANNEL_LIST_CMDID,
  742. /** configure MLO parameters for roaming */
  743. WMI_ROAM_MLO_CONFIG_CMDID,
  744. /** offload scan specific commands */
  745. /** set offload scan AP profile */
  746. WMI_OFL_SCAN_ADD_AP_PROFILE = WMI_CMD_GRP_START_ID(WMI_GRP_OFL_SCAN),
  747. /** remove offload scan AP profile */
  748. WMI_OFL_SCAN_REMOVE_AP_PROFILE,
  749. /** set offload scan period */
  750. WMI_OFL_SCAN_PERIOD,
  751. /* P2P specific commands */
  752. /**set P2P device info. FW will used by FW to create P2P IE to be carried in probe response
  753. * generated during p2p listen and for p2p discoverability */
  754. WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP_START_ID(WMI_GRP_P2P),
  755. /** enable/disable p2p discoverability on STA/AP VDEVs */
  756. WMI_P2P_DEV_SET_DISCOVERABILITY,
  757. /** set p2p ie to be carried in beacons generated by FW for GO */
  758. WMI_P2P_GO_SET_BEACON_IE,
  759. /** set p2p ie to be carried in probe response frames generated by FW for GO */
  760. WMI_P2P_GO_SET_PROBE_RESP_IE,
  761. /** set the vendor specific p2p ie data. FW will use this to parse the P2P NoA
  762. * attribute in the beacons/probe responses received.
  763. * Note: This command is currently used only for Apple P2P implementation.
  764. */
  765. WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
  766. /** set the configure of p2p find offload */
  767. WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID,
  768. /** set the vendor specific p2p ie data for p2p find offload using */
  769. WMI_P2P_DISC_OFFLOAD_APPIE_CMDID,
  770. /** set the BSSID/device name pattern of p2p find offload */
  771. WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID,
  772. /** set OppPS related parameters **/
  773. WMI_P2P_SET_OPPPS_PARAM_CMDID,
  774. /** set listen offload start related parameters */
  775. WMI_P2P_LISTEN_OFFLOAD_START_CMDID,
  776. /** set listen offload stop related parameters */
  777. WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID,
  778. /** AP power save specific config */
  779. /** set AP power save specific param */
  780. WMI_AP_PS_PEER_PARAM_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_AP_PS),
  781. /** set AP UAPSD coex specific param */
  782. WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
  783. /** set Enhanced Green AP param */
  784. WMI_AP_PS_EGAP_PARAM_CMDID,
  785. /** Rate-control specific commands */
  786. WMI_PEER_RATE_RETRY_SCHED_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RATE_CTRL),
  787. /** WLAN Profiling commands. */
  788. WMI_WLAN_PROFILE_TRIGGER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROFILE),
  789. WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
  790. WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
  791. WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
  792. WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
  793. /** Suspend resume command Ids */
  794. WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SUSPEND),
  795. WMI_PDEV_RESUME_CMDID,
  796. /* Beacon filter commands */
  797. /** add a beacon filter */
  798. WMI_ADD_BCN_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BCN_FILTER),
  799. /** remove a beacon filter */
  800. WMI_RMV_BCN_FILTER_CMDID,
  801. /* WOW Specific WMI commands*/
  802. /** add pattern for awake */
  803. WMI_WOW_ADD_WAKE_PATTERN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WOW),
  804. /** deleta a wake pattern */
  805. WMI_WOW_DEL_WAKE_PATTERN_CMDID,
  806. /** enable/deisable wake event */
  807. WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
  808. /** enable WOW */
  809. WMI_WOW_ENABLE_CMDID,
  810. /** host woke up from sleep event to FW. Generated in response to WOW Hardware event */
  811. WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
  812. /* IOAC add keep alive cmd. */
  813. WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID,
  814. /* IOAC del keep alive cmd. */
  815. WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID,
  816. /* IOAC add pattern for awake */
  817. WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID,
  818. /* IOAC deleta a wake pattern */
  819. WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID,
  820. /* D0-WOW enable or disable cmd */
  821. WMI_D0_WOW_ENABLE_DISABLE_CMDID,
  822. /* enable extend WoW */
  823. WMI_EXTWOW_ENABLE_CMDID,
  824. /* Extend WoW command to configure app type1 parameter */
  825. WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID,
  826. /* Extend WoW command to configure app type2 parameter */
  827. WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID,
  828. /* enable ICMPv6 Network advertisement filtering */
  829. WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID,
  830. /*
  831. * Set a pattern to match UDP packet in WOW mode.
  832. * If match, construct a tx frame in a local buffer
  833. * to send through the peer AP to the entity in the
  834. * IP network that sent the UDP packet to this STA.
  835. */
  836. WMI_WOW_UDP_SVC_OFLD_CMDID,
  837. /* configure WOW host wakeup PIN pattern */
  838. WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID,
  839. /* Set which action category should wake the host from suspend */
  840. WMI_WOW_SET_ACTION_WAKE_UP_CMDID,
  841. /* RTT measurement related cmd */
  842. /** request to make an RTT measurement */
  843. WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RTT),
  844. /** request to report a tsf measurement */
  845. WMI_RTT_TSF_CMDID,
  846. /** spectral scan command */
  847. /** configure spectral scan */
  848. WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SPECTRAL),
  849. /** enable/disable spectral scan and trigger */
  850. WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
  851. /* F/W stats */
  852. /** one time request for stats */
  853. WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STATS),
  854. /** Push MCC Adaptive Scheduler Stats to Firmware */
  855. WMI_MCC_SCHED_TRAFFIC_STATS_CMDID,
  856. /** one time request for txrx stats */
  857. WMI_REQUEST_STATS_EXT_CMDID,
  858. /* Link Layer stats */
  859. /** Request for link layer stats */
  860. WMI_REQUEST_LINK_STATS_CMDID,
  861. /** Request for setting params to link layer stats */
  862. WMI_START_LINK_STATS_CMDID,
  863. /** Request to clear stats*/
  864. WMI_CLEAR_LINK_STATS_CMDID,
  865. /** Request for getting the Firmware Memory Dump */
  866. WMI_GET_FW_MEM_DUMP_CMDID,
  867. /** Request to flush of the buffered debug messages */
  868. WMI_DEBUG_MESG_FLUSH_CMDID,
  869. /** Cmd to configure the verbose level */
  870. WMI_DIAG_EVENT_LOG_CONFIG_CMDID,
  871. /** One time request for wlan stats */
  872. WMI_REQUEST_WLAN_STATS_CMDID,
  873. /** Request for getting RCPI of peer */
  874. WMI_REQUEST_RCPI_CMDID,
  875. /** One time request for peer stats info */
  876. WMI_REQUEST_PEER_STATS_INFO_CMDID,
  877. /** One time request for radio channel stats */
  878. WMI_REQUEST_RADIO_CHAN_STATS_CMDID,
  879. /** request for WLM (wlan latency manager) stats */
  880. WMI_REQUEST_WLM_STATS_CMDID,
  881. /** request for control path stats */
  882. WMI_REQUEST_CTRL_PATH_STATS_CMDID,
  883. /** unified request for LL stats and get station cmds */
  884. WMI_REQUEST_UNIFIED_LL_GET_STA_CMDID,
  885. /** request for thermal stats */
  886. WMI_REQUEST_THERMAL_STATS_CMDID,
  887. /** ARP OFFLOAD REQUEST*/
  888. WMI_SET_ARP_NS_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL),
  889. /** Proactive ARP Response Add Pattern Command*/
  890. WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID,
  891. /** Proactive ARP Response Del Pattern Command*/
  892. WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID,
  893. /** NS offload confid*/
  894. WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NLO_OFL),
  895. /** APFIND Config */
  896. WMI_APFIND_CMDID,
  897. /** Passpoint list config */
  898. WMI_PASSPOINT_LIST_CONFIG_CMDID,
  899. /** configure supprssing parameters for MAWC */
  900. WMI_NLO_CONFIGURE_MAWC_CMDID,
  901. /* GTK offload Specific WMI commands*/
  902. WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GTK_OFL),
  903. /* CSA offload Specific WMI commands*/
  904. /** csa offload enable */
  905. WMI_CSA_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CSA_OFL),
  906. /** chan switch command */
  907. WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
  908. /* Chatter commands*/
  909. /* Change chatter mode of operation */
  910. WMI_CHATTER_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CHATTER),
  911. /** chatter add coalescing filter command */
  912. WMI_CHATTER_ADD_COALESCING_FILTER_CMDID,
  913. /** chatter delete coalescing filter command */
  914. WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID,
  915. /** chatter coalecing query command */
  916. WMI_CHATTER_COALESCING_QUERY_CMDID,
  917. /**addba specific commands */
  918. /** start the aggregation on this TID */
  919. WMI_PEER_TID_ADDBA_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TID_ADDBA),
  920. /** stop the aggregation on this TID */
  921. WMI_PEER_TID_DELBA_CMDID,
  922. /** set station mimo powersave method */
  923. WMI_STA_DTIM_PS_METHOD_CMDID,
  924. /** Configure the Station UAPSD AC Auto Trigger Parameters */
  925. WMI_STA_UAPSD_AUTO_TRIG_CMDID,
  926. /** Configure the Keep Alive Parameters */
  927. WMI_STA_KEEPALIVE_CMDID,
  928. /* Request ssn from target for a sta/tid pair */
  929. WMI_BA_REQ_SSN_CMDID,
  930. /* misc command group */
  931. /** echo command mainly used for testing */
  932. WMI_ECHO_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MISC),
  933. /* !!IMPORTANT!!
  934. * If you need to add a new WMI command to the WMI_GRP_MISC sub-group,
  935. * please make sure you add it BEHIND WMI_PDEV_UTF_CMDID,
  936. * as we MUST have a fixed value here to maintain compatibility between
  937. * UTF and the ART2 driver
  938. */
  939. /** UTF WMI commands */
  940. WMI_PDEV_UTF_CMDID,
  941. /** set debug log config */
  942. WMI_DBGLOG_CFG_CMDID,
  943. /* QVIT specific command id */
  944. WMI_PDEV_QVIT_CMDID,
  945. /* Factory Testing Mode request command
  946. * used for integrated chipsets */
  947. WMI_PDEV_FTM_INTG_CMDID,
  948. /* set and get keepalive parameters command */
  949. WMI_VDEV_SET_KEEPALIVE_CMDID,
  950. WMI_VDEV_GET_KEEPALIVE_CMDID,
  951. /* For fw recovery test command */
  952. WMI_FORCE_FW_HANG_CMDID,
  953. /* Set Mcast/Bdcast filter */
  954. WMI_SET_MCASTBCAST_FILTER_CMDID,
  955. /** set thermal management params **/
  956. WMI_THERMAL_MGMT_CMDID,
  957. /** set host auto shutdown params **/
  958. WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID,
  959. /** set tpc chainmask config command */
  960. WMI_TPC_CHAINMASK_CONFIG_CMDID,
  961. /** set Antenna diversity command */
  962. WMI_SET_ANTENNA_DIVERSITY_CMDID,
  963. /** Set OCB Sched Request, deprecated */
  964. WMI_OCB_SET_SCHED_CMDID,
  965. /** Set rssi monitoring config command */
  966. WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID,
  967. /** Enable/disable Large Receive Offload processing; provide cfg params */
  968. WMI_LRO_CONFIG_CMDID,
  969. /** transfer data from host to firmware to write flash */
  970. WMI_TRANSFER_DATA_TO_FLASH_CMDID,
  971. /** Command to enable/disable filtering of multicast IP with unicast mac */
  972. WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID,
  973. /** Command to control WISA mode */
  974. WMI_VDEV_WISA_CMDID,
  975. /** set debug log time stamp sync up with host */
  976. WMI_DBGLOG_TIME_STAMP_SYNC_CMDID,
  977. /** Command for host to set/delete multiple mcast filters */
  978. WMI_SET_MULTIPLE_MCAST_FILTER_CMDID,
  979. /** upload a requested section of data from firmware flash to host */
  980. WMI_READ_DATA_FROM_FLASH_CMDID,
  981. /* Thermal Throttling SET CONF commands */
  982. WMI_THERM_THROT_SET_CONF_CMDID,
  983. /* set runtime dpd recalibration params */
  984. WMI_RUNTIME_DPD_RECAL_CMDID,
  985. /* get TX power for input HALPHY parameters */
  986. WMI_GET_TPC_POWER_CMDID,
  987. /* Specify when to start monitoring for idle state */
  988. WMI_IDLE_TRIGGER_MONITOR_CMDID,
  989. /** set ELNA BYPASS status */
  990. WMI_SET_ELNA_BYPASS_CMDID,
  991. /** get ELNA BYPASS status */
  992. WMI_GET_ELNA_BYPASS_CMDID,
  993. /** get ANI level of the channels */
  994. WMI_GET_CHANNEL_ANI_CMDID,
  995. /** set OCL (One Chain Listen) mode */
  996. WMI_SET_OCL_CMDID,
  997. /* Offload 11k related requests */
  998. WMI_11K_OFFLOAD_REPORT_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_11K_OFFLOAD),
  999. /* invoke neighbor report from FW */
  1000. WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID,
  1001. /* GPIO Configuration */
  1002. WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GPIO),
  1003. WMI_GPIO_OUTPUT_CMDID,
  1004. /* Txbf configuration command */
  1005. WMI_TXBF_CMDID,
  1006. /* Antenna Controller, connected to wlan debug uart/GPIO. */
  1007. WMI_ANT_CONTROLLER_CMDID,
  1008. /* FWTEST Commands */
  1009. WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_FWTEST),
  1010. /** set NoA descs **/
  1011. WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID,
  1012. /* UNIT Tests */
  1013. WMI_UNIT_TEST_CMDID,
  1014. /* set debug and tuning parameters */
  1015. WMI_FWTEST_CMDID,
  1016. /* Q-Boost configuration test commands */
  1017. WMI_QBOOST_CFG_CMDID,
  1018. /* Simulation Test command */
  1019. WMI_SIMULATION_TEST_CMDID,
  1020. /* WFA test config command */
  1021. WMI_WFA_CONFIG_CMDID,
  1022. /** TDLS Configuration */
  1023. /** enable/disable TDLS */
  1024. WMI_TDLS_SET_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDLS),
  1025. /** set tdls peer state */
  1026. WMI_TDLS_PEER_UPDATE_CMDID,
  1027. /** TDLS Offchannel control */
  1028. WMI_TDLS_SET_OFFCHAN_MODE_CMDID,
  1029. /** Resmgr Configuration */
  1030. /** Adaptive OCS is enabled by default in the FW. This command is used to
  1031. * disable FW based adaptive OCS.
  1032. */
  1033. WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RESMGR),
  1034. /** set the requested channel time quota for the home channels */
  1035. WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID,
  1036. /** set the requested latency for the home channels */
  1037. WMI_RESMGR_SET_CHAN_LATENCY_CMDID,
  1038. /** STA SMPS Configuration */
  1039. /** force SMPS mode */
  1040. WMI_STA_SMPS_FORCE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_SMPS),
  1041. /** set SMPS parameters */
  1042. WMI_STA_SMPS_PARAM_CMDID,
  1043. /* Wlan HB commands*/
  1044. /* enalbe/disable wlan HB */
  1045. WMI_HB_SET_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLAN_HB),
  1046. /* set tcp parameters for wlan HB */
  1047. WMI_HB_SET_TCP_PARAMS_CMDID,
  1048. /* set tcp pkt filter for wlan HB */
  1049. WMI_HB_SET_TCP_PKT_FILTER_CMDID,
  1050. /* set udp parameters for wlan HB */
  1051. WMI_HB_SET_UDP_PARAMS_CMDID,
  1052. /* set udp pkt filter for wlan HB */
  1053. WMI_HB_SET_UDP_PKT_FILTER_CMDID,
  1054. /* OIC ping keep alive */
  1055. WMI_HB_OIC_PING_OFFLOAD_PARAM_CMDID,
  1056. WMI_HB_OIC_PING_OFFLOAD_SET_ENABLE_CMDID,
  1057. /* WMI commands related to DHCP Lease Renew Offload **/
  1058. WMI_HB_DHCP_LEASE_RENEW_OFFLOAD_CMDID,
  1059. /** Wlan RMC commands*/
  1060. /** enable/disable RMC */
  1061. WMI_RMC_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RMC),
  1062. /** configure action frame period */
  1063. WMI_RMC_SET_ACTION_PERIOD_CMDID,
  1064. /** For debug/future enhancement purposes only,
  1065. * configures/finetunes RMC algorithms */
  1066. WMI_RMC_CONFIG_CMDID,
  1067. /** select manual leader */
  1068. WMI_RMC_SET_MANUAL_LEADER_CMDID,
  1069. /** WLAN MHF offload commands */
  1070. /** enable/disable MHF offload */
  1071. WMI_MHF_OFFLOAD_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MHF_OFL),
  1072. /** Plumb routing table for MHF offload */
  1073. WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID,
  1074. /*location scan commands*/
  1075. /*start batch scan*/
  1076. WMI_BATCH_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
  1077. /*stop batch scan*/
  1078. WMI_BATCH_SCAN_DISABLE_CMDID,
  1079. /*get batch scan result*/
  1080. WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID,
  1081. /* OEM related cmd */
  1082. WMI_OEM_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OEM),
  1083. WMI_OEM_REQUEST_CMDID, /* UNUSED */
  1084. /* OEM related cmd used for Low Power ranging */
  1085. WMI_LPI_OEM_REQ_CMDID,
  1086. WMI_OEM_DMA_RING_CFG_REQ_CMDID,
  1087. /** Command to handle OEM's opaque data */
  1088. WMI_OEM_DATA_CMDID,
  1089. /** Nan Request */
  1090. WMI_NAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN),
  1091. /** Modem power state command */
  1092. WMI_MODEM_POWER_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_COEX),
  1093. WMI_CHAN_AVOID_UPDATE_CMDID,
  1094. WMI_COEX_CONFIG_CMDID,
  1095. WMI_CHAN_AVOID_RPT_ALLOW_CMDID,
  1096. WMI_COEX_GET_ANTENNA_ISOLATION_CMDID,
  1097. WMI_SAR_LIMITS_CMDID,
  1098. WMI_SAR_GET_LIMITS_CMDID,
  1099. /**
  1100. * OBSS scan offload enable/disable commands
  1101. * OBSS scan enable CMD will send to FW after VDEV UP, if these conditions are true:
  1102. * 1. WMI_SERVICE_OBSS_SCAN is reported by FW in service ready,
  1103. * 2. STA connect to a 2.4Ghz ht20/ht40 AP,
  1104. * 3. AP enable 20/40 coexistence (OBSS_IE-74 can be found in beacon or association response)
  1105. * If OBSS parameters from beacon changed, also use enable CMD to update parameters.
  1106. * OBSS scan disable CMD will send to FW if have enabled when tearing down connection.
  1107. */
  1108. WMI_OBSS_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OBSS_OFL),
  1109. WMI_OBSS_SCAN_DISABLE_CMDID,
  1110. WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID,
  1111. /**LPI commands*/
  1112. /**LPI mgmt snooping config command*/
  1113. WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LPI),
  1114. /**LPI scan start command*/
  1115. WMI_LPI_START_SCAN_CMDID,
  1116. /**LPI scan stop command*/
  1117. WMI_LPI_STOP_SCAN_CMDID,
  1118. /** ExtScan commands */
  1119. WMI_EXTSCAN_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_EXTSCAN),
  1120. WMI_EXTSCAN_STOP_CMDID,
  1121. WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID,
  1122. WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID,
  1123. WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID,
  1124. WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID,
  1125. WMI_EXTSCAN_SET_CAPABILITIES_CMDID,
  1126. WMI_EXTSCAN_GET_CAPABILITIES_CMDID,
  1127. WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID,
  1128. WMI_EXTSCAN_CONFIGURE_MAWC_CMDID,
  1129. /** DHCP server offload commands */
  1130. WMI_SET_DHCP_SERVER_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DHCP_OFL),
  1131. /** IPA Offload features related commands */
  1132. WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_IPA),
  1133. /** mDNS responder offload commands */
  1134. WMI_MDNS_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MDNS_OFL),
  1135. WMI_MDNS_SET_FQDN_CMDID,
  1136. WMI_MDNS_SET_RESPONSE_CMDID,
  1137. WMI_MDNS_GET_STATS_CMDID,
  1138. WMI_MDNS_SET_STAIP_CMDID,
  1139. /* enable/disable AP Authentication offload */
  1140. WMI_SAP_OFL_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAP_OFL),
  1141. WMI_SAP_SET_BLACKLIST_PARAM_CMDID,
  1142. WMI_SAP_OBSS_DETECTION_CFG_CMDID,
  1143. /** Out-of-context-of-BSS (OCB) commands */
  1144. WMI_OCB_SET_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OCB),
  1145. WMI_OCB_SET_UTC_TIME_CMDID,
  1146. WMI_OCB_START_TIMING_ADVERT_CMDID,
  1147. WMI_OCB_STOP_TIMING_ADVERT_CMDID,
  1148. WMI_OCB_GET_TSF_TIMER_CMDID,
  1149. WMI_DCC_GET_STATS_CMDID,
  1150. WMI_DCC_CLEAR_STATS_CMDID,
  1151. WMI_DCC_UPDATE_NDL_CMDID,
  1152. /* System-On-Chip commands */
  1153. WMI_SOC_SET_PCL_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SOC),
  1154. WMI_SOC_SET_HW_MODE_CMDID,
  1155. WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID,
  1156. WMI_SOC_SET_ANTENNA_MODE_CMDID,
  1157. /* packet filter commands */
  1158. WMI_PACKET_FILTER_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PKT_FILTER),
  1159. WMI_PACKET_FILTER_ENABLE_CMDID,
  1160. /** Motion Aided WiFi Connectivity (MAWC) commands */
  1161. WMI_MAWC_SENSOR_REPORT_IND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MAWC),
  1162. /** WMI commands related to PMF 11w Offload */
  1163. WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PMF_OFFLOAD),
  1164. /** WMI commands related to pkt filter (BPF) offload */
  1165. WMI_BPF_GET_CAPABILITY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
  1166. WMI_BPF_GET_VDEV_STATS_CMDID,
  1167. WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID,
  1168. WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID,
  1169. WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID,
  1170. WMI_BPF_SET_VDEV_ENABLE_CMDID,
  1171. WMI_BPF_SET_VDEV_WORK_MEMORY_CMDID,
  1172. WMI_BPF_GET_VDEV_WORK_MEMORY_CMDID,
  1173. /** WMI commands related to monitor mode. */
  1174. WMI_MNT_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MONITOR),
  1175. /** WMI commands related to regulatory offload */
  1176. WMI_SET_CURRENT_COUNTRY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_REGULATORY),
  1177. WMI_11D_SCAN_START_CMDID,
  1178. WMI_11D_SCAN_STOP_CMDID,
  1179. WMI_SET_INIT_COUNTRY_CMDID,
  1180. WMI_AFC_CMDID,
  1181. /**
  1182. * Nan Data commands
  1183. * NDI - NAN Data Interface
  1184. * NDP - NAN Data Path
  1185. */
  1186. /* Commands in prototyping phase */
  1187. WMI_NDI_GET_CAP_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROTOTYPE),
  1188. WMI_NDP_INITIATOR_REQ_CMDID,
  1189. WMI_NDP_RESPONDER_REQ_CMDID,
  1190. WMI_NDP_END_REQ_CMDID,
  1191. WMI_NDP_CMDID,
  1192. /** WMI commands related to HW data filtering **/
  1193. WMI_HW_DATA_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_HW_DATA_FILTER),
  1194. /** WMI commands related to WLAN latency module **/
  1195. WMI_WLM_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLM),
  1196. /** WMI commands related to STA & AP TWT module **/
  1197. WMI_TWT_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TWT),
  1198. WMI_TWT_DISABLE_CMDID,
  1199. WMI_TWT_ADD_DIALOG_CMDID,
  1200. WMI_TWT_DEL_DIALOG_CMDID,
  1201. WMI_TWT_PAUSE_DIALOG_CMDID,
  1202. WMI_TWT_RESUME_DIALOG_CMDID,
  1203. WMI_TWT_BTWT_INVITE_STA_CMDID,
  1204. WMI_TWT_BTWT_REMOVE_STA_CMDID,
  1205. WMI_TWT_NUDGE_DIALOG_CMDID,
  1206. /** WMI commands related to motion detection **/
  1207. WMI_MOTION_DET_CONFIG_PARAM_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MOTION_DET),
  1208. WMI_MOTION_DET_BASE_LINE_CONFIG_PARAM_CMDID,
  1209. WMI_MOTION_DET_START_STOP_CMDID,
  1210. WMI_MOTION_DET_BASE_LINE_START_STOP_CMDID,
  1211. /** WMI commands related to OBSS PD Spatial Reuse **/
  1212. WMI_PDEV_OBSS_PD_SPATIAL_REUSE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SPATIAL_REUSE),
  1213. WMI_PDEV_OBSS_PD_SPATIAL_REUSE_SET_DEF_OBSS_THRESH_CMDID,
  1214. /** WMI commands related to High Precision Clock Synchronization feature **/
  1215. WMI_HPCS_PULSE_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_HPCS_PULSE),
  1216. /** WMI commands related to Audio Frame aggregation feature **/
  1217. WMI_AUDIO_AGGR_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_AUDIO),
  1218. WMI_AUDIO_AGGR_ADD_GROUP_CMDID,
  1219. WMI_AUDIO_AGGR_DEL_GROUP_CMDID,
  1220. WMI_AUDIO_AGGR_SET_GROUP_RATE_CMDID,
  1221. WMI_AUDIO_AGGR_SET_GROUP_RETRY_CMDID,
  1222. WMI_AUDIO_AGGR_SET_GROUP_AUTO_RATE_CMDID,
  1223. WMI_AUDIO_AGGR_SET_GROUP_PROBE_CMDID,
  1224. WMI_AUDIO_AGGR_UPDATE_STA_GROUP_INFO_CMDID,
  1225. WMI_AUDIO_AGGR_GET_STATISTICS_CMDID,
  1226. WMI_AUDIO_AGGR_RESET_STATISTICS_CMDID,
  1227. WMI_AUDIO_AGGR_SET_RTSCTS_CONFIG_CMDID,
  1228. WMI_AUDIO_AGGR_SET_SCHED_METHOD_CMDID,
  1229. WMI_AUDIO_AGGR_GET_SCHED_METHOD_CMDID,
  1230. /** WMI commands related to Channel Frequency Response Capture **/
  1231. WMI_CFR_CAPTURE_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CFR_CAPTURE),
  1232. /** WMI commands related to Air Time Management feature **/
  1233. /** ATF SSID GROUPING REQUEST command */
  1234. WMI_ATF_SSID_GROUPING_REQUEST_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_ATM),
  1235. /** WMM ATF Configuration for groups */
  1236. WMI_ATF_GROUP_WMM_AC_CONFIG_REQUEST_CMDID,
  1237. /** ATF Peer Extended Request command */
  1238. WMI_PEER_ATF_EXT_REQUEST_CMDID,
  1239. /** Vendor Defined WMI commands **/
  1240. WMI_VENDOR_PDEV_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VENDOR),
  1241. WMI_VENDOR_VDEV_CMDID,
  1242. WMI_VENDOR_PEER_CMDID,
  1243. /** Further vendor cmd IDs can be added below **/
  1244. /** WMI commands specific to Tid level Latency config **/
  1245. /** VDEV Latency Config command */
  1246. WMI_VDEV_TID_LATENCY_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LATENCY),
  1247. /** TID Latency Request command */
  1248. WMI_PEER_TID_LATENCY_CONFIG_CMDID,
  1249. /** WMI commands specific to MLO **/
  1250. /** MLO link active / inactive Request command */
  1251. WMI_MLO_LINK_SET_ACTIVE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MLO),
  1252. /** WMI cmd used to indicate hw_links part of MLO */
  1253. WMI_MLO_SETUP_CMDID,
  1254. /** WMI cmd used for init synchronization of hw_links part of MLO */
  1255. WMI_MLO_READY_CMDID,
  1256. /** WMI cmd used for tearing down a hw_link part of MLO */
  1257. WMI_MLO_TEARDOWN_CMDID,
  1258. } WMI_CMD_ID;
  1259. typedef enum {
  1260. /** WMI service is ready; after this event WMI messages can be sent/received */
  1261. WMI_SERVICE_READY_EVENTID = 0x1,
  1262. /** WMI is ready; after this event the wlan subsystem is initialized and can process commands. */
  1263. WMI_READY_EVENTID,
  1264. /** Specify what WMI services the target supports (for services beyond
  1265. * what fits in the WMI_SERVICE_READY_EVENT message's wmi_service_bitmap)
  1266. */
  1267. WMI_SERVICE_AVAILABLE_EVENTID,
  1268. /** Specify what numbers and kinds of interfaces (a.k.a. vdevs)
  1269. * the target supports
  1270. */
  1271. WMI_IFACE_COMBINATION_IND_EVENTID,
  1272. /** Scan specific events */
  1273. WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
  1274. /** Spectral scan FW params to host */
  1275. WMI_PDEV_SSCAN_FW_PARAM_EVENTID,
  1276. /** Spectral scan related event start/stop trigger to host */
  1277. WMI_SSCAN_EVT_MESSAGE_EVENTID,
  1278. /* PDEV specific events */
  1279. /** TPC config for the current operating channel */
  1280. WMI_PDEV_TPC_CONFIG_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
  1281. /** Channel stats event */
  1282. WMI_CHAN_INFO_EVENTID,
  1283. /** PHY Error specific WMI event */
  1284. WMI_PHYERR_EVENTID,
  1285. /** eeprom dump event */
  1286. WMI_PDEV_DUMP_EVENTID,
  1287. /** traffic pause event */
  1288. WMI_TX_PAUSE_EVENTID,
  1289. /** DFS radar event */
  1290. WMI_DFS_RADAR_EVENTID,
  1291. /** track L1SS entry and residency event */
  1292. WMI_PDEV_L1SS_TRACK_EVENTID,
  1293. /** Report current temprature of the chip in Celcius degree */
  1294. WMI_PDEV_TEMPERATURE_EVENTID,
  1295. /** Extension of WMI_SERVICE_READY msg with extra target capability info */
  1296. WMI_SERVICE_READY_EXT_EVENTID,
  1297. /** FIPS test mode event */
  1298. WMI_PDEV_FIPS_EVENTID,
  1299. /** Channel hopping avoidance */
  1300. WMI_PDEV_CHANNEL_HOPPING_EVENTID,
  1301. /** CCK ANI level event */
  1302. WMI_PDEV_ANI_CCK_LEVEL_EVENTID,
  1303. /** OFDM ANI level event */
  1304. WMI_PDEV_ANI_OFDM_LEVEL_EVENTID,
  1305. /** Tx PPDU params */
  1306. WMI_PDEV_TPC_EVENTID,
  1307. /** NF Cal Power in DBR/DBM for all channels */
  1308. WMI_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID,
  1309. /** SOC/PDEV events */
  1310. WMI_PDEV_SET_HW_MODE_RESP_EVENTID,
  1311. WMI_PDEV_HW_MODE_TRANSITION_EVENTID,
  1312. WMI_PDEV_SET_MAC_CONFIG_RESP_EVENTID,
  1313. /** Report ANT DIV feature's status */
  1314. WMI_PDEV_ANTDIV_STATUS_EVENTID,
  1315. /** Chip level Power stats */
  1316. WMI_PDEV_CHIP_POWER_STATS_EVENTID,
  1317. /** Power Save Failure Detected */
  1318. WMI_PDEV_CHIP_POWER_SAVE_FAILURE_DETECTED_EVENTID,
  1319. /* Event to report the switch count in csa of one or more VDEVs */
  1320. WMI_PDEV_CSA_SWITCH_COUNT_STATUS_EVENTID,
  1321. /** Report the caldata version to host */
  1322. WMI_PDEV_CHECK_CAL_VERSION_EVENTID,
  1323. /** Report chain RSSI and antenna index to host */
  1324. WMI_PDEV_DIV_RSSI_ANTID_EVENTID,
  1325. /** provide noise floor and cycle counts for a channel */
  1326. WMI_PDEV_BSS_CHAN_INFO_EVENTID,
  1327. /** Response received the ctl table to host */
  1328. WMI_PDEV_UPDATE_CTLTABLE_EVENTID,
  1329. WMI_PDEV_DMA_RING_CFG_RSP_EVENTID,
  1330. WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID,
  1331. /** WMI Event to deliver CTL Failsafe application */
  1332. WMI_PDEV_CTL_FAILSAFE_CHECK_EVENTID,
  1333. /* Event to report the switch count in BSS color of one or more VDEVs */
  1334. WMI_PDEV_CSC_SWITCH_COUNT_STATUS_EVENTID,
  1335. /* Event to send cold boot calibration data */
  1336. WMI_PDEV_COLD_BOOT_CAL_DATA_EVENTID,
  1337. /* Event to report a rogue ap info that is detected in fw */
  1338. WMI_PDEV_RAP_INFO_EVENTID,
  1339. WMI_CHAN_RF_CHARACTERIZATION_INFO_EVENTID,
  1340. /** 2nd extension of SERVICE_READY msg with extra target capability info */
  1341. WMI_SERVICE_READY_EXT2_EVENTID,
  1342. /**
  1343. * vdev restart response for multiple vdevs in response to
  1344. * MULTIPLE_VDEV_RESTART_REQUEST
  1345. */
  1346. WMI_PDEV_MULTIPLE_VDEV_RESTART_RESP_EVENTID,
  1347. /** WMI event in response to TPC STATS command */
  1348. WMI_PDEV_GET_TPC_STATS_EVENTID,
  1349. /* Event to get DPD status from HALPHY */
  1350. WMI_PDEV_GET_DPD_STATUS_EVENTID,
  1351. /* Event to get Calibration status from HALPHY */
  1352. WMI_PDEV_GET_HALPHY_CAL_STATUS_EVENTID,
  1353. /* Event to set halphy cal bitmap */
  1354. WMI_PDEV_SET_HALPHY_CAL_BMAP_EVENTID,
  1355. /* Event to get AOA phasedelta values from HALPHY */
  1356. WMI_PDEV_AOA_PHASEDELTA_EVENTID,
  1357. /* VDEV specific events */
  1358. /** VDEV started event in response to VDEV_START request */
  1359. WMI_VDEV_START_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
  1360. /** vdev stopped event , generated in response to VDEV_STOP request */
  1361. WMI_VDEV_STOPPED_EVENTID,
  1362. /* Indicate the set key (used for setting per
  1363. * peer unicast and per vdev multicast)
  1364. * operation has completed */
  1365. WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
  1366. /* NOTE: WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID would be deprecated. Please
  1367. don't use this for any new implementations */
  1368. /* Firmware requests dynamic change to a specific beacon interval for a specific vdev ID in MCC scenario.
  1369. This request is valid only for vdevs operating in soft AP or P2P GO mode */
  1370. WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID,
  1371. /* Return the TSF timestamp of specified vdev */
  1372. WMI_VDEV_TSF_REPORT_EVENTID,
  1373. /* FW response to Host for vdev delete cmdid */
  1374. WMI_VDEV_DELETE_RESP_EVENTID,
  1375. /* DISA feature: FW response to Host with encrypted/decrypted 802.11 DISA frame */
  1376. WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_EVENTID,
  1377. /** event to report mac randomization success **/
  1378. WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_STATUS_EVENTID,
  1379. /* event for ARP stats collection */
  1380. WMI_VDEV_GET_ARP_STAT_EVENTID,
  1381. /** get tx power event in response to VDEV_GET_TX_POWER request */
  1382. WMI_VDEV_GET_TX_POWER_EVENTID,
  1383. WMI_VDEV_BCN_RECEPTION_STATS_EVENTID,
  1384. /* provide LTE-Coex state */
  1385. WMI_VDEV_GET_MWS_COEX_STATE_EVENTID,
  1386. /* provide LTE-Coex Dynamic Power Back-off info */
  1387. WMI_VDEV_GET_MWS_COEX_DPWB_STATE_EVENTID,
  1388. /* provide LTE-Coex TDM info */
  1389. WMI_VDEV_GET_MWS_COEX_TDM_STATE_EVENTID,
  1390. /* provide LTE-Coex IDRx info */
  1391. WMI_VDEV_GET_MWS_COEX_IDRX_STATE_EVENTID,
  1392. /* provide LTE-Coex antenna sharing info */
  1393. WMI_VDEV_GET_MWS_COEX_ANTENNA_SHARING_STATE_EVENTID,
  1394. /* Event to handle FW offloaded mgmt packets */
  1395. WMI_VDEV_MGMT_OFFLOAD_EVENTID,
  1396. /* FW response to Host for delete all peer cmdid */
  1397. WMI_VDEV_DELETE_ALL_PEER_RESP_EVENTID,
  1398. /** Indicates host to start/stop strobing for QTIMER periodically */
  1399. WMI_VDEV_AUDIO_SYNC_START_STOP_EVENTID,
  1400. /** Sends the final offset in the QTIMERs of both master and slave */
  1401. WMI_VDEV_AUDIO_SYNC_Q_MASTER_SLAVE_OFFSET_EVENTID,
  1402. /** VDEV_SEND_BIG_DATA_EVENT IS DEPRECATED - DO NOT USE */
  1403. WMI_VDEV_SEND_BIG_DATA_EVENTID,
  1404. /** send BIG DATA stats to host phase 2 */
  1405. WMI_VDEV_SEND_BIG_DATA_P2_EVENTID,
  1406. /** Latency related information received from beacon IE */
  1407. WMI_VDEV_BCN_LATENCY_EVENTID,
  1408. /** Disconnect request from FW */
  1409. WMI_VDEV_DISCONNECT_EVENTID,
  1410. /** Send Smart Monitor related params to host */
  1411. WMI_VDEV_SMART_MONITOR_EVENTID,
  1412. /* peer specific events */
  1413. /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */
  1414. WMI_PEER_STA_KICKOUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
  1415. /** Peer Info Event with data_rate, rssi, tx_fail_cnt etc */
  1416. WMI_PEER_INFO_EVENTID,
  1417. /** Event indicating that TX fail count reaching threshold */
  1418. WMI_PEER_TX_FAIL_CNT_THR_EVENTID,
  1419. /* Return the estimate link speed for the Peer specified in the
  1420. * WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID command.
  1421. */
  1422. WMI_PEER_ESTIMATED_LINKSPEED_EVENTID,
  1423. /* Return the peer state
  1424. * WMI_PEER_SET_PARAM_CMDID, WMI_PEER_AUTHORIZE
  1425. */
  1426. WMI_PEER_STATE_EVENTID,
  1427. /* Peer Assoc Conf event to confirm fw had received PEER_ASSOC_CMD.
  1428. * After that, host will send Mx message.
  1429. * Otherwise, host will pause any Mx(STA:M2/M4) message
  1430. */
  1431. WMI_PEER_ASSOC_CONF_EVENTID,
  1432. /* FW response to Host for peer delete cmdid */
  1433. WMI_PEER_DELETE_RESP_EVENTID,
  1434. /** Valid rate code list for peer */
  1435. WMI_PEER_RATECODE_LIST_EVENTID,
  1436. WMI_WDS_PEER_EVENTID,
  1437. WMI_PEER_STA_PS_STATECHG_EVENTID,
  1438. /** Peer Ant Div Info Event with rssi per chain, etc */
  1439. WMI_PEER_ANTDIV_INFO_EVENTID,
  1440. /*
  1441. * WMI_PEER_RESERVED_EVENTID
  1442. * These values are used for placeholders, to allow the subsequent
  1443. * WMI_PEER_OPER_MODE_CHANGE_EVENTID constant to have the same value
  1444. * as it had in its original location, when it was mistakenly placed
  1445. * amongst the WMI_PEER CMDID defs.
  1446. *
  1447. * These WMI_PEER_RESERVED values can be replaced with actual WMI peer
  1448. * event message IDs, though it will be simpler to instead add new
  1449. * WMI_PEER EVENTID defs at the end of the WMI_GRP_PEER WMI_EVT_GRP.
  1450. */
  1451. WMI_PEER_RESERVED0_EVENTID,
  1452. WMI_PEER_RESERVED1_EVENTID,
  1453. WMI_PEER_RESERVED2_EVENTID,
  1454. WMI_PEER_RESERVED3_EVENTID,
  1455. WMI_PEER_RESERVED4_EVENTID,
  1456. WMI_PEER_RESERVED5_EVENTID,
  1457. WMI_PEER_RESERVED6_EVENTID,
  1458. WMI_PEER_RESERVED7_EVENTID,
  1459. WMI_PEER_RESERVED8_EVENTID,
  1460. WMI_PEER_RESERVED9_EVENTID,
  1461. WMI_PEER_RESERVED10_EVENTID,
  1462. /** Peer operating mode change indication sent to host to update stats */
  1463. WMI_PEER_OPER_MODE_CHANGE_EVENTID,
  1464. /** report the current tx PN for the peer */
  1465. WMI_PEER_TX_PN_RESPONSE_EVENTID,
  1466. WMI_PEER_CFR_CAPTURE_EVENTID,
  1467. /* Peer Create Conf event to confirm fw had received WMI_PEER_CREATE_CMDID
  1468. * and status of WMI_PEER_CREATE_CMDID.
  1469. */
  1470. WMI_PEER_CREATE_CONF_EVENTID,
  1471. /* beacon/mgmt specific events */
  1472. /** RX management frame. the entire frame is carried along with the event. */
  1473. WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
  1474. /** software beacon alert event to Host requesting host to Queue a beacon for transmission
  1475. use only in host beacon mode */
  1476. WMI_HOST_SWBA_EVENTID,
  1477. /** beacon tbtt offset event indicating the tsf offset of the tbtt from the theoretical value.
  1478. tbtt offset is normally 0 and will be non zero if there are multiple VDEVs operating in
  1479. staggered beacon transmission mode */
  1480. WMI_TBTTOFFSET_UPDATE_EVENTID,
  1481. /** event after the first beacon is transmitted following
  1482. a change in the template.*/
  1483. WMI_OFFLOAD_BCN_TX_STATUS_EVENTID,
  1484. /** event after the first probe response is transmitted following
  1485. a change in the template.*/
  1486. WMI_OFFLOAD_PROB_RESP_TX_STATUS_EVENTID,
  1487. /** Event for Mgmt TX completion event */
  1488. WMI_MGMT_TX_COMPLETION_EVENTID,
  1489. /** Event for Mgmt TX bundle completion event */
  1490. WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID,
  1491. /** vdev_map used in WMI_TBTTOFFSET_UPDATE_EVENTID supports max 32 vdevs.
  1492. * Use this event if number of vdevs > 32.
  1493. */
  1494. WMI_TBTTOFFSET_EXT_UPDATE_EVENTID,
  1495. /** Event for offchan data TX completion event */
  1496. WMI_OFFCHAN_DATA_TX_COMPLETION_EVENTID,
  1497. /** software FILS Discovery Frame alert event to Host, requesting host to Queue an FD frame for transmission */
  1498. WMI_HOST_SWFDA_EVENTID,
  1499. /** software beacon alert event to Host requesting host to Queue a beacon for transmission.
  1500. * Used only in host beacon mode. */
  1501. WMI_HOST_SWBA_V2_EVENTID,
  1502. /** Event for QoS null frame TX completion */
  1503. WMI_QOS_NULL_FRAME_TX_COMPLETION_EVENTID,
  1504. /** WMI event for Firmware Consumed/Dropped Rx management frames indication */
  1505. WMI_MGMT_RX_FW_CONSUMED_EVENTID,
  1506. /* ADDBA Related WMI Events*/
  1507. /** Indication the completion of the prior
  1508. WMI_PEER_TID_DELBA_CMDID(initiator) */
  1509. WMI_TX_DELBA_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
  1510. /** Indication the completion of the prior
  1511. *WMI_PEER_TID_ADDBA_CMDID(initiator) */
  1512. WMI_TX_ADDBA_COMPLETE_EVENTID,
  1513. /* Seq num returned from hw for a sta/tid pair */
  1514. WMI_BA_RSP_SSN_EVENTID,
  1515. /* Aggregation state requested by BTC */
  1516. WMI_AGGR_STATE_TRIG_EVENTID,
  1517. /** Roam event to trigger roaming on host */
  1518. WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
  1519. /** matching AP found from list of profiles */
  1520. WMI_PROFILE_MATCH,
  1521. /** roam synch event */
  1522. WMI_ROAM_SYNCH_EVENTID,
  1523. /** roam synch frame event */
  1524. WMI_ROAM_SYNCH_FRAME_EVENTID,
  1525. /** various roam scan stats */
  1526. WMI_ROAM_SCAN_STATS_EVENTID,
  1527. /** Blacklisted AP information event */
  1528. WMI_ROAM_BLACKLIST_EVENTID,
  1529. /** Roam Pre-Authentication start event */
  1530. WMI_ROAM_PREAUTH_START_EVENTID,
  1531. /** Roaming PMKID request event */
  1532. WMI_ROAM_PMKID_REQUEST_EVENTID,
  1533. /** roam stats */
  1534. WMI_ROAM_STATS_EVENTID,
  1535. /** Roam scan channels list */
  1536. WMI_ROAM_SCAN_CHANNEL_LIST_EVENTID,
  1537. /** Firmware roam capability information */
  1538. WMI_ROAM_CAPABILITY_REPORT_EVENTID,
  1539. /** P2P disc found */
  1540. WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P),
  1541. /** send noa info to host when noa is changed for beacon tx offload enable */
  1542. WMI_P2P_NOA_EVENTID,
  1543. /** send p2p listen offload stopped event with different reason */
  1544. WMI_P2P_LISTEN_OFFLOAD_STOPPED_EVENTID,
  1545. /** Send EGAP Info to host */
  1546. WMI_AP_PS_EGAP_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AP_PS),
  1547. /* send pdev resume event to host after pdev resume. */
  1548. WMI_PDEV_RESUME_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SUSPEND),
  1549. /** WOW wake up host event.generated in response to WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID.
  1550. will cary wake reason */
  1551. WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
  1552. WMI_D0_WOW_DISABLE_ACK_EVENTID,
  1553. WMI_WOW_INITIAL_WAKEUP_EVENTID,
  1554. /*RTT related event ID*/
  1555. /** RTT measurement report */
  1556. WMI_RTT_MEASUREMENT_REPORT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
  1557. /** TSF measurement report */
  1558. WMI_TSF_MEASUREMENT_REPORT_EVENTID,
  1559. /** RTT error report */
  1560. WMI_RTT_ERROR_REPORT_EVENTID,
  1561. /*STATS specific events*/
  1562. /** txrx stats event requested by host */
  1563. WMI_STATS_EXT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STATS),
  1564. /** FW iface link stats Event */
  1565. WMI_IFACE_LINK_STATS_EVENTID,
  1566. /** FW iface peer link stats Event */
  1567. WMI_PEER_LINK_STATS_EVENTID,
  1568. /** FW Update radio stats Event */
  1569. WMI_RADIO_LINK_STATS_EVENTID,
  1570. /** Firmware memory dump Complete event*/
  1571. WMI_UPDATE_FW_MEM_DUMP_EVENTID,
  1572. /** Event indicating the DIAG logs/events supported by FW */
  1573. WMI_DIAG_EVENT_LOG_SUPPORTED_EVENTID,
  1574. /** Instantaneous RSSI event */
  1575. WMI_INST_RSSI_STATS_EVENTID,
  1576. /** FW update tx power levels event */
  1577. WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID,
  1578. /** This event is used to report wlan stats to host.
  1579. * It is triggered under 3 conditions:
  1580. * (a) Periodic timer timed out, based on the period specified
  1581. * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
  1582. * (b) Whenever any of the (enabled) stats thresholds specified
  1583. * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
  1584. * within the current stats period.
  1585. * (c) In response to the one-time wlan stats request of
  1586. * WMI_REQUEST_WLAN_STATS_CMDID from host.
  1587. *
  1588. * If this event is triggered by condition a or b,
  1589. * the stats counters are cleared at the start of each period.
  1590. * But if it is triggered by condition c, stats counters won't be cleared.
  1591. */
  1592. WMI_REPORT_STATS_EVENTID,
  1593. /** Event indicating RCPI of the peer requested by host in the WMI_REQUEST_RCPI_CMDID */
  1594. WMI_UPDATE_RCPI_EVENTID,
  1595. /** This event is used to respond to WMI_REQUEST_PEER_STATS_INFO_CMDID
  1596. * and report peer stats info to host */
  1597. WMI_PEER_STATS_INFO_EVENTID,
  1598. /** This event is used to respond to WMI_REQUEST_RADIO_CHAN_STATS_CMDID
  1599. * and report radio channel stats to host */
  1600. WMI_RADIO_CHAN_STATS_EVENTID,
  1601. /** This event is used to respond to WMI_REQUEST_WLM_STATS_CMDID
  1602. * and report WLM (WLAN latency manager) stats info to host */
  1603. WMI_WLM_STATS_EVENTID,
  1604. /** This event is used to respond to WMI_REQUEST_CTRL_PATH_STATS_CMDID
  1605. * and report stats info to host */
  1606. WMI_CTRL_PATH_STATS_EVENTID,
  1607. /* NLO specific events */
  1608. /** NLO match event after the first match */
  1609. WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL),
  1610. /** NLO scan complete event */
  1611. WMI_NLO_SCAN_COMPLETE_EVENTID,
  1612. /** APFIND specific events */
  1613. WMI_APFIND_EVENTID,
  1614. /** passpoint network match event */
  1615. WMI_PASSPOINT_MATCH_EVENTID,
  1616. /** GTK offload stautus event requested by host */
  1617. WMI_GTK_OFFLOAD_STATUS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
  1618. /** GTK offload failed to rekey event */
  1619. WMI_GTK_REKEY_FAIL_EVENTID,
  1620. /* CSA IE received event */
  1621. WMI_CSA_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
  1622. /*chatter query reply event*/
  1623. WMI_CHATTER_PC_QUERY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CHATTER),
  1624. /** DFS related events */
  1625. WMI_PDEV_DFS_RADAR_DETECTION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_DFS),
  1626. /** Indicate channel-availability-check completion event to host */
  1627. WMI_VDEV_DFS_CAC_COMPLETE_EVENTID,
  1628. /** Indicate off-channel-availability-check completion event to host */
  1629. WMI_VDEV_ADFS_OCAC_COMPLETE_EVENTID,
  1630. /** echo event in response to echo command */
  1631. WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
  1632. /* !!IMPORTANT!!
  1633. * If you need to add a new WMI event ID to the WMI_GRP_MISC sub-group,
  1634. * please make sure you add it BEHIND WMI_PDEV_UTF_EVENTID,
  1635. * as we MUST have a fixed value here to maintain compatibility between
  1636. * UTF and the ART2 driver
  1637. */
  1638. /** UTF specific WMI event */
  1639. WMI_PDEV_UTF_EVENTID,
  1640. /** event carries buffered debug messages */
  1641. WMI_DEBUG_MESG_EVENTID,
  1642. /** FW stats(periodic or on shot) */
  1643. WMI_UPDATE_STATS_EVENTID,
  1644. /** debug print message used for tracing FW code while debugging */
  1645. WMI_DEBUG_PRINT_EVENTID,
  1646. /** DCS wlan or non-wlan interference event
  1647. */
  1648. WMI_DCS_INTERFERENCE_EVENTID,
  1649. /** VI spoecific event */
  1650. WMI_PDEV_QVIT_EVENTID,
  1651. /** FW code profile data in response to profile request */
  1652. WMI_WLAN_PROFILE_DATA_EVENTID,
  1653. /* Factory Testing Mode request event
  1654. * used for integrated chipsets */
  1655. WMI_PDEV_FTM_INTG_EVENTID,
  1656. /* avoid list of frequencies .
  1657. */
  1658. WMI_WLAN_FREQ_AVOID_EVENTID,
  1659. /* Indicate the keepalive parameters */
  1660. WMI_VDEV_GET_KEEPALIVE_EVENTID,
  1661. /*Thermal Management event*/
  1662. WMI_THERMAL_MGMT_EVENTID,
  1663. /* Container for DIAG event and log data */
  1664. WMI_DIAG_DATA_CONTAINER_EVENTID,
  1665. /* host auto shutdown event */
  1666. WMI_HOST_AUTO_SHUTDOWN_EVENTID,
  1667. /*update mib counters together with WMI_UPDATE_STATS_EVENTID*/
  1668. WMI_UPDATE_WHAL_MIB_STATS_EVENTID,
  1669. /*update ht/vht info based on vdev (rx and tx NSS and preamble)*/
  1670. WMI_UPDATE_VDEV_RATE_STATS_EVENTID,
  1671. WMI_DIAG_EVENTID,
  1672. /** Set OCB Sched Response, deprecated */
  1673. WMI_OCB_SET_SCHED_EVENTID,
  1674. /** event to indicate the flush of the buffered debug messages is complete*/
  1675. WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID,
  1676. /** event to report mix/max RSSI breach events */
  1677. WMI_RSSI_BREACH_EVENTID,
  1678. /** event to report completion of data storage into flash memory */
  1679. WMI_TRANSFER_DATA_TO_FLASH_COMPLETE_EVENTID,
  1680. /** event to report SCPC calibrated data to host */
  1681. WMI_PDEV_UTF_SCPC_EVENTID,
  1682. /** event to provide requested data from the target's flash memory */
  1683. WMI_READ_DATA_FROM_FLASH_EVENTID,
  1684. /** event to report rx aggregation failure frame information */
  1685. WMI_REPORT_RX_AGGR_FAILURE_EVENTID,
  1686. /** event to upload a PKGID to host to identify chip for various products */
  1687. WMI_PKGID_EVENTID,
  1688. /* Thermal Throttling stats event id for every pdev and zones, etc */
  1689. WMI_THERM_THROT_STATS_EVENTID,
  1690. /* WMI UNIT TEST event */
  1691. WMI_UNIT_TEST_EVENTID,
  1692. /** event to report result of host configure SAR2 */
  1693. WMI_SAR2_RESULT_EVENTID,
  1694. /** event to get TX power per input HALPHY parameters */
  1695. WMI_GET_TPC_POWER_EVENTID,
  1696. /** event to provide MU-EDCA Parameters (to update host's beacon config) */
  1697. WMI_MUEDCA_PARAMS_CONFIG_EVENTID,
  1698. /** event to get ELNA BYPASS status */
  1699. WMI_GET_ELNA_BYPASS_EVENTID,
  1700. /** event to report ANI level of the channels */
  1701. WMI_GET_CHANNEL_ANI_EVENTID,
  1702. /* GPIO Event */
  1703. WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
  1704. /** upload H_CV info WMI event
  1705. * to indicate uploaded H_CV info to host
  1706. */
  1707. WMI_UPLOADH_EVENTID,
  1708. /** capture H info WMI event
  1709. * to indicate captured H info to host
  1710. */
  1711. WMI_CAPTUREH_EVENTID,
  1712. /* hw RFkill */
  1713. WMI_RFKILL_STATE_CHANGE_EVENTID,
  1714. /* Smart Antenna Controller status */
  1715. WMI_SMARTANT_STATE_CHANGE_EVENTID,
  1716. /* TDLS Event */
  1717. WMI_TDLS_PEER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TDLS),
  1718. /** STA SMPS Event */
  1719. /** force SMPS mode */
  1720. WMI_STA_SMPS_FORCE_MODE_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STA_SMPS),
  1721. /*location scan event*/
  1722. /*report the firmware's capability of batch scan*/
  1723. WMI_BATCH_SCAN_ENABLED_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
  1724. /*batch scan result*/
  1725. WMI_BATCH_SCAN_RESULT_EVENTID,
  1726. /* OEM Event */
  1727. WMI_OEM_CAPABILITY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OEM), /*DEPRECATED*/
  1728. WMI_OEM_MEASUREMENT_REPORT_EVENTID, /* DEPRECATED */
  1729. WMI_OEM_ERROR_REPORT_EVENTID, /* DEPRECATED */
  1730. WMI_OEM_RESPONSE_EVENTID,
  1731. WMI_OEM_DMA_RING_CFG_RSP_EVENTID,
  1732. WMI_OEM_DMA_BUF_RELEASE_EVENTID,
  1733. WMI_OEM_DATA_EVENTID,
  1734. /* NAN Event */
  1735. WMI_NAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN),
  1736. WMI_NAN_DISC_IFACE_CREATED_EVENTID,
  1737. WMI_NAN_DISC_IFACE_DELETED_EVENTID,
  1738. WMI_NAN_STARTED_CLUSTER_EVENTID,
  1739. WMI_NAN_JOINED_CLUSTER_EVENTID,
  1740. WMI_NAN_DMESG_EVENTID,
  1741. /* Coex Event */
  1742. WMI_COEX_REPORT_ANTENNA_ISOLATION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_COEX),
  1743. WMI_SAR_GET_LIMITS_EVENTID,
  1744. /* LPI Event */
  1745. WMI_LPI_RESULT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LPI),
  1746. WMI_LPI_STATUS_EVENTID,
  1747. WMI_LPI_HANDOFF_EVENTID,
  1748. /* ExtScan events */
  1749. WMI_EXTSCAN_START_STOP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_EXTSCAN),
  1750. WMI_EXTSCAN_OPERATION_EVENTID,
  1751. WMI_EXTSCAN_TABLE_USAGE_EVENTID,
  1752. WMI_EXTSCAN_CACHED_RESULTS_EVENTID,
  1753. WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID,
  1754. WMI_EXTSCAN_HOTLIST_MATCH_EVENTID,
  1755. WMI_EXTSCAN_CAPABILITIES_EVENTID,
  1756. WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID,
  1757. /* mDNS offload events */
  1758. WMI_MDNS_STATS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MDNS_OFL),
  1759. /* SAP Authentication offload events */
  1760. WMI_SAP_OFL_ADD_STA_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SAP_OFL),
  1761. WMI_SAP_OFL_DEL_STA_EVENTID,
  1762. WMI_SAP_OBSS_DETECTION_REPORT_EVENTID,
  1763. /* OBSS Offloads events */
  1764. WMI_OBSS_COLOR_COLLISION_DETECTION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OBSS_OFL),
  1765. /** Out-of-context-of-bss (OCB) events */
  1766. WMI_OCB_SET_CONFIG_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OCB),
  1767. WMI_OCB_GET_TSF_TIMER_RESP_EVENTID,
  1768. WMI_DCC_GET_STATS_RESP_EVENTID,
  1769. WMI_DCC_UPDATE_NDL_RESP_EVENTID,
  1770. WMI_DCC_STATS_EVENTID,
  1771. /* System-On-Chip events */
  1772. WMI_SOC_SET_HW_MODE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SOC),
  1773. WMI_SOC_HW_MODE_TRANSITION_EVENTID,
  1774. WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID,
  1775. /** Motion Aided WiFi Connectivity (MAWC) events */
  1776. WMI_MAWC_ENABLE_SENSOR_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MAWC),
  1777. /** pkt filter (BPF) offload relevant events */
  1778. WMI_BPF_CAPABILIY_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
  1779. WMI_BPF_VDEV_STATS_INFO_EVENTID,
  1780. WMI_BPF_GET_VDEV_WORK_MEMORY_RESP_EVENTID,
  1781. /* RMC specific event */
  1782. /* RMC manual leader selected event */
  1783. WMI_RMC_NEW_LEADER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RMC),
  1784. /** WMI events related to regulatory offload */
  1785. WMI_REG_CHAN_LIST_CC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_REGULATORY),
  1786. WMI_11D_NEW_COUNTRY_EVENTID,
  1787. WMI_REG_CHAN_LIST_CC_EXT_EVENTID,
  1788. WMI_AFC_EVENTID,
  1789. /** Events for TWT(Target Wake Time) of STA and AP */
  1790. WMI_TWT_ENABLE_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TWT),
  1791. WMI_TWT_DISABLE_COMPLETE_EVENTID,
  1792. WMI_TWT_ADD_DIALOG_COMPLETE_EVENTID,
  1793. WMI_TWT_DEL_DIALOG_COMPLETE_EVENTID,
  1794. WMI_TWT_PAUSE_DIALOG_COMPLETE_EVENTID,
  1795. WMI_TWT_RESUME_DIALOG_COMPLETE_EVENTID,
  1796. WMI_TWT_BTWT_INVITE_STA_COMPLETE_EVENTID,
  1797. WMI_TWT_BTWT_REMOVE_STA_COMPLETE_EVENTID,
  1798. WMI_TWT_SESSION_STATS_EVENTID,
  1799. WMI_TWT_NUDGE_DIALOG_COMPLETE_EVENTID,
  1800. WMI_TWT_NOTIFY_EVENTID,
  1801. WMI_TWT_ACK_EVENTID,
  1802. /** Events in Prototyping phase */
  1803. WMI_NDI_CAP_RSP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PROTOTYPE),
  1804. WMI_NDP_INITIATOR_RSP_EVENTID,
  1805. WMI_NDP_RESPONDER_RSP_EVENTID,
  1806. WMI_NDP_END_RSP_EVENTID,
  1807. WMI_NDP_INDICATION_EVENTID,
  1808. WMI_NDP_CONFIRM_EVENTID,
  1809. WMI_NDP_END_INDICATION_EVENTID,
  1810. WMI_WLAN_COEX_BT_ACTIVITY_EVENTID,
  1811. WMI_NDL_SCHEDULE_UPDATE_EVENTID,
  1812. WMI_NDP_EVENTID,
  1813. /** WMI events related to motion detection */
  1814. WMI_MOTION_DET_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MOTION_DET),
  1815. WMI_MOTION_DET_BASE_LINE_HOST_EVENTID,
  1816. /** WMI events related to Estimation of Service Parameters (802.11mc) */
  1817. WMI_ESP_ESTIMATE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ESP),
  1818. /** WMI events related to Audio Frame aggregation feature **/
  1819. WMI_AUDIO_AGGR_REPORT_STATISTICS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AUDIO),
  1820. WMI_AUDIO_AGGR_SCHED_METHOD_EVENTID,
  1821. /** Vendor defined WMI events **/
  1822. WMI_VENDOR_PDEV_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VENDOR),
  1823. WMI_VENDOR_VDEV_EVENTID,
  1824. WMI_VENDOR_PEER_EVENTID,
  1825. /** Further vendor event IDs can be added below **/
  1826. /** WMI event specific to MLO **/
  1827. /** MLO link active / inactive response event */
  1828. WMI_MLO_LINK_SET_ACTIVE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MLO),
  1829. /* Response event for MLO setup cmd */
  1830. WMI_MLO_SETUP_COMPLETE_EVENTID,
  1831. /* Response event for MLO teardown cmd */
  1832. WMI_MLO_TEARDOWN_COMPLETE_EVENTID,
  1833. } WMI_EVT_ID;
  1834. /* defines for OEM message sub-types */
  1835. #define WMI_OEM_CAPABILITY_REQ 0x01
  1836. #define WMI_OEM_CAPABILITY_RSP 0x02
  1837. #define WMI_OEM_MEASUREMENT_REQ 0x03
  1838. #define WMI_OEM_MEASUREMENT_RSP 0x04
  1839. #define WMI_OEM_ERROR_REPORT_RSP 0x05
  1840. #define WMI_OEM_NAN_MEAS_REQ 0x06
  1841. #define WMI_OEM_NAN_MEAS_RSP 0x07
  1842. #define WMI_OEM_NAN_PEER_INFO 0x08
  1843. #define WMI_OEM_CONFIGURE_LCR 0x09
  1844. #define WMI_OEM_CONFIGURE_LCI 0x0A
  1845. #define WMI_CHAN_LIST_TAG 0x1
  1846. #define WMI_SSID_LIST_TAG 0x2
  1847. #define WMI_BSSID_LIST_TAG 0x3
  1848. #define WMI_IE_TAG 0x4
  1849. #define WMI_SCAN_START_OFFSET_TAG 0x5
  1850. typedef struct {
  1851. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
  1852. /** primary 20 MHz channel frequency in mhz */
  1853. A_UINT32 mhz;
  1854. /** Center frequency 1 in MHz*/
  1855. A_UINT32 band_center_freq1;
  1856. /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
  1857. A_UINT32 band_center_freq2;
  1858. /** channel info described below */
  1859. A_UINT32 info;
  1860. /** contains min power, max power, reg power and reg class id. */
  1861. A_UINT32 reg_info_1;
  1862. /** contains antennamax, max bandwidth */
  1863. A_UINT32 reg_info_2;
  1864. } wmi_channel;
  1865. typedef enum {
  1866. WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
  1867. WMI_CHANNEL_CHANGE_CAUSE_CSA,
  1868. } wmi_channel_change_cause;
  1869. /** channel info consists of 6 bits of channel mode */
  1870. #define WMI_SET_CHANNEL_MODE(pwmi_channel,val) do { \
  1871. (pwmi_channel)->info &= 0xffffffc0; \
  1872. (pwmi_channel)->info |= (val); \
  1873. } while (0)
  1874. #define WMI_GET_CHANNEL_MODE(pwmi_channel) ((pwmi_channel)->info & 0x0000003f)
  1875. #define WMI_CHAN_FLAG_HT40_PLUS 6
  1876. #define WMI_CHAN_FLAG_PASSIVE 7
  1877. #define WMI_CHAN_ADHOC_ALLOWED 8
  1878. #define WMI_CHAN_AP_DISABLED 9
  1879. #define WMI_CHAN_FLAG_DFS 10
  1880. #define WMI_CHAN_FLAG_ALLOW_HT 11 /* HT is allowed on this channel */
  1881. #define WMI_CHAN_FLAG_ALLOW_VHT 12 /* VHT is allowed on this channel */
  1882. #define WMI_CHANNEL_CHANGE_CAUSE_CSA 13 /*Indicate reason for channel switch */
  1883. #define WMI_CHAN_FLAG_HALF_RATE 14 /* Indicates half rate channel */
  1884. #define WMI_CHAN_FLAG_QUARTER_RATE 15 /* Indicates quarter rate channel */
  1885. #define WMI_CHAN_FLAG_DFS_CFREQ2 16 /* Enable radar event reporting for sec80 in VHT80p80 */
  1886. #define WMI_CHAN_FLAG_ALLOW_HE 17 /* HE (11ax) is allowed on this channel */
  1887. #define WMI_CHAN_FLAG_PSC 18 /* Indicate it is a PSC (preferred scanning channel) */
  1888. #define WMI_CHAN_FLAG_NAN_DISABLED 19 /* Indicates that NAN operations are disabled on this channel */
  1889. #define WMI_CHAN_FLAG_STA_DFS 20 /* Indicates if STA should process radar signals */
  1890. #define WMI_SET_CHANNEL_FLAG(pwmi_channel,flag) do { \
  1891. (pwmi_channel)->info |= (1 << flag); \
  1892. } while (0)
  1893. #define WMI_GET_CHANNEL_FLAG(pwmi_channel,flag) \
  1894. (((pwmi_channel)->info & (1 << flag)) >> flag)
  1895. #define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel,val) do { \
  1896. (pwmi_channel)->reg_info_1 &= 0xffffff00; \
  1897. (pwmi_channel)->reg_info_1 |= (val & 0xff); \
  1898. } while (0)
  1899. #define WMI_GET_CHANNEL_MIN_POWER(pwmi_channel) ((pwmi_channel)->reg_info_1 & 0xff)
  1900. #define WMI_SET_CHANNEL_MAX_POWER(pwmi_channel,val) do { \
  1901. (pwmi_channel)->reg_info_1 &= 0xffff00ff; \
  1902. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 8); \
  1903. } while (0)
  1904. #define WMI_GET_CHANNEL_MAX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 8) & 0xff)
  1905. #define WMI_SET_CHANNEL_REG_POWER(pwmi_channel,val) do { \
  1906. (pwmi_channel)->reg_info_1 &= 0xff00ffff; \
  1907. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 16); \
  1908. } while (0)
  1909. #define WMI_GET_CHANNEL_REG_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 16) & 0xff)
  1910. #define WMI_SET_CHANNEL_REG_CLASSID(pwmi_channel,val) do { \
  1911. (pwmi_channel)->reg_info_1 &= 0x00ffffff; \
  1912. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 24); \
  1913. } while (0)
  1914. #define WMI_GET_CHANNEL_REG_CLASSID(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 24) & 0xff)
  1915. #define WMI_SET_CHANNEL_ANTENNA_MAX(pwmi_channel,val) do { \
  1916. (pwmi_channel)->reg_info_2 &= 0xffffff00; \
  1917. (pwmi_channel)->reg_info_2 |= (val & 0xff); \
  1918. } while (0)
  1919. #define WMI_GET_CHANNEL_ANTENNA_MAX(pwmi_channel) ((pwmi_channel)->reg_info_2 & 0xff)
  1920. /* max tx power is in 1 dBm units */
  1921. #define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel,val) do { \
  1922. (pwmi_channel)->reg_info_2 &= 0xffff00ff; \
  1923. (pwmi_channel)->reg_info_2 |= ((val & 0xff) << 8); \
  1924. } while (0)
  1925. #define WMI_GET_CHANNEL_MAX_TX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_2)>>8) & 0xff)
  1926. /* max bw supported for each channel, enum wmi_channel_width as value */
  1927. #define WMI_SET_CHANNEL_MAX_BANDWIDTH(pwmi_channel,val) do { \
  1928. (pwmi_channel)->reg_info_2 &= 0xff00ffff; \
  1929. (pwmi_channel)->reg_info_2 |= ((val & 0xff) << 16); \
  1930. } while (0)
  1931. #define WMI_GET_CHANNEL_MAX_BANDWIDTH(pwmi_channel) ((((pwmi_channel)->reg_info_2) >> 16) & 0xff)
  1932. /** HT Capabilities*/
  1933. #define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
  1934. #define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
  1935. #define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
  1936. #define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
  1937. #define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
  1938. #define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
  1939. #define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
  1940. #define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
  1941. #define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
  1942. #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
  1943. #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
  1944. #define WMI_HT_CAP_HT40_SGI 0x0800
  1945. #define WMI_HT_CAP_RX_LDPC 0x1000 /* LDPC RX support */
  1946. #define WMI_HT_CAP_TX_LDPC 0x2000 /* LDPC TX support */
  1947. /* These macros should be used when we wish to advertise STBC support for
  1948. * only 1SS or 2SS or 3SS. */
  1949. #define WMI_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
  1950. #define WMI_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
  1951. #define WMI_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
  1952. #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
  1953. WMI_HT_CAP_HT20_SGI | \
  1954. WMI_HT_CAP_HT40_SGI | \
  1955. WMI_HT_CAP_TX_STBC | \
  1956. WMI_HT_CAP_RX_STBC | \
  1957. WMI_HT_CAP_LDPC | \
  1958. WMI_HT_CAP_TX_LDPC | \
  1959. WMI_HT_CAP_RX_LDPC)
  1960. /* WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
  1961. field. The fields not defined here are not supported, or reserved.
  1962. Do not change these masks and if you have to add new one follow the
  1963. bitmask as specified by 802.11ac draft.
  1964. */
  1965. #define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
  1966. #define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
  1967. #define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
  1968. #define WMI_VHT_CAP_CH_WIDTH_160MHZ 0x00000004
  1969. #define WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ 0x00000008
  1970. #define WMI_VHT_CAP_RX_LDPC 0x00000010
  1971. #define WMI_VHT_CAP_SGI_80MHZ 0x00000020
  1972. #define WMI_VHT_CAP_SGI_160MHZ 0x00000040
  1973. #define WMI_VHT_CAP_TX_STBC 0x00000080
  1974. #define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
  1975. #define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
  1976. #define WMI_VHT_CAP_SU_BFORMER 0x00000800
  1977. #define WMI_VHT_CAP_SU_BFORMEE 0x00001000
  1978. #define WMI_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
  1979. #define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
  1980. #define WMI_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
  1981. #define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
  1982. #define WMI_VHT_CAP_MU_BFORMER 0x00080000
  1983. #define WMI_VHT_CAP_MU_BFORMEE 0x00100000
  1984. #define WMI_VHT_CAP_TXOP_PS 0x00200000
  1985. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
  1986. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
  1987. #define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
  1988. #define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
  1989. #define WMI_VHT_CAP_TX_LDPC 0x40000000
  1990. /* TEMPORARY:
  1991. * Preserve the incorrect old name as an alias for the correct new name
  1992. * until all references to the old name have been removed from all hosts
  1993. * and targets.
  1994. */
  1995. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT
  1996. /* These macros should be used when we wish to advertise STBC support for
  1997. * only 1SS or 2SS or 3SS. */
  1998. #define WMI_VHT_CAP_RX_STBC_1SS 0x00000100
  1999. #define WMI_VHT_CAP_RX_STBC_2SS 0x00000200
  2000. #define WMI_VHT_CAP_RX_STBC_3SS 0x00000300
  2001. /* TEMPORARY:
  2002. * Preserve the incorrect old name as an alias for the correct new name
  2003. * until all references to the old name have been removed from all hosts
  2004. * and targets.
  2005. */
  2006. #define WMI_vHT_CAP_RX_STBC_3SS WMI_VHT_CAP_RX_STBC_3SS
  2007. #define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
  2008. WMI_VHT_CAP_SGI_80MHZ | \
  2009. WMI_VHT_CAP_TX_STBC | \
  2010. WMI_VHT_CAP_RX_STBC_MASK | \
  2011. WMI_VHT_CAP_RX_LDPC | \
  2012. WMI_VHT_CAP_TX_LDPC | \
  2013. WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
  2014. WMI_VHT_CAP_RX_FIXED_ANT | \
  2015. WMI_VHT_CAP_TX_FIXED_ANT)
  2016. /* Interested readers refer to Rx/Tx MCS Map definition as defined in
  2017. 802.11ac
  2018. */
  2019. #define WMI_VHT_MAX_MCS_EXT_SS_GET(vht_mcs_map, index) WMI_GET_BITS(vht_mcs_map, 16 + index, 1)
  2020. #define WMI_VHT_MAX_MCS_EXT_SS_SET(vht_mcs_map, index, value) WMI_SET_BITS(vht_mcs_map, 16 + index, 1, value)
  2021. /* Notification bit for Ext MCS 10/11 support */
  2022. #define WMI_VHT_MCS_NOTIFY_EXT_SS_GET(vht_mcs_map) WMI_GET_BITS(vht_mcs_map, 24, 1)
  2023. #define WMI_VHT_MCS_NOTIFY_EXT_SS_SET(vht_mcs_map, value) WMI_SET_BITS(vht_mcs_map, 24, 1, value)
  2024. #define WMI_VHT_MAX_MCS_4_SS_MASK(r,ss) ((3 & (r)) << (((ss) - 1) << 1))
  2025. #define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
  2026. #define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
  2027. /** 11ax capabilities */
  2028. #define WMI_HE_CAP_PPE_PRESENT 0x00000001
  2029. #define WMI_HE_CAP_TWT_RESPONDER_SUPPORT 0x00000002
  2030. #define WMI_HE_CAP_TWT_REQUESTER_SUPPORT 0x00000004
  2031. #define WMI_HE_FRAG_SUPPORT_MASK 0x00000018
  2032. #define WMI_HE_FRAG_SUPPORT_SHIFT 3
  2033. #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT 0x00000001
  2034. #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT 0x00000002
  2035. #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT 0x00000004
  2036. #define WMI_HE_CAP_RX_DL_OFDMA_SUPPORT 0x00000018
  2037. #define WMI_HE_CAP_RX_DL_MUMIMO_SUPPORT 0x00000030
  2038. #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT_GET(he_cap_info_dword1) \
  2039. WMI_GET_BITS(he_cap_info_dword1, 0, 1)
  2040. #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT_SET(he_cap_info_dword1, value) \
  2041. WMI_SET_BITS(he_cap_info_dword1, 0, 1, value)
  2042. #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT_GET(he_cap_info_dword1) \
  2043. WMI_GET_BITS(he_cap_info_dword1, 1, 1)
  2044. #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT_SET(he_cap_info_dword1, value) \
  2045. WMI_SET_BITS(he_cap_info_dword1, 1, 1, value)
  2046. #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT_GET(he_cap_info_dword1) \
  2047. WMI_GET_BITS(he_cap_info_dword1, 2, 1)
  2048. #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT_SET(he_cap_info_dword1, value) \
  2049. WMI_SET_BITS(he_cap_info_dword1, 2, 1, value)
  2050. #define WMI_HE_CAP_RX_DL_OFDMA_SUPPORT_GET(he_cap_info_dword1) \
  2051. WMI_GET_BITS(he_cap_info_dword1, 3, 2)
  2052. #define WMI_HE_CAP_RX_DL_OFDMA_SUPPORT_SET(he_cap_info_dword1, value) \
  2053. WMI_SET_BITS(he_cap_info_dword1, 3, 2, value)
  2054. #define WMI_HE_CAP_RX_DL_MUMIMO_SUPPORT_GET(he_cap_info_dword1) \
  2055. WMI_GET_BITS(he_cap_info_dword1, 5, 2)
  2056. #define WMI_HE_CAP_RX_DL_MUMIMO_SUPPORT_SET(he_cap_info_dword1, value) \
  2057. WMI_SET_BITS(he_cap_info_dword1, 5, 2, value)
  2058. /* Interested readers refer to Rx/Tx MCS Map definition as defined in 802.11ax
  2059. */
  2060. #define WMI_HE_MAX_MCS_4_SS_MASK(r,ss) ((3 & (r)) << (((ss) - 1) << 1))
  2061. /*
  2062. * index ranges from 0 to 15, and is used for checking if MCS 12/13 is enabled
  2063. * for a particular NSS.
  2064. * The lower 8 bits (indices 0-7) within the 16 bits indicate MCS 12/13
  2065. * enablement for BW <= 80MHz; the upper 8 bits (indices 8-15) within
  2066. * the 16 bits indicate MCS 12/13 enablement for BW > 80MHz.
  2067. * The 16 bits for the index values are within the upper bits (bits 31:16)
  2068. * of a 32-bit word.
  2069. */
  2070. #define WMI_HE_EXTRA_MCS_SS_GET(he_mcs_map_ext, index) \
  2071. WMI_GET_BITS(he_mcs_map_ext, 16 + index, 1)
  2072. #define WMI_HE_EXTRA_MCS_SS_SET(he_mcs_map_ext, index, value) \
  2073. WMI_SET_BITS(he_mcs_map_ext, 16 + index, 1, value)
  2074. /* fragmentation support field value */
  2075. enum {
  2076. WMI_HE_FRAG_SUPPORT_LEVEL0, /* No Fragmentation support */
  2077. WMI_HE_FRAG_SUPPORT_LEVEL1, /* support for fragments within a VHT single MPDU, no support for fragments within AMPDU */
  2078. WMI_HE_FRAG_SUPPORT_LEVEL2, /* support for up to 1 fragment per MSDU within a single A-MPDU */
  2079. WMI_HE_FRAG_SUPPORT_LEVEL3, /* support for multiple fragments per MSDU within an A-MPDU */
  2080. };
  2081. enum {
  2082. WMI_HE_RX_DL_OFDMA_SUPPORT_DEFAULT, /* Default */
  2083. WMI_HE_RX_DL_OFDMA_SUPPORT_DISABLE, /* RX DL OFDMA Support Disabled */
  2084. WMI_HE_RX_DL_OFDMA_SUPPORT_ENABLE, /* RX DL OFDMA Support Enabled */
  2085. WMI_HE_RX_DL_OFDMA_SUPPORT_INVALID, /* INVALID */
  2086. };
  2087. enum {
  2088. WMI_HE_RX_DL_MUMIMO_SUPPORT_DEFAULT, /* Default */
  2089. WMI_HE_RX_DL_MUMIMO_SUPPORT_DISABLE, /* RX DL MU-MIMO Support Disabled */
  2090. WMI_HE_RX_DL_MUMIMO_SUPPORT_ENABLE, /* RX DL MU-MIMO Support Enabled */
  2091. WMI_HE_RX_DL_MUMIMO_SUPPORT_INVALID, /* INVALID */
  2092. };
  2093. /** NOTE: This defs cannot be changed in the future without breaking WMI compatibility */
  2094. #define WMI_MAX_NUM_SS MAX_HE_NSS
  2095. #define WMI_MAX_NUM_RU MAX_HE_RU
  2096. /*
  2097. * Figure 8 554ae: -PPE Threshold Info field format
  2098. * we pack PPET16 and PPT8 for four RU's in one element of array.
  2099. *
  2100. * ppet16_ppet8_ru3_ru0 array element 0 holds:
  2101. * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
  2102. *rsvd |NSS1,RU4|NSS1,RU4|NSS1,RU3|NSS1,RU3|NSS1,RU2|NSS1,RU2|NSS1,RU1|NSS1,RU1|
  2103. *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
  2104. *
  2105. * ppet16_ppet8_ru3_ru0 array element 1 holds:
  2106. * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
  2107. *rsvd |NSS2,RU4|NSS2,RU4|NSS2,RU3|NSS2,RU3|NSS2,RU2|NSS2,RU2|NSS2,RU1|NSS2,RU1|
  2108. *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
  2109. *
  2110. * etc.
  2111. */
  2112. /*
  2113. * Note that in these macros, "ru" is one-based, not zero-based, while
  2114. * nssm1 is zero-based.
  2115. */
  2116. #define WMI_SET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
  2117. do { \
  2118. ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) & 3) * 6)); \
  2119. ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet & 7) << (((ru-1) & 3) * 6)); \
  2120. } while (0)
  2121. #define WMI_GET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1) \
  2122. ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) & 3) * 6)) & 7)
  2123. #define WMI_SET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
  2124. do { \
  2125. ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) & 3) * 6 + 3)); \
  2126. ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1) & 3) * 6 + 3)); \
  2127. } while (0)
  2128. #define WMI_GET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1) \
  2129. ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) & 3) * 6 + 3)) & 7)
  2130. typedef struct _wmi_ppe_threshold {
  2131. A_UINT32 numss_m1; /** NSS - 1*/
  2132. union {
  2133. A_UINT32 ru_count; /** RU COUNT OBSOLETE to be removed after few versions */
  2134. A_UINT32 ru_mask; /** RU index mask */
  2135. };
  2136. A_UINT32 ppet16_ppet8_ru3_ru0[WMI_MAX_NUM_SS]; /** ppet8 and ppet16 for max num ss */
  2137. /**************************************************
  2138. * As this struct is embedded inside other structs,
  2139. * it cannot be expanded without breaking backwards
  2140. * compatibility. Do not add new fields here.
  2141. **************************************************/
  2142. } wmi_ppe_threshold;
  2143. #define WMI_MAX_EHTCAP_MAC_SIZE 2
  2144. #define WMI_MAX_EHTCAP_PHY_SIZE 3
  2145. /* WMI_SYS_CAPS_* refer to the capabilities that system support
  2146. */
  2147. #define WMI_SYS_CAP_ENABLE 0x00000001
  2148. #define WMI_SYS_CAP_TXPOWER 0x00000002
  2149. /*
  2150. * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions.
  2151. * Bits 5:0 are reserved
  2152. */
  2153. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS (28)
  2154. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS (24)
  2155. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS (20)
  2156. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS (16)
  2157. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS (12)
  2158. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS (8)
  2159. #define WMI_DBS_HW_MODE_DBS_MODE_BITPOS (7)
  2160. #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS (6)
  2161. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  2162. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  2163. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  2164. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  2165. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  2166. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  2167. #define WMI_DBS_HW_MODE_DBS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
  2168. #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
  2169. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \
  2170. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value)
  2171. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \
  2172. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value)
  2173. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \
  2174. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value)
  2175. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \
  2176. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value)
  2177. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \
  2178. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value)
  2179. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \
  2180. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value)
  2181. #define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value) \
  2182. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_DBS_MODE_BITPOS, 1, value)
  2183. #define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value) \
  2184. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value)
  2185. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \
  2186. ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  2187. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \
  2188. ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  2189. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \
  2190. ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  2191. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \
  2192. ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  2193. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \
  2194. ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  2195. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \
  2196. ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  2197. #define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode) \
  2198. ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
  2199. #define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode) \
  2200. ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
  2201. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS (31)
  2202. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS (30)
  2203. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS (29)
  2204. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS (28)
  2205. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS (27)
  2206. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
  2207. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
  2208. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
  2209. #define WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
  2210. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
  2211. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \
  2212. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value)
  2213. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(scan_cfg, value) \
  2214. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS, 1, value)
  2215. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(scan_cfg, value) \
  2216. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS, 1, value)
  2217. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_SET(scan_cfg, value) \
  2218. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS, 1, value)
  2219. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_SET(scan_cfg, value) \
  2220. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS, 1, value)
  2221. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_cfg) \
  2222. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
  2223. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_cfg) \
  2224. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
  2225. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_cfg) \
  2226. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
  2227. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_GET(scan_cfg) \
  2228. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
  2229. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_GET(scan_cfg) \
  2230. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
  2231. #define WMI_DBS_FW_MODE_CFG_DBS_BITPOS (31)
  2232. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS (30)
  2233. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS (29)
  2234. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS (28)
  2235. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS (27)
  2236. #define WMI_DBS_FW_MODE_CFG_DBS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
  2237. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
  2238. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
  2239. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS)
  2240. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS)
  2241. #define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \
  2242. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value)
  2243. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(fw_mode, value) \
  2244. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS, 1, value)
  2245. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_SET(fw_mode, value) \
  2246. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS, 1, value)
  2247. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_SET(fw_mode, value) \
  2248. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS, 1, value)
  2249. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_SET(fw_mode, value) \
  2250. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS, 1, value)
  2251. #define WMI_DBS_FW_MODE_CFG_DBS_GET(fw_mode) \
  2252. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
  2253. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_mode) \
  2254. ((fw_mode & WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
  2255. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_GET(fw_mode) \
  2256. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
  2257. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_GET(fw_mode) \
  2258. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS)
  2259. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_GET(fw_mode) \
  2260. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS)
  2261. /** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */
  2262. typedef struct _wmi_abi_version {
  2263. A_UINT32 abi_version_0; /** WMI Major and Minor versions */
  2264. A_UINT32 abi_version_1; /** WMI change revision */
  2265. A_UINT32 abi_version_ns_0; /** ABI version namespace first four dwords */
  2266. A_UINT32 abi_version_ns_1; /** ABI version namespace second four dwords */
  2267. A_UINT32 abi_version_ns_2; /** ABI version namespace third four dwords */
  2268. A_UINT32 abi_version_ns_3; /** ABI version namespace fourth four dwords */
  2269. } wmi_abi_version;
  2270. /*
  2271. * maximum number of memroy requests allowed from FW.
  2272. */
  2273. #define WMI_MAX_MEM_REQS 16
  2274. /* !!NOTE!!:
  2275. * This HW_BD_INFO_SIZE cannot be changed without breaking compatibility.
  2276. * Please don't change it.
  2277. */
  2278. #define HW_BD_INFO_SIZE 5
  2279. /**
  2280. * PDEV ID to identify the physical device,
  2281. * value 0 reserved for SOC level commands/event
  2282. */
  2283. #define WMI_PDEV_ID_SOC 0 /* SOC level, applicable to all PDEVs */
  2284. #define WMI_PDEV_ID_1ST 1 /* first pdev (pdev 0) */
  2285. #define WMI_PDEV_ID_2ND 2 /* second pdev (pdev 1) */
  2286. #define WMI_PDEV_ID_3RD 3 /* third pdev (pdev 2) */
  2287. /*
  2288. * Enum regarding which BDF elements are provided in which elements of the
  2289. * wmi_service_ready_event_fixed_param.hw_bd_info[] array
  2290. */
  2291. typedef enum {
  2292. BDF_VERSION = 0,
  2293. REF_DESIGN_ID = 1,
  2294. CUSTOMER_ID = 2,
  2295. PROJECT_ID = 3,
  2296. BOARD_DATA_REV = 4,
  2297. } wmi_hw_bd_info_e;
  2298. /*
  2299. * Macros to get/set BDF details within the
  2300. * wmi_service_ready_event_fixed_param.hw_bd_info[] array
  2301. */
  2302. #define WMI_GET_BDF_VERSION(hw_bd_info) ((hw_bd_info)[BDF_VERSION])
  2303. #define WMI_GET_REF_DESIGN(hw_bd_info) ((hw_bd_info)[REF_DESIGN_ID])
  2304. #define WMI_GET_CUSTOMER_ID(hw_bd_info) ((hw_bd_info)[CUSTOMER_ID])
  2305. #define WMI_GET_PROJECT_ID(hw_bd_info) ((hw_bd_info)[PROJECT_ID])
  2306. #define WMI_GET_BOARD_DATA_REV(hw_bd_info) ((hw_bd_info)[BOARD_DATA_REV])
  2307. #define WMI_SET_BDF_VERSION(hw_bd_info, val) ((hw_bd_info)[BDF_VERSION] = (val))
  2308. #define WMI_SET_REF_DESIGN(hw_bd_info, val) ((hw_bd_info)[REF_DESIGN_ID] = (val))
  2309. #define WMI_SET_CUSTOMER_ID(hw_bd_info, val) ((hw_bd_info)[CUSTOMER_ID] = (val))
  2310. #define WMI_SET_PROJECT_ID(hw_bd_info, val) ((hw_bd_info)[PROJECT_ID] = (val))
  2311. #define WMI_SET_BOARD_DATA_REV(hw_bd_info, val) ((hw_bd_info)[BOARD_DATA_REV] = (val))
  2312. /**
  2313. * The following struct holds optional payload for
  2314. * wmi_service_ready_event_fixed_param,e.g., 11ac pass some of the
  2315. * device capability to the host.
  2316. */
  2317. typedef struct {
  2318. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_READY_EVENT */
  2319. A_UINT32 fw_build_vers; /* firmware build number */
  2320. wmi_abi_version fw_abi_vers;
  2321. A_UINT32 phy_capability; /* WMI_PHY_CAPABILITY */
  2322. A_UINT32 max_frag_entry; /* Maximum number of frag table entries that SW will populate less 1 */
  2323. A_UINT32 num_rf_chains;
  2324. /* The following field is only valid for service type WMI_SERVICE_11AC */
  2325. A_UINT32 ht_cap_info; /* WMI HT Capability */
  2326. A_UINT32 vht_cap_info; /* VHT capability info field of 802.11ac */
  2327. A_UINT32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
  2328. A_UINT32 hw_min_tx_power;
  2329. A_UINT32 hw_max_tx_power;
  2330. /* sys_cap_info:
  2331. * bits 1:0 - RXTX LED + RFKILL enable flags (see WMI_LEDRFKILL_FLAGS)
  2332. * bits 31:2 - reserved (must be set to zero)
  2333. */
  2334. A_UINT32 sys_cap_info;
  2335. A_UINT32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
  2336. /** Max beacon and Probe Response IE offload size (includes
  2337. * optional P2P IEs) */
  2338. A_UINT32 max_bcn_ie_size;
  2339. /*
  2340. * request to host to allocate a chuck of memory and pss it down to FW via WM_INIT.
  2341. * FW uses this as FW extesnsion memory for saving its data structures. Only valid
  2342. * for low latency interfaces like PCIE where FW can access this memory directly (or)
  2343. * by DMA.
  2344. */
  2345. A_UINT32 num_mem_reqs;
  2346. /* Max No. scan channels target can support
  2347. * If FW is too old and doesn't indicate this number, host side value will default to
  2348. * 0, and host will take the original compatible value (62) for future scan channel
  2349. * setup.
  2350. */
  2351. A_UINT32 max_num_scan_channels;
  2352. /* Hardware board specific ID. Values defined in enum WMI_HWBOARD_ID.
  2353. * Default 0 means tha hw_bd_info[] is invalid(legacy board).
  2354. */
  2355. A_UINT32 hw_bd_id;
  2356. A_UINT32 hw_bd_info[HW_BD_INFO_SIZE]; /* Board specific information. Invalid if hw_hd_id is zero. */
  2357. /*
  2358. * Number of MACs supported, i.e. a DBS-capable device will return 2
  2359. */
  2360. A_UINT32 max_supported_macs;
  2361. /*
  2362. * FW sub-feature capabilities to be used in concurrence with wmi_service_bitmap
  2363. */
  2364. A_UINT32 wmi_fw_sub_feat_caps; /* values from enum WMI_FW_SUB_FEAT_CAPS */
  2365. /*
  2366. * Number of Dual Band Simultaneous (DBS) hardware modes
  2367. */
  2368. A_UINT32 num_dbs_hw_modes;
  2369. /*
  2370. * txrx_chainmask
  2371. * [7:0] - 2G band tx chain mask
  2372. * [15:8] - 2G band rx chain mask
  2373. * [23:16] - 5G band tx chain mask
  2374. * [31:24] - 5G band rx chain mask
  2375. *
  2376. */
  2377. A_UINT32 txrx_chainmask;
  2378. /*
  2379. * default Dual Band Simultaneous (DBS) hardware mode
  2380. */
  2381. A_UINT32 default_dbs_hw_mode_index;
  2382. /*
  2383. * Number of msdu descriptors target would use
  2384. */
  2385. A_UINT32 num_msdu_desc;
  2386. /* The TLVs for hal_reg_capabilities, wmi_service_bitmap and mem_reqs[] will follow this TLV.
  2387. * HAL_REG_CAPABILITIES hal_reg_capabilities;
  2388. * A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
  2389. * wlan_host_mem_req mem_reqs[];
  2390. * wlan_dbs_hw_mode_list[];
  2391. */
  2392. } wmi_service_ready_event_fixed_param;
  2393. typedef enum {
  2394. WMI_RXTX_LED_ENABLE = 0x00000001,
  2395. WMI_RFKILL_ENABLE = 0x00000002,
  2396. } WMI_LEDRFKILL_FLAGS;
  2397. #define WMI_SERVICE_SEGMENT_BM_SIZE32 4 /* 4x A_UINT32 = 128 bits */
  2398. typedef struct {
  2399. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_service_available_event_fixed_param */
  2400. /*
  2401. * The wmi_service_segment offset field specifies the position within the
  2402. * logical bitmap of WMI service flags at which the WMI service flags
  2403. * specified within this message begin.
  2404. * Since the first 128 WMI service flags are specified within the
  2405. * wmi_service_bitmap field of the WMI_SERVICE_READY_EVENT message,
  2406. * the wmi_service_segment_offset value is expected to be 128 or more.
  2407. */
  2408. A_UINT32 wmi_service_segment_offset;
  2409. A_UINT32 wmi_service_segment_bitmap[WMI_SERVICE_SEGMENT_BM_SIZE32];
  2410. /*
  2411. * This TLV is followed by the below TLVs:
  2412. * A_UINT32 wmi_service_ext_bitmap[]
  2413. * The wmi_service_ext_bitmap covers WMI service flags at the offset where
  2414. * wmi_service_available_event_fixed_param.wmi_service_segment_bitmap
  2415. * leaves off.
  2416. * For example, if
  2417. * wmi_service_available_event_fixed_param.wmi_service_segment_offset
  2418. * is 128, then
  2419. * wmi_service_available_event_fixed_param.wmi_service_segment_bitmap
  2420. * will cover WMI service flags
  2421. * 128 to (128 + WMI_SERVICE_SEGMENT_BM_SIZE32 * 32) = 128 to 256
  2422. * and wmi_service_ext_bitmap will cover WMI service flags starting at 256.
  2423. */
  2424. } wmi_service_available_event_fixed_param;
  2425. /*
  2426. * HDL version GET/SET APIs
  2427. */
  2428. #define WMI_HDL_VERSION_BITPOS 0
  2429. #define WMI_HDL_VERSION_NUM_BITS 10
  2430. #define WMI_HDL_VERSION_GET(dword) WMI_GET_BITS(dword, WMI_HDL_VERSION_BITPOS, WMI_HDL_VERSION_NUM_BITS)
  2431. #define WMI_HDL_VERSION_SET(dword, value) WMI_SET_BITS(dword, WMI_HDL_VERSION_BITPOS, WMI_HDL_VERSION_NUM_BITS, value)
  2432. typedef struct {
  2433. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_EXT_READY_EVENT */
  2434. /* which WMI_DBS_CONC_SCAN_CFG setting the FW is initialized with */
  2435. A_UINT32 default_conc_scan_config_bits;
  2436. /* which WMI_DBS_FW_MODE_CFG setting the FW is initialized with */
  2437. A_UINT32 default_fw_config_bits;
  2438. wmi_ppe_threshold ppet;
  2439. A_UINT32 he_cap_info; /* see section 8.4.2.213 from draft r8 of 802.11ax; see WMI_HE_FRAG_SUPPORT enum */
  2440. /*
  2441. * An HT STA shall not allow transmission of more than one MPDU start
  2442. * within the time limit described in the MPDU maximum density field.
  2443. */
  2444. A_UINT32 mpdu_density; /* units are microseconds */
  2445. /*
  2446. * Maximum no of BSSID based RX filters host can program
  2447. * Value 0 means FW hasn't given any limit to host.
  2448. */
  2449. A_UINT32 max_bssid_rx_filters;
  2450. /*
  2451. * Extended FW build version information:
  2452. * bits 9:0 -> HDL version info
  2453. * bits 27:10 -> reserved
  2454. * bits 31:28 -> CRM sub ID
  2455. */
  2456. A_UINT32 fw_build_vers_ext;
  2457. /* max_nlo_ssids - dynamically negotiated maximum number of SSIDS for NLO
  2458. * This limit is the maximum number of SSIDs that can be configured in the
  2459. * target for Network List Offload (i.e. scanning for a preferred network).
  2460. * If this value is 0x0, the target supports WMI_NLO_MAX_SSIDS (16).
  2461. * If this value is non-zero, the host should send back in the
  2462. * WMI_INIT message's wmi_resource_config.max_nlo_ssids a value that
  2463. * is equal to or less than the target capability limit reported here.
  2464. */
  2465. A_UINT32 max_nlo_ssids;
  2466. /* ref to section 8.4.2.48 Multiple BSSID element
  2467. * The Max BSSID Indicator field contains a value assigned to n,
  2468. * where 2^n is the maximum number of BSSIDs
  2469. */
  2470. A_UINT32 max_bssid_indicator;
  2471. /* 2nd DWORD of HE MAC Capabilities */
  2472. A_UINT32 he_cap_info_ext;
  2473. /**************************************************************************
  2474. * DON'T ADD ANY FURTHER FIELDS HERE -
  2475. * It would cause the size of the READY_EXT message within some targets
  2476. * to exceed the size of the buffer used for the message.
  2477. **************************************************************************/
  2478. /*
  2479. * A variable-length TLV array of wmi_chan_rf_characterization_info will
  2480. * follow this fixed_param TLV, containing rx characterization info for
  2481. * primary channels.
  2482. * WMI_CHAN_RF_CHARACTERIZATION_INFO wmi_chan_rf_characterization_info[];
  2483. */
  2484. } wmi_service_ready_ext_event_fixed_param;
  2485. /*
  2486. * regdb version GET/SET APIs
  2487. */
  2488. #define WMI_REG_DB_VERSION_MAJOR_BITPOS 0
  2489. #define WMI_REG_DB_VERSION_MINOR_BITPOS 8
  2490. #define WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS 16
  2491. #define WMI_BDF_REG_DB_VERSION_MINOR_BITPOS 24
  2492. #define WMI_REG_DB_VERSION_NUM_BITS 8
  2493. #define WMI_REG_DB_VERSION_MAJOR_GET(dword) \
  2494. WMI_GET_BITS(dword, WMI_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
  2495. #define WMI_REG_DB_VERSION_MAJOR_SET(dword, value) \
  2496. WMI_SET_BITS(dword, WMI_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
  2497. #define WMI_REG_DB_VERSION_MINOR_GET(dword) \
  2498. WMI_GET_BITS(dword, WMI_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
  2499. #define WMI_REG_DB_VERSION_MINOR_SET(dword, value) \
  2500. WMI_SET_BITS(dword, WMI_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
  2501. #define WMI_BDF_REG_DB_VERSION_MAJOR_GET(dword) \
  2502. WMI_GET_BITS(dword, WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
  2503. #define WMI_BDF_REG_DB_VERSION_MAJOR_SET(dword, value) \
  2504. WMI_SET_BITS(dword, WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
  2505. #define WMI_BDF_REG_DB_VERSION_MINOR_GET(dword) \
  2506. WMI_GET_BITS(dword, WMI_BDF_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
  2507. #define WMI_BDF_REG_DB_VERSION_MINOR_SET(dword, value) \
  2508. WMI_SET_BITS(dword, WMI_BDF_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
  2509. #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) \
  2510. do { \
  2511. WMI_REG_DB_VERSION_MAJOR_SET(dword, reg_db_ver_major); \
  2512. WMI_REG_DB_VERSION_MINOR_SET(dword, reg_db_ver_minor); \
  2513. WMI_BDF_REG_DB_VERSION_MAJOR_SET(dword, bdf_reg_db_ver_major); \
  2514. WMI_BDF_REG_DB_VERSION_MINOR_SET(dword, bdf_reg_db_ver_minor); \
  2515. } while (0)
  2516. #define WMI_HW_MIN_TX_POWER_BITPOS 0
  2517. #define WMI_HW_MAX_TX_POWER_BITPOS 16
  2518. #define WMI_HW_MIN_TX_POWER_GET(dword) \
  2519. ((A_INT16) WMI_GET_BITS(dword, WMI_HW_MIN_TX_POWER_BITPOS, 16))
  2520. #define WMI_HW_MIN_TX_POWER_SET(dword, value) \
  2521. WMI_SET_BITS(dword, WMI_HW_MIN_TX_POWER_BITPOS, 16, value)
  2522. #define WMI_HW_MAX_TX_POWER_GET(dword) \
  2523. ((A_INT16) WMI_GET_BITS(dword, WMI_HW_MAX_TX_POWER_BITPOS, 16))
  2524. #define WMI_HW_MAX_TX_POWER_SET(dword, value) \
  2525. WMI_SET_BITS(dword, WMI_HW_MAX_TX_POWER_BITPOS, 16, value)
  2526. #define WMI_MAX_USER_PER_PPDU_UL_OFDMA_GET(dword) \
  2527. WMI_GET_BITS(dword, 0, 16)
  2528. #define WMI_MAX_USER_PER_PPDU_UL_OFDMA_SET(dword, value) \
  2529. WMI_SET_BITS(dword, 0, 16, value)
  2530. #define WMI_MAX_USER_PER_PPDU_DL_OFDMA_GET(dword) \
  2531. WMI_GET_BITS(dword, 16, 16)
  2532. #define WMI_MAX_USER_PER_PPDU_DL_OFDMA_SET(dword, value) \
  2533. WMI_SET_BITS(dword, 16, 16, value)
  2534. #define WMI_MAX_USER_PER_PPDU_UL_MUMIMO_GET(dword) \
  2535. WMI_GET_BITS(dword, 0, 16)
  2536. #define WMI_MAX_USER_PER_PPDU_UL_MUMIMO_SET(dword, value) \
  2537. WMI_SET_BITS(dword, 0, 16, value)
  2538. #define WMI_MAX_USER_PER_PPDU_DL_MUMIMO_GET(dword) \
  2539. WMI_GET_BITS(dword, 16, 16)
  2540. #define WMI_MAX_USER_PER_PPDU_DL_MUMIMO_SET(dword, value) \
  2541. WMI_SET_BITS(dword, 16, 16, value)
  2542. #define WMI_TARGET_CAP_FLAGS_RX_PEER_METADATA_VERSION_GET(target_cap_flags) \
  2543. WMI_GET_BITS(target_cap_flags, 0, 2)
  2544. #define WMI_TARGET_CAP_FLAGS_RX_PEER_METADATA_VERSION_SET(target_cap_flags, value) \
  2545. WMI_SET_BITS(target_cap_flags, 0, 2, value)
  2546. typedef struct {
  2547. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_service_ready_ext2_event_fixed_param.*/
  2548. /*
  2549. * regDB Version to be sent to Host on WMI service ready ext2 event.
  2550. * [7:0] - regDbVersionMajor
  2551. * [15:8] - regDbVersionMinor
  2552. * [23:16] - bdfRegDbVersionMajor
  2553. * [31:24] - bdfRegDbVersionMinor
  2554. * The WMI_*REG_DB_VERSION_[MAJOR,MINOR]_[SET,GET] macros are used to
  2555. * access these bitfields.
  2556. */
  2557. A_UINT32 reg_db_version;
  2558. /* Min & Max Tx power (in dBm) supported in 2.4 GHz band
  2559. * [15:0] - Min Tx Power in 2.4 GHz band
  2560. * [31:16] - Max Tx Power in 2.4 GHz band
  2561. * WMI_HW_[MIN,MAX]_TX_POWER_[GET,SET] macros are used to access
  2562. * these bitfields.
  2563. * If Min Tx Power = Max Tx Power = 0 means Min Tx Power & Max Tx Power
  2564. * are not specified.
  2565. */
  2566. A_UINT32 hw_min_max_tx_power_2g;
  2567. /* Min & Max Tx power (in dBm) supported in 5 GHz band
  2568. * [15:0] - Min Tx Power in 5 GHz band
  2569. * [31:16] - Max Tx Power in 5 GHz band
  2570. * WMI_HW_[MIN,MAX]_TX_POWER_[GET,SET] macros are used to access
  2571. * these bitfields.
  2572. * If Min Tx Power = Max Tx Power = 0 means Min Tx Power & Max Tx Power
  2573. * are not specified.
  2574. */
  2575. A_UINT32 hw_min_max_tx_power_5g;
  2576. /*
  2577. * Number of peers supported per WMI_PEER_CHAN_WIDTH_SWITCH_CMDID
  2578. * 0 - not enabled
  2579. */
  2580. A_UINT32 chwidth_num_peer_caps;
  2581. /*
  2582. * Whether preamble puncturing is supported by FW, and if so, for which
  2583. * bandwidths. The possible values for this field are listed below.
  2584. * 0: preamble puncturing is not supported
  2585. * 80: puncturing supported within channels of at least 80 MHz bandwidth
  2586. * 160: puncturing supported within channels of at least 160 MHz bandwidth
  2587. * 320: puncturing supported within 320 MHz channels
  2588. */
  2589. A_UINT32 preamble_puncture_bw;
  2590. /*
  2591. * [15:0] - ULOFDMA Refer WMI_MAX_USER_PER_PPDU_UL_OFDMA_GET & SET
  2592. * [31:16] - DLOFDMA Refer WMI_MAX_USER_PER_PPDU_DL_OFDMA_GET & SET
  2593. * If max_user_per_ppdu_ofdma == 0 the UL/DL max users are unspecified.
  2594. */
  2595. A_UINT32 max_user_per_ppdu_ofdma;
  2596. /*
  2597. * [15:0] - ULMUMIMO Refer WMI_MAX_USER_PER_PPDU_UL_MUMIMO_GET & SET
  2598. * [31:16] - DLMUMIMO Refer WMI_MAX_USER_PER_PPDU_DL_MUMIMO_GET & SET
  2599. * If max_user_per_ppdu_mumimo == 0 the UL/DL max users are unspecified.
  2600. */
  2601. A_UINT32 max_user_per_ppdu_mumimo;
  2602. /**
  2603. * @brief target_cap_flags - flags containing information about target capabilities.
  2604. * Bits 1:0
  2605. * Rx peer metadata version number used by target
  2606. * 0-> legacy case
  2607. * 1-> MLO support
  2608. * 2,3-> reserved
  2609. * Refer to WMI_TARGET_CAP_FLAGS_PEER_METADATA_VERSION macros.
  2610. * Bits 31:2 - Reserved
  2611. */
  2612. A_UINT32 target_cap_flags;
  2613. /* EHT MAC Capabilities: total WMI_MAX_EHTCAP_MAC_SIZE*A_UINT32 bits
  2614. * those bits actually are max mac capabilities = cap_mac_2g | cap_mac_5g
  2615. * The actual cap mac info per mac (2g/5g) in the TLV -- WMI_MAC_PHY_CAPABILITIES_EXT
  2616. */
  2617. A_UINT32 eht_cap_mac_info[WMI_MAX_EHTCAP_MAC_SIZE];
  2618. /* Following this struct are the TLV's:
  2619. * WMI_DMA_RING_CAPABILITIES;
  2620. * wmi_spectral_bin_scaling_params;
  2621. * WMI_MAC_PHY_CAPABILITIES_EXT; <-- EHT mac capabilites and phy capabilites info
  2622. * WMI_HAL_REG_CAPABILITIES_EXT2;
  2623. * wmi_nan_capabilities;
  2624. * WMI_SCAN_RADIO_CAPABILITIES_EXT2;
  2625. */
  2626. } wmi_service_ready_ext2_event_fixed_param;
  2627. typedef struct {
  2628. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_rf_characterization_info_event_fixed_param */
  2629. /*
  2630. * A variable-length TLV array of wmi_chan_rf_characterization_info will
  2631. * follow this fixed_param TLV, containing rx characterization info for
  2632. * primary channels.
  2633. * WMI_CHAN_RF_CHARACTERIZATION_INFO wmi_chan_rf_characterization_info[];
  2634. */
  2635. } wmi_chan_rf_characterization_info_event_fixed_param;
  2636. typedef enum {
  2637. WMI_FW_STA_RTT_INITR = 0x00000001,
  2638. WMI_FW_STA_RTT_RESPR = 0x00000002,
  2639. WMI_FW_P2P_CLI_RTT_INITR = 0x00000004,
  2640. WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008,
  2641. WMI_FW_P2P_GO_RTT_INITR = 0x00000010,
  2642. WMI_FW_P2P_GO_RTT_RESPR = 0x00000020,
  2643. WMI_FW_AP_RTT_INITR = 0x00000040,
  2644. WMI_FW_AP_RTT_RESPR = 0x00000080,
  2645. WMI_FW_NAN_RTT_INITR = 0x00000100,
  2646. WMI_FW_NAN_RTT_RESPR = 0x00000200,
  2647. WMI_FW_SCAN_DBS_POLICY = 0x00000400,
  2648. /*
  2649. * New fw sub feature capabilites before
  2650. * WMI_FW_MAX_SUB_FEAT_CAP
  2651. */
  2652. WMI_FW_MAX_SUB_FEAT_CAP = 0x80000000,
  2653. } WMI_FW_SUB_FEAT_CAPS;
  2654. typedef enum {
  2655. WMI_HWBD_NONE = 0, /* No hw board information is given */
  2656. WMI_HWBD_QCA6174 = 1, /* Rome(AR6320) */
  2657. WMI_HWBD_QCA2582 = 2, /* Killer 1525*/
  2658. } WMI_HWBD_ID;
  2659. #define ATH_BD_DATA_REV_MASK 0x000000FF
  2660. #define ATH_BD_DATA_REV_SHIFT 0
  2661. #define ATH_BD_DATA_PROJ_ID_MASK 0x0000FF00
  2662. #define ATH_BD_DATA_PROJ_ID_SHIFT 8
  2663. #define ATH_BD_DATA_CUST_ID_MASK 0x00FF0000
  2664. #define ATH_BD_DATA_CUST_ID_SHIFT 16
  2665. #define ATH_BD_DATA_REF_DESIGN_ID_MASK 0xFF000000
  2666. #define ATH_BD_DATA_REF_DESIGN_ID_SHIFT 24
  2667. #define SET_BD_DATA_REV(bd_data_ver, value) \
  2668. ((bd_data_ver) &= ~ATH_BD_DATA_REV_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REV_SHIFT))
  2669. #define GET_BD_DATA_REV(bd_data_ver) \
  2670. (((bd_data_ver) & ATH_BD_DATA_REV_MASK) >> ATH_BD_DATA_REV_SHIFT)
  2671. #define SET_BD_DATA_PROJ_ID(bd_data_ver, value) \
  2672. ((bd_data_ver) &= ~ATH_BD_DATA_PROJ_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_PROJ_ID_SHIFT))
  2673. #define GET_BD_DATA_PROJ_ID(bd_data_ver) \
  2674. (((bd_data_ver) & ATH_BD_DATA_PROJ_ID_MASK) >> ATH_BD_DATA_PROJ_ID_SHIFT)
  2675. #define SET_BD_DATA_CUST_ID(bd_data_ver, value) \
  2676. ((bd_data_ver) &= ~ATH_BD_DATA_CUST_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_CUST_ID_SHIFT))
  2677. #define GET_BD_DATA_CUST_ID(bd_data_ver) \
  2678. (((bd_data_ver) & ATH_BD_DATA_CUST_ID_MASK) >> ATH_BD_DATA_CUST_ID_SHIFT)
  2679. #define SET_BD_DATA_REF_DESIGN_ID(bd_data_ver, value) \
  2680. ((bd_data_ver) &= ~ATH_BD_DATA_REF_DESIGN_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REF_DESIGN_ID_SHIFT))
  2681. #define GET_BD_DATA_REF_DESIGN_ID(bd_data_ver) \
  2682. (((bd_data_ver) & ATH_BD_DATA_REF_DESIGN_ID_MASK) >> ATH_BD_DATA_REF_DESIGN_ID_SHIFT)
  2683. #ifdef ROME_LTE_COEX_FREQ_AVOID
  2684. typedef struct {
  2685. A_UINT32 start_freq; /* start frequency, not channel center freq */
  2686. A_UINT32 end_freq; /* end frequency */
  2687. } avoid_freq_range_desc;
  2688. typedef struct {
  2689. /* bad channel range count, multi range is allowed, 0 means all channel clear */
  2690. A_UINT32 num_freq_ranges;
  2691. /* multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc */
  2692. avoid_freq_range_desc avd_freq_range[0];
  2693. } wmi_wlan_avoid_freq_ranges_event;
  2694. #endif
  2695. /** status consists of upper 16 bits fo A_STATUS status and lower 16 bits of module ID that retuned status */
  2696. #define WLAN_INIT_STATUS_SUCCESS 0x0
  2697. #define WLAN_INIT_STATUS_GEN_FAILED 0x1
  2698. #define WLAN_GET_INIT_STATUS_REASON(status) ((status) & 0xffff)
  2699. #define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
  2700. typedef A_UINT32 WLAN_INIT_STATUS;
  2701. typedef struct {
  2702. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ready_event_fixed_param */
  2703. wmi_abi_version fw_abi_vers;
  2704. /*
  2705. * mac_addr is always filled; in addition, there can be a mac_addr_list
  2706. * TLV following this fixed_param TLV to specify additional MAC addresses,
  2707. * for cases where the target specifies one MAC address per pdev
  2708. * (so the host can treat the pdevs within the target as separately
  2709. * as possible) rather than one MAC address for the whole SOC.
  2710. */
  2711. wmi_mac_addr mac_addr;
  2712. A_UINT32 status;
  2713. A_UINT32 num_dscp_table;
  2714. /* num_extra_mac_addr -
  2715. * how many additional MAC addresses besides the above mac_addr
  2716. * are provided in the subsequent mac_addr_list TLV
  2717. */
  2718. A_UINT32 num_extra_mac_addr;
  2719. /*
  2720. * Total number of "real" peers (remote peers of an AP vdev,
  2721. * BSS peer of a STA vdev, TDLS peer of a STA vdev) that FW supports.
  2722. * If 0, then Host can use param_tlv->resource_config->num_peers as
  2723. * total number of peers.
  2724. */
  2725. A_UINT32 num_total_peers;
  2726. /*
  2727. * Number of extra peers that Firmware adds.
  2728. * These are self peers and/or other FW only peers that don't represent
  2729. * a 802.11 transceiver, but instead are used for convenience, e.g. to
  2730. * provide a pseudo-peer object for an AP vdev's bcast/mcast tx queues,
  2731. * to allow each tx queue to belong to a peer object.
  2732. * Peer ID can be up to num_total_peers + num_extra_peers.
  2733. */
  2734. A_UINT32 num_extra_peers;
  2735. /*
  2736. * max_ast_index - max AST index that Firmware can generate
  2737. * max_ast_index = (ast_table_size-1), ast_table_size is dynamically chosen
  2738. * based on num_peers configutation from Host. Hence Host needs to know the
  2739. * max_ast_index that Firmware can generate.
  2740. * A 0x0 value for max_ast_index means the target has not specified a limit.
  2741. */
  2742. A_UINT32 max_ast_index;
  2743. /* pktlog_defs_checksum:
  2744. * checksum computed from the definitions of the enums and structs
  2745. * used within pktlog traces.
  2746. * This pktlog defs checksum needs to be embedded into pktlog trace files
  2747. * (specifically in ath_pktlog_bufhdr.version).
  2748. *
  2749. * If pktlog_defs_checksum is zero then it is invalid; it should be ignored
  2750. * and ath_pktlog_bufhdr.magic_num needs to be PKTLOG_MAGIC_NUM_LEGACY
  2751. * (i.e. 7735225).
  2752. *
  2753. * If pktlog_defs_checksum is non-zero then it is valid, and the host
  2754. * should put it into the pktlog trace file header and set
  2755. * ath_pktlog_bufhdr.magic_num as PKTLOG_MAGIC_NUM_VERSION_IS_CHECKSUM
  2756. * (i.e. 2453506), to indicate that the file header version field contains
  2757. * a checksum.
  2758. */
  2759. A_UINT32 pktlog_defs_checksum;
  2760. /*
  2761. * max_onchip_ast_index - max AST index that Firmware can generate
  2762. * max_onchip_ast_index = (ast_table_size-1), where ast_table_size is
  2763. * dynamically chosen based on num_peers configutation from Host.
  2764. * Hence Host needs to know the max_onchip_ast_index that Firmware can
  2765. * generate.
  2766. * A 0x0 value for max_onchip_ast_index means the target has not specified
  2767. * a limit.
  2768. */
  2769. A_UINT32 max_onchip_ast_index;
  2770. /*
  2771. * This fixed_param TLV is followed by these additional TLVs:
  2772. * mac_addr_list[num_extra_mac_addr];
  2773. */
  2774. } wmi_ready_event_fixed_param;
  2775. typedef struct {
  2776. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resource_config */
  2777. /**
  2778. * @brief num_vdev - number of virtual devices (VAPs) to support
  2779. */
  2780. A_UINT32 num_vdevs;
  2781. /**
  2782. * @brief num_peers - number of peer nodes to support
  2783. */
  2784. A_UINT32 num_peers;
  2785. /*
  2786. * @brief In offload mode target supports features like WOW, chatter and other
  2787. * protocol offloads. In order to support them some functionalities like
  2788. * reorder buffering, PN checking need to be done in target. This determines
  2789. * maximum number of peers suported by target in offload mode
  2790. */
  2791. A_UINT32 num_offload_peers;
  2792. /* @brief Number of reorder buffers available for doing target based reorder
  2793. * Rx reorder buffering
  2794. */
  2795. A_UINT32 num_offload_reorder_buffs;
  2796. /**
  2797. * @brief num_peer_keys - number of keys per peer
  2798. */
  2799. A_UINT32 num_peer_keys;
  2800. /**
  2801. * @brief num_peer_tids - number of TIDs to provide storage for per peer.
  2802. */
  2803. A_UINT32 num_tids;
  2804. /**
  2805. * @brief ast_skid_limit - max skid for resolving hash collisions
  2806. * @details
  2807. * The address search table is sparse, so that if two MAC addresses
  2808. * result in the same hash value, the second of these conflicting
  2809. * entries can slide to the next index in the address search table,
  2810. * and use it, if it is unoccupied. This ast_skid_limit parameter
  2811. * specifies the upper bound on how many subsequent indices to search
  2812. * over to find an unoccupied space.
  2813. */
  2814. A_UINT32 ast_skid_limit;
  2815. /**
  2816. * @brief tx_chain_mask - the nominal chain mask for transmit
  2817. * @details
  2818. * The chain mask may be modified dynamically, e.g. to operate AP tx with
  2819. * a reduced number of chains if no clients are associated.
  2820. * This configuration parameter specifies the nominal chain-mask that
  2821. * should be used when not operating with a reduced set of tx chains.
  2822. */
  2823. A_UINT32 tx_chain_mask;
  2824. /**
  2825. * @brief rx_chain_mask - the nominal chain mask for receive
  2826. * @details
  2827. * The chain mask may be modified dynamically, e.g. for a client to use
  2828. * a reduced number of chains for receive if the traffic to the client
  2829. * is low enough that it doesn't require downlink MIMO or antenna
  2830. * diversity.
  2831. * This configuration parameter specifies the nominal chain-mask that
  2832. * should be used when not operating with a reduced set of rx chains.
  2833. */
  2834. A_UINT32 rx_chain_mask;
  2835. /**
  2836. * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
  2837. * @details
  2838. * Each WMM access class (voice, video, best-effort, background) will
  2839. * have its own timeout value to dictate how long to wait for missing
  2840. * rx MPDUs to arrive before flushing subsequent MPDUs that have already
  2841. * been received.
  2842. * This parameter specifies the timeout in milliseconds for each class .
  2843. * NOTE: the number of class (defined as 4) cannot be
  2844. * changed in the future without breaking WMI compatibility.
  2845. */
  2846. A_UINT32 rx_timeout_pri[4];
  2847. /**
  2848. * @brief rx_decap mode - what mode the rx should decap packets to
  2849. * @details
  2850. * MAC can decap to RAW (no decap), native wifi or Ethernet types
  2851. * THis setting also determines the default TX behavior, however TX
  2852. * behavior can be modified on a per VAP basis during VAP init
  2853. */
  2854. A_UINT32 rx_decap_mode;
  2855. /**
  2856. * @brief scan_max_pending_req - what is the maximum scan requests than can be queued
  2857. */
  2858. A_UINT32 scan_max_pending_req;
  2859. /**
  2860. * @brief maximum VDEV that could use BMISS offload
  2861. */
  2862. A_UINT32 bmiss_offload_max_vdev;
  2863. /**
  2864. * @brief maximum VDEV that could use offload roaming
  2865. */
  2866. A_UINT32 roam_offload_max_vdev;
  2867. /**
  2868. * @brief maximum AP profiles that would push to offload roaming
  2869. */
  2870. A_UINT32 roam_offload_max_ap_profiles;
  2871. /**
  2872. * @brief num_mcast_groups - how many groups to use for mcast->ucast conversion
  2873. * @details
  2874. * The target's WAL maintains a table to hold information regarding which
  2875. * peers belong to a given multicast group, so that if multicast->unicast
  2876. * conversion is enabled, the target can convert multicast tx frames to a
  2877. * series of unicast tx frames, to each peer within the multicast group.
  2878. * This num_mcast_groups configuration parameter tells the target how
  2879. * many multicast groups to provide storage for within its multicast
  2880. * group membership table.
  2881. */
  2882. A_UINT32 num_mcast_groups;
  2883. /**
  2884. * @brief num_mcast_table_elems - size to alloc for the mcast membership table
  2885. * @details
  2886. * This num_mcast_table_elems configuration parameter tells the target
  2887. * how many peer elements it needs to provide storage for in its
  2888. * multicast group membership table.
  2889. * These multicast group membership table elements are shared by the
  2890. * multicast groups stored within the table.
  2891. */
  2892. A_UINT32 num_mcast_table_elems;
  2893. /**
  2894. * @brief mcast2ucast_mode - whether/how to do multicast->unicast conversion
  2895. * @details
  2896. * This configuration parameter specifies whether the target should
  2897. * perform multicast --> unicast conversion on transmit, and if so,
  2898. * what to do if it finds no entries in its multicast group membership
  2899. * table for the multicast IP address in the tx frame.
  2900. * Configuration value:
  2901. * 0 -> Do not perform multicast to unicast conversion.
  2902. * 1 -> Convert multicast frames to unicast, if the IP multicast address
  2903. * from the tx frame is found in the multicast group membership
  2904. * table. If the IP multicast address is not found, drop the frame.
  2905. * 2 -> Convert multicast frames to unicast, if the IP multicast address
  2906. * from the tx frame is found in the multicast group membership
  2907. * table. If the IP multicast address is not found, transmit the
  2908. * frame as multicast.
  2909. */
  2910. A_UINT32 mcast2ucast_mode;
  2911. /**
  2912. * @brief tx_dbg_log_size - how much memory to allocate for a tx PPDU dbg log
  2913. * @details
  2914. * This parameter controls how much memory the target will allocate to
  2915. * store a log of tx PPDU meta-information (how large the PPDU was,
  2916. * when it was sent, whether it was successful, etc.)
  2917. */
  2918. A_UINT32 tx_dbg_log_size;
  2919. /**
  2920. * @brief num_wds_entries - how many AST entries to be allocated for WDS
  2921. */
  2922. A_UINT32 num_wds_entries;
  2923. /**
  2924. * @brief dma_burst_size - MAC DMA burst size, e.g., on Peregrine on PCI
  2925. * this limit can be 0 -default, 1 256B
  2926. */
  2927. A_UINT32 dma_burst_size;
  2928. /**
  2929. * @brief mac_aggr_delim - Fixed delimiters to be inserted after every MPDU
  2930. * to account for interface latency to avoid underrun.
  2931. */
  2932. A_UINT32 mac_aggr_delim;
  2933. /**
  2934. * @brief rx_skip_defrag_timeout_dup_detection_check
  2935. * @details
  2936. * determine whether target is responsible for detecting duplicate
  2937. * non-aggregate MPDU and timing out stale fragments.
  2938. *
  2939. * A-MPDU reordering is always performed on the target.
  2940. *
  2941. * 0: target responsible for frag timeout and dup checking
  2942. * 1: host responsible for frag timeout and dup checking
  2943. */
  2944. A_UINT32 rx_skip_defrag_timeout_dup_detection_check;
  2945. /**
  2946. * @brief vow_config - Configuration for VoW : No of Video Nodes to be supported
  2947. * and Max no of descriptors for each Video link (node).
  2948. */
  2949. A_UINT32 vow_config;
  2950. /**
  2951. * @brief maximum VDEV that could use GTK offload
  2952. */
  2953. A_UINT32 gtk_offload_max_vdev;
  2954. /**
  2955. * @brief num_msdu_desc - Number of msdu descriptors target should use
  2956. */
  2957. A_UINT32 num_msdu_desc; /* Number of msdu desc */
  2958. /**
  2959. * @brief max_frag_entry - Max. number of Tx fragments per MSDU
  2960. * @details
  2961. * This parameter controls the max number of Tx fragments per MSDU.
  2962. * This is sent by the target as part of the WMI_SERVICE_READY event
  2963. * and is overriden by the OS shim as required.
  2964. */
  2965. A_UINT32 max_frag_entries;
  2966. /**
  2967. * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS
  2968. * @brief num_msdu_desc - Number of vdev that can support beacon offload
  2969. */
  2970. A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */
  2971. /**
  2972. * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev
  2973. * @details
  2974. * Each TDLS enabled vdev can track outgoing transmits/rssi/rates to/of
  2975. * peers in a connection tracking table for possible TDLS link creation
  2976. * or deletion. This controls the number of tracked peers per vdev.
  2977. */
  2978. A_UINT32 num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */
  2979. /**
  2980. * @brief beacon_tx_offload_max_vdev - Number of maximum beaconing vaps at any time.
  2981. */
  2982. A_UINT32 beacon_tx_offload_max_vdev;
  2983. A_UINT32 num_multicast_filter_entries;
  2984. A_UINT32 num_wow_filters; /*host can configure the number of wow filters*/
  2985. /**
  2986. * @brief num_keep_alive_pattern - Num of keep alive patterns configured
  2987. * from host.
  2988. */
  2989. A_UINT32 num_keep_alive_pattern;
  2990. /**
  2991. * @brief keep_alive_pattern_size - keep alive pattern size.
  2992. */
  2993. A_UINT32 keep_alive_pattern_size;
  2994. /**
  2995. * @brief max_tdls_concurrent_sleep_sta - Number of tdls sleep sta supported
  2996. * @details
  2997. * Each TDLS STA can become a sleep STA independently. This parameter
  2998. * mentions how many such sleep STAs can be supported concurrently.
  2999. */
  3000. A_UINT32 max_tdls_concurrent_sleep_sta;
  3001. /**
  3002. * @brief max_tdls_concurrent_buffer_sta - Number of tdls buffer sta supported
  3003. * @details
  3004. * Each TDLS STA can become a buffer STA independently. This parameter
  3005. * mentions how many such buffer STAs can be supported concurrently.
  3006. */
  3007. A_UINT32 max_tdls_concurrent_buffer_sta;
  3008. /**
  3009. * @brief wmi_send_separate - host configures fw to send the wmi separately
  3010. */
  3011. A_UINT32 wmi_send_separate;
  3012. /**
  3013. * @brief num_ocb_vdevs - Number of vdevs used for OCB support
  3014. */
  3015. A_UINT32 num_ocb_vdevs;
  3016. /**
  3017. * @brief num_ocb_channels - The supported number of simultaneous OCB channels
  3018. */
  3019. A_UINT32 num_ocb_channels;
  3020. /**
  3021. * @brief num_ocb_schedules - The supported number of OCB schedule segments
  3022. */
  3023. A_UINT32 num_ocb_schedules;
  3024. /**
  3025. * @brief specific configuration from host, such as per platform configuration
  3026. */
  3027. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_S 0
  3028. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_M 0x1
  3029. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_S 1
  3030. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_M 0x2
  3031. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_S 2
  3032. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_M 0x4
  3033. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_S 3
  3034. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_M 0x8
  3035. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_S 4
  3036. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_M 0x10
  3037. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_S 5
  3038. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_M 0x20
  3039. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_S 6
  3040. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_M 0x40
  3041. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_S 7
  3042. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_M 0x80
  3043. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_S 8
  3044. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_M 0x100
  3045. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_S 9
  3046. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_M 0x200
  3047. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_S 10
  3048. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_M 0x400
  3049. #define WMI_RSRC_CFG_FLAG_TX_PPDU_STATS_ENABLE_S 11
  3050. #define WMI_RSRC_CFG_FLAG_TX_PPDU_STATS_ENABLE_M 0x800
  3051. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_S 12
  3052. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_M 0x1000
  3053. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_S 13
  3054. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_M 0x2000
  3055. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_S 14
  3056. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_M 0x4000
  3057. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_S 15
  3058. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_M 0x8000
  3059. /*
  3060. * If the AC override valid bit is set then this field will specify the
  3061. * access category to use for EAPOL frames
  3062. * 0 - WMM_AC_BE
  3063. * 1 - WMM_AC_BK
  3064. * 2 - WMM_AC_VI
  3065. * 3 - WMM_AC_VO
  3066. */
  3067. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_S 16
  3068. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_M 0x30000
  3069. /*
  3070. * If TX_ACK_RSSI is set, then the target should populate the ack_rssi
  3071. * field within the WMI_MGMT_TX_COMPLETION_EVENT message, the ack_rssi
  3072. * TLV within the WMI_MGMT_TX_BUNDLE_COMPLETION_EVENT message, and the
  3073. * "MSDU ACK RSSI" array within the HTT_T2H TX_COMPL_IND message.
  3074. */
  3075. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_S 18
  3076. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_M 0x40000
  3077. /*
  3078. * If HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN is set, the host will not
  3079. * include the HTC header length in the payload length for all HTT_H2T
  3080. * messages.
  3081. * Otherwise, only when sending HTT_H2T_MSG_TYPE_TX_FRM message,
  3082. * payload length includes HTC header length. Other HTT_H2T messages'
  3083. * payload length does not include HTC header length.
  3084. * The host will only set this HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN flag
  3085. * if the target has set the WMI_SERVICE_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN
  3086. * flag to indicate its support for this option.
  3087. */
  3088. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_S 19
  3089. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_M 0x80000
  3090. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_S 20
  3091. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_M 0x100000
  3092. /*
  3093. * If this HTT_PEER_STATS is set, then the target should use the
  3094. * the HTT_T2H_MSG_TYPE_PEER_STATS_IND message to upload peer stats;
  3095. * else the target should avoid sending the PEER_STATS_IND message.
  3096. */
  3097. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_S 21
  3098. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_M 0x200000
  3099. /*
  3100. * If this BIT is set, then the target should use peer_tid_ext to analyze
  3101. * per peer per tid extended configurations
  3102. */
  3103. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_S 22
  3104. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_M 0x400000
  3105. /*
  3106. * If the VIDEO_OVER_WIFI_ENABLE flag is set, the target will use a
  3107. * series of algorithmic adjustments to optimize Video performance
  3108. * by reducing latency, reducing latency jitter, and minimizing
  3109. * dropped packets.
  3110. */
  3111. #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_S 23
  3112. #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_M 0x800000
  3113. /*
  3114. * If the THREE_WAY_COEX_CONFIG_LEGACY flag is set, the target will use
  3115. * the configuration parameters given by Host driver to WLAN FW and
  3116. * apply them along with the existing CoEx Weights Override logic to
  3117. * prioritize the WLAN-BT-Zigbee packets accordingly.
  3118. *
  3119. * The host shall only set the THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT
  3120. * RSRC_CFG flag if the target has set the WMI_SERVICE
  3121. * THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT flag.
  3122. *
  3123. * The logic to send GPM to BT-SOC with BT-ZB priorities remains the same.
  3124. */
  3125. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_S 24
  3126. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_M 0x1000000
  3127. /*
  3128. * If the THREE_WAY_COEX_CONFIG_OVERRIDE flag is set, the target will use
  3129. * the configuration parameters given by Host driver to WLAN FW and
  3130. * apply them by OVERRIDing the existing CoEx Weights Override logic to
  3131. * prioritize the WLAN-BT-Zigbee packets accordingly.
  3132. *
  3133. * The host shall only set the THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT
  3134. * RSRC_CFG flag if the target has set the WMI_SERVICE
  3135. * THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT flag.
  3136. *
  3137. * The logic to send GPM to BT-SOC with BT-ZB priorities remains the same.
  3138. */
  3139. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_S 25
  3140. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_M 0x2000000
  3141. /*
  3142. * If the TX_COMPLETION_TX_TSF64 flag is set, the target should
  3143. * populate the htt_tx_compl_ind_append_tx_tsf64 array within the
  3144. * HTT_T2H TX_COMPL_IND message.
  3145. */
  3146. #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_S 26
  3147. #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_M 0x4000000
  3148. /*
  3149. * If this BIT is set, then the target should support Packet capture(SMART MU FR)
  3150. */
  3151. #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_S 27
  3152. #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_M 0x8000000
  3153. /*
  3154. * If this BIT is set, then target should support BSS Max Idle period.
  3155. */
  3156. #define WMI_RSRC_CFG_FLAG_BSS_MAX_IDLE_TIME_SUPPORT_S 28
  3157. #define WMI_RSRC_CFG_FLAG_BSS_MAX_IDLE_TIME_SUPPORT_M 0x10000000
  3158. /*
  3159. * If this bit is set, then target should use the audio sync feature.
  3160. * Host should only set this bit if the target has indicated via the
  3161. * WMI_SERVICE_AUDIO_SYNC_SUPPORT flag that it supports audio sync.
  3162. */
  3163. #define WMI_RSRC_CFG_FLAG_AUDIO_SYNC_SUPPORT_S 29
  3164. #define WMI_RSRC_CFG_FLAG_AUDIO_SYNC_SUPPORT_M 0x20000000
  3165. /*
  3166. * If this BIT is set, then the target should disable IPA
  3167. */
  3168. #define WMI_RSRC_CFG_FLAG_IPA_DISABLE_S 30
  3169. #define WMI_RSRC_CFG_FLAG_IPA_DISABLE_M 0x40000000
  3170. /*
  3171. * If this bit is set, target should use the PCIe GEN switching feature.
  3172. */
  3173. #define WMI_RSRC_CFG_FLAG_PCIE_GEN_SWITCH_CAPABLITY_S 31
  3174. #define WMI_RSRC_CFG_FLAG_PCIE_GEN_SWITCH_CAPABLITY_M 0x80000000
  3175. A_UINT32 flag1;
  3176. /** @brief smart_ant_cap - Smart Antenna capabilities information
  3177. * @details
  3178. * 1 - Smart antenna is enabled.
  3179. * 0 - Smart antenna is disabled.
  3180. * In future this can contain smart antenna specifc capabilities.
  3181. */
  3182. A_UINT32 smart_ant_cap;
  3183. /**
  3184. * User can configure the buffers allocated for each AC (BE, BK, VI, VO)
  3185. * during init
  3186. */
  3187. A_UINT32 BK_Minfree;
  3188. A_UINT32 BE_Minfree;
  3189. A_UINT32 VI_Minfree;
  3190. A_UINT32 VO_Minfree;
  3191. /**
  3192. * @brief alloc_frag_desc_for_data_pkt . Controls data packet fragment
  3193. * descriptor memory allocation.
  3194. * 1 - Allocate fragment descriptor memory for data packet in firmware.
  3195. * If host wants to transmit data packet at its desired rate,
  3196. * this field must be set.
  3197. * 0 - Don't allocate fragment descriptor for data packet.
  3198. */
  3199. A_UINT32 alloc_frag_desc_for_data_pkt;
  3200. /** how much space to allocate for NDP NS (neighbor solicitation) specs */
  3201. A_UINT32 num_ns_ext_tuples_cfg;
  3202. /**
  3203. * size (in bytes) of the buffer the FW shall allocate per vdev
  3204. * firmware can dynamic allocate memory (or disable)
  3205. * packet filtering feature.
  3206. * 0 - fw chooses its default value
  3207. * -1 (0XFFFFFFFF) - disable APF
  3208. */
  3209. A_UINT32 bpf_instruction_size;
  3210. /**
  3211. * Maximum no of BSSID based RX filters host would program
  3212. * Value 0 means host doesn't given any limit to FW.
  3213. */
  3214. A_UINT32 max_bssid_rx_filters;
  3215. /**
  3216. * Use PDEV ID instead of MAC ID, added for backward compatibility with older host
  3217. * which is using MAC ID. 1 means PDEV ID, 0 means MAC ID.
  3218. */
  3219. A_UINT32 use_pdev_id;
  3220. /** Maximum number of scan clients whose DBS scan duty cycle can be configured */
  3221. A_UINT32 max_num_dbs_scan_duty_cycle;
  3222. /** Maximum number of Multi group key to support */
  3223. A_UINT32 max_num_group_keys;
  3224. union {
  3225. A_UINT32 peer_map_unmap_v2_support; /* old name */
  3226. /**
  3227. * HTT peer map/unmap format support (map 4bits and unmap 4bits)
  3228. * 0x00 -> host use default map/unmap only.
  3229. * 0x01 -> legacy value that is interpreted the same as 0x22.
  3230. * 0x22 -> host supports HTT peer map/unmap v2 format; the target is
  3231. * allowed but not required to use peer map/unmap v2 format.
  3232. * 0x32 -> host supports HTT peer map v3 format; the target is
  3233. * allowed but not required to use peer map v3 format and
  3234. * peer unmap v2 format.
  3235. */
  3236. A_UINT32 peer_map_unmap_versions;
  3237. };
  3238. /** Sched config params for all pdevs
  3239. * These tx scheduling configuration parameters are currently only
  3240. * used for internal testing purposes; therefore the non-default
  3241. * values for this field are not currently documented.
  3242. * For regular use, this field should be set to 0x0.
  3243. */
  3244. A_UINT32 sched_params;
  3245. /* Number of MAC on which AP TWT feature is supported */
  3246. A_UINT32 twt_ap_pdev_count;
  3247. /* Max no of STA with which TWT sessions can be formed by the AP */
  3248. A_UINT32 twt_ap_sta_count;
  3249. /* max_nlo_ssids - dynamically negotiated maximum number of SSIDS for NLO
  3250. * This parameter provides the final specification for the maximum number
  3251. * of SSIDs for the target to support for Network List Offload's scanning
  3252. * for preferred networks.
  3253. * This wmi_resource_config.max_nlo_ssids must be <= the max_nlo_ssids
  3254. * field from the target's WMI_SERVICE_READY_EXT_EVENT message.
  3255. * (If the target didn't provide a max_nlo_ssids field in the
  3256. * WMI_SERVICE_READY_EXT message, or if the SERVICE_READY_EXT msg's
  3257. * max_nlo_ssids value was 0x0, the target doesn't support dynamic
  3258. * negotiation of max NLO SSIDs, and WMI_NLO_MAX_SSIDS (=16) applies.)
  3259. * If this wmi_resource_config.max_nlo_ssids field is absent or 0x0,
  3260. * the host does not support dynamic negotiation of max NLO SSIDs.
  3261. * In such a case, the target will respond as follows:
  3262. * If the target supports at least WMI_NLO_MAX_SSIDS, the target will
  3263. * use the statically-configured WMI_NLO_MAX_SSIDS value.
  3264. * If the target supports less than WMI_NLO_MAX_SSIDS, the target will
  3265. * abort its boot-up, due to receiving an invalid/unsupported
  3266. * configuration specification.
  3267. */
  3268. A_UINT32 max_nlo_ssids;
  3269. /**
  3270. * num_packet_filters: the num that host requests fw to support for
  3271. * pktfilter in total, then firmware can dynamic allocate
  3272. * memory(or disable) pktfilter feature.
  3273. *
  3274. * 0 - fw chooses its default value.
  3275. * -1(0XFFFFFFFF)- disable pktfilter.
  3276. */
  3277. A_UINT32 num_packet_filters;
  3278. /**
  3279. * num_max_sta_vdevs: the max num for the sta vdevs
  3280. * fw will use it to config the memory of offload features that
  3281. * are only for sta vdevs.
  3282. * p2p client should be included.
  3283. *
  3284. * 0 - fw chooses its default value: 'num_vdevs' of this structure.
  3285. */
  3286. A_UINT32 num_max_sta_vdevs;
  3287. /* ref to section 8.4.2.48 Multiple BSSID element
  3288. * The Max BSSID Indicator field contains a value assigned to n,
  3289. * where 2^n is the maximum number of BSSIDs
  3290. */
  3291. A_UINT32 max_bssid_indicator;
  3292. /** @brief ul_resp_config - Configures the 11ax uplink ofdma feature on STA.
  3293. * I.e. sending uplink response to a trigger frame sent by AP.
  3294. * @details
  3295. * 0 - fw default behavior, based on chipset
  3296. * 1 - UL_RESP is disabled.
  3297. * 2 - UL_RESP is enabled.
  3298. * other - reserved.
  3299. */
  3300. A_UINT32 ul_resp_config;
  3301. /* msdu_flow_override_config0 - contains AST enable bitmask
  3302. * AST0 is unconditionally enabled, unless the MSDU flow override feature
  3303. * is entirely disabled.
  3304. * AST1 through AST3 are conditionally enabled, based on bits 0-2 in
  3305. * msdu_flow_override_config0.
  3306. * If all three bits are 0, no msdu flow override feature at all in FW.
  3307. *
  3308. * The WMI_MSDU_FLOW_AST_ENABLE_GET and WMI_MSDU_FLOW_AST_ENABLE_SET
  3309. * macros are used to read and write these bitfields.
  3310. */
  3311. A_UINT32 msdu_flow_override_config0;
  3312. /* msdu_flow_override_config1:
  3313. * Bits 3:0 - AST0_FLOW_MASK(4)
  3314. * Bits 7:4 - AST1_FLOW_MASK(4)
  3315. * Bits 11:8 - AST2_FLOW_MASK(4)
  3316. * Bits 15:12 - AST3_FLOW_MASK(4)
  3317. * Bits 23:16 - TID_VALID_HI_PRI (8)
  3318. * Bits 31:24 - TID_VALID_LOW_PRI (8)
  3319. *
  3320. * The macros
  3321. * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET
  3322. * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET
  3323. * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET
  3324. * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET
  3325. * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET
  3326. * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET
  3327. * are used to read and write these bitfields.
  3328. */
  3329. A_UINT32 msdu_flow_override_config1;
  3330. /** @brief flags2 - contains flags used for the following purposes:
  3331. * Configure 11ax uplink ofdma/MU-MIMO feature in FW, when chipsets
  3332. * are brought up in Repeater/STA mode.
  3333. *
  3334. * @details
  3335. * Bits 3:0
  3336. * Enable UL MU-OFDMA/MIMO for PDEVs WIFI0, WIFI1, WIFI2
  3337. * This flags should only be set when a pdev has STA VAP
  3338. * in repeater/self-organizing-network modes.
  3339. * E.g. to enable UL RESP for 5G and 2G radios, value shall be
  3340. * 0b00000000000000000000000000000011 = 0x3.
  3341. * Host shall use UCI config for a radio to populate this value,
  3342. * each radio entry shall have "config re_ul_resp 1" value set.
  3343. * Hence this can be configured dynamically.
  3344. *
  3345. * Refer to the below WMI_RSRC_CFG_FLAGS2_RE_ULRESP_PDEV_CFG_GET/SET
  3346. * macros.
  3347. * Bits 5:4
  3348. * HTT rx peer metadata version number that host supports.
  3349. * Firmware intially sends the target supported version number
  3350. * as part of service_ready_ext2 message.
  3351. * Host can ack the version number that it is using as part of
  3352. * this message.
  3353. * 0-> legacy case
  3354. * 1-> MLO support
  3355. * 2-3-> Reserved
  3356. * Refer to the WMI_RSRC_CFG_FLAGS2_RX_PEER_METADATA_VERSION macros.
  3357. * Bit 6 - is_sap_connected_d3wow_enabled
  3358. * Enable D3WoW for SAP w/ clients connected
  3359. * 0-> disable the feature
  3360. * 1-> enable the feature
  3361. * Refer to the WMI_RSRC_CFG_FLAGS2_IS_SAP_CONNECTED_D3WOW_ENABLED
  3362. * GET/SET macros.
  3363. * Bit 7 - is_go_connected_d3wow_enabled
  3364. * Enable D3WoW for GO w/ clients connected
  3365. * 0-> disable the feature
  3366. * 1-> enable the feature
  3367. * Refer to the WMI_RSRC_CFG_FLAGS2_IS_GO_CONNECTED_D3WOW_ENABLED
  3368. * GET/SET macros.
  3369. * Bit 8 - enable_dynamic_pcie_gen_speed_switch
  3370. * enable dynamic pcie gen speed switch
  3371. * 0-> disable the feature
  3372. * 1-> enable the feature
  3373. * Refer to the WMI_RSRC_CFG_FLAGS2_IS_DYNAMIC_PCIE_GEN_SPEED_SWITCH_ENABLED
  3374. * GET/SET macros.
  3375. * Bit 9 - calc_next_dtim_count
  3376. * 0 -> disable calculation of DTIM count for MBSSID_NON_TX_VAP
  3377. * 1 -> Used by some hosts to indicate calculation of DTIM count
  3378. * for MBSSID_NON_TX_VAP
  3379. * Refer to WMI_RSRC_CFG_FLAGS2_CALC_NEXT_DTIM_COUNT_GET/SET macros.
  3380. *
  3381. * Bits 31:10 - Reserved
  3382. */
  3383. A_UINT32 flags2;
  3384. /** @brief host_service_flags - can be used by Host to indicate
  3385. * services that host can support.
  3386. *
  3387. * @details
  3388. * Bit 0
  3389. * The bit will be set when Host HDD supports seperate iface creation
  3390. * for NAN. More specifically Host can support creation of NAN vdev
  3391. * in firmware.
  3392. *
  3393. * Refer to WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_IFACE_SUPPORT_GET/SET
  3394. * macros defined below.
  3395. * Bit 1
  3396. * The bit will be set when HOST is capable of processing multiple
  3397. * radio events per radio. More specifically whenever Firmware is
  3398. * sending multiple radio events (WMI_RADIO_LINK_STATS_EVENTID
  3399. * = 0x16004) for a single radio,
  3400. * Through this flag Firmware will know that HOST is able to support
  3401. * delivery of RADIO_LINK_STATS across multiple event messages,
  3402. * and Firmware can send multiple radio events.
  3403. *
  3404. * Refer to WMI_RSRC_CFG_HOST_SERVICE_FLAG_HOST_SUPPORT_MULTI_RADIO_EVTS_PER_RADIO_GET/SET
  3405. * macros defined below.
  3406. * Bit 2
  3407. * This bit will be set when host is able to handle split AST feature.
  3408. * Refer to the below definitions of the
  3409. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_SPLIT_AST_FEATURE_HOST_SUPPORT_GET
  3410. * and _SET macros.
  3411. * Bit 3
  3412. * This bit will be set when host is able to enable EAPOL offload to
  3413. * FW for SAE roaming feature.
  3414. * Refer to the below definitions of the
  3415. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_SAE_EAPOL_OFFLOAD_SUPPORT_GET
  3416. * and _SET macros.
  3417. * Bit 4
  3418. * This bit will be set when host is able to process the
  3419. * WMI_REG_CC_EXT_EVENT.
  3420. * Refer to the below definitions of the
  3421. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_CC_EXT_SUPPORT_GET
  3422. * and _SET macros.
  3423. * Bit 5
  3424. * This bit will be set when the host supports NAN channels.
  3425. * Refer to WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_CHANNEL_SUPPORT_GET/SET
  3426. * Bit 6
  3427. * This bit will be set when the host supports synchronous TWT events.
  3428. * Refer to WMI_RSRC_CFG_HOST_SERVICE_FLAG_STA_TWT_SYNC_EVT_SUPPORT_GET
  3429. * and _SET.
  3430. * Bit 7
  3431. * This bit will be set when host supports both LPI and SP mode.
  3432. * when this bit is set to 0 - Indicate LPI only mode
  3433. * when set to 1 - Indicate both SP mode and LPI mode
  3434. * both are supported
  3435. * Refer to the below definitions of the
  3436. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_LPI_SP_MODE_SUPPORT_GET
  3437. * and _SET macros.
  3438. * Bit 8
  3439. * This bit will be set when host wants to disable timer check in
  3440. * reg for AFC.
  3441. * when set to 1 - Disable timer check
  3442. * Refer to the below definitions of the
  3443. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_TIMER_CHECK_GET
  3444. * and _SET macros.
  3445. * Bit 9
  3446. * This bit will be set when host host wants to disable request id
  3447. * check in reg for AFC.
  3448. * when set to 1 - Disable Request ID check
  3449. * Refer to the below definitions of the
  3450. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_REQ_ID_CHECK_GET
  3451. * and _SET macros.
  3452. * Bits 31:10 - Reserved
  3453. */
  3454. A_UINT32 host_service_flags;
  3455. /** @brief max_rnr_neighbours -
  3456. * The Maximum number of neighbour RNR's from other SoC.
  3457. * This limits the field @num_bss in @wmi_pdev_tbtt_offset_sync_cmd_fixed_param.
  3458. * Value of 0 means crosss SoC TBTT offset syncronization not required and
  3459. * @PDEV_TBTT_OFFSET_SYNC_CMD wouldn't be used.
  3460. */
  3461. A_UINT32 max_rnr_neighbours;
  3462. /** @brief ema_max_vap_cnt - number of maximum EMA Tx vaps (VAPs having both
  3463. * VDEV_FLAGS_EMA_MODE and VDEV_FLAGS_TRANSMIT_AP set) at any instance
  3464. * of time across SOC. Legacy MBSS Vaps are not accounted in this field.
  3465. */
  3466. A_UINT32 ema_max_vap_cnt;
  3467. /** @brief ema_max_profile_period - maximum profile periodicity
  3468. * (maximum number of beacons after which VAP profiles repeat)
  3469. * for any EMA VAP on any pdev.
  3470. */
  3471. A_UINT32 ema_max_profile_period;
  3472. /** @brief max_ndp_sessions
  3473. * This is the max ndp sessions sent by the host which is the minimum
  3474. * of the value requested within the host's ini configurations and
  3475. * the max ndp sessions supported by the firmware (as reported in the
  3476. * SERVICE_READY_EXT2_EVENT message).
  3477. */
  3478. A_UINT32 max_ndp_sessions;
  3479. /** @brief max_ndi_supported
  3480. * This is the max ndi interfaces sent by the host based on the value
  3481. * specified by the host's ini configuration.
  3482. */
  3483. A_UINT32 max_ndi_interfaces;
  3484. /** @brief max_ap_vaps
  3485. * Maximum number of AP mode vdevs created at any time.
  3486. * This value is minimum of the number of AP vdevs supported by
  3487. * the target and host.
  3488. */
  3489. A_UINT32 max_ap_vaps;
  3490. /** @brief cbc_flow_ena
  3491. * When cbc_flow_ena is se, halphy will do Cold Boot Calibration flow.
  3492. * Otherwise, halphy will do normal flow.
  3493. */
  3494. A_UINT32 cbc_flow_ena;
  3495. /** @brief ema_init_config - can be used by Host to indicate beacon size
  3496. * @details
  3497. * Bit 0 : 15 - Size of beacon, currently it can be sent as
  3498. * 1500 or 2500 or 4000 bytes
  3499. * Bit 16 : 31 - Reserved
  3500. * In case of Backward compatibility, if this variable is 0 then
  3501. * default beacon size (1500) is used.
  3502. */
  3503. A_UINT32 ema_init_config;
  3504. /** @brief carrier_config
  3505. * Carrier profile configuration
  3506. * BIT 0 -> enable/disable charter configurations
  3507. * BIT 1 : 31 Reserved
  3508. */
  3509. A_UINT32 carrier_config;
  3510. } wmi_resource_config;
  3511. #define WMI_MSDU_FLOW_AST_ENABLE_GET(msdu_flow_config0, ast_x) \
  3512. (((ast_x) == 0) ? 1 : ((msdu_flow_config0) & (1 << ((ast_x) - 1))))
  3513. #define WMI_MSDU_FLOW_AST_ENABLE_SET(msdu_flow_config0, ast_x, enable) \
  3514. do { \
  3515. if ((ast_x) == 0) break; \
  3516. if ((enable)) { \
  3517. (msdu_flow_config0) |= (1 << ((ast_x) - 1)); \
  3518. } else { \
  3519. (msdu_flow_config0) &= ~(1 << ((ast_x) - 1)); \
  3520. } \
  3521. } while(0)
  3522. #define WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET(msdu_flow_config1, ast_x) \
  3523. (((msdu_flow_config1) & (0x0f << ((ast_x) * 4))) >> ((ast_x) * 4))
  3524. #define WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET( \
  3525. msdu_flow_config1, ast_x, mask) \
  3526. do { \
  3527. (msdu_flow_config1) &= ~(0xF << ((ast_x) * 4)); \
  3528. (msdu_flow_config1) |= ((mask) << ((ast_x) * 4)); \
  3529. } while(0)
  3530. #define WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET(msdu_flow_config1) \
  3531. (((msdu_flow_config1) & 0xff0000) >> 16)
  3532. #define WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET(msdu_flow_config1, mask) \
  3533. do { \
  3534. (msdu_flow_config1) &= ~0xff0000; \
  3535. (msdu_flow_config1) |= ((mask) << 16); \
  3536. } while(0)
  3537. #define WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET(msdu_flow_config1) \
  3538. ((msdu_flow_config1 & 0xff000000) >> 24)
  3539. #define WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET(msdu_flow_config1, mask) \
  3540. do { \
  3541. (msdu_flow_config1) &= ~0xff000000; \
  3542. (msdu_flow_config1) |= ((mask) << 24); \
  3543. } while(0)
  3544. #define WMI_RSRC_CFG_FLAG_SET(word32, flag, value) \
  3545. do { \
  3546. (word32) &= ~WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
  3547. (word32) |= ((value) << WMI_RSRC_CFG_FLAG_ ## flag ## _S) & \
  3548. WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
  3549. } while (0)
  3550. #define WMI_RSRC_CFG_FLAG_GET(word32, flag) \
  3551. (((word32) & WMI_RSRC_CFG_FLAG_ ## flag ## _M) >> \
  3552. WMI_RSRC_CFG_FLAG_ ## flag ## _S)
  3553. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_SET(word32, value) \
  3554. WMI_RSRC_CFG_FLAG_SET((word32), WOW_IGN_PCIE_RST, (value))
  3555. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_GET(word32) \
  3556. WMI_RSRC_CFG_FLAG_GET((word32), WOW_IGN_PCIE_RST)
  3557. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_SET(word32, value) \
  3558. WMI_RSRC_CFG_FLAG_SET((word32), LTEU_SUPPORT, (value))
  3559. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_GET(word32) \
  3560. WMI_RSRC_CFG_FLAG_GET((word32), LTEU_SUPPORT)
  3561. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_SET(word32, value) \
  3562. WMI_RSRC_CFG_FLAG_SET((word32), COEX_GPIO_SUPPORT, (value))
  3563. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_GET(word32) \
  3564. WMI_RSRC_CFG_FLAG_GET((word32), COEX_GPIO_SUPPORT)
  3565. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_SET(word32, value) \
  3566. WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_SPECTRAL_INTF, (value))
  3567. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_GET(word32) \
  3568. WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_SPECTRAL_INTF)
  3569. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_SET(word32, value) \
  3570. WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_CHAN_LOAD_INTF, (value))
  3571. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_GET(word32) \
  3572. WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_CHAN_LOAD_INTF)
  3573. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_SET(word32, value) \
  3574. WMI_RSRC_CFG_FLAG_SET((word32), BSS_CHANNEL_INFO_64, (value))
  3575. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_GET(word32) \
  3576. WMI_RSRC_CFG_FLAG_GET((word32), BSS_CHANNEL_INFO_64)
  3577. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_SET(word32, value) \
  3578. WMI_RSRC_CFG_FLAG_SET((word32), ATF_CONFIG_ENABLE, (value))
  3579. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_GET(word32) \
  3580. WMI_RSRC_CFG_FLAG_GET((word32), ATF_CONFIG_ENABLE)
  3581. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_SET(word32, value) \
  3582. WMI_RSRC_CFG_FLAG_SET((word32), IPHR_PAD_CONFIG_ENABLE, (value))
  3583. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_GET(word32) \
  3584. WMI_RSRC_CFG_FLAG_GET((word32), IPHR_PAD_CONFIG_ENABLE)
  3585. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_SET(word32, value) \
  3586. WMI_RSRC_CFG_FLAG_SET((word32), QWRAP_MODE_ENABLE, (value))
  3587. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_GET(word32) \
  3588. WMI_RSRC_CFG_FLAG_GET((word32), QWRAP_MODE_ENABLE)
  3589. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_SET(word32, value) \
  3590. WMI_RSRC_CFG_FLAG_SET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT, (value))
  3591. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_GET(word32) \
  3592. WMI_RSRC_CFG_FLAG_GET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT)
  3593. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_SET(word32, value) \
  3594. WMI_RSRC_CFG_FLAG_SET((word32), TX_MSDU_ID_NEW_PARTITION_SUPPORT, (value))
  3595. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_GET(word32) \
  3596. WMI_RSRC_CFG_FLAG_GET((word32), TX_MSDU_ID_NEW_PARTITION_SUPPORT)
  3597. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_SET(word32, value) \
  3598. WMI_RSRC_CFG_FLAG_SET((word32), TCL_CCE_DISABLE, (value))
  3599. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_GET(word32) \
  3600. WMI_RSRC_CFG_FLAG_GET((word32), TCL_CCE_DISABLE)
  3601. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_SET(word32, value) \
  3602. WMI_RSRC_CFG_FLAG_SET((word32), TIM_V2_SUPPORT_ENABLE, (value))
  3603. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_GET(word32) \
  3604. WMI_RSRC_CFG_FLAG_GET((word32), TIM_V2_SUPPORT_ENABLE)
  3605. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_SET(word32, value) \
  3606. WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_REKEY_MINRATE_SUPPORT_ENABLE, (value))
  3607. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_GET(word32) \
  3608. WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_REKEY_MINRATE_SUPPORT_ENABLE)
  3609. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_SET(word32, value) \
  3610. WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_AC_OVERRIDE_VALID, (value))
  3611. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_GET(word32) \
  3612. WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_AC_OVERRIDE_VALID)
  3613. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_SET(word32, value) \
  3614. WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_AC_OVERRIDE, (value))
  3615. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_GET(word32) \
  3616. WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_AC_OVERRIDE)
  3617. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_SET(word32, value) \
  3618. WMI_RSRC_CFG_FLAG_SET((word32), TX_ACK_RSSI, (value))
  3619. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_GET(word32) \
  3620. WMI_RSRC_CFG_FLAG_GET((word32), TX_ACK_RSSI)
  3621. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_SET(word32, value) \
  3622. WMI_RSRC_CFG_FLAG_SET((word32), HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN, (value))
  3623. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_GET(word32) \
  3624. WMI_RSRC_CFG_FLAG_GET((word32), HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN)
  3625. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_SET(word32, value) \
  3626. WMI_RSRC_CFG_FLAG_SET((word32), PEER_UNMAP_RESPONSE_SUPPORT, (value))
  3627. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_GET(word32) \
  3628. WMI_RSRC_CFG_FLAG_GET((word32), PEER_UNMAP_RESPONSE_SUPPORT)
  3629. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_SET(word32, value) \
  3630. WMI_RSRC_CFG_FLAG_SET((word32), HTT_PEER_STATS, (value))
  3631. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_GET(word32) \
  3632. WMI_RSRC_CFG_FLAG_GET((word32), HTT_PEER_STATS)
  3633. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_SET(word32, value) \
  3634. WMI_RSRC_CFG_FLAG_SET((word32), PEER_TID_EXT, (value))
  3635. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_GET(word32) \
  3636. WMI_RSRC_CFG_FLAG_GET((word32), PEER_TID_EXT)
  3637. #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_SET(word32, value) \
  3638. WMI_RSRC_CFG_FLAG_SET((word32), VIDEO_OVER_WIFI_ENABLE, (value))
  3639. #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_GET(word32) \
  3640. WMI_RSRC_CFG_FLAG_GET((word32), VIDEO_OVER_WIFI_ENABLE)
  3641. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_SET(word32, value) \
  3642. WMI_RSRC_CFG_FLAG_SET((word32), THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT, (value))
  3643. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_GET(word32) \
  3644. WMI_RSRC_CFG_FLAG_GET((word32), THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT)
  3645. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_SET(word32, value) \
  3646. WMI_RSRC_CFG_FLAG_SET((word32), THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT, (value))
  3647. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_GET(word32) \
  3648. WMI_RSRC_CFG_FLAG_GET((word32), THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT)
  3649. #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_SET(word32, value) \
  3650. WMI_RSRC_CFG_FLAG_SET((word32), TX_COMPLETION_TX_TSF64_ENABLE, (value))
  3651. #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_GET(word32) \
  3652. WMI_RSRC_CFG_FLAG_GET((word32), TX_COMPLETION_TX_TSF64_ENABLE)
  3653. #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_SET(word32, value) \
  3654. WMI_RSRC_CFG_FLAG_SET((word32), PACKET_CAPTURE_SUPPORT, (value))
  3655. #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_GET(word32) \
  3656. WMI_RSRC_CFG_FLAG_GET((word32), PACKET_CAPTURE_SUPPORT)
  3657. #define WMI_RSRC_CFG_FLAG_BSS_MAX_IDLE_TIME_SUPPORT_SET(word32, value) \
  3658. WMI_RSRC_CFG_FLAG_SET((word32), BSS_MAX_IDLE_TIME_SUPPORT, (value))
  3659. #define WMI_RSRC_CFG_FLAG_BSS_MAX_IDLE_TIME_SUPPORT_GET(word32) \
  3660. WMI_RSRC_CFG_FLAG_GET((word32), BSS_MAX_IDLE_TIME_SUPPORT)
  3661. #define WMI_RSRC_CFG_FLAG_AUDIO_SYNC_SUPPORT_SET(word32, value) \
  3662. WMI_RSRC_CFG_FLAG_SET((word32), AUDIO_SYNC_SUPPORT, (value))
  3663. #define WMI_RSRC_CFG_FLAG_AUDIO_SYNC_SUPPORT_GET(word32) \
  3664. WMI_RSRC_CFG_FLAG_GET((word32), AUDIO_SYNC_SUPPORT)
  3665. #define WMI_RSRC_CFG_FLAG_IPA_DISABLE_SET(word32, value) \
  3666. WMI_RSRC_CFG_FLAG_SET((word32), IPA_DISABLE, (value))
  3667. #define WMI_RSRC_CFG_FLAG_IPA_DISABLE_GET(word32) \
  3668. WMI_RSRC_CFG_FLAG_GET((word32), IPA_DISABLE)
  3669. #define WMI_RSRC_CFG_FLAG_PCIE_GEN_SWITCH_CAPABLITY_SET(word32, value) \
  3670. WMI_RSRC_CFG_FLAG_SET((word32), PCIE_GEN_SWITCH_CAPABLITY, (value))
  3671. #define WMI_RSRC_CFG_FLAG_PCIE_GEN_SWITCH_CAPABLITY_GET(word32) \
  3672. WMI_RSRC_CFG_FLAG_GET((word32), PCIE_GEN_SWITCH_CAPABLITY)
  3673. #define WMI_RSRC_CFG_FLAGS2_RE_ULRESP_PDEV_CFG_GET(flags2, pdev_id) \
  3674. WMI_GET_BITS(flags2, pdev_id, 1)
  3675. #define WMI_RSRC_CFG_FLAGS2_RE_ULRESP_PDEV_CFG_SET(flags2, pdev_id, value) \
  3676. WMI_SET_BITS(flags2, pdev_id, 1, value)
  3677. #define WMI_RSRC_CFG_FLAGS2_RX_PEER_METADATA_VERSION_GET(flags2) \
  3678. WMI_GET_BITS(flags2, 4, 2)
  3679. #define WMI_RSRC_CFG_FLAGS2_RX_PEER_METADATA_VERSION_SET(flags2, value) \
  3680. WMI_SET_BITS(flags2, 4, 2, value)
  3681. #define WMI_RSRC_CFG_FLAGS2_IS_SAP_CONNECTED_D3WOW_ENABLED_GET(flags2) \
  3682. WMI_GET_BITS(flags2, 6, 1)
  3683. #define WMI_RSRC_CFG_FLAGS2_IS_SAP_CONNECTED_D3WOW_ENABLED_SET(flags2, value) \
  3684. WMI_SET_BITS(flags2, 6, 1, value)
  3685. #define WMI_RSRC_CFG_FLAGS2_IS_GO_CONNECTED_D3WOW_ENABLED_GET(flags2) \
  3686. WMI_GET_BITS(flags2, 7, 1)
  3687. #define WMI_RSRC_CFG_FLAGS2_IS_GO_CONNECTED_D3WOW_ENABLED_SET(flags2, value) \
  3688. WMI_SET_BITS(flags2, 7, 1, value)
  3689. #define WMI_RSRC_CFG_FLAGS2_IS_DYNAMIC_PCIE_GEN_SPEED_SWITCH_ENABLED_GET(flags2) \
  3690. WMI_GET_BITS(flags2, 8, 1)
  3691. #define WMI_RSRC_CFG_FLAGS2_IS_DYNAMIC_PCIE_GEN_SPEED_SWITCH_ENABLED_SET(flags2, value) \
  3692. WMI_SET_BITS(flags2, 8, 1, value)
  3693. #define WMI_RSRC_CFG_FLAGS2_CALC_NEXT_DTIM_COUNT_GET(flags2) \
  3694. WMI_GET_BITS(flags2, 9, 1)
  3695. #define WMI_RSRC_CFG_FLAGS2_CALC_NEXT_DTIM_COUNT_SET(flags2, value) \
  3696. WMI_SET_BITS(flags2, 9, 1, value)
  3697. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_IFACE_SUPPORT_GET(host_service_flags) \
  3698. WMI_GET_BITS(host_service_flags, 0, 1)
  3699. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_IFACE_SUPPORT_SET(host_service_flags, val) \
  3700. WMI_SET_BITS(host_service_flags, 0, 1, val)
  3701. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_HOST_SUPPORT_MULTI_RADIO_EVTS_PER_RADIO_GET(host_service_flags) \
  3702. WMI_GET_BITS(host_service_flags, 1, 1)
  3703. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_HOST_SUPPORT_MULTI_RADIO_EVTS_PER_RADIO_SET(host_service_flags, val) \
  3704. WMI_SET_BITS(host_service_flags, 1, 1, val)
  3705. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SPLIT_AST_FEATURE_HOST_SUPPORT_GET(host_service_flags) \
  3706. WMI_GET_BITS(host_service_flags, 2, 1)
  3707. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SPLIT_AST_FEATURE_HOST_SUPPORT_SET(host_service_flags, val) \
  3708. WMI_SET_BITS(host_service_flags, 2, 1, val)
  3709. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SAE_EAPOL_OFFLOAD_SUPPORT_GET(host_service_flags) \
  3710. WMI_GET_BITS(host_service_flags, 3, 1)
  3711. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SAE_EAPOL_OFFLOAD_SUPPORT_SET(host_service_flags, val) \
  3712. WMI_SET_BITS(host_service_flags, 3, 1, val)
  3713. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_CC_EXT_SUPPORT_GET(host_service_flags) \
  3714. WMI_GET_BITS(host_service_flags, 4, 1)
  3715. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_CC_EXT_SUPPORT_SET(host_service_flags, val) \
  3716. WMI_SET_BITS(host_service_flags, 4, 1, val)
  3717. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_CHANNEL_SUPPORT_GET(host_service_flags) \
  3718. WMI_GET_BITS(host_service_flags, 5, 1)
  3719. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_CHANNEL_SUPPORT_SET(host_service_flags, val) \
  3720. WMI_SET_BITS(host_service_flags, 5, 1, val)
  3721. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_STA_TWT_SYNC_EVT_SUPPORT_GET(host_service_flags) \
  3722. WMI_GET_BITS(host_service_flags, 6, 1)
  3723. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_STA_TWT_SYNC_EVT_SUPPORT_SET(host_service_flags, val) \
  3724. WMI_SET_BITS(host_service_flags, 6, 1, val)
  3725. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_LPI_SP_MODE_SUPPORT_GET(host_service_flags) \
  3726. WMI_GET_BITS(host_service_flags, 7, 1)
  3727. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_LPI_SP_MODE_SUPPORT_SET(host_service_flags, val) \
  3728. WMI_SET_BITS(host_service_flags, 7, 1, val)
  3729. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_TIMER_CHECK_GET(host_service_flags) \
  3730. WMI_GET_BITS(host_service_flags, 8, 1)
  3731. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_TIMER_CHECK_SET(host_service_flags, val) \
  3732. WMI_SET_BITS(host_service_flags, 8, 1, val)
  3733. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_REQ_ID_CHECK_GET(host_service_flags) \
  3734. WMI_GET_BITS(host_service_flags, 9, 1)
  3735. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_REQ_ID_CHECK_SET(host_service_flags, val) \
  3736. WMI_SET_BITS(host_service_flags, 9, 1, val)
  3737. #define WMI_RSRC_CFG_CARRIER_CFG_CHARTER_ENABLE_GET(carrier_config) \
  3738. WMI_GET_BITS(carrier_config, 0, 1)
  3739. #define WMI_RSRC_CFG_CARRIER_CFG_CHARTER_ENABLE_SET(carrier_config, val) \
  3740. WMI_SET_BITS(carrier_config, 0, 1, val)
  3741. typedef struct {
  3742. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */
  3743. /** The following indicate the WMI versions to be supported by
  3744. * the host driver. Note that the host driver decide to
  3745. * "downgrade" its WMI version support and this may not be the
  3746. * native version of the host driver. */
  3747. wmi_abi_version host_abi_vers;
  3748. A_UINT32 num_host_mem_chunks; /** size of array host_mem_chunks[] */
  3749. /* The TLVs for resource_config, host_mem_chunks[], and hw_mode_config will follow.
  3750. * wmi_resource_config resource_config;
  3751. * wlan_host_memory_chunk host_mem_chunks[];
  3752. * wmi_pdev_set_hw_mode_cmd_fixed_param hw_mode_config;
  3753. * Note that the hw_mode_config, in spite of its "pdev" name,
  3754. * applies to the entire target rather than for a single pdev
  3755. * within the target.
  3756. * To avoid specifying a HW mode for the target, the host should
  3757. * fill hw_mode_config's fields with 0x0.
  3758. */
  3759. } wmi_init_cmd_fixed_param;
  3760. /**
  3761. * TLV for channel list
  3762. */
  3763. typedef struct {
  3764. /** WMI_CHAN_LIST_TAG */
  3765. A_UINT32 tag;
  3766. /** # of channels to scan */
  3767. A_UINT32 num_chan;
  3768. /** channels in Mhz */
  3769. A_UINT32 channel_list[1];
  3770. } wmi_chan_list;
  3771. /**
  3772. * TLV for bssid list
  3773. */
  3774. typedef struct {
  3775. /** WMI_BSSID_LIST_TAG */
  3776. A_UINT32 tag;
  3777. /** number of bssids */
  3778. A_UINT32 num_bssid;
  3779. /** bssid list */
  3780. wmi_mac_addr bssid_list[1];
  3781. } wmi_bssid_list;
  3782. /**
  3783. * TLV for ie data.
  3784. */
  3785. typedef struct {
  3786. /** WMI_IE_TAG */
  3787. A_UINT32 tag;
  3788. /** number of bytes in ie data */
  3789. A_UINT32 ie_len;
  3790. /** ie data array (ie_len adjusted to number of words (ie_len + 4)/4) */
  3791. A_UINT32 ie_data[1];
  3792. } wmi_ie_data;
  3793. /**
  3794. * TLV used for length/buffer
  3795. */
  3796. typedef struct {
  3797. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tlv_buf_len_param */
  3798. A_UINT32 buf_len; /** Length of buf */
  3799. /**
  3800. * Following this structure is the TLV byte stream of buf of length buf_len:
  3801. * A_UINT8 buf[];
  3802. *
  3803. */
  3804. } wmi_tlv_buf_len_param;
  3805. /**
  3806. * TLV used for specifying the demensions of a multi-dimensional array
  3807. * that has been stored in a flat buffer
  3808. */
  3809. typedef struct {
  3810. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tlv_arrays_len_param */
  3811. /**
  3812. * d1_len, d2_len, d3_len, and d4_len are the lengths of each dimension
  3813. * for a multi-dimensional array.
  3814. * If the length of outer dimension is not 1, the inner dimension
  3815. * shouldn't be 1.
  3816. * If the multi-dimensional array has less than 4 dimensions, the outer
  3817. * dimensions' lengths should be 1. For example, a buf[3][4] array
  3818. * would have d1_len = 4, d2_len = 3, d3_len = 1, d4_len = 1.
  3819. * The outermost dimension of the array can be inferred from the array
  3820. * length; thus, this struct supports up to 5-D arrays. For a 5-D array,
  3821. * the outermost (5th) dimension would be
  3822. * array length / (d1_len * d2_len * d3_len * d4_len)
  3823. *
  3824. * For security (to ensure no out-of-bounds memory access),
  3825. * the receiver shall validate that the product of all dimensions
  3826. * is equal to (or less than) the array length.
  3827. */
  3828. A_UINT32 d1_len; /* the length of 1st (innermost) dimension array */
  3829. A_UINT32 d2_len; /* the length of 2nd dimension array */
  3830. A_UINT32 d3_len; /* the length of 3rd dimension array */
  3831. A_UINT32 d4_len; /* the length of 4th dimension array */
  3832. /**
  3833. * Following this structure is the TLV multi-dimension array buffer:
  3834. * <type> buf[L1*L2*L3*L4];
  3835. * where, L1, L2, L3, and L4 are the values of
  3836. * d1_len, d2_len, d3_len and d4_len.
  3837. * To access the 4-D element a[i][j][k][l], the buf[] array would be
  3838. * indexed as buf[i*L3*L2*L1 + j*L2*L1 + k*L1 + l].
  3839. */
  3840. } wmi_tlv_arrays_len_param;
  3841. typedef struct {
  3842. /** Len of the SSID */
  3843. A_UINT32 ssid_len;
  3844. /** SSID */
  3845. A_UINT32 ssid[8];
  3846. } wmi_ssid;
  3847. typedef struct {
  3848. /** WMI_SSID_LIST_TAG */
  3849. A_UINT32 tag;
  3850. A_UINT32 num_ssids;
  3851. wmi_ssid ssids[1];
  3852. } wmi_ssid_list;
  3853. typedef struct {
  3854. /** WMI_SCAN_START_OFFSET_TAG */
  3855. A_UINT32 tag;
  3856. /** Number of start TSF offsets */
  3857. A_UINT32 num_offset;
  3858. /** Array of start TSF offsets provided in milliseconds */
  3859. A_UINT32 start_tsf_offset[1];
  3860. } wmi_scan_start_offset;
  3861. /**
  3862. * WLAN_SCAN_CHAN_MODE Macros defined for A_UINT8 phymode_list[]
  3863. */
  3864. /** enum WLAN_PHY_MODE _mode starts from 0, but the WMI message requires
  3865. * 0 to be used to represent unspecified / don't care / default values.
  3866. * Therefore, WMI phy mode = WLAN phy mode + 1.
  3867. */
  3868. /** If the received WMI phy mode is 0 then it is ignored by the FW,
  3869. * and the FW will use any mode as long as the frequency matches.
  3870. */
  3871. /** The number of phy_mode's (BW+mode) passed in the TLV phymode_list[] must
  3872. * be equal to num_chan. (Unless the host does not specify phymode_list values
  3873. * at all, in which case the number of phymode_list elements will be zero.)
  3874. * The indexing of the phymode_list[] array corresponds to same index of
  3875. * the chan_list[] array.
  3876. */
  3877. #define WMI_SCAN_CHAN_SET_MODE(_c) ((_c) + 1)
  3878. #define WMI_SCAN_CHAN_GET_MODE(_c) ((_c) - 1)
  3879. #define WMI_SCAN_CHAN_MODE_IS_SET(_c) (_c)
  3880. typedef struct {
  3881. /*
  3882. * freq unit: MHz (upper 16bits -- value)
  3883. * flags (lower 16bits -- bitfield): valid for the freq short ssid
  3884. * The flags bitfield contains a bitmask of WMI_SCAN_HINT_FLAG_ values.
  3885. */
  3886. A_UINT32 freq_flags;
  3887. /* per spec, only 4 bytes*/
  3888. A_UINT32 short_ssid;
  3889. } wmi_hint_freq_short_ssid;
  3890. /** following bssid mac address same as wmi_mac_addr
  3891. * one example: freq -- 5980(0x175c), flags -- 0x1, mac -- 00:03:7f:12:34:56
  3892. * freq_flags will be: 0x175c0001
  3893. * macaddr31to00 will be: 0x127f0300
  3894. * macaddr47to32 will be: 0x00005634
  3895. */
  3896. typedef struct {
  3897. /*
  3898. * freq unit: MHz (upper 16bits -- value)
  3899. * flags (lower 16bits -- bitfield): valid for the freq bssid
  3900. * The flags bitfield contains a bitmask of WMI_SCAN_HINT_FLAG_ values.
  3901. */
  3902. A_UINT32 freq_flags;
  3903. /* legacy bssid addr, use same macro to convert: WMI_MAC_ADDR_TO_CHAR_ARRAY, WMI_CHAR_ARRAY_TO_MAC_ADDR */
  3904. wmi_mac_addr bssid;
  3905. } wmi_hint_freq_bssid;
  3906. /** macro to get freq and corresponding flags from wmi_hint_freq_short_ssid */
  3907. #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)
  3908. #define WMI_GET_FLAGS_FROM_HINT_FREQ_SHORT_SSID(pwmi_hint_freq_short_ssid_addr) (((pwmi_hint_freq_short_ssid_addr)->freq_flags) & 0xffff)
  3909. /** macro to set freq and corresponding flags in wmi_hint_freq_short_ssid */
  3910. #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))
  3911. #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))
  3912. /** macro to get freq and corresponding flags from wmi_hint_freq_bssid */
  3913. #define WMI_GET_FREQ_FROM_HINT_FREQ_BSSID(pwmi_hint_freq_bssid_addr) ((((pwmi_hint_freq_bssid_addr)->freq_flags) >> 16) & 0xffff)
  3914. #define WMI_GET_FLAGS_FROM_HINT_FREQ_BSSID(pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) & 0xffff)
  3915. /** macro to set freq and corresponding flags in wmi_hint_freq_bssid */
  3916. #define WMI_SET_FREQ_IN_HINT_FREQ_BSSID(freq, pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) |= ((freq) << 16))
  3917. #define WMI_SET_FLAGS_IN_HINT_FREQ_BSSID(flags, pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) |= (flags))
  3918. /** other macro for 6GHZ, TU(time unit), 20TU normally it is 20ms */
  3919. #define MAX_NUM_20TU_EACH_CH 6
  3920. #define MAX_NUM_S_SSID_EACH_20TU 1
  3921. #define MAX_NUM_BSSID_EACH_20TU 3
  3922. /* prefix used by scan requestor ids on the host */
  3923. #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
  3924. /* prefix used by scan request ids generated on the host */
  3925. /* host cycles through the lower 12 bits to generate ids */
  3926. #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
  3927. #define WLAN_SCAN_PARAMS_MAX_SSID 16
  3928. #define WLAN_SCAN_PARAMS_MAX_BSSID 4
  3929. #define WLAN_SCAN_PARAMS_MAX_IE_LEN 512
  3930. /* NOTE: This constant cannot be changed without breaking WMI compatibility */
  3931. #define WMI_IE_BITMAP_SIZE 8
  3932. typedef struct {
  3933. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
  3934. /** Scan ID (lower 16 bits) MSB 4 bits is used to identify scan client based on enum WMI_SCAN_CLIENT_ID */
  3935. A_UINT32 scan_id;
  3936. /** Scan requestor ID (lower 16 bits) is used by scan client to classify the scan source, reason, ...etc */
  3937. A_UINT32 scan_req_id;
  3938. /** VDEV id(interface) that is requesting scan */
  3939. A_UINT32 vdev_id;
  3940. /** Scan Priority, input to scan scheduler */
  3941. A_UINT32 scan_priority;
  3942. /** Scan events subscription */
  3943. A_UINT32 notify_scan_events;
  3944. /** dwell time in msec on active channels */
  3945. A_UINT32 dwell_time_active;
  3946. /** dwell time in msec on passive channels */
  3947. A_UINT32 dwell_time_passive;
  3948. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  3949. A_UINT32 min_rest_time;
  3950. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  3951. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  3952. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  3953. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  3954. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  3955. * irrespective of activity. activity is determined by the idle_time parameter.
  3956. */
  3957. A_UINT32 max_rest_time;
  3958. /** time before sending next set of probe requests.
  3959. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  3960. * The number of probe requests specified depends on the ssid_list and bssid_list
  3961. */
  3962. A_UINT32 repeat_probe_time;
  3963. /** time in msec between 2 consequetive probe requests with in a set. */
  3964. A_UINT32 probe_spacing_time;
  3965. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  3966. A_UINT32 idle_time;
  3967. /** maximum time in msec allowed for scan */
  3968. A_UINT32 max_scan_time;
  3969. /** delay in msec before sending first probe request after switching to a channel */
  3970. A_UINT32 probe_delay;
  3971. /** Scan control flags */
  3972. A_UINT32 scan_ctrl_flags;
  3973. /** Burst duration time in msec*/
  3974. A_UINT32 burst_duration;
  3975. /** # if channels to scan. In the TLV channel_list[] */
  3976. A_UINT32 num_chan;
  3977. /** number of bssids. In the TLV bssid_list[] */
  3978. A_UINT32 num_bssid;
  3979. /** number of ssid. In the TLV ssid_list[] */
  3980. A_UINT32 num_ssids;
  3981. /** number of bytes in ie data. In the TLV ie_data[]. Max len is defined by WLAN_SCAN_PARAMS_MAX_IE_LEN */
  3982. A_UINT32 ie_len;
  3983. /** Max number of probes to be sent */
  3984. A_UINT32 n_probes;
  3985. /** MAC Address to use in Probe Req as SA **/
  3986. wmi_mac_addr mac_addr;
  3987. /** Mask on which MAC has to be randomized **/
  3988. wmi_mac_addr mac_mask;
  3989. /** ie bitmap to use in probe req **/
  3990. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  3991. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  3992. A_UINT32 num_vendor_oui;
  3993. /** Scan control flags extended **/
  3994. A_UINT32 scan_ctrl_flags_ext;
  3995. /** dwell time in msec on active 2G channels, if it's not zero */
  3996. A_UINT32 dwell_time_active_2g;
  3997. /**
  3998. * dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked
  3999. * as an active channel
  4000. */
  4001. A_UINT32 dwell_time_active_6ghz;
  4002. /**
  4003. * dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked
  4004. * as a passive channel
  4005. */
  4006. A_UINT32 dwell_time_passive_6ghz;
  4007. /**
  4008. * Offset time is in milliseconds per channel.
  4009. */
  4010. A_UINT32 scan_start_offset;
  4011. /**
  4012. * minimum dwell time in msec for 6 GHz channel
  4013. * We'll listen for this time on the channel; if no beacon /
  4014. * probe response / FILS frame are received during this time
  4015. * we'll move to next channel.
  4016. */
  4017. A_UINT32 min_dwell_time_6ghz;
  4018. /**
  4019. * dwell time in msec for 6 GHz channel of spectral scan channel list
  4020. */
  4021. A_UINT32 dwell_time_spectral_ch;
  4022. /**
  4023. * TLV (tag length value) parameters follow the scan_cmd
  4024. * structure. The TLV's are:
  4025. * channel_list:
  4026. * If FW supports WMI_SERVICE_SCAN_CONFIG_PER_CHANNEL,
  4027. * then channel_list may fill the upper 12 bits with channel flags,
  4028. * while using only the lower 20 bits for channel frequency.
  4029. * Check WMI_SCAN_CHANNEL_FLAG macros for the channel flags
  4030. * If FW doesn't support WMI_SERVICE_SCAN_CONFIG_PER_CHANNEL,
  4031. * then channel_list only holds the frequency value
  4032. * Use WMI_SCAN_CHANNEL_FREQ_MASK & WMI_SCAN_CHANNEL_FLAGS_MASK
  4033. * A_UINT32 channel_list[num_chan]; // in MHz
  4034. * wmi_ssid ssid_list[num_ssids];
  4035. * wmi_mac_addr bssid_list[num_bssid];
  4036. * A_UINT8 ie_data[ie_len];
  4037. * wmi_vendor_oui vendor_oui[num_vendor_oui];
  4038. * A_UINT8 phymode_list[0 or num_chan]; // see WMI_SCAN_CHAN_MODE macros
  4039. * wmi_hint_freq_short_ssid hint_freq_short_ssid[num]; // the num can be calculated by TLV len
  4040. * wmi_hint_freq_bssid hint_freq_bssid[num]; // the num can be calculated by TLV len
  4041. * A_UINT32 spectral_chan_list[num]; // in MHz, the num can be calculated by TLV len
  4042. * *** NOTE:
  4043. * *** Use caution when using further TLVs, in case the additional
  4044. * *** TLVs cause the message size to exceed the of the buffer to
  4045. * *** hold the message.
  4046. */
  4047. } wmi_start_scan_cmd_fixed_param;
  4048. /**
  4049. * scan control flags.
  4050. */
  4051. /** passively scan all channels including active channels */
  4052. #define WMI_SCAN_FLAG_PASSIVE 0x1
  4053. /** add wild card ssid probe request even though ssid_list is specified. */
  4054. #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
  4055. /** add cck rates to rates/xrate ie for the generated probe request */
  4056. #define WMI_SCAN_ADD_CCK_RATES 0x4
  4057. /** add ofdm rates to rates/xrate ie for the generated probe request */
  4058. #define WMI_SCAN_ADD_OFDM_RATES 0x8
  4059. /** To enable indication of Chan load and Noise floor to host */
  4060. #define WMI_SCAN_CHAN_STAT_EVENT 0x10
  4061. /** Filter Probe request frames */
  4062. #define WMI_SCAN_FILTER_PROBE_REQ 0x20
  4063. /**When set, not to scan DFS channels*/
  4064. #define WMI_SCAN_BYPASS_DFS_CHN 0x40
  4065. /**When set, certain errors are ignored and scan continues.
  4066. * Different FW scan engine may use its own logic to decide what errors to ignore*/
  4067. #define WMI_SCAN_CONTINUE_ON_ERROR 0x80
  4068. /** Enable promiscous mode for CCXv4 */
  4069. #define WMI_SCAN_FILTER_PROMISCOUS 0x100
  4070. /** allow to send probe req on DFS channel */
  4071. #define WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS 0x200
  4072. /** add TPC content in probe req frame */
  4073. #define WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ 0x400
  4074. /** add DS content in probe req frame */
  4075. #define WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ 0x800
  4076. /** use random mac address for TA for probe request frame and add
  4077. * oui specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the probe req frame.
  4078. * if oui is not set by WMI_SCAN_PROB_REQ_OUI_CMDID then the flag is ignored*/
  4079. #define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ 0x1000
  4080. /** allow mgmt transmission during off channel scan */
  4081. #define WMI_SCAN_OFFCHAN_MGMT_TX 0x2000
  4082. /** allow data transmission during off channel scan */
  4083. #define WMI_SCAN_OFFCHAN_DATA_TX 0x4000
  4084. /** allow capture ppdu with phy errrors */
  4085. #define WMI_SCAN_CAPTURE_PHY_ERROR 0x8000
  4086. /** always do passive scan on passive channels */
  4087. #define WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN 0x10000
  4088. /** set HALF (10MHz) rate support */
  4089. #define WMI_SCAN_FLAG_HALF_RATE_SUPPORT 0x20000
  4090. /** set Quarter (5MHz) rate support */
  4091. #define WMI_SCAN_FLAG_QUARTER_RATE_SUPPORT 0x40000
  4092. #define WMI_SCAN_RANDOM_SEQ_NO_IN_PROBE_REQ 0x80000
  4093. #define WMI_SCAN_ENABLE_IE_WHTELIST_IN_PROBE_REQ 0x100000
  4094. /** for adaptive scan mode using 3 bits (21 - 23 bits) */
  4095. #define WMI_SCAN_DWELL_MODE_MASK 0x00E00000
  4096. #define WMI_SCAN_DWELL_MODE_SHIFT 21
  4097. typedef enum {
  4098. WMI_SCAN_DWELL_MODE_DEFAULT = 0,
  4099. WMI_SCAN_DWELL_MODE_CONSERVATIVE = 1,
  4100. WMI_SCAN_DWELL_MODE_MODERATE = 2,
  4101. WMI_SCAN_DWELL_MODE_AGGRESSIVE = 3,
  4102. WMI_SCAN_DWELL_MODE_STATIC = 4,
  4103. } WMI_SCAN_DWELL_MODE;
  4104. #define WMI_SCAN_SET_DWELL_MODE(flag, mode) \
  4105. do { \
  4106. (flag) |= (((mode) << WMI_SCAN_DWELL_MODE_SHIFT) & \
  4107. WMI_SCAN_DWELL_MODE_MASK); \
  4108. } while (0)
  4109. #define WMI_SCAN_GET_DWELL_MODE(flag) \
  4110. (((flag) & WMI_SCAN_DWELL_MODE_MASK) >> WMI_SCAN_DWELL_MODE_SHIFT)
  4111. /** WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
  4112. #define WMI_SCAN_CLASS_MASK 0xFF000000
  4113. /*
  4114. * Masks identifying types/ID of scans
  4115. * Scan_Stop macros should be the same value as below defined in UMAC
  4116. * #define IEEE80211_SPECIFIC_SCAN 0x00000000
  4117. * #define IEEE80211_VAP_SCAN 0x01000000
  4118. * #define IEEE80211_ALL_SCANS 0x04000000
  4119. */
  4120. /* WMI_SCAN_STOP_ONE:
  4121. * Stop one scan which matches with scan_id provided in scan stop command.
  4122. */
  4123. #define WMI_SCAN_STOP_ONE 0x00000000
  4124. /* WMI_SCN_STOP_VAP_ALL:
  4125. * Stop all scans (host scans and FW internal scans) on provided vdev.
  4126. */
  4127. #define WMI_SCN_STOP_VAP_ALL 0x01000000
  4128. /* WMI_SCN_STOP_HOST_VAP_ALL:
  4129. * Stop all host scans on provided vdev.
  4130. */
  4131. #define WMI_SCN_STOP_HOST_VAP_ALL 0x02000000
  4132. /* WMI_SCAN_STOP_ALL:
  4133. * Stop all scans (host scans and FW internal scans) on all vdevs.
  4134. */
  4135. #define WMI_SCAN_STOP_ALL 0x04000000
  4136. /** extended Scan ctrl flags **/
  4137. #define WMI_SCAN_FLAG_EXT_DBS_SCAN_POLICY_MASK 0x00000003 /* Bit 0-1 reserved for DBS scan selection policy.*/
  4138. #define WMI_SCAN_DBS_POLICY_DEFAULT 0x0 /** Select duty cycle if configured, else fall back to whatever
  4139. policy scan manager computes */
  4140. #define WMI_SCAN_DBS_POLICY_FORCE_NONDBS 0x1 /** Force to select Non-DBS scan */
  4141. #define WMI_SCAN_DBS_POLICY_IGNORE_DUTY 0x2 /** Ignore duty cycle even if configured and fall back to whatever
  4142. policy scan manager computes*/
  4143. #define WMI_SCAN_DBS_POLICY_RESERVED 0x3
  4144. #define WMI_SCAN_DBS_POLICY_MAX 0x3
  4145. /* Enable Reception of Public Action frame with this flag */
  4146. #define WMI_SCAN_FLAG_EXT_FILTER_PUBLIC_ACTION_FRAME 0x00000004
  4147. /* Indicate to scan all PSC channel */
  4148. #define WMI_SCAN_FLAG_EXT_6GHZ_SCAN_ALL_PSC_CH 0x00000008
  4149. /* Indicate to scan all NON-PSC channel */
  4150. #define WMI_SCAN_FLAG_EXT_6GHZ_SCAN_ALL_NON_PSC_CH 0x00000010
  4151. /* Indicate to save scan result matching hint from scan client */
  4152. #define WMI_SCAN_FLAG_EXT_6GHZ_MATCH_HINT 0x00000020
  4153. /* Skip any ch on which no any RNR had been received */
  4154. #define WMI_SCAN_FLAG_EXT_6GHZ_SKIP_NON_RNR_CH 0x00000040
  4155. /* Indicate client hint req is high priority than fw rnr or FILS disc */
  4156. #define WMI_SCAN_FLAG_EXT_6GHZ_CLIENT_HIGH_PRIORITY 0x00000080
  4157. /* Force all 6ghz scan channels to active channel */
  4158. #define WMI_SCAN_FLAG_EXT_6GHZ_FORCE_CHAN_ACTIVE 0x00000100
  4159. /* Force broadcast address in RA even though specified bssid */
  4160. #define WMI_SCAN_FLAG_EXT_FORCE_BRCAST_RA 0x00000200
  4161. /* Extend 6ghz channel measure time */
  4162. #define WMI_SCAN_FLAG_EXT_6GHZ_EXTEND_MEASURE_TIME 0x00000400
  4163. /**
  4164. * Currently passive scan has higher priority than beacon and
  4165. * beacon miss would happen irrespective of dwell time.
  4166. * Below flag ensures there would not be beacon miss if the dwell
  4167. * time is lesser than beacon interval - channel switch time combined.
  4168. * For dwell time greater than beacon interval, bmiss is expected.
  4169. */
  4170. #define WMI_SCAN_FLAG_EXT_PASSIVE_SCAN_START_TIME_ENHANCE 0x00000800
  4171. /* Force unicast address in RA */
  4172. #define WMI_SCAN_FLAG_EXT_FORCE_UNICAST_RA 0x00001000
  4173. /**
  4174. * new 6 GHz flags per chan (short ssid or bssid) in struct
  4175. * wmi_hint_freq_short_ssid or wmi_hint_freq_bssid
  4176. */
  4177. /* Indicate not to send probe req for short_ssid or bssid on that channel */
  4178. #define WMI_SCAN_HINT_FLAG_SKIP_TX_PROBE_REQ 0x00000001
  4179. /* Force channel in WMI hint to active channel */
  4180. #define WMI_SCAN_HINT_FLAG_FORCE_CHAN_ACTIVE 0x00000002
  4181. /* Combine short SSID with legacy bssid list */
  4182. #define WMI_SCAN_HINT_FLAG_COMBINE_BSSID_LIST 0x00000004
  4183. #define WMI_SCAN_CHANNEL_FREQ_MASK 0x000FFFFF
  4184. #define WMI_SCAN_CHANNEL_FLAGS_MASK 0xFFF00000
  4185. /**
  4186. * Per channel configuration flags
  4187. */
  4188. /**
  4189. * WMI_SCAN_CHANNEL_FLAG_SCAN_ONLY_IF_RNR_FOUND:
  4190. * If this flag is set, then scan only if the corresponding channel
  4191. * is found via RNR IE during 2g/5g scan.
  4192. * If this flag is not set, then FW always scans the channel
  4193. * irrespective of RNR and also FW ignores
  4194. * WMI_SCAN_FLAG_EXT_6GHZ_SKIP_NON_RNR_CH flag
  4195. */
  4196. #define WMI_SCAN_CHANNEL_FLAG_SCAN_ONLY_IF_RNR_FOUND 0x001
  4197. typedef struct {
  4198. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
  4199. /** requestor requesting cancel */
  4200. A_UINT32 requestor;
  4201. /** Scan ID */
  4202. A_UINT32 scan_id;
  4203. /**
  4204. * Req Type
  4205. * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
  4206. * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id (on a specific pdev in DBDC)
  4207. * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
  4208. * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine (on a specific pdev in DBDC)
  4209. */
  4210. A_UINT32 req_type;
  4211. /**
  4212. * vDev ID
  4213. * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
  4214. */
  4215. A_UINT32 vdev_id;
  4216. /** pdev_id for identifying the MAC
  4217. * See macros starting with WMI_PDEV_ID_ for values.
  4218. * In non-DBDC case host should set it to 0
  4219. */
  4220. A_UINT32 pdev_id;
  4221. } wmi_stop_scan_cmd_fixed_param;
  4222. #define MAX_NUM_CHAN_PER_WMI_CMD 58 /* each WMI cmd can hold 58 channel entries at most */
  4223. #define APPEND_TO_EXISTING_CHAN_LIST 1
  4224. #define CHANNEL_MAX_BANDWIDTH_VALID 2
  4225. typedef struct {
  4226. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */
  4227. A_UINT32 num_scan_chans; /** no of elements in chan_info[] */
  4228. A_UINT32 flags; /* Flags used to control the behavior of channel list update on target side */
  4229. 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. */
  4230. /** Followed by the variable length TLV chan_info:
  4231. * wmi_channel chan_info[] */
  4232. } wmi_scan_chan_list_cmd_fixed_param;
  4233. /*
  4234. * Priority numbers must be sequential, starting with 0.
  4235. */
  4236. /* NOTE: WLAN SCAN_PRIORITY_COUNT can't be changed without breaking the compatibility */
  4237. typedef enum {
  4238. WMI_SCAN_PRIORITY_VERY_LOW = 0,
  4239. WMI_SCAN_PRIORITY_LOW,
  4240. WMI_SCAN_PRIORITY_MEDIUM,
  4241. WMI_SCAN_PRIORITY_HIGH,
  4242. WMI_SCAN_PRIORITY_VERY_HIGH,
  4243. WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
  4244. } wmi_scan_priority;
  4245. /* Five Levels for Requested Priority */
  4246. /* VERY_LOW LOW MEDIUM HIGH VERY_HIGH */
  4247. typedef A_UINT32 WLAN_PRIORITY_MAPPING[WMI_SCAN_PRIORITY_COUNT];
  4248. /**
  4249. * 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
  4250. * ex. if we need overwrite P2P Client prority entry, we will overwrite the whole table for WLAN_M_STA
  4251. * we will generate the new WLAN_M_STA table with modified P2P Client Entry but keep STA entry intact
  4252. */
  4253. typedef struct {
  4254. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param */
  4255. /**
  4256. * used as an index to find the proper table for a specific vdev type in default_scan_priority_mapping_table
  4257. * 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
  4258. */
  4259. A_UINT32 vdev_type;
  4260. /**
  4261. * number of rows in mapping_table for a specific vdev
  4262. * for WLAN_M_STA type, there are 3 entries in the table (refer to default_scan_priority_mapping_table definition)
  4263. */
  4264. A_UINT32 number_rows;
  4265. /**
  4266. * pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values.
  4267. * In non-DBDC case host should set it to 0
  4268. */
  4269. A_UINT32 pdev_id;
  4270. /** mapping_table for a specific vdev follows this TLV
  4271. * WLAN_PRIORITY_MAPPING mapping_table[]; */
  4272. } wmi_scan_sch_priority_table_cmd_fixed_param;
  4273. /** update flags */
  4274. #define WMI_SCAN_UPDATE_SCAN_PRIORITY 0x1
  4275. #define WMI_SCAN_UPDATE_SCAN_MIN_REST_TIME 0x2
  4276. #define WMI_SCAN_UPDATE_SCAN_MAX_REST_TIME 0x4
  4277. typedef struct {
  4278. A_UINT32 tlv_header;
  4279. /** requestor requesting update scan request */
  4280. A_UINT32 requestor;
  4281. /** Scan ID of the scan request that need to be update */
  4282. A_UINT32 scan_id;
  4283. /** update flags, indicating which of the following fields are valid and need to be updated*/
  4284. A_UINT32 scan_update_flags;
  4285. /** scan priority. Only valid if WMI_SCAN_UPDATE_SCAN_PRIORITY flag is set in scan_update_flag */
  4286. A_UINT32 scan_priority;
  4287. /** min rest time. Only valid if WMI_SCAN_UPDATE_MIN_REST_TIME flag is set in scan_update_flag */
  4288. A_UINT32 min_rest_time;
  4289. /** min rest time. Only valid if WMI_SCAN_UPDATE_MAX_REST_TIME flag is set in scan_update_flag */
  4290. A_UINT32 max_rest_time;
  4291. /** 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 */
  4292. A_UINT32 pdev_id;
  4293. } wmi_scan_update_request_cmd_fixed_param;
  4294. #define WMI_SCAN_PROBE_OUI_SPOOFED_MAC_IN_PROBE_REQ 0x1
  4295. #define WMI_SCAN_PROBE_OUI_RANDOM_SEQ_NO_IN_PROBE_REQ 0x2
  4296. #define WMI_SCAN_PROBE_OUI_ENABLE_IE_WHITELIST_IN_PROBE_REQ 0x4
  4297. typedef struct _wmi_vendor_oui {
  4298. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vendor_oui */
  4299. A_UINT32 oui_type_subtype; /** Vendor OUI type and subtype, lower 3 bytes is type and highest byte is subtype**/
  4300. }wmi_vendor_oui;
  4301. typedef struct {
  4302. A_UINT32 tlv_header;
  4303. /** oui to be used in probe request frame when random mac addresss is
  4304. * requested part of scan parameters. this is applied to both FW internal scans and
  4305. * host initated scans. host can request for random mac address with
  4306. * WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ flag. */
  4307. A_UINT32 prob_req_oui;
  4308. A_UINT32 vdev_id;
  4309. /** Control Flags **/
  4310. A_UINT32 flags;
  4311. /** ie bitmap to use in probe req **/
  4312. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  4313. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  4314. A_UINT32 num_vendor_oui;
  4315. /** 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 */
  4316. A_UINT32 pdev_id;
  4317. /* Following this tlv, there comes an array of structure of type wmi_vendor_oui
  4318. wmi_vendor_oui vendor_oui[];*/
  4319. } wmi_scan_prob_req_oui_cmd_fixed_param;
  4320. enum wmi_scan_event_type {
  4321. WMI_SCAN_EVENT_STARTED = 0x1,
  4322. WMI_SCAN_EVENT_COMPLETED = 0x2,
  4323. WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
  4324. WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
  4325. WMI_SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */
  4326. WMI_SCAN_EVENT_PREEMPTED = 0x20, /* preempted by other high priority scan */
  4327. WMI_SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */
  4328. WMI_SCAN_EVENT_RESTARTED = 0x80, /* scan restarted */
  4329. WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
  4330. WMI_SCAN_EVENT_SUSPENDED = 0x200, /* scan request is suspended */
  4331. WMI_SCAN_EVENT_RESUMED = 0x400, /* scan request is resumed */
  4332. WMI_SCAN_EVENT_MAX = 0x8000
  4333. };
  4334. enum wmi_scan_completion_reason {
  4335. /** scan related events */
  4336. WMI_SCAN_REASON_NONE = 0xFF,
  4337. WMI_SCAN_REASON_COMPLETED = 0,
  4338. WMI_SCAN_REASON_CANCELLED = 1,
  4339. WMI_SCAN_REASON_PREEMPTED = 2,
  4340. WMI_SCAN_REASON_TIMEDOUT = 3,
  4341. WMI_SCAN_REASON_INTERNAL_FAILURE = 4, /* This reason indication failures when performaing scan */
  4342. WMI_SCAN_REASON_SUSPENDED = 5,
  4343. WMI_SCAN_REASON_DFS_VIOLATION = 6, /* Failure when tried to SCAN channel in NOL list */
  4344. WMI_SCAN_REASON_MAX,
  4345. };
  4346. typedef struct {
  4347. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_event_fixed_param */
  4348. /** scan event (wmi_scan_event_type) */
  4349. A_UINT32 event;
  4350. /** status of the scan completion event */
  4351. A_UINT32 reason;
  4352. /** channel freq , only valid for FOREIGN channel event*/
  4353. A_UINT32 channel_freq;
  4354. /**id of the requestor whose scan is in progress */
  4355. A_UINT32 requestor;
  4356. /**id of the scan that is in progress */
  4357. A_UINT32 scan_id;
  4358. /**id of VDEV that requested the scan */
  4359. A_UINT32 vdev_id;
  4360. /** TSF Timestamp when the scan event (wmi_scan_event_type) is completed
  4361. * In case of AP it is TSF of the AP vdev
  4362. * In case of STA connected state this is the TSF of the AP
  4363. * In case of STA not connected it will be the free running HW timer
  4364. */
  4365. A_UINT32 tsf_timestamp;
  4366. } wmi_scan_event_fixed_param;
  4367. /* WMI Diag event */
  4368. typedef struct {
  4369. A_UINT32 tlv_header; /* TLV tag and len; tag is WMITLV_TAG_STRUC_wmi_diag_event_fixed_param */
  4370. A_UINT32 time_stamp; /* Reference timestamp. diag frame contains diff value */
  4371. A_UINT32 count; /* Number of diag frames added to current event */
  4372. A_UINT32 dropped;
  4373. /* followed by WMITLV_TAG_ARRAY_BYTE */
  4374. } wmi_diag_event_fixed_param;
  4375. #define WMI_11K_OFFLOAD_BITMAP_NEIGHBOR_REPORT_REQ 0x1
  4376. typedef struct {
  4377. A_UINT32 time_offset; /* positive offset in secs from the time 11k offload command has been received, 0xFFFFFFFF if offset is not valid */
  4378. 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 */
  4379. A_UINT32 bmiss_count_trigger; /* value 1 is to send neighbor report at 1st BMISS, 0xFFFFFFFF if input is not valid */
  4380. A_UINT32 per_threshold_offset; /* percentage offset from the current per_threshold, 0xFFFFFFFF if input is not valid */
  4381. 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 */
  4382. 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
  4383. * neighbor report requests that will be sent by FW after every roam */
  4384. wmi_ssid ssid; /* ssid of current connected AP FW might choose to use this SSID in the neighbor report req frame if it is
  4385. * interested in candidate of the same SSID */
  4386. } wmi_neighbor_report_offload;
  4387. typedef struct {
  4388. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_11k_report_fixed_param */
  4389. A_UINT32 vdev_id;
  4390. A_UINT32 offload_11k; /* bitmask to indicate to FW what all 11k features are offloaded */
  4391. } wmi_11k_offload_report_fixed_param;
  4392. typedef struct {
  4393. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_neighbor_report_offload_tlv_param */
  4394. wmi_neighbor_report_offload neighbor_rep_ofld_params;
  4395. } wmi_neighbor_report_11k_offload_tlv_param;
  4396. #define WMI_INVOKE_NEIGHBOR_REPORT_FLAGS_SEND_RESP_TO_HOST 0x1
  4397. typedef struct {
  4398. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_invoke_neighbor_report_fixed_param */
  4399. A_UINT32 vdev_id;
  4400. A_UINT32 flags;
  4401. wmi_ssid ssid; /* if ssid.len == 0, firmware doesn't include ssid sub-element.
  4402. * In that case AP gives all the candidates in ESS without SSID filter
  4403. * If host wants to insert ssid subelement in the neighbor report request frame, then it can specify the ssid here */
  4404. } wmi_11k_offload_invoke_neighbor_report_fixed_param;
  4405. #define WMI_MAX_PMKID_LEN 16
  4406. #define WMI_MAX_PMK_LEN 64
  4407. #define WMI_PMK_CACHE_CAT_FLAG_BSSID 0x1
  4408. #define WMI_PMK_CACHE_CAT_FLAG_SSID_CACHE_ID 0x2
  4409. #define WMI_PMK_CACHE_ACTION_FLAG_ADD_ENTRY 0x1
  4410. #define WMI_PMK_CACHE_ACTION_FLAG_DEL_ENTRY 0x2
  4411. typedef struct {
  4412. A_UINT32 tlv_header;
  4413. A_UINT32 pmk_len;
  4414. 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,
  4415. in spite of the automatic byte-swap applied to WMI messages during download*/
  4416. A_UINT32 pmkid_len;
  4417. A_UINT8 pmkid[WMI_MAX_PMKID_LEN];
  4418. wmi_mac_addr bssid;
  4419. wmi_ssid ssid;
  4420. A_UINT32 cache_id;
  4421. A_UINT32 cat_flag; // whether (bssid) or (ssid,cache_id) is valid
  4422. A_UINT32 action_flag; // add/delete the entry
  4423. } wmi_pmk_cache;
  4424. #define WMI_PMK_CACHE_OP_FLAG_FLUSH_ALL 0x1
  4425. typedef struct {
  4426. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_update_pmk_cache_cmd_fixed_param */
  4427. A_UINT32 op_flag; //option to flush all the cache at once
  4428. A_UINT32 vdev_id;
  4429. A_UINT32 num_cache;
  4430. /**
  4431. * TLV (tag length value) parameters follow the update_pmk_cache cmd
  4432. * structure. The TLV's are:
  4433. * wmi_pmk_cache cache_list[];
  4434. */
  4435. } wmi_pdev_update_pmk_cache_cmd_fixed_param;
  4436. #define WMI_FILS_MAX_USERNAME_LEN 16
  4437. #define WMI_FILS_MAX_REALM_LEN 256
  4438. #define WMI_FILS_MAX_RRK_LEN 64
  4439. #define WMI_FILS_MAX_RIK_LEN 64
  4440. /* for big-endian hosts, manual endian conversion will be needed to keep the array values in their original order,
  4441. in spite of the automatic byte-swap applied to WMI messages during download*/
  4442. typedef struct {
  4443. A_UINT8 username[WMI_FILS_MAX_USERNAME_LEN];
  4444. A_UINT32 username_length;
  4445. A_UINT32 next_erp_seq_num;
  4446. A_UINT8 rRk[WMI_FILS_MAX_RRK_LEN];
  4447. A_UINT32 rRk_length;
  4448. A_UINT8 rIk[WMI_FILS_MAX_RIK_LEN];
  4449. A_UINT32 rIk_length;
  4450. A_UINT8 realm[WMI_FILS_MAX_REALM_LEN];
  4451. A_UINT32 realm_len;
  4452. } wmi_erp_info;
  4453. enum wmi_fils_hlp_pkt_type {
  4454. WMI_FILS_HLP_PKT_TYPE_DHCP_DISCOVER = 1,
  4455. };
  4456. typedef struct {
  4457. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_fils_offload_tlv_param */
  4458. A_UINT32 flags;
  4459. wmi_erp_info vdev_erp_info;
  4460. } wmi_roam_fils_offload_tlv_param;
  4461. typedef struct {
  4462. A_UINT32 tlv_header; /** tag WMITLV_TAG_STRUC_wmi_pdev_update_fils_hlp_pkt_cmd_fixed_param**/
  4463. A_UINT32 flags;
  4464. A_UINT32 vdev_id;
  4465. A_UINT32 size;
  4466. A_UINT32 pkt_type; // filled using enum wmi_fils_hlp_pkt_type
  4467. // A_UINT8 fils_hlp_pkt[];
  4468. } wmi_pdev_update_fils_hlp_pkt_cmd_fixed_param;
  4469. #define WMI_MAX_KEK_LEN 64
  4470. #define GTK_OFFLOAD_KEK_EXTENDED_BYTES WMI_MAX_KEK_LEN /*KEK len has been increased to 64 to support FILS security.
  4471. To not break backward compatibility, new GTK_OFFLOAD_KEK_EXTENDED_BYTES has been defined without modifying old GTK_OFFLOAD_KEK_BYTES */
  4472. typedef struct {
  4473. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_fils_synch_tlv_param */
  4474. A_UINT32 update_erp_next_seq_num;// Boolean denoting whether next erp_seq_num changed or not.
  4475. A_UINT32 next_erp_seq_num;
  4476. A_UINT32 kek_len;
  4477. A_UINT8 kek[WMI_MAX_KEK_LEN];
  4478. A_UINT32 pmk_len;
  4479. A_UINT8 pmk[WMI_MAX_PMK_LEN];
  4480. A_UINT8 pmkid[WMI_MAX_PMKID_LEN];
  4481. A_UINT8 realm[WMI_FILS_MAX_REALM_LEN];
  4482. A_UINT32 realm_len;
  4483. } wmi_roam_fils_synch_tlv_param;
  4484. /*
  4485. * FW sends PMK cache of roamed candidate to host to sync pmk cache with host
  4486. */
  4487. typedef struct {
  4488. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_pmk_cache_synch_tlv_param */
  4489. A_UINT32 pmk_len;
  4490. A_UINT8 pmk[WMI_MAX_PMK_LEN];
  4491. A_UINT8 pmkid[WMI_MAX_PMKID_LEN];
  4492. } wmi_roam_pmk_cache_synch_tlv_param;
  4493. /**
  4494. * WMI_ROAM_LINK_FLAG_XXX definition:
  4495. */
  4496. #define WMI_ROAM_LINK_FLAG_DISABLE 0x1 /* link is disabled, host can overwrite it later. */
  4497. typedef struct {
  4498. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ml_setup_links_param */
  4499. A_UINT32 vdev_id; /* when vdev_id is 0xffffffff, means the link_id hasn't attached to vdev */
  4500. A_UINT32 link_id; /* link id defined as in 802.11 BE spec. */
  4501. wmi_channel channel; /* link primary channel */
  4502. /**
  4503. * link flags: refer WMI_ROAM_LINK_FLAG_XXX.
  4504. */
  4505. A_UINT32 flags;
  4506. wmi_mac_addr link_addr; /* link address */
  4507. } wmi_roam_ml_setup_links_param;
  4508. /*
  4509. * If FW has multiple active channels due to MCC(multi channel concurrency),
  4510. * then these stats are combined stats for all the active channels.
  4511. */
  4512. typedef struct {
  4513. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param */
  4514. /** ack count, it is an incremental number, not accumulated number */
  4515. A_UINT32 ackRcvBad;
  4516. /** bad rts count, it is an incremental number, not accumulated number */
  4517. A_UINT32 rtsBad;
  4518. /** good rts, it is an incremental number, not accumulated number */
  4519. A_UINT32 rtsGood;
  4520. /** fcs count, it is an incremental number, not accumulated number */
  4521. A_UINT32 fcsBad;
  4522. /** beacon count, it is an incremental number, not accumulated number */
  4523. A_UINT32 noBeacons;
  4524. } wmi_update_whal_mib_stats_event_fixed_param;
  4525. /*
  4526. * This defines how much headroom is kept in the
  4527. * receive frame between the descriptor and the
  4528. * payload, in order for the WMI PHY error and
  4529. * management handler to insert header contents.
  4530. *
  4531. * This is in bytes.
  4532. */
  4533. #define WMI_MGMT_RX_HDR_HEADROOM (sizeof(wmi_comb_phyerr_rx_hdr) + WMI_TLV_HDR_SIZE + sizeof(wmi_single_phyerr_rx_hdr))
  4534. /** This event will be used for sending scan results
  4535. * as well as rx mgmt frames to the host. The rx buffer
  4536. * will be sent as part of this WMI event. It would be a
  4537. * good idea to pass all the fields in the RX status
  4538. * descriptor up to the host.
  4539. */
  4540. /* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */
  4541. #define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */
  4542. /** flag indicating that the mgmt frame (probe req/beacon) is received in the context of extscan performed by FW */
  4543. #define WMI_MGMT_RX_HDR_EXTSCAN 0x01
  4544. /** flag indicating that the mgmt frame (probe req/beacon) is received in the context of matched network by FW ENLO */
  4545. #define WMI_MGMT_RX_HDR_ENLO 0x02
  4546. #define MAX_ANTENNA_EIGHT 8
  4547. /** Helper macro for params GET/SET of MGMT_RX_FW_CONSUMED_EVENTID */
  4548. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_PEER_ID_GET(peer_info_subtype) WMI_GET_BITS(peer_info_subtype, 0, 16)
  4549. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_PEER_ID_SET(peer_info_subtype, value) WMI_SET_BITS(peer_info_subtype, 0, 16, value)
  4550. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_IEEE_LINK_ID_GET(peer_info_subtype) WMI_GET_BITS(peer_info_subtype, 16, 3)
  4551. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_IEEE_LINK_ID_SET(peer_info_subtype, value) WMI_SET_BITS(peer_info_subtype, 16, 3, value)
  4552. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_SUBTYPE_GET(peer_info_subtype) WMI_GET_BITS(peer_info_subtype, 28, 4)
  4553. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_SUBTYPE_SET(peer_info_subtype, value) WMI_SET_BITS(peer_info_subtype, 28, 4, value)
  4554. #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)
  4555. #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)
  4556. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_MGMT_PKT_CTR_GET(mgmt_pkt_ctr_info) WMI_GET_BITS(mgmt_pkt_ctr_info, 16, 16)
  4557. #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)
  4558. typedef struct {
  4559. A_UINT32 tlv_header; /* WMITLV_TAG_STRUCT_wmi_mgmt_rx_fw_consumed_hdr */
  4560. A_UINT32 rx_tsf_l32; /* h/w assigned timestamp of the rx frame in micro sec */
  4561. A_UINT32 rx_tsf_u32 ;/* h/w assigned timestamp of the rx frame in micro sec */
  4562. A_UINT32 pdev_id; /* pdev_id for identifying the MAC the rx mgmt frame was received by */
  4563. /**
  4564. * peer_info_subtype
  4565. *
  4566. * [15:0]: ml_peer_id, ML peer_id unique across chips
  4567. * [18:16]: ieee_link_id, protocol link id on which the rx frame is received
  4568. * [27:19]: reserved
  4569. * [31:28]: subtype, subtype of the received MGMT frame
  4570. */
  4571. A_UINT32 peer_info_subtype;
  4572. A_UINT32 chan_freq; /* frequency in MHz of the channel on which this frame was received */
  4573. /* Timestamp (in micro sec) of the last fw consumed/dropped mgmt. frame, same across chips */
  4574. A_UINT32 global_timestamp;
  4575. /**
  4576. * mgmt_pkt_ctr_info
  4577. *
  4578. * [14:0]: reserved
  4579. * [15]: mgmt_pkt_ctr_valid
  4580. * [31:16]: mgmt_pkt_ctr, Sequence number of the last fw consumed mgmt frame
  4581. */
  4582. A_UINT32 mgmt_pkt_ctr_info;
  4583. } wmi_mgmt_rx_fw_consumed_hdr;
  4584. /** Helper macro for param GET/SET of mgmt_rx_reo_params */
  4585. #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)
  4586. #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)
  4587. #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)
  4588. #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)
  4589. #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)
  4590. #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)
  4591. /** Data structure of the TLV to add in RX EVENTID for providing REO params
  4592. * like global_timestamp and mgmt_pkt_ctr
  4593. */
  4594. typedef struct {
  4595. A_UINT32 tlv_header; /*TLV WMITLV_TAG_STRUC_wmi_mgmt_rx_reo_params*/
  4596. /* Timestamp (in micro sec) of the last fw forwarded mgmt. frame, same across chips */
  4597. A_UINT32 global_timestamp;
  4598. /**
  4599. * mgmt_pkt_ctr_link_info
  4600. *
  4601. * [11:0]: reserved
  4602. * [14:12]: ieee_link_id, protocol link id on which the rx frame is received
  4603. * [15]: mgmt_pkt_ctr_valid
  4604. * [31:16]: mgmt_pkt_ctr, Sequence number of the last fw forwarded mgmt frame
  4605. */
  4606. A_UINT32 mgmt_pkt_ctr_link_info;
  4607. } wmi_mgmt_rx_reo_params;
  4608. typedef struct {
  4609. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */
  4610. /** channel on which this frame is received (channel number) */
  4611. A_UINT32 channel;
  4612. /** snr information used to cal rssi */
  4613. A_UINT32 snr;
  4614. /** Rate kbps */
  4615. A_UINT32 rate;
  4616. /** rx phy mode WLAN_PHY_MODE */
  4617. A_UINT32 phy_mode;
  4618. /** length of the frame */
  4619. A_UINT32 buf_len;
  4620. /** rx status */
  4621. A_UINT32 status; /* capture mode indication */
  4622. /** RSSI of PRI 20MHz for each chain. */
  4623. A_UINT32 rssi_ctl[ATH_MAX_ANTENNA];
  4624. /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */
  4625. A_UINT32 flags;
  4626. /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
  4627. A_INT32 rssi;
  4628. /** delta between local TSF(TSF timestamp when frame was RXd)
  4629. * and remote TSF(TSF timestamp in the IE for mgmt frame -
  4630. * beacon,proberesp for e.g). If remote TSF is not available,
  4631. * delta set to 0.
  4632. * Although tsf_delta is stored as A_UINT32, it can be negative,
  4633. * and thus would need to be sign-extended if added to a value
  4634. * larger than 32 bits.
  4635. */
  4636. A_UINT32 tsf_delta;
  4637. /* The lower 32 bits of the TSF (rx_tsf_l32) is copied by FW from
  4638. * TSF timestamp in the RX MAC descriptor provided by HW.
  4639. */
  4640. A_UINT32 rx_tsf_l32;
  4641. /* The Upper 32 bits (rx_tsf_u32) is filled by reading the TSF register
  4642. * after the packet is received.
  4643. */
  4644. A_UINT32 rx_tsf_u32;
  4645. /** pdev_id for identifying the MAC the rx mgmt frame was received by
  4646. * See macros starting with WMI_PDEV_ID_ for values.
  4647. */
  4648. A_UINT32 pdev_id;
  4649. /** freq in MHz of the channel on which this frame was received */
  4650. A_UINT32 chan_freq;
  4651. /* This TLV is followed by array of bytes:
  4652. * A_UINT8 bufp[]; <-- management frame buffer
  4653. */
  4654. /* This TLV is optionally followed by array of struct:
  4655. * wmi_rssi_ctl_ext rssi_ctl_ext;
  4656. */
  4657. /*
  4658. * This TLV is followed by struct:
  4659. * wmi_mgmt_rx_reo_params reo_params;// MGMT rx REO params
  4660. */
  4661. } wmi_mgmt_rx_hdr;
  4662. /* WMI CMD to receive the management filter criteria from the host */
  4663. typedef struct {
  4664. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_mgmt_reo_filter_cmd_fixed_param */
  4665. A_UINT32 pdev_id; /* pdev_id for identifying the MAC */
  4666. /* filter:
  4667. * Each bit represents the possible combination of frame type (2 bits)
  4668. * and subtype (4 bits)
  4669. * There would be 64 such combinations as per the 802.11 standard
  4670. * For Exp : We have beacon frame, we will take the type and subtype
  4671. * of this frame and concatenate the bits, it will give 6 bits
  4672. * number. We need to go to that bit position in the below
  4673. * 2 filter_low and filter_high bitmap and set the bit.
  4674. */
  4675. A_UINT32 filter_low;
  4676. A_UINT32 filter_high;
  4677. } wmi_mgmt_rx_reo_filter_configuration_cmd_fixed_param;
  4678. typedef enum {
  4679. PKT_CAPTURE_MODE_DISABLE = 0,
  4680. PKT_CAPTURE_MODE_MGMT_ONLY,
  4681. PKT_CAPTURE_MODE_DATA_ONLY,
  4682. PKT_CAPTURE_MODE_DATA_MGMT,
  4683. } WMI_PKT_CAPTURE_MODE_CONFIG;
  4684. /* This information sending to host during offloaded MGMT local TX and host TX */
  4685. typedef struct {
  4686. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_hdr */
  4687. /* channel frequency in MHz */
  4688. A_UINT32 chan_freq;
  4689. /** snr information used to cal rssi in dB */
  4690. A_UINT32 snr;
  4691. /** Rate kbps */
  4692. A_UINT32 rate_kbps;
  4693. /** phy mode WLAN_PHY_MODE */
  4694. A_UINT32 phy_mode;
  4695. /** length of the frame in bytes */
  4696. A_UINT32 buf_len;
  4697. /** status:
  4698. * 0x00: CRC ERR
  4699. * 0x08: DECRYPT ERR
  4700. * 0x10: MIC ERR
  4701. * 0x20: KEY CACHE MISS
  4702. */
  4703. A_UINT32 status;
  4704. /** flags:
  4705. * Information about the management frame e.g. can give a scan source
  4706. * for a scan result mgmt frame
  4707. * Refer to WMI_MGMT_RX_HDR_ definitions.
  4708. * ex: WMI_MGMT_RX_HDR_EXTSCAN,WMI_MGMT_RX_HDR_ENLO
  4709. */
  4710. A_UINT32 flags;
  4711. /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
  4712. A_INT32 rssi;
  4713. /** delta between local TSF (TSF timestamp when frame was RXd)
  4714. * and remote TSF (TSF timestamp in the IE for mgmt frame -
  4715. * beacon, proberesp for example). If remote TSF is not available,
  4716. * delta is set to 0.
  4717. * Although tsf_delta is stored as A_UINT32, it can be negative,
  4718. * and thus would need to be sign-extended if added to a value
  4719. * larger than 32 bits.
  4720. */
  4721. A_UINT32 tsf_delta;
  4722. /* The lower 32 bits of the TSF (tsf_l32) is copied by FW from
  4723. * TSF timestamp in the TX MAC descriptor provided by HW.
  4724. */
  4725. A_UINT32 tsf_l32;
  4726. /* The upper 32 bits of the TSF (tsf_u32) is copied by FW from
  4727. * TSF timestamp in the TX MAC descriptor provided by HW.
  4728. */
  4729. A_UINT32 tsf_u32;
  4730. /** pdev_id for identifying the MAC the tx mgmt frame transmitted.
  4731. * See macros starting with WMI_PDEV_ID_ for values.
  4732. */
  4733. A_UINT32 pdev_id;
  4734. A_UINT32 direction; /* tx:0,rx:1*/
  4735. /** tx_status:
  4736. * 0: xmit ok
  4737. * 1: excessive retries
  4738. * 2: blocked by tx filtering
  4739. * 4: fifo underrun
  4740. * 8: swabort
  4741. */
  4742. A_UINT32 tx_status;
  4743. A_UINT32
  4744. /* tx_retry_cnt:
  4745. * Indicates retry count of offloaded/local & host mgmt tx frames.
  4746. * The WMI_MGMT_HDR_TX_RETRY_[SET,GET] macros can be used to access
  4747. * this bitfield in a portable manner.
  4748. */
  4749. tx_retry_cnt:6, /* [5:0] */
  4750. reserved_1:26; /* [31:6] */
  4751. /* This TLV may be followed by array of bytes:
  4752. * A_UINT8 bufp[]; <-- management frame buffer
  4753. */
  4754. } wmi_mgmt_hdr;
  4755. /* Tx retry cnt set & get bits*/
  4756. #define WMI_MGMT_HDR_TX_RETRY_CNT_SET(tx_retry_cnt, value) \
  4757. WMI_SET_BITS(tx_retry_cnt, 0, 6, value)
  4758. #define WMI_MGMT_HDR_TX_RETRY_CNT_GET(tx_retry_cnt) \
  4759. WMI_GET_BITS(tx_retry_cnt, 0, 6)
  4760. /*
  4761. * Instead of universally increasing the RX_HDR_HEADROOM size which may cause problems for older targets,
  4762. * this new ext_hdr can be used for extending the header and will be only applicable for new targets.
  4763. */
  4764. typedef struct
  4765. {
  4766. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_rssi_ctl_ext */
  4767. /** RSSI of PRI 20MHz for each chain, in dB w.r.t. noise floor */
  4768. A_UINT32 rssi_ctl_ext[MAX_ANTENNA_EIGHT - ATH_MAX_ANTENNA];
  4769. } wmi_rssi_ctl_ext;
  4770. typedef struct {
  4771. /** TSF timestamp */
  4772. A_UINT32 tsf_timestamp;
  4773. /**
  4774. * Current freq1, freq2
  4775. *
  4776. * [7:0]: freq1[lo]
  4777. * [15:8] : freq1[hi]
  4778. * [23:16]: freq2[lo]
  4779. * [31:24]: freq2[hi]
  4780. */
  4781. A_UINT32 freq_info_1;
  4782. /**
  4783. * Combined RSSI over all chains and channel width for this PHY error
  4784. *
  4785. * [7:0]: RSSI combined
  4786. * [15:8]: Channel width (MHz)
  4787. * [23:16]: PHY error code
  4788. * [24:16]: reserved (future use)
  4789. */
  4790. A_UINT32 freq_info_2;
  4791. /**
  4792. * RSSI on chain 0 through 3
  4793. *
  4794. * This is formatted the same as the PPDU_START RX descriptor
  4795. * field:
  4796. *
  4797. * [7:0]: pri20
  4798. * [15:8]: sec20
  4799. * [23:16]: sec40
  4800. * [31:24]: sec80
  4801. */
  4802. A_UINT32 rssi_chain0;
  4803. A_UINT32 rssi_chain1;
  4804. A_UINT32 rssi_chain2;
  4805. A_UINT32 rssi_chain3;
  4806. /**
  4807. * Last calibrated NF value for chain 0 through 3
  4808. *
  4809. * nf_list_1:
  4810. *
  4811. * + [15:0] - chain 0
  4812. * + [31:16] - chain 1
  4813. *
  4814. * nf_list_2:
  4815. *
  4816. * + [15:0] - chain 2
  4817. * + [31:16] - chain 3
  4818. */
  4819. A_UINT32 nf_list_1;
  4820. A_UINT32 nf_list_2;
  4821. /** Length of the frame */
  4822. A_UINT32 buf_len;
  4823. } wmi_single_phyerr_rx_hdr;
  4824. typedef struct {
  4825. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_single_phyerr_ext_rx_hdr */
  4826. /**
  4827. * RSSI on chain 4 through 7 in dB w.r.t noise floor.
  4828. *
  4829. * This is formatted the same as the PPDU_START RX descriptor
  4830. * field:
  4831. *
  4832. * [7:0]: pri20
  4833. * [15:8]: sec20
  4834. * [23:16]: sec40
  4835. * [31:24]: sec80
  4836. */
  4837. A_UINT32 rssi_chain4;
  4838. A_UINT32 rssi_chain5;
  4839. A_UINT32 rssi_chain6;
  4840. A_UINT32 rssi_chain7;
  4841. /**
  4842. * Last calibrated NF value for chain 4 through 7 in dbm
  4843. *
  4844. * nf_list_3:
  4845. * + [15:0] - chain 4
  4846. * + [31:16] - chain 5
  4847. *
  4848. * nf_list_4:
  4849. * + [15:0] - chain 6
  4850. * + [31:16] - chain 7
  4851. *
  4852. * Each chain's noise floor is stored as a sign-extended (negative)
  4853. * value in dBm units.
  4854. */
  4855. A_UINT32 nf_list_3;
  4856. A_UINT32 nf_list_4;
  4857. } wmi_single_phyerr_ext_rx_hdr;
  4858. #define WMI_UNIFIED_FREQINFO_1_LO 0x000000ff
  4859. #define WMI_UNIFIED_FREQINFO_1_LO_S 0
  4860. #define WMI_UNIFIED_FREQINFO_1_HI 0x0000ff00
  4861. #define WMI_UNIFIED_FREQINFO_1_HI_S 8
  4862. #define WMI_UNIFIED_FREQINFO_2_LO 0x00ff0000
  4863. #define WMI_UNIFIED_FREQINFO_2_LO_S 16
  4864. #define WMI_UNIFIED_FREQINFO_2_HI 0xff000000
  4865. #define WMI_UNIFIED_FREQINFO_2_HI_S 24
  4866. /*
  4867. * Please keep in mind that these _SET macros break macro side effect
  4868. * assumptions; don't be clever with them.
  4869. */
  4870. #define WMI_UNIFIED_FREQ_INFO_GET(hdr, f) \
  4871. (WMI_F_MS((hdr)->freq_info_1, \
  4872. WMI_UNIFIED_FREQINFO_##f##_LO) \
  4873. | (WMI_F_MS((hdr)->freq_info_1, \
  4874. WMI_UNIFIED_FREQINFO_##f##_HI) << 8))
  4875. #define WMI_UNIFIED_FREQ_INFO_SET(hdr, f, v) \
  4876. do { \
  4877. WMI_F_RMW((hdr)->freq_info_1, (v) & 0xff, \
  4878. WMI_UNIFIED_FREQINFO_##f##_LO); \
  4879. WMI_F_RMW((hdr)->freq_info_1, ((v) >> 8) & 0xff, \
  4880. WMI_UNIFIED_FREQINFO_##f##_HI); \
  4881. } while (0)
  4882. #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB 0x000000ff
  4883. #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB_S 0
  4884. #define WMI_UNIFIED_FREQINFO_2_CHWIDTH 0x0000ff00
  4885. #define WMI_UNIFIED_FREQINFO_2_CHWIDTH_S 8
  4886. #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE 0x00ff0000
  4887. #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE_S 16
  4888. #define WMI_UNIFIED_RSSI_COMB_GET(hdr) \
  4889. ((int8_t) (WMI_F_MS((hdr)->freq_info_2, \
  4890. WMI_UNIFIED_FREQINFO_2_RSSI_COMB)))
  4891. #define WMI_UNIFIED_RSSI_COMB_SET(hdr, v) \
  4892. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  4893. WMI_UNIFIED_FREQINFO_2_RSSI_COMB);
  4894. #define WMI_UNIFIED_CHWIDTH_GET(hdr) \
  4895. WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_CHWIDTH)
  4896. #define WMI_UNIFIED_CHWIDTH_SET(hdr, v) \
  4897. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  4898. WMI_UNIFIED_FREQINFO_2_CHWIDTH);
  4899. #define WMI_UNIFIED_PHYERRCODE_GET(hdr) \
  4900. WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_PHYERRCODE)
  4901. #define WMI_UNIFIED_PHYERRCODE_SET(hdr, v) \
  4902. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  4903. WMI_UNIFIED_FREQINFO_2_PHYERRCODE);
  4904. #define WMI_UNIFIED_CHAIN_0 0x0000ffff
  4905. #define WMI_UNIFIED_CHAIN_0_S 0
  4906. #define WMI_UNIFIED_CHAIN_1 0xffff0000
  4907. #define WMI_UNIFIED_CHAIN_1_S 16
  4908. #define WMI_UNIFIED_CHAIN_2 0x0000ffff
  4909. #define WMI_UNIFIED_CHAIN_2_S 0
  4910. #define WMI_UNIFIED_CHAIN_3 0xffff0000
  4911. #define WMI_UNIFIED_CHAIN_3_S 16
  4912. #define WMI_UNIFIED_CHAIN_4 0x0000ffff
  4913. #define WMI_UNIFIED_CHAIN_4_S 0
  4914. #define WMI_UNIFIED_CHAIN_5 0xffff0000
  4915. #define WMI_UNIFIED_CHAIN_5_S 16
  4916. #define WMI_UNIFIED_CHAIN_6 0x0000ffff
  4917. #define WMI_UNIFIED_CHAIN_6_S 0
  4918. #define WMI_UNIFIED_CHAIN_7 0xffff0000
  4919. #define WMI_UNIFIED_CHAIN_7_S 16
  4920. #define WMI_UNIFIED_CHAIN_0_FIELD nf_list_1
  4921. #define WMI_UNIFIED_CHAIN_1_FIELD nf_list_1
  4922. #define WMI_UNIFIED_CHAIN_2_FIELD nf_list_2
  4923. #define WMI_UNIFIED_CHAIN_3_FIELD nf_list_2
  4924. #define WMI_UNIFIED_CHAIN_4_FIELD nf_list_3
  4925. #define WMI_UNIFIED_CHAIN_5_FIELD nf_list_3
  4926. #define WMI_UNIFIED_CHAIN_6_FIELD nf_list_4
  4927. #define WMI_UNIFIED_CHAIN_7_FIELD nf_list_4
  4928. #define WMI_UNIFIED_NF_CHAIN_GET(hdr, c) \
  4929. ((int16_t) (WMI_F_MS((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD, \
  4930. WMI_UNIFIED_CHAIN_##c)))
  4931. #define WMI_UNIFIED_NF_CHAIN_SET(hdr, c, nf) \
  4932. WMI_F_RMW((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD, (nf) & 0xffff, \
  4933. WMI_UNIFIED_CHAIN_##c);
  4934. /*
  4935. * For now, this matches what the underlying hardware is doing.
  4936. * Update ar6000ProcRxDesc() to use these macros when populating
  4937. * the rx descriptor and then we can just copy the field over
  4938. * to the WMI PHY notification without worrying about breaking
  4939. * things.
  4940. */
  4941. #define WMI_UNIFIED_RSSI_CHAN_PRI20 0x000000ff
  4942. #define WMI_UNIFIED_RSSI_CHAN_PRI20_S 0
  4943. #define WMI_UNIFIED_RSSI_CHAN_SEC20 0x0000ff00
  4944. #define WMI_UNIFIED_RSSI_CHAN_SEC20_S 8
  4945. #define WMI_UNIFIED_RSSI_CHAN_SEC40 0x00ff0000
  4946. #define WMI_UNIFIED_RSSI_CHAN_SEC40_S 16
  4947. #define WMI_UNIFIED_RSSI_CHAN_SEC80 0xff000000
  4948. #define WMI_UNIFIED_RSSI_CHAN_SEC80_S 24
  4949. #define WMI_UNIFIED_RSSI_CHAN_SET(hdr, c, ch, rssi) \
  4950. WMI_F_RMW((hdr)->rssi_chain##c, (rssi) & 0xff, \
  4951. WMI_UNIFIED_RSSI_CHAN_##ch);
  4952. #define WMI_UNIFIED_RSSI_CHAN_GET(hdr, c, ch) \
  4953. ((int8_t) (WMI_F_MS((hdr)->rssi_chain##c, \
  4954. WMI_UNIFIED_RSSI_CHAN_##ch)))
  4955. #define WMI_UNIFIED_CHAIN_RSSI_GET(tlv, chain_idx, band) \
  4956. ((A_INT8) WMI_F_MS((tlv)->chain_rssi[chain_idx], WMI_UNIFIED_RSSI_CHAN_ ## band))
  4957. typedef struct {
  4958. /** Phy error event header */
  4959. wmi_single_phyerr_rx_hdr hdr;
  4960. /** frame buffer */
  4961. A_UINT8 bufp[1];
  4962. } wmi_single_phyerr_rx_event;
  4963. /* PHY ERROR MASK 0 */
  4964. /* bits 1:0 defined but not published */
  4965. #define WMI_PHY_ERROR_MASK0_RADAR (1 << 2)
  4966. /* bits 23:3 defined but not published */
  4967. #define WMI_PHY_ERROR_MASK0_FALSE_RADAR_EXT (1 << 24)
  4968. /* bits 25:24 defined but not published */
  4969. #define WMI_PHY_ERROR_MASK0_SPECTRAL_SCAN (1 << 26)
  4970. /* bits 31:27 defined but not published */
  4971. /* PHY ERROR MASK 1 */
  4972. /* bits 13:0 defined but not published */
  4973. /* bits 31:14 reserved */
  4974. /* PHY ERROR MASK 2 */
  4975. /* bits 31:0 reserved */
  4976. typedef struct {
  4977. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_comb_phyerr_rx_hdr */
  4978. /** Phy error phy error count */
  4979. A_UINT32 num_phyerr_events;
  4980. A_UINT32 tsf_l32;
  4981. A_UINT32 tsf_u32;
  4982. A_UINT32 buf_len;
  4983. union {
  4984. A_UINT32 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
  4985. /** pdev_id for identifying the MAC
  4986. * See macros starting with WMI_PDEV_ID_ for values.
  4987. */
  4988. A_UINT32 pdev_id;
  4989. };
  4990. A_UINT32 rsPhyErrMask0; /* see WMI_PHY_ERROR_MASK0 */
  4991. A_UINT32 rsPhyErrMask1; /* see WMI_PHY_ERROR_MASK1 */
  4992. A_UINT32 rsPhyErrMask2; /* see WMI_PHY_ERROR_MASK2 */
  4993. /* This TLV is followed by array of bytes:
  4994. * frame buffer - contains multiple payloads in the order:
  4995. * header - payload, header - payload...
  4996. * (The header is of type: wmi_single_phyerr_rx_hdr)
  4997. * A_UINT8 bufp[];
  4998. * The extension hdr will repeat num_phyerr_events of times
  4999. * and will have 1:1 mapping with above header. i.e the 1st
  5000. * ext_rx_hdr will belong to 1st phyerr_rx_hdr and so on.
  5001. * wmi_single_phyerr_ext_rx_hdr single_phyerr_ext;
  5002. */
  5003. } wmi_comb_phyerr_rx_hdr;
  5004. /* WMI MGMT TX */
  5005. typedef struct {
  5006. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_hdr */
  5007. /** unique id identifying the VDEV, generated by the caller */
  5008. A_UINT32 vdev_id;
  5009. /** peer MAC address */
  5010. wmi_mac_addr peer_macaddr;
  5011. /** xmit rate */
  5012. A_UINT32 tx_rate;
  5013. /** xmit power */
  5014. A_UINT32 tx_power;
  5015. /** Buffer length in bytes */
  5016. A_UINT32 buf_len;
  5017. /* This TLV is followed by array of bytes:
  5018. * A_UINT8 bufp[]; <-- management frame buffer
  5019. */
  5020. } wmi_mgmt_tx_hdr;
  5021. #define WMI_TX_SEND_PARAM_PWR_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 0, 8)
  5022. #define WMI_TX_SEND_PARAM_PWR_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 0, 8, value)
  5023. #define WMI_TX_SEND_PARAM_MCS_MASK_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 8, 12)
  5024. #define WMI_TX_SEND_PARAM_MCS_MASK_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 8, 12, value)
  5025. #define WMI_TX_SEND_PARAM_NSS_MASK_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 20, 8)
  5026. #define WMI_TX_SEND_PARAM_NSS_MASK_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 20, 8, value)
  5027. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 28, 4)
  5028. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 28, 4, value)
  5029. #define WMI_TX_SEND_PARAM_CHAIN_MASK_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 0, 8)
  5030. #define WMI_TX_SEND_PARAM_CHAIN_MASK_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 0, 8, value)
  5031. #define WMI_TX_SEND_PARAM_BW_MASK_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 8, 7)
  5032. #define WMI_TX_SEND_PARAM_BW_MASK_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 8, 7, value)
  5033. #define WMI_TX_SEND_PARAM_PREAMBLE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 15, 5)
  5034. #define WMI_TX_SEND_PARAM_PREAMBLE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 15, 5, value)
  5035. #define WMI_TX_SEND_PARAM_FRAME_TYPE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 20, 1)
  5036. #define WMI_TX_SEND_PARAM_FRAME_TYPE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 20, 1, value)
  5037. #define WMI_TX_SEND_PARAM_CFR_CAPTURE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 21, 1)
  5038. #define WMI_TX_SEND_PARAM_CFR_CAPTURE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 21, 1, value)
  5039. #define WMI_TX_SEND_PARAM_BEAMFORM_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 22, 1)
  5040. #define WMI_TX_SEND_PARAM_BEAMFORM_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 22, 1, value)
  5041. /* TX_SEND flags:
  5042. * Bit 0: set wrong txkey
  5043. * There is one special WFA test case in STA or AP, setting wrong txkey
  5044. * in disassoc or deauth with PMF enabled to verify if peer disconnected
  5045. */
  5046. #define WMI_TX_SEND_FLAG_SET_WRONG_KEY 0x00000001
  5047. #define WMI_TX_SEND_FLAG_SET_WRONG_KEY_GET(tx_flags) WMI_GET_BITS(tx_flags, 0, 1)
  5048. #define WMI_TX_SEND_FLAG_SET_WRONG_KEY_SET(tx_flags, value) WMI_SET_BITS(tx_flags, 0, 1, value)
  5049. typedef struct {
  5050. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_send_params */
  5051. union {
  5052. struct {
  5053. /* DWORD 0: tx power, tx rate, retry_limit */
  5054. A_UINT32
  5055. /* pwr -
  5056. * Specify what power the tx frame needs to be transmitted at.
  5057. * The power a signed (two's complement) value is in units of 0.5 dBm.
  5058. * The value needs to be appropriately sign-extended when extracting
  5059. * the value from the message and storing it in a variable that is
  5060. * larger than A_INT8. (fw automatically handles this sign-extension.)
  5061. * If the transmission uses multiple tx chains, this power spec is
  5062. * the total transmit power, assuming incoherent combination of
  5063. * per-chain power to produce the total power.
  5064. */
  5065. pwr: 8,
  5066. /* mcs_mask -
  5067. * Specify the allowable values for MCS index (modulation and coding)
  5068. * to use for transmitting the frame.
  5069. *
  5070. * For HT / VHT preamble types, this mask directly corresponds to
  5071. * the HT or VHT MCS indices that are allowed. For each bit N set
  5072. * within the mask, MCS index N is allowed for transmitting the frame.
  5073. * For legacy CCK and OFDM rates, separate bits are provided for CCK
  5074. * rates versus OFDM rates, so the host has the option of specifying
  5075. * that the target must transmit the frame with CCK or OFDM rates
  5076. * (not HT or VHT), but leaving the decision to the target whether
  5077. * to use CCK or OFDM.
  5078. *
  5079. * For CCK and OFDM, the bits within this mask are interpreted as
  5080. * follows:
  5081. * bit 0 -> CCK 1 Mbps rate is allowed
  5082. * bit 1 -> CCK 2 Mbps rate is allowed
  5083. * bit 2 -> CCK 5.5 Mbps rate is allowed
  5084. * bit 3 -> CCK 11 Mbps rate is allowed
  5085. * bit 4 -> OFDM BPSK modulation, 1/2 coding rate is allowed
  5086. * bit 5 -> OFDM BPSK modulation, 3/4 coding rate is allowed
  5087. * bit 6 -> OFDM QPSK modulation, 1/2 coding rate is allowed
  5088. * bit 7 -> OFDM QPSK modulation, 3/4 coding rate is allowed
  5089. * bit 8 -> OFDM 16-QAM modulation, 1/2 coding rate is allowed
  5090. * bit 9 -> OFDM 16-QAM modulation, 3/4 coding rate is allowed
  5091. * bit 10 -> OFDM 64-QAM modulation, 2/3 coding rate is allowed
  5092. * bit 11 -> OFDM 64-QAM modulation, 3/4 coding rate is allowed
  5093. *
  5094. * The MCS index specification needs to be compatible with the
  5095. * bandwidth mask specification. For example, a MCS index == 9
  5096. * specification is inconsistent with a preamble type == VHT,
  5097. * Nss == 1, and channel bandwidth == 20 MHz.
  5098. *
  5099. * Furthermore, the host has only a limited ability to specify to
  5100. * the target to select from HT + legacy rates, or VHT + legacy rates,
  5101. * since this mcs_mask can specify either HT/VHT rates or legacy rates.
  5102. * If no bits are set, target can choose what MCS type to use.
  5103. */
  5104. mcs_mask: 12,
  5105. /* nss_mask -
  5106. * Specify which numbers of spatial streams (MIMO factor) are permitted.
  5107. * Each bit in this mask corresponds to a Nss value:
  5108. * bit 0: if set, Nss = 1 (non-MIMO) is permitted
  5109. * bit 1: if set, Nss = 2 (2x2 MIMO) is permitted
  5110. * bit 2: if set, Nss = 3 (3x3 MIMO) is permitted
  5111. * bit 3: if set, Nss = 4 (4x4 MIMO) is permitted
  5112. * bit 4: if set, Nss = 5 (5x5 MIMO) is permitted
  5113. * bit 5: if set, Nss = 6 (6x6 MIMO) is permitted
  5114. * bit 6: if set, Nss = 7 (7x7 MIMO) is permitted
  5115. * bit 7: if set, Nss = 8 (8x8 MIMO) is permitted
  5116. * The values in the Nss mask must be suitable for the recipient, e.g.
  5117. * a value of 0x4 (Nss = 3) cannot be specified for a tx frame to a
  5118. * recipient which only supports 2x2 MIMO.
  5119. * If no bits are set, target can choose what NSS type to use.
  5120. */
  5121. nss_mask: 8,
  5122. /* retry_limit -
  5123. * Specify the maximum number of transmissions, including the
  5124. * initial transmission, to attempt before giving up if no ack
  5125. * is received.
  5126. * If the tx rate is specified, then all retries shall use the
  5127. * same rate as the initial transmission.
  5128. * If no tx rate is specified, the target can choose whether to
  5129. * retain the original rate during the retransmissions, or to
  5130. * fall back to a more robust rate.
  5131. */
  5132. retry_limit: 4;
  5133. };
  5134. A_UINT32 tx_param_dword0;
  5135. };
  5136. union {
  5137. struct {
  5138. /* DWORD 1: tx chain mask, preamble_type, tx BW */
  5139. A_UINT32
  5140. /* chain_mask - specify which chains to transmit from
  5141. * If not set, target will choose what chain_mask to use.
  5142. */
  5143. chain_mask: 8,
  5144. /* The bits in this mask correspond to the values as below
  5145. * bit 0 -> 5MHz
  5146. * bit 1 -> 10MHz
  5147. * bit 2 -> 20MHz
  5148. * bit 3 -> 40MHz
  5149. * bit 4 -> 80MHz
  5150. * bit 5 -> 160MHz
  5151. * bit 6 -> 80_80MHz
  5152. * If no bits are set, target can choose what BW to use.
  5153. */
  5154. bw_mask: 7,
  5155. /* preamble_type_mask -
  5156. * Specify which preamble types (CCK, OFDM, HT, VHT) the target
  5157. * may choose from for transmitting this frame.
  5158. * Each bit in this mask corresponds to a preamble_type value:
  5159. * bit 0: if set, OFDM
  5160. * bit 1: if set, CCK
  5161. * bit 2: if set, HT
  5162. * bit 3: if set, VHT
  5163. * bit 4: if set, HE
  5164. * If no bits are set, target can choose what preamble type to use.
  5165. */
  5166. preamble_type: 5,
  5167. /* Data:1 Mgmt:0 */
  5168. frame_type: 1,
  5169. /* Capture CFR when bit is set */
  5170. cfr_capture: 1,
  5171. /* Enables Beamforming when bit is set */
  5172. en_beamforming: 1,
  5173. reserved1_31_23: 9;
  5174. };
  5175. A_UINT32 tx_param_dword1;
  5176. };
  5177. } wmi_tx_send_params;
  5178. #define WMI_MLO_MGMT_TID 0xFFFFFFFF
  5179. typedef struct {
  5180. A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_mlo_tx_send_params) and len */
  5181. A_UINT32 hw_link_id; /** Unique link id across SOCs, provided by QMI handshake.
  5182. * If WMI_MLO_MGMT_TID then the frame will be queued in the MLO queue
  5183. * If valid hw_link_id
  5184. */
  5185. } wmi_mlo_tx_send_params;
  5186. typedef struct {
  5187. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_send_cmd_fixed_param */
  5188. A_UINT32 vdev_id;
  5189. A_UINT32 desc_id; /* echoed in tx_compl_event */
  5190. A_UINT32 chanfreq; /* MHz units */
  5191. /* WMI_MGMT_TX_SEND_CMDID is used for both pass by value and
  5192. * pass by reference WMI management frames.
  5193. *
  5194. * a) If the command is for pass by reference,
  5195. * paddr_lo and padd_hi will hold the address of remote/host buffer
  5196. * b) If the command is for pass by value,
  5197. * paddr_lo and paddr_hi will be NULL.
  5198. */
  5199. A_UINT32 paddr_lo;
  5200. A_UINT32 paddr_hi;
  5201. A_UINT32 frame_len;
  5202. A_UINT32 buf_len; /** Buffer length in bytes */
  5203. /*
  5204. * The frame which will have tx_params_valid set will be always be RAW
  5205. * frame, as it will be tx'ed on non-pause tid
  5206. */
  5207. A_UINT32 tx_params_valid;
  5208. /* tx_flags:
  5209. * Extra flags when tx_params_valid is 0.
  5210. * Refer to WMI_TX_SEND_FLAG_xxx defs regarding the meaning of the
  5211. * bits within this field.
  5212. */
  5213. A_UINT32 tx_flags;
  5214. /* peer_rssi:
  5215. * If non-zero, indicates saved peer beacon/probe resp RSSI (dBm units)
  5216. * ONLY for init connection auth/assoc pkt.
  5217. */
  5218. A_INT32 peer_rssi;
  5219. /* This TLV is followed by array of bytes: First 64 bytes of management frame
  5220. * A_UINT8 bufp[];
  5221. */
  5222. /* This TLV is followed by wmi_tx_send_params
  5223. * wmi_tx_send_params tx_send_params;
  5224. * wmi_mlo_tx_send_params mlo_tx_send_params[];
  5225. */
  5226. } wmi_mgmt_tx_send_cmd_fixed_param;
  5227. typedef struct {
  5228. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offchan_data_tx_send_cmd_fixed_param */
  5229. A_UINT32 vdev_id;
  5230. A_UINT32 desc_id; /* echoed in tx_compl_event */
  5231. A_UINT32 chanfreq; /* MHz units */
  5232. A_UINT32 paddr_lo;
  5233. A_UINT32 paddr_hi;
  5234. A_UINT32 frame_len;
  5235. A_UINT32 buf_len; /** Buffer length in bytes */
  5236. /* The frame which will have tx_params_valid set will be always be RAW
  5237. * frame, as it will be tx'ed on non-pause tid
  5238. */
  5239. A_UINT32 tx_params_valid;
  5240. /* This TLV is followed by array of bytes: First 64 bytes of frame
  5241. * A_UINT8 bufp[];
  5242. */
  5243. /* This TLV is followed by wmi_tx_send_params
  5244. * wmi_tx_send_params tx_send_params;
  5245. */
  5246. } wmi_offchan_data_tx_send_cmd_fixed_param;
  5247. typedef struct {
  5248. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_qos_null_frame_tx_send_cmd_fixed_param */
  5249. A_UINT32 vdev_id;
  5250. A_UINT32 desc_id; /* echoed in tx_compl_event */
  5251. A_UINT32 paddr_lo; /* paddr_lo and padd_hi will hold the address of remote/host buffer, which is physical address of frame */
  5252. A_UINT32 paddr_hi;
  5253. A_UINT32 frame_len; /* Actual length of frame in bytes*/
  5254. A_UINT32 buf_len; /** Buffer length in bytes, length of data DMA'ed to FW from host */
  5255. /* This fixed_param TLV is followed by the TLVs listed below:
  5256. * 1. ARRAY_BYTE TLV: First buf_len (expected to be 64) bytes of frame
  5257. * A_UINT8 bufp[];
  5258. * 2. wmi_tx_send_params tx_send_params;
  5259. */
  5260. } wmi_qos_null_frame_tx_send_cmd_fixed_param;
  5261. typedef struct {
  5262. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_event_fixed_param */
  5263. A_UINT32 value;
  5264. } wmi_echo_event_fixed_param;
  5265. typedef struct {
  5266. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_cmd_fixed_param */
  5267. A_UINT32 value;
  5268. } wmi_echo_cmd_fixed_param;
  5269. typedef struct {
  5270. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param */
  5271. /** pdev_id for identifying the MAC
  5272. * See macros starting with WMI_PDEV_ID_ for values.
  5273. */
  5274. A_UINT32 pdev_id;
  5275. /** reg domain code */
  5276. A_UINT32 reg_domain;
  5277. A_UINT32 reg_domain_2G;
  5278. A_UINT32 reg_domain_5G;
  5279. A_UINT32 conformance_test_limit_2G;
  5280. A_UINT32 conformance_test_limit_5G;
  5281. A_UINT32 dfs_domain;
  5282. /**
  5283. * The below conformance_test_limit index fields are for supporting the
  5284. * 5G sub-band CTL feature.
  5285. * Conformance test limits (CTLs) are the product-specific
  5286. * regulatory-compliant powers stored in the board data file (BDF).
  5287. * These CTLs within the BDF are identified by CTL index values.
  5288. * For example, the BDF file is expected to contain CTL data for
  5289. * FCC (CTL index = 0x10), ETSI (CTL index = 0x30),
  5290. * Japan/MKK (CTL index = 0x40), Korea (CTL index = 0x50),
  5291. * and China (CTL index = 0x60) CTL regions.
  5292. * The target FW will use the CTL indices specified in this message to
  5293. * find a BDF CTL entry with a matching CTL index value, and then use
  5294. * that CTL as one of the inputs into the tx power limit computation.
  5295. * A CTL index value of 0x0 is invalid, and will be ignored by the FW.
  5296. */
  5297. A_UINT32 conformance_test_limit_5G_subband_UNII1;
  5298. A_UINT32 conformance_test_limit_5G_subband_UNII2a;
  5299. A_UINT32 conformance_test_limit_5G_subband_UNII2c;
  5300. A_UINT32 conformance_test_limit_5G_subband_UNII3;
  5301. A_UINT32 conformance_test_limit_5G_subband_UNII4;
  5302. /**
  5303. * The below conformance_test_limit index fields are like the above,
  5304. * but are for supporting the 6G sub-band CTL feature.
  5305. */
  5306. A_UINT32 conformance_test_limit_6G_subband_UNII5;
  5307. A_UINT32 conformance_test_limit_6G_subband_UNII6;
  5308. A_UINT32 conformance_test_limit_6G_subband_UNII7;
  5309. A_UINT32 conformance_test_limit_6G_subband_UNII8;
  5310. } wmi_pdev_set_regdomain_cmd_fixed_param;
  5311. typedef struct {
  5312. /** TRUE for scan start and flase for scan end */
  5313. A_UINT32 scan_start;
  5314. } wmi_pdev_scan_cmd;
  5315. /* WMI support for setting ratemask in target */
  5316. typedef struct {
  5317. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_config_ratemask_fixed_param */
  5318. A_UINT32 vdev_id;
  5319. /*
  5320. * 0 - cck/ofdm
  5321. * 1 - HT
  5322. * 2 - VHT
  5323. * 3 - HE
  5324. */
  5325. A_UINT32 type;
  5326. A_UINT32 mask_lower32;
  5327. A_UINT32 mask_higher32;
  5328. A_UINT32 mask_lower32_2;
  5329. A_UINT32 mask_higher32_2;
  5330. } wmi_vdev_config_ratemask_cmd_fixed_param;
  5331. /* nrp action - Filter Neighbor Rx Packets - add/remove filter */
  5332. enum {
  5333. WMI_FILTER_NRP_ACTION_ADD = 0x1,
  5334. WMI_FILTER_NRP_ACTION_REMOVE = 0x2,
  5335. WMI_FILTER_NRP_ACTION_GET_LIST = 0x3,
  5336. }; /* nrp - Neighbor Rx Packets */
  5337. /* nrp type - Filter Neighbor Rx Packets - ap/client addr */
  5338. enum {
  5339. WMI_FILTER_NRP_TYPE_AP_BSSID = 0x1,
  5340. WMI_FILTER_NRP_TYPE_STA_MACADDR = 0x2,
  5341. };
  5342. /* nrp flag - Filter Neighbor Rx Packets
  5343. * (capture flag, 2 & 3 not initially supported)
  5344. */
  5345. enum {
  5346. WMI_FILTER_NRP_CAPTURE_ONLY_RX_PACKETS = 0x1,
  5347. WMI_FILTER_NRP_CAPTURE_ONLY_TX_PACKETS = 0x2,
  5348. WMI_FILTER_NRP_CAPTURE_BOTH_TXRX_PACKETS = 0x3,
  5349. };
  5350. typedef struct {
  5351. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_filter_nrp_config_cmd_fixed_param */
  5352. A_UINT32 vdev_id;
  5353. /* AP Bssid or Client Mac-addr */
  5354. wmi_mac_addr addr;
  5355. /* Add/Remove NRF Filter */
  5356. A_UINT32 action; /* WMI_FILTER_NRP_ACTION enum */
  5357. /* client/ap filter */
  5358. A_UINT32 type; /* WMI_FILTER_NRP_TYPE enum */
  5359. /* optional - tx/rx capture */
  5360. A_UINT32 flag; /* WMI_FILTER_NRP_CAPTURE enum */
  5361. /* BSSID index - index of the BSSID register */
  5362. A_UINT32 bssid_idx;
  5363. } wmi_vdev_filter_nrp_config_cmd_fixed_param; /* Filter for Neighbor Rx Packets */
  5364. /*Command to set/unset chip in quiet mode*/
  5365. typedef struct {
  5366. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_quiet_cmd_fixed_param */
  5367. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  5368. A_UINT32 period; /*period in TUs*/
  5369. A_UINT32 duration; /*duration in TUs*/
  5370. A_UINT32 next_start; /*offset in TUs*/
  5371. A_UINT32 enabled; /*enable/disable*/
  5372. } wmi_pdev_set_quiet_cmd_fixed_param;
  5373. typedef struct {
  5374. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_quiet_cmd_fixed_param */
  5375. A_UINT32 vdev_id; /* Virtual interface ID */
  5376. A_UINT32 period; /* period in TUs */
  5377. A_UINT32 duration; /* duration in TUs */
  5378. A_UINT32 next_start; /* offset in TUs */
  5379. A_UINT32 enabled; /* enable/disable */
  5380. } wmi_vdev_set_quiet_cmd_fixed_param;
  5381. /*
  5382. * START_STOP flag value: 1 - Start, 0 - Stop
  5383. */
  5384. #define WMI_OFFLOAD_QUIET_FLAG_START_STOP 0x00000001
  5385. /*
  5386. * ONE_SHOT flag value: 1 - One shot, 0 - Repeat
  5387. * This flag is only relevant if the START_STOP flag == 1 (start).
  5388. */
  5389. #define WMI_OFFLOAD_QUIET_FLAG_ONE_SHOT 0x00000002
  5390. /*
  5391. * Enable/Disable sending Quiet IE info in SWBA event from the target
  5392. * 0 - Don't include Quiet IE in WMI SWBA Event
  5393. * 1 - Include Quiet IE in WMI SWBA Event
  5394. */
  5395. #define WMI_OFFLOAD_QUIET_FLAG_INFO_IN_SWBA_START_STOP 0x00000004
  5396. typedef struct {
  5397. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_bcn_offload_ml_quiet_config_params */
  5398. A_UINT32 vdev_id; /* partner vdev_id */
  5399. A_UINT32 hw_link_id; /* hw_link_id: Unique link id across SOCs, got as part of QMI handshake */
  5400. A_UINT32 beacon_interval; /* beacon interval in TU from received beacon of the partner link */
  5401. A_UINT32 period; /* period in TUs */
  5402. A_UINT32 duration; /* duration in TUs */
  5403. A_UINT32 next_start; /* offset in TUs from beacon */
  5404. A_UINT32 flags; /* STOP or START (and single vs. repeated) Quiet IE
  5405. * See WMI_OFFLOAD_QUIET_FLAG_xxx defs.
  5406. */
  5407. } wmi_vdev_bcn_offload_ml_quiet_config_params;
  5408. typedef struct {
  5409. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_bcn_offload_quiet_config_cmd_fixed_param */
  5410. A_UINT32 vdev_id; /* Virtual interface ID */
  5411. A_UINT32 period; /* period in TUs */
  5412. A_UINT32 duration; /* duration in TUs */
  5413. A_UINT32 next_start; /* offset in TUs from beacon */
  5414. A_UINT32 flags; /* STOP or START (and single vs. repeated) Quiet IE
  5415. * See WMI_OFFLOAD_QUIET_FLAG_xxx defs.
  5416. */
  5417. /*
  5418. * This TLV is optionally followed by array of wmi_vdev_bcn_offload_ml_quiet_config_params struct
  5419. * wmi_vdev_bcn_offload_ml_quiet_config_params will have multiple instances equal to num of links in an AP MLD
  5420. * wmi_vdev_bcn_offload_ml_quiet_config_params ml_quiet_param[];
  5421. */
  5422. } wmi_vdev_bcn_offload_quiet_config_cmd_fixed_param;
  5423. typedef struct {
  5424. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_custom_aggr_size_cmd_fixed_param */
  5425. A_UINT32 vdev_id; /* vdev id indicating to which the vdev custom aggregation size will be applied. */
  5426. /* Size for tx aggregation for the vdev mentioned in vdev id
  5427. * (max MPDUs per A-MPDU or max MSDUs per A-MSDU based on aggr_type field)
  5428. */
  5429. A_UINT32 tx_aggr_size;
  5430. A_UINT32 rx_aggr_size; /* Size for rx aggregation (block ack window size limit) for the vdev mentioned in vdev id */
  5431. /*
  5432. * To set TX aggregation size limits per VDEV per AC
  5433. * bits 1:0 (ac):
  5434. * Access Category (0x0=BE, 0x1=BK, 0x2=VI, 0x3=VO)
  5435. * If tx_ac_enable bit is not set, tx_aggr_size is applied
  5436. * for all Access Categories
  5437. * bit 2 (aggr_type): TX Aggregation Type (0=A-MPDU, 1=A-MSDU)
  5438. * bit 3 (tx_aggr_size_disable): If set tx_aggr_size is invalid
  5439. * bit 4 (rx_aggr_size_disable): If set rx_aggr_size is invalid
  5440. * bit 5 (tx_ac_enable): If set, above ac bitmap is valid.
  5441. * bit 6 (256 BA support enable) If set, Default 256 BA size is expected
  5442. * from host
  5443. * bit 7 (1024 BA support enable) If set, Default 1024 BA size is expected
  5444. * from host
  5445. * bits 31:8: Reserved bits. should be set to zero.
  5446. */
  5447. A_UINT32 enable_bitmap;
  5448. } wmi_vdev_set_custom_aggr_size_cmd_fixed_param;
  5449. typedef enum {
  5450. WMI_VDEV_CUSTOM_AGGR_TYPE_AMPDU = 0,
  5451. WMI_VDEV_CUSTOM_AGGR_TYPE_AMSDU = 1,
  5452. WMI_VDEV_CUSTOM_AGGR_TYPE_MAX,
  5453. } wmi_vdev_custom_aggr_type_t;
  5454. #define WMI_VDEV_CUSTOM_AGGR_AC_BITPOS 0
  5455. #define WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS 2
  5456. #define WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS 2
  5457. #define WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS 1
  5458. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS 3
  5459. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS 1
  5460. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS 4
  5461. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS 1
  5462. #define WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS 5
  5463. #define WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS 1
  5464. #define WMI_VDEV_CUSTOM_AGGR_256_BA_EN_BITPOS 6
  5465. #define WMI_VDEV_CUSTOM_AGGR_256_BA_EN_NUM_BITS 1
  5466. #define WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_BITPOS 7
  5467. #define WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_NUM_BITS 1
  5468. #define WMI_VDEV_CUSTOM_AGGR_AC_SET(param, value) \
  5469. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_AC_BITPOS, \
  5470. WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS, value)
  5471. #define WMI_VDEV_CUSTOM_AGGR_AC_GET(param) \
  5472. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_AC_BITPOS, \
  5473. WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS)
  5474. #define WMI_VDEV_CUSTOM_AGGR_TYPE_SET(param, value) \
  5475. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS, \
  5476. WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS, value)
  5477. #define WMI_VDEV_CUSTOM_AGGR_TYPE_GET(param) \
  5478. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS, \
  5479. WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS)
  5480. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_SET(param, value) \
  5481. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS, \
  5482. WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS, value)
  5483. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_GET(param) \
  5484. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS, \
  5485. WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS)
  5486. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_SET(param, value) \
  5487. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS, \
  5488. WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS, value)
  5489. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_GET(param) \
  5490. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS, \
  5491. WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS)
  5492. #define WMI_VDEV_CUSTOM_TX_AC_EN_SET(param, value) \
  5493. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS, \
  5494. WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS, value)
  5495. #define WMI_VDEV_CUSTOM_TX_AC_EN_GET(param) \
  5496. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS, \
  5497. WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS)
  5498. #define WMI_VDEV_CUSTOM_AGGR_256_BA_EN_SET(param, value) \
  5499. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_256_BA_EN_BITPOS, \
  5500. WMI_VDEV_CUSTOM_AGGR_256_BA_EN_NUM_BITS, value)
  5501. #define WMI_VDEV_CUSTOM_AGGR_256_BA_EN_GET(param) \
  5502. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_256_BA_EN_BITPOS, \
  5503. WMI_VDEV_CUSTOM_AGGR_256_BA_EN_NUM_BITS)
  5504. #define WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_SET(param, value) \
  5505. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_BITPOS, \
  5506. WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_NUM_BITS, value)
  5507. #define WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_GET(param) \
  5508. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_BITPOS, \
  5509. WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_NUM_BITS)
  5510. typedef enum {
  5511. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_NONAGGR = 0,
  5512. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_AGGR = 1,
  5513. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_MAX,
  5514. } wmi_vdev_custom_sw_retry_type_t;
  5515. typedef struct {
  5516. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param */
  5517. A_UINT32 vdev_id; /* vdev id indicating to which the vdev custom software retries will be applied. */
  5518. A_UINT32 ac_type; /* access category (VI, VO, BE, BK) enum wmi_traffic_ac */
  5519. A_UINT32 sw_retry_type; /* 0 = non-aggr retry, 1 = aggr retry (wmi_vdev_custom_sw_retry_type_t enum) */
  5520. A_UINT32 sw_retry_th; /* max retry count per AC base on ac_type for the vdev mentioned in vdev id*/
  5521. } wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param;
  5522. typedef struct {
  5523. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_chainmask_config_cmd_fixed_param */
  5524. A_UINT32 tlv_header;
  5525. /* vdev id indicating to which the vdev, this chainmask configuration will be applied. */
  5526. A_UINT32 vdev_id;
  5527. /* number of chains to use for transmissions in 2.4 GHz band */
  5528. A_UINT32 num_tx_chains_2g;
  5529. /* number of chains to use for reception in 2.4 GHz band */
  5530. A_UINT32 num_rx_chains_2g;
  5531. /* nss to use for transmissions in 2.4 GHz band */
  5532. A_UINT32 tx_nss_2g;
  5533. /* nss to use for reception in 2.4 GHz band */
  5534. A_UINT32 rx_nss_2g;
  5535. /* number of chains to use for 11b transmissions. Valid only in 2.4 GHz */
  5536. A_UINT32 num_tx_chains_b;
  5537. /* number of chains to use for 11g transmissions. Valid only in 2.4 GHz */
  5538. A_UINT32 num_tx_chains_g;
  5539. /* number of chains to use for transmissions in 5 GHz band */
  5540. A_UINT32 num_tx_chains_5g;
  5541. /* number of chains to use for reception in 5 GHz band */
  5542. A_UINT32 num_rx_chains_5g;
  5543. /* nss to use for transmissions in 5 GHz band */
  5544. A_UINT32 tx_nss_5g;
  5545. /* nss to use for reception in 5 GHz band */
  5546. A_UINT32 rx_nss_5g;
  5547. /* number of chains to use for 11a transmissions. Valid only in 5 GHz */
  5548. A_UINT32 num_tx_chains_a;
  5549. /* If non-zero then use only one chain for TX when connection tx_nss is 1 in 2.4 GHz */
  5550. A_UINT32 disable_tx_mrc_2g;
  5551. /* If non-zero then use only one chain for RX when connection rx_nss is 1 in 2.4 GHz */
  5552. A_UINT32 disable_rx_mrc_2g;
  5553. /* If non-zero then use only one chain for TX when connection tx_nss is 1 in 5 GHz */
  5554. A_UINT32 disable_tx_mrc_5g;
  5555. /* If non-zero then use only one chain for RX when connection rx_nss is 1 in 5 GHz */
  5556. A_UINT32 disable_rx_mrc_5g;
  5557. } wmi_vdev_chainmask_config_cmd_fixed_param;
  5558. /*
  5559. * Command to enable/disable Green AP Power Save.
  5560. * This helps conserve power during AP operation. When the AP has no
  5561. * stations associated with it, the host can enable Green AP Power Save
  5562. * to request the firmware to shut down all but one transmit and receive
  5563. * chains.
  5564. */
  5565. typedef struct {
  5566. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_green_ap_ps_enable_cmd_fixed_param */
  5567. /** pdev_id for identifying the MAC
  5568. * See macros starting with WMI_PDEV_ID_ for values.
  5569. */
  5570. A_UINT32 pdev_id;
  5571. A_UINT32 enable; /*1:enable, 0:disable*/
  5572. } wmi_pdev_green_ap_ps_enable_cmd_fixed_param;
  5573. #define MAX_HT_IE_LEN 32
  5574. /* DEPRECATED */
  5575. typedef struct {
  5576. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ht_ie_cmd_fixed_param */
  5577. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  5578. A_UINT32 ie_len; /*length of the ht ie in the TLV ie_data[] */
  5579. A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
  5580. A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
  5581. /** The TLV for the HT IE follows:
  5582. * A_UINT32 ie_data[];
  5583. */
  5584. } wmi_pdev_set_ht_ie_cmd_fixed_param;
  5585. #define MAX_VHT_IE_LEN 32
  5586. /* DEPRECATED */
  5587. typedef struct {
  5588. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_vht_ie_cmd_fixed_param */
  5589. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  5590. A_UINT32 ie_len; /*length of the vht ie in the TLV ie_data[] */
  5591. A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
  5592. A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
  5593. /** The TLV for the VHT IE follows:
  5594. * A_UINT32 ie_data[];
  5595. */
  5596. } wmi_pdev_set_vht_ie_cmd_fixed_param;
  5597. typedef struct {
  5598. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param */
  5599. /** pdev_id for identifying the MAC
  5600. * See macros starting with WMI_PDEV_ID_ for values.
  5601. */
  5602. A_UINT32 pdev_id;
  5603. wmi_mac_addr base_macaddr;
  5604. } wmi_pdev_set_base_macaddr_cmd_fixed_param;
  5605. enum wmi_spectral_scan_mode {
  5606. WMI_SPECTRAL_SCAN_NORMAL_MODE,
  5607. WMI_SPECTRAL_SCAN_AGILE_MODE,
  5608. };
  5609. /*
  5610. * For now, the spectral configuration is global rather than
  5611. * per-vdev. The vdev is a placeholder and will be ignored
  5612. * by the firmware.
  5613. */
  5614. typedef struct {
  5615. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_configure_cmd_fixed_param */
  5616. A_UINT32 vdev_id;
  5617. A_UINT32 spectral_scan_count;
  5618. A_UINT32 spectral_scan_period;
  5619. A_UINT32 spectral_scan_priority;
  5620. A_UINT32 spectral_scan_fft_size;
  5621. A_UINT32 spectral_scan_gc_ena;
  5622. A_UINT32 spectral_scan_restart_ena;
  5623. A_UINT32 spectral_scan_noise_floor_ref;
  5624. A_UINT32 spectral_scan_init_delay;
  5625. A_UINT32 spectral_scan_nb_tone_thr;
  5626. A_UINT32 spectral_scan_str_bin_thr;
  5627. A_UINT32 spectral_scan_wb_rpt_mode;
  5628. A_UINT32 spectral_scan_rssi_rpt_mode;
  5629. A_UINT32 spectral_scan_rssi_thr;
  5630. A_UINT32 spectral_scan_pwr_format;
  5631. A_UINT32 spectral_scan_rpt_mode;
  5632. A_UINT32 spectral_scan_bin_scale;
  5633. A_UINT32 spectral_scan_dBm_adj;
  5634. A_UINT32 spectral_scan_chn_mask;
  5635. /* See enum wmi_spectral_scan_mode */
  5636. A_UINT32 spectral_scan_mode;
  5637. union {
  5638. /**
  5639. * Two center frequencies are required for agile channel switch
  5640. * supporting True 160 and Restricted 160 ((80+80) or 165) MHz.
  5641. * This parameter specifies the center frequency for cases with a
  5642. * contiguous channel, and the center frequency of the primary
  5643. * portion of a non-contiguous (80+80 or 165 MHz) channel.
  5644. */
  5645. A_UINT32 spectral_scan_center_freq;
  5646. A_UINT32 spectral_scan_center_freq1;
  5647. };
  5648. /* agile span primary channel frequency (MHz), 0 for normal scan*/
  5649. A_UINT32 spectral_scan_chan_freq;
  5650. /* agile scan bandwidth (20, 40, 80, 80+80, 160), enum wmi_channel_width */
  5651. A_UINT32 spectral_scan_chan_width;
  5652. /**
  5653. * Adding freq2 to support True 160 and restricted 160 ((80+80) or 165) MHz.
  5654. * agile span center frequency2 (MHz), 0 for normal scan.
  5655. */
  5656. A_UINT32 spectral_scan_center_freq2;
  5657. } wmi_vdev_spectral_configure_cmd_fixed_param;
  5658. /*
  5659. * Enabling, disabling and triggering the spectral scan
  5660. * is a per-vdev operation. That is, it will set channel
  5661. * flags per vdev rather than globally; so concurrent scan/run
  5662. * and multiple STA (eg p2p, tdls, multi-band STA) is possible.
  5663. */
  5664. typedef struct {
  5665. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_enable_cmd_fixed_param */
  5666. A_UINT32 vdev_id;
  5667. /* 0 - ignore; 1 - trigger, 2 - clear trigger */
  5668. A_UINT32 trigger_cmd;
  5669. /* 0 - ignore; 1 - enable, 2 - disable */
  5670. A_UINT32 enable_cmd;
  5671. /* See enum wmi_spectral_scan_mode */
  5672. A_UINT32 spectral_scan_mode;
  5673. } wmi_vdev_spectral_enable_cmd_fixed_param;
  5674. typedef struct {
  5675. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_tx_power_cmd_fixed_param */
  5676. A_UINT32 vdev_id;
  5677. } wmi_vdev_get_tx_power_cmd_fixed_param;
  5678. /* Primary 80 bin values */
  5679. #define WMI_SSCAN_PRI80_START_BIN_GET(pri80_bins) WMI_GET_BITS(pri80_bins, 0, 16)
  5680. #define WMI_SSCAN_PRI80_START_BIN_SET(pri80_bins, value) WMI_SET_BITS(pri80_bins, 0, 16, value)
  5681. #define WMI_SSCAN_PRI80_END_BIN_GET(pri80_bins) WMI_GET_BITS(pri80_bins, 16, 16)
  5682. #define WMI_SSCAN_PRI80_END_BIN_SET(pri80_bins, value) WMI_SET_BITS(pri80_bins, 16, 16, value)
  5683. /* Secondary 80 bin values */
  5684. #define WMI_SSCAN_SEC80_START_BIN_GET(sec80_bins) WMI_GET_BITS(sec80_bins, 0, 16)
  5685. #define WMI_SSCAN_SEC80_START_BIN_SET(sec80_bins, value) WMI_SET_BITS(sec80_bins, 0, 16, value)
  5686. #define WMI_SSCAN_SEC80_END_BIN_GET(sec80_bins) WMI_GET_BITS(sec80_bins, 16, 16)
  5687. #define WMI_SSCAN_SEC80_END_BIN_SET(sec80_bins, value) WMI_SET_BITS(sec80_bins, 16, 16, value)
  5688. /* 5MHz bin values */
  5689. #define WMI_SSCAN_MID_5MHZ_START_BIN_GET(mid_5mhz_bins) WMI_GET_BITS(mid_5mhz_bins, 0, 16)
  5690. #define WMI_SSCAN_MID_5MHZ_START_BIN_SET(mid_5mhz_bins, value) WMI_SET_BITS(mid_5mhz_bins, 0, 16, value)
  5691. #define WMI_SSCAN_MID_5MHZ_END_BIN_GET(mid_5mhz_bins) WMI_GET_BITS(mid_5mhz_bins, 16, 16)
  5692. #define WMI_SSCAN_MID_5MHZ_END_BIN_SET(mid_5mhz_bins, value) WMI_SET_BITS(mid_5mhz_bins, 16, 16, value)
  5693. typedef struct {
  5694. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sscan_fw_cmd_fixed_param */
  5695. A_UINT32 pdev_id;
  5696. /* See enum wmi_spectral_scan_mode */
  5697. A_UINT32 spectral_scan_mode;
  5698. /**
  5699. * This fixed_param TLV is followed by the below TLVs:
  5700. *
  5701. * wmi_pdev_sscan_fft_bin_index fft_bin_index[]; // array len = 0 or 1
  5702. * If present (array length is 1) this TLV specifies the primary
  5703. * and secondary channels FFT bin indices for True 160 and
  5704. * Restricted 160 (80+80 or 165) MHz BW cases.
  5705. */
  5706. } wmi_pdev_sscan_fw_cmd_fixed_param;
  5707. /**
  5708. * The below structure is used only to send the FFT bin numbers for
  5709. * True 160 and Restricted 160(80+80 or 165) MHz from FW to HOST
  5710. */
  5711. typedef struct {
  5712. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sscan_fft_bin_index */
  5713. /**
  5714. * Bit 15 - 0 : primary 80 start bin number
  5715. * Bit 31 - 16 : primary 80 end bin number
  5716. * Refer to WMI_SSCAN_PRI80_[START,END]_BIN_[GET,SET] macros.
  5717. * Only for True 160 and Restricted 160(80+80 or 165) MHz this
  5718. * will be filled.
  5719. */
  5720. A_UINT32 pri80_bins;
  5721. /**
  5722. * Bit 15 - 0 : secondary 80 start bin number
  5723. * Bit 31 - 16 : secondary 80 end bin number
  5724. * Refer to WMI_SSCAN_SEC80_[START,END]_BIN_[GET,SET] macros.
  5725. * Only for True 160 and Restricted 160(80+80 or 165) MHz this
  5726. * will be filled.
  5727. */
  5728. A_UINT32 sec80_bins;
  5729. /**
  5730. * Bit 15 - 0 : 5Mhz start bin number
  5731. * Bit 31 - 16 : 5Mhz end bin number
  5732. * Refer to WMI_SSCAN_MID_5MHZ_[START,END]_BIN_[GET,SET] macros.
  5733. * Only for Restricted 160(80+80 or 165), otherwise 0.
  5734. */
  5735. A_UINT32 mid_5mhz_bins;
  5736. } wmi_pdev_sscan_fft_bin_index;
  5737. typedef enum {
  5738. /** Enum to indicate bmsk of spectral scan stop evt on scan count max out */
  5739. WMI_SSCAN_EVT_BMSK_SCAN_STOP_SCOUNT = 0X00000001,
  5740. /** Add more event code bmsks above this */
  5741. WMI_SSCAN_EVT_BMSK_MAX = 0Xffffffff,
  5742. } wmi_sscan_evt_message_code;
  5743. /**
  5744. * The below structure is used to send the start/stop triggers
  5745. * for events related to spectral scan activity from
  5746. * FW to host
  5747. */
  5748. typedef struct {
  5749. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sscan_evt_message_fixed_param */
  5750. A_UINT32 pdev_id;
  5751. /** Refer Enum wmi_sscan_evt_message_code */
  5752. A_UINT32 sscan_evt_code;
  5753. } wmi_sscan_evt_message_fixed_param;
  5754. #define WMI_BEACON_CTRL_TX_DISABLE 0
  5755. #define WMI_BEACON_CTRL_TX_ENABLE 1
  5756. #define WMI_BEACON_CTRL_SWBA_EVENT_DISABLE 2
  5757. #define WMI_BEACON_CTRL_SWBA_EVENT_ENABLE 3
  5758. typedef struct {
  5759. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_offload_ctrl_cmd_fixed_param */
  5760. /** unique id identifying the VDEV, generated by the caller */
  5761. A_UINT32 vdev_id;
  5762. A_UINT32 bcn_ctrl_op; /* fw default 1 (see WMI_BEACON_CTRL defs) */
  5763. } wmi_bcn_offload_ctrl_cmd_fixed_param;
  5764. /** common structure used for wmi_vedv_get_tx_power_event */
  5765. typedef struct {
  5766. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_tx_power_event_fixed_param */
  5767. A_UINT32 tx_power; /** units: 0.5 dBm, per-chain tx power */
  5768. A_UINT32 vdev_id; /** unique id identifying the VDEV, generated by the caller */
  5769. } wmi_vdev_get_tx_power_event_fixed_param;
  5770. typedef enum {
  5771. /** Limit the offchannel duration */
  5772. WMI_VDEV_LIMIT_OFFCHAN_ENABLE = 0x1,
  5773. /** Skip DFS channels from Scan channel list.
  5774. * valid for both host scans and FW scans */
  5775. WMI_VDEV_LIMIT_OFFCHAN_SKIP_DFS = 0x2,
  5776. } wmi_vdev_limit_offchan_flags;
  5777. typedef struct {
  5778. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_vdev_limit_offchan_cmd_fixed_param */
  5779. /** Limit the duration of offchannel events requested by the vdev corresponding to the specified vdev_id */
  5780. A_UINT32 vdev_id;
  5781. /** see enum wmi_vdev_limit_offchan_flags */
  5782. A_UINT32 flags;
  5783. /** max offchannel time allowed in msec when WMI_VDEV_LIMIT_OFFCHAN_ENABLE flag is set */
  5784. A_UINT32 max_offchan_time;
  5785. /** rest time in msec on the BSS channel */
  5786. A_UINT32 rest_time;
  5787. } wmi_vdev_limit_offchan_cmd_fixed_param;
  5788. #define WMI_CSA_EVENT_QSBW_ISE_ID_MASK 0x000000FF /* information sub element id for QSBW, expected value is 0x02 */
  5789. #define WMI_CSA_EVENT_QSBW_ISE_LEN_MASK 0x0000FF00 /* length of QSBW ISE data, expected value is 0x02 */
  5790. #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) */
  5791. #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) */
  5792. #define WMI_CSA_EVENT_QSBW_ISE_ID 0x02
  5793. #define WMI_CSA_EVENT_QSBW_ISE_LEN 0x02
  5794. #define WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK 0x01
  5795. #define WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK 0x02
  5796. #define WMI_CSA_EVENT_QSBW_ISE_CAP_5M(qsbw_ise) \
  5797. (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
  5798. #define WMI_CSA_EVENT_QSBW_ISE_CAP_10M(qsbw_ise) \
  5799. (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
  5800. #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_5M(qsbw_ise) \
  5801. (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
  5802. #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_10M(qsbw_ise) \
  5803. (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
  5804. typedef enum {
  5805. WMI_CSA_IE_PRESENT = 0x00000001,
  5806. WMI_XCSA_IE_PRESENT = 0x00000002,
  5807. WMI_WBW_IE_PRESENT = 0x00000004,
  5808. WMI_CSWRAP_IE_PRESENT = 0x00000008,
  5809. WMI_CSWARP_IE_PRESENT = WMI_CSWRAP_IE_PRESENT, /* deprecated: typo */
  5810. WMI_QSBW_ISE_PRESENT = 0x00000010,
  5811. WMI_CSWRAP_IE_EXTENDED_PRESENT = 0x00000020, /* Added bitmask to verify if the additional information is filled in */
  5812. } WMI_CSA_EVENT_IES_PRESENT_FLAG;
  5813. /* wmi CSA receive event from beacon frame */
  5814. typedef struct {
  5815. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_event_fixed_param */
  5816. A_UINT32 i_fc_dur; /* Bit 0-15: FC, Bit 16-31: DUR */
  5817. wmi_mac_addr i_addr1;
  5818. wmi_mac_addr i_addr2;
  5819. /* NOTE: size of array of csa_ie[], xcsa_ie[], and wb_ie[] cannot be
  5820. * changed in the future without breaking WMI compatibility */
  5821. A_UINT32 csa_ie[2];
  5822. A_UINT32 xcsa_ie[2];
  5823. A_UINT32 wb_ie[2];
  5824. union {
  5825. A_UINT32 cswrap_ie; /* use this */
  5826. A_UINT32 cswarp_ie; /* deprecated (typo) */
  5827. };
  5828. A_UINT32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */
  5829. A_UINT32 qsbw_ise;
  5830. /* cswrap_ie_extended:
  5831. * Stores full IEEE80211_ELEMID_CHAN_SWITCH_WRAP information element.
  5832. * The first two octets host the Element ID and Length fields.
  5833. * The IE comprises New Country Subelement (optional and max length 6),
  5834. * Wide Bandwidth Channel Subelement (optional and max length 5) and
  5835. * New Transmit Power Envelope subelement (optional and max length 7)
  5836. * The 4-byte words within cswrap_ie_extended[] use little endian ordering;
  5837. * the first octect of the IE resides in bits 7:0 of cswrap_ie_extended[0],
  5838. * the second octet resides in bits 15:8 of cswrap_ie_extended[0] and so on.
  5839. */
  5840. A_UINT32 cswrap_ie_extended[5];
  5841. } wmi_csa_event_fixed_param;
  5842. typedef enum {
  5843. WAL_PEER_MCAST2UCAST_DISABLED = 0,
  5844. WAL_PEER_MCAST2UCAST_DROP_EMPTY = 1, /* Drop the frames if match is not found */
  5845. WAL_PEER_MCAST2UCAST_MCAST_EMPTY = 2, /* Send as mcast if match is not found */
  5846. } WMI_PEER_MCAST2UCAST_MODE;
  5847. typedef enum {
  5848. PKT_PWR_SAVE_NAP_ENABLE = 0x00000001,
  5849. PKT_PWR_SAVE_LS_ENABLE = 0x00000002,
  5850. PKT_PWR_SAVE_DS_ENABLE = 0x00000004,
  5851. PKT_PWR_SAVE_BTCOEX_ENABLE = 0x00000008,
  5852. PKT_PWR_SAVE_FSM_ENABLE = 0x80000000,
  5853. } WMI_PDEV_PKT_PWR_SAVE_LEVEL;
  5854. /** MACROs to get user setting for enabling/disabling Secondary Rate Feature set
  5855. * Bit-0 : Enable/Disable Control for "PPDU Secondary Retry Support"
  5856. * Bit-1 : Enable/Disable Control for "RTS Black/White-listing Support"
  5857. * Bit-2 : Enable/Disable Control for "Higher MCS retry restriction on XRETRY failures"
  5858. * Bit 3-5 : "Xretry threshold" to use
  5859. * Bit 6~31 : reserved for future use.
  5860. */
  5861. #define WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT_S 0
  5862. #define WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT 0x00000001
  5863. #define WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT_S 1
  5864. #define WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT 0x00000002
  5865. #define WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION_S 2
  5866. #define WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION 0x00000004
  5867. #define WMI_PDEV_PARAM_XRETRY_THRESHOLD_S 3
  5868. #define WMI_PDEV_PARAM_XRETRY_THRESHOLD 0x00000038
  5869. #define WMI_PDEV_PARAM_IS_SECONDARY_RATE_ENABLED(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT)
  5870. #define WMI_PDEV_PARAM_IS_RTS_BL_WL_ENABLED(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT)
  5871. #define WMI_PDEV_PARAM_IS_HIGHER_MCS_XRETRY_RESTRICTION_SET(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION)
  5872. #define WMI_PDEV_PARAM_GET_XRETRY_THRESHOLD(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_XRETRY_THRESHOLD)
  5873. typedef enum {
  5874. /** TX chain mask */
  5875. WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
  5876. /** RX chain mask */
  5877. WMI_PDEV_PARAM_RX_CHAIN_MASK, /* 0x2 */
  5878. /** TX power limit for 2G Radio */
  5879. WMI_PDEV_PARAM_TXPOWER_LIMIT2G, /* 0x3 */
  5880. /** TX power limit for 5G Radio */
  5881. WMI_PDEV_PARAM_TXPOWER_LIMIT5G, /* 0x4 */
  5882. /** TX power scale */
  5883. WMI_PDEV_PARAM_TXPOWER_SCALE, /* 0x5 */
  5884. /** Beacon generation mode . 0: host, 1: target */
  5885. WMI_PDEV_PARAM_BEACON_GEN_MODE, /* 0x6 */
  5886. /** Beacon generation mode . 0: staggered 1: bursted */
  5887. WMI_PDEV_PARAM_BEACON_TX_MODE, /* 0x7 */
  5888. /** Resource manager off chan mode .
  5889. * 0: turn off off chan mode. 1: turn on offchan mode
  5890. */
  5891. WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE, /* 0x8 */
  5892. /** Protection mode 0: no protection 1:use CTS-to-self 2: use RTS/CTS */
  5893. WMI_PDEV_PARAM_PROTECTION_MODE, /* 0x9 */
  5894. /** Dynamic bandwidth 0: disable 1: enable */
  5895. WMI_PDEV_PARAM_DYNAMIC_BW, /* 0xa */
  5896. /** Non aggregrate/ 11g sw retry threshold.0-disable */
  5897. WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH, /* 0xb */
  5898. /** aggregrate sw retry threshold. 0-disable*/
  5899. WMI_PDEV_PARAM_AGG_SW_RETRY_TH, /* 0xc */
  5900. /** Station kickout threshold (non of consecutive failures).0-disable */
  5901. WMI_PDEV_PARAM_STA_KICKOUT_TH, /* 0xd */
  5902. /** Aggerate size scaling configuration per AC */
  5903. WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING, /* 0xe */
  5904. /** LTR enable */
  5905. WMI_PDEV_PARAM_LTR_ENABLE, /* 0xf */
  5906. /** LTR latency for BE, in us */
  5907. WMI_PDEV_PARAM_LTR_AC_LATENCY_BE, /* 0x10 */
  5908. /** LTR latency for BK, in us */
  5909. WMI_PDEV_PARAM_LTR_AC_LATENCY_BK, /* 0x11 */
  5910. /** LTR latency for VI, in us */
  5911. WMI_PDEV_PARAM_LTR_AC_LATENCY_VI, /* 0x12 */
  5912. /** LTR latency for VO, in us */
  5913. WMI_PDEV_PARAM_LTR_AC_LATENCY_VO, /* 0x13 */
  5914. /** LTR AC latency timeout, in ms */
  5915. WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT, /* 0x14 */
  5916. /** LTR platform latency override, in us */
  5917. WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE, /* 0x15 */
  5918. /** LTR-M override, in us */
  5919. WMI_PDEV_PARAM_LTR_RX_OVERRIDE, /* 0x16 */
  5920. /** Tx activity timeout for LTR, in us */
  5921. WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT, /* 0x17 */
  5922. /** L1SS state machine enable */
  5923. WMI_PDEV_PARAM_L1SS_ENABLE, /* 0x18 */
  5924. /** Deep sleep state machine enable */
  5925. WMI_PDEV_PARAM_DSLEEP_ENABLE, /* 0x19 */
  5926. /** RX buffering flush enable */
  5927. WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH, /* 0x1a */
  5928. /** RX buffering matermark */
  5929. WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK, /* 0x1b */
  5930. /** RX buffering timeout enable */
  5931. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN, /* 0x1c */
  5932. /** RX buffering timeout value */
  5933. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE, /* 0x1d */
  5934. /** pdev level stats update period in ms */
  5935. WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD, /* 0x1e */
  5936. /** vdev level stats update period in ms */
  5937. WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD, /* 0x1f */
  5938. /** peer level stats update period in ms */
  5939. WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD, /* 0x20 */
  5940. /** beacon filter status update period */
  5941. WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD, /* 0x21 */
  5942. /** QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
  5943. WMI_PDEV_PARAM_PMF_QOS, /* 0x22 */
  5944. /** Access category on which ARP frames are sent */
  5945. WMI_PDEV_PARAM_ARP_AC_OVERRIDE, /* 0x23 */
  5946. /** DCS configuration */
  5947. WMI_PDEV_PARAM_DCS, /* 0x24 */
  5948. /** Enable/Disable ANI on target */
  5949. WMI_PDEV_PARAM_ANI_ENABLE, /* 0x25 */
  5950. /** configure the ANI polling period */
  5951. WMI_PDEV_PARAM_ANI_POLL_PERIOD, /* 0x26 */
  5952. /** configure the ANI listening period */
  5953. WMI_PDEV_PARAM_ANI_LISTEN_PERIOD, /* 0x27 */
  5954. /** configure OFDM immunity level */
  5955. WMI_PDEV_PARAM_ANI_OFDM_LEVEL, /* 0x28 */
  5956. /** configure CCK immunity level */
  5957. WMI_PDEV_PARAM_ANI_CCK_LEVEL, /* 0x29 */
  5958. /** Enable/Disable CDD for 1x1 STAs in rate control module */
  5959. WMI_PDEV_PARAM_DYNTXCHAIN, /* 0x2a */
  5960. /** Enable/Disable proxy STA */
  5961. WMI_PDEV_PARAM_PROXY_STA, /* 0x2b */
  5962. /** Enable/Disable low power state when all VDEVs are inactive/idle. */
  5963. WMI_PDEV_PARAM_IDLE_PS_CONFIG, /* 0x2c */
  5964. /** Enable/Disable power gating sleep */
  5965. WMI_PDEV_PARAM_POWER_GATING_SLEEP, /* 0x2d */
  5966. /** Enable/Disable Rfkill */
  5967. WMI_PDEV_PARAM_RFKILL_ENABLE, /* 0x2e */
  5968. /** Set Bursting DUR */
  5969. WMI_PDEV_PARAM_BURST_DUR, /* 0x2f */
  5970. /** Set Bursting ENABLE */
  5971. WMI_PDEV_PARAM_BURST_ENABLE, /* 0x30 */
  5972. /** HW rfkill config */
  5973. WMI_PDEV_PARAM_HW_RFKILL_CONFIG, /* 0x31 */
  5974. /** Enable radio low power features */
  5975. WMI_PDEV_PARAM_LOW_POWER_RF_ENABLE, /* 0x32 */
  5976. /** L1SS entry and residency time track */
  5977. WMI_PDEV_PARAM_L1SS_TRACK, /* 0x33 */
  5978. /** set hyst at runtime, requirement from SS */
  5979. WMI_PDEV_PARAM_HYST_EN, /* 0x34 */
  5980. /** Enable/ Disable POWER COLLAPSE */
  5981. WMI_PDEV_PARAM_POWER_COLLAPSE_ENABLE, /* 0x35 */
  5982. /** configure LED system state */
  5983. WMI_PDEV_PARAM_LED_SYS_STATE, /* 0x36 */
  5984. /** Enable/Disable LED */
  5985. WMI_PDEV_PARAM_LED_ENABLE, /* 0x37 */
  5986. /** set DIRECT AUDIO time latency */
  5987. WMI_PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY, /* DEPRECATED */ /* 0x38 */
  5988. /** set DIRECT AUDIO Feature ENABLE */
  5989. WMI_PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE, /* DEPRECATED */ /* 0x39 */
  5990. /** pdev level whal mib stats update enable */
  5991. WMI_PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE, /* 0x3a */
  5992. /** ht/vht info based on vdev */
  5993. WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD, /* 0x3b */
  5994. /** Set CTS channel BW for dynamic BW adjustment feature */
  5995. WMI_PDEV_PARAM_CTS_CBW, /* 0x3c */
  5996. /** Set GPIO pin info used by WNTS */
  5997. WMI_PDEV_PARAM_WNTS_CONFIG, /* 0x3d */
  5998. /** Enable/Disable hardware adaptive early rx feature */
  5999. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE, /* 0x3e */
  6000. /** The minimum early rx duration, to ensure early rx duration is non-zero */
  6001. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP, /* 0x3f */
  6002. /** Increasing/decreasing step used by hardware */
  6003. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP, /* 0x40 */
  6004. /** The fixed early rx duration when adaptive early rx is disabled */
  6005. WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP, /* 0x41 */
  6006. /** Enable/Disable bmiss based adaptive beacon timeout feature */
  6007. WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE, /* 0x42 */
  6008. /** The minimum beacon timeout duration, to ensure beacon timeout duration is non-zero */
  6009. WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT, /* 0x43 */
  6010. /** Increasing/decreasing step used by hardware */
  6011. WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP, /* 0x44 */
  6012. /** The fixed beacon timeout duration when bmiss based adaptive beacon timeout is disabled */
  6013. WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT, /* 0x45 */
  6014. /** Enable/Disable Congestion Estimator based adaptive beacon timeout feature */
  6015. WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE, /* 0x46 */
  6016. /** combo value of ce_id, ce_threshold, ce_time, refer to WMI_CE_BTO_CE_ID_MASK */
  6017. WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE, /* 0x47 */
  6018. /** 2G TX chain mask */
  6019. WMI_PDEV_PARAM_TX_CHAIN_MASK_2G, /* 0x48 */
  6020. /** 2G RX chain mask */
  6021. WMI_PDEV_PARAM_RX_CHAIN_MASK_2G, /* 0x49 */
  6022. /** 5G TX chain mask */
  6023. WMI_PDEV_PARAM_TX_CHAIN_MASK_5G, /* 0x4a */
  6024. /** 5G RX chain mask */
  6025. WMI_PDEV_PARAM_RX_CHAIN_MASK_5G, /* 0x4b */
  6026. /* Set tx chain mask for CCK rates */
  6027. WMI_PDEV_PARAM_TX_CHAIN_MASK_CCK, /* 0x4c */
  6028. /* Set tx chain mask for 1SS stream */
  6029. WMI_PDEV_PARAM_TX_CHAIN_MASK_1SS, /* 0x4d */
  6030. /* Enable/Disable CTS2Self for P2P GO when Non-P2P Client is connected */
  6031. WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG, /* 0x4e */
  6032. /** TX power backoff in dB: tx power -= param value
  6033. * Host passes values(DB) to Halphy, Halphy reduces the power table by
  6034. * the values. Safety check will happen in Halphy
  6035. */
  6036. WMI_PDEV_PARAM_TXPOWER_DECR_DB, /* 0x4f */
  6037. /** enable and disable aggregate burst along with duration */
  6038. WMI_PDEV_PARAM_AGGR_BURST, /* 0x50 */
  6039. /** Set the global RX decap mode */
  6040. WMI_PDEV_PARAM_RX_DECAP_MODE, /* 0x51 */
  6041. /** Enable/Disable Fast channel reset */
  6042. WMI_PDEV_PARAM_FAST_CHANNEL_RESET, /* 0x52 */
  6043. /** Default antenna for Smart antenna */
  6044. WMI_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA, /* 0x53 */
  6045. /** Set the user-specified antenna gain */
  6046. WMI_PDEV_PARAM_ANTENNA_GAIN, /* 0x54 */
  6047. /** Set the user-specified RX filter */
  6048. WMI_PDEV_PARAM_RX_FILTER, /* 0x55 */
  6049. /** configure the user-specified MCAST tid for managed mcast feature
  6050. * 0-15 is the valid range. 0xff will clear the tid setting */
  6051. WMI_PDEV_SET_MCAST_TO_UCAST_TID, /* 0x56 */
  6052. /** Enable/Disable Proxy sta mode */
  6053. WMI_PDEV_PARAM_PROXY_STA_MODE, /* 0x57 */
  6054. /** configure the mcast2ucast mode for the pdev->peer_mcast.
  6055. * See WMI_PEER_MCAST2UCAST_MODE for possible values */
  6056. WMI_PDEV_PARAM_SET_MCAST2UCAST_MODE, /* 0x58 */
  6057. /** Sets the Mcast buffers for cloning, to support Mcast enhancement */
  6058. WMI_PDEV_PARAM_SET_MCAST2UCAST_BUFFER, /* 0x59 */
  6059. /** Remove the Mcast buffers added by host */
  6060. WMI_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER, /* 0x5a */
  6061. /** En/disable station power save state indication */
  6062. WMI_PDEV_PEER_STA_PS_STATECHG_ENABLE, /* 0x5b */
  6063. /** Access category on which ARP frames are sent */
  6064. WMI_PDEV_PARAM_IGMPMLD_AC_OVERRIDE, /* 0x5c */
  6065. /** allow or disallow interbss frame forwarding */
  6066. WMI_PDEV_PARAM_BLOCK_INTERBSS, /* 0x5d */
  6067. /** Enable/Disable reset */
  6068. WMI_PDEV_PARAM_SET_DISABLE_RESET_CMDID, /* 0x5e */
  6069. /** Enable/Disable/Set MSDU_TTL in milliseconds. */
  6070. WMI_PDEV_PARAM_SET_MSDU_TTL_CMDID, /* 0x5f */
  6071. /** Set global PPDU duration limit (usec). */
  6072. WMI_PDEV_PARAM_SET_PPDU_DURATION_CMDID, /* 0x60 */
  6073. /** set txbf sounding period of vap in milliseconds */
  6074. WMI_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID, /* 0x61 */
  6075. /** Set promiscuous mode */
  6076. WMI_PDEV_PARAM_SET_PROMISC_MODE_CMDID, /* 0x62 */
  6077. /** Set burst mode */
  6078. WMI_PDEV_PARAM_SET_BURST_MODE_CMDID, /* 0x63 */
  6079. /** enable enhanced stats */
  6080. WMI_PDEV_PARAM_EN_STATS, /* 0x64 */
  6081. /** Set mu-grouping policy */
  6082. WMI_PDEV_PARAM_MU_GROUP_POLICY, /* 0x65 */
  6083. /** Channel Hopping Enable */
  6084. WMI_PDEV_PARAM_NOISE_DETECTION, /* 0x66 */
  6085. /** Set Channel Hopping NF threshold in dBm */
  6086. WMI_PDEV_PARAM_NOISE_THRESHOLD, /* 0x67 */
  6087. /** Set PAPRD policy */
  6088. WMI_PDEV_PARAM_DPD_ENABLE, /* 0x68 */
  6089. /** Enable/disable mcast/bcast echo, used by ProxySTA */
  6090. WMI_PDEV_PARAM_SET_MCAST_BCAST_ECHO, /* 0x69 */
  6091. /** ATF enable/disable strict schedule */
  6092. WMI_PDEV_PARAM_ATF_STRICT_SCH, /* 0x6a */
  6093. /** ATF set access category duration, B0-B29 duration, B30-B31: AC */
  6094. WMI_PDEV_PARAM_ATF_SCHED_DURATION, /* 0x6b */
  6095. /** Default antenna polarization */
  6096. WMI_PDEV_PARAM_ANT_PLZN, /* 0x6c */
  6097. /** Set mgmt retry limit */
  6098. WMI_PDEV_PARAM_MGMT_RETRY_LIMIT, /* 0x6d */
  6099. /** Set CCA sensitivity level in dBm */
  6100. WMI_PDEV_PARAM_SENSITIVITY_LEVEL, /* 0x6e */
  6101. /** Set 2G positive and negative Tx power in 0.5dBm units */
  6102. WMI_PDEV_PARAM_SIGNED_TXPOWER_2G, /* 0x6f */
  6103. /** Set 5G positive and negative Tx power in 0.5dBm
  6104. * units */
  6105. WMI_PDEV_PARAM_SIGNED_TXPOWER_5G, /* 0x70 */
  6106. /** Enable/disble AMSDU for tids */
  6107. WMI_PDEV_PARAM_ENABLE_PER_TID_AMSDU, /* 0x71 */
  6108. /** Enable/disable AMPDU for tids */
  6109. WMI_PDEV_PARAM_ENABLE_PER_TID_AMPDU, /* 0x72 */
  6110. /** Set CCA threshold in dBm */
  6111. WMI_PDEV_PARAM_CCA_THRESHOLD, /* 0x73 */
  6112. /** RTS Fixed rate setting */
  6113. WMI_PDEV_PARAM_RTS_FIXED_RATE, /* 0x74 */
  6114. /** Pdev reset */
  6115. WMI_PDEV_PARAM_PDEV_RESET, /* 0x75 */
  6116. /** wapi mbssid offset **/
  6117. WMI_PDEV_PARAM_WAPI_MBSSID_OFFSET, /* 0x76 */
  6118. /** ARP DEBUG source address*/
  6119. WMI_PDEV_PARAM_ARP_DBG_SRCADDR, /* 0x77 */
  6120. /** ARP DEBUG destination address*/
  6121. WMI_PDEV_PARAM_ARP_DBG_DSTADDR, /* 0x78 */
  6122. /** ATF enable/disable obss noise scheduling */
  6123. WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCH, /* 0x79 */
  6124. /** ATF obss noise scaling factor */
  6125. WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR, /* 0x7a */
  6126. /**
  6127. * TX power reduction scaling exponent - final tx power is the
  6128. * nominal tx power (A_MIN(reg_pow,ctl,etc..)) divided by
  6129. * 2^(scale exponent). For example:
  6130. * If this scale exponent is 0, the power is unchanged (divided by 2^0)
  6131. * If this factor is 1, the power is scaled down by 2^1, i.e. 3 dB
  6132. * If this factor is 2, the power is scaled down by 2^2, i.e. 6 dB
  6133. * If this factor is 3, the power is scaled down by 2^3, i.e. 9 dB
  6134. */
  6135. WMI_PDEV_PARAM_CUST_TXPOWER_SCALE, /* 0x7b */
  6136. /** ATF enabe/disabe dynamically */
  6137. WMI_PDEV_PARAM_ATF_DYNAMIC_ENABLE, /* 0x7c */
  6138. /** Set tx retry limit for control frames. 0 = disable, 31 = max */
  6139. WMI_PDEV_PARAM_CTRL_RETRY_LIMIT, /* 0x7d */
  6140. /** Set propagation delay for 2G / 5G band.
  6141. * The propagation delay is fundamentally a per-peer property, but
  6142. * the target may not support per-peer settings for ack timeouts.
  6143. * This pdev parameter allows the MAC-level ack timeout to be set to
  6144. * a value suitable for the worst-case propagation delay of any peer
  6145. * within that pdev.
  6146. * Units are microseconds.
  6147. */
  6148. WMI_PDEV_PARAM_PROPAGATION_DELAY, /* 0x7e */
  6149. /**
  6150. * Host can enable/disable ANT DIV feature
  6151. * if it's been enabled in BDF
  6152. */
  6153. WMI_PDEV_PARAM_ENA_ANT_DIV, /* 0x7f */
  6154. /** Host can force one chain to select a specific ANT */
  6155. WMI_PDEV_PARAM_FORCE_CHAIN_ANT, /* 0x80 */
  6156. /**
  6157. * Start a cycle ANT self test periodically.
  6158. * In the test, the FW would select each ANT pair
  6159. * one by one, the cycle time could be configured
  6160. * via WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL
  6161. */
  6162. WMI_PDEV_PARAM_ANT_DIV_SELFTEST, /* 0x81 */
  6163. /**
  6164. * Configure the cycle time of ANT self test,
  6165. * the unit is micro second. Per the timer
  6166. * limitation, too small value could be not so
  6167. * accurate.
  6168. */
  6169. WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL, /* 0x82 */
  6170. /**
  6171. * wlan stats observation period, the unit is millisecond.
  6172. * The value of 0 is used to turn off periodic stats report.
  6173. */
  6174. WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD, /* 0x83 */
  6175. /**
  6176. * Set tx_ppdu_delay[] bin size to specify how many
  6177. * milliseconds each bin of the wmi_tx_stats.tx_ppdu_delay[]
  6178. * histogram represents.
  6179. */
  6180. WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS, /* 0x84 */
  6181. /** set wmi_tx_stats.tx_ppdu_delay[] array length */
  6182. WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN, /* 0x85 */
  6183. /** set wmi_tx_stats.tx_mpdu_aggr[] array length */
  6184. WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN, /* 0x86 */
  6185. /** set wmi_rx_stats.rx_mpdu_aggr[] array length */
  6186. WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN, /* 0x87 */
  6187. /** Set TX delay value in TX sch module, unit is microseconds */
  6188. WMI_PDEV_PARAM_TX_SCH_DELAY, /* 0x88 */
  6189. /** Set RTS enable for SIFS bursting */
  6190. WMI_PDEV_PARAM_ENABLE_RTS_SIFS_BURSTING, /* 0x89 */
  6191. /** Set Maximum number of MPDUs in an AMPDU*/
  6192. WMI_PDEV_PARAM_MAX_MPDUS_IN_AMPDU, /* 0x8a */
  6193. /** Enable/disable peer stats info mechanism
  6194. * A zero value disables; a non-zero value enables.
  6195. */
  6196. WMI_PDEV_PARAM_PEER_STATS_INFO_ENABLE, /* 0x8b */
  6197. /** Configure Fast PWR Transition mode
  6198. * 0x0 -> inidcates Fast PWR transition disabled
  6199. * 0x1 -> indicates Static mode enabled
  6200. * 0x2 -> indicates Dynamic mode enabled
  6201. */
  6202. WMI_PDEV_PARAM_FAST_PWR_TRANSITION, /* 0x8c */
  6203. /** Enable/disable radio channel stats mechanism
  6204. * A zero value disables; a non-zero value enables.
  6205. */
  6206. WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE, /* 0x8d */
  6207. /** Enable/disable radio diagnosis feature
  6208. * which allows retrieving the status of radio.
  6209. * A zero value disables; a non-zero value enables.
  6210. */
  6211. WMI_PDEV_PARAM_RADIO_DIAGNOSIS_ENABLE, /* 0x8e */
  6212. /** Enable/Disable mesh mcast traffic
  6213. * 1 - Allow mesh mcast traffic
  6214. * 0 - Disallow mesh mcast traffic
  6215. */
  6216. WMI_PDEV_PARAM_MESH_MCAST_ENABLE, /* 0x8f */
  6217. /** Enable/Disable smart chainmask scheme
  6218. * 1 - Enable smart chainmask scheme
  6219. * 0 - Disable smart chainmask scheme
  6220. */
  6221. WMI_PDEV_PARAM_SMART_CHAINMASK_SCHEME, /* 0x90 */
  6222. /** Enable/Disable alternate chainmask scheme
  6223. * 1 - Enable alternate chainmask scheme
  6224. * 0 - Disable alternate chainmask scheme
  6225. */
  6226. WMI_PDEV_PARAM_ALTERNATIVE_CHAINMASK_SCHEME, /* 0x91 */
  6227. /** User configured parameters for antenna diversity algorithm
  6228. * BIT[25..13]: Probe period (milliseconds units)
  6229. * BIT[12..0]: Stay period (milliseconds units)
  6230. */
  6231. WMI_PDEV_PARAM_ANT_DIV_USRCFG, /* 0x92 */
  6232. /** pdev packet power save levels,
  6233. * refer to WMI_PDEV_PKT_PWR_SAVE_LEVEL
  6234. */
  6235. WMI_PDEV_PARAM_PACKET_POWER_SAVE_LEVEL, /* 0x93 */
  6236. /** Define IOT pattern to be enabled/disabled
  6237. * bit values: 0 - disable, 1 - enable
  6238. * BIT[0..31]: each bit represents an IOT pattern
  6239. * -----
  6240. * Bit 0 - avoid SMPS with certain APs
  6241. * Bits 31:1 - reserved
  6242. */
  6243. WMI_PDEV_PARAM_SET_IOT_PATTERN, /* 0x94 */
  6244. /** ACK timeout - change wireless packet ack timeout configuration,
  6245. * units are microseconds
  6246. */
  6247. WMI_PDEV_PARAM_ACK_TIMEOUT, /* 0x95 */
  6248. /** Number of TX chains to use for a/b/g rates.
  6249. * bit 0~15 : 11b mode TX chain number.
  6250. * bit 16~31 : 11ag mode TX chain number.
  6251. */
  6252. WMI_PDEV_PARAM_ABG_MODE_TX_CHAIN_NUM, /* 0x96 */
  6253. /** Enable/Disable cck txfir override
  6254. * bit 0 - enable (1) or disable (0) CCK tx FIR
  6255. * bits 31:1 - unused / reserved (set to 0)
  6256. */
  6257. WMI_PDEV_PARAM_ENABLE_CCK_TXFIR_OVERRIDE, /* 0x97 */
  6258. /** Enable/Disable DTIM Synth
  6259. * 1- Enable DTIM Synth
  6260. * 0- Disable DTIM Synth
  6261. */
  6262. WMI_PDEV_PARAM_DTIM_SYNTH, /* 0x98 */
  6263. /** Configure auto detect power failure feature.
  6264. * 0 - FW will trigger crash if power failure happens.
  6265. * 1 - FW will send a failure notification to host, and the host
  6266. * framework determines how to respond to the power failure
  6267. * 2 - Silently rejuvenate if power failure occurs.
  6268. * 3 - Feature disabled.
  6269. */
  6270. WMI_PDEV_AUTO_DETECT_POWER_FAILURE, /* 0x99 */
  6271. /** Configure operating voltage corner mode based on phymode and bw.
  6272. * bit 0-1 - operating voltage corner mode for 11a/b.
  6273. * bit 2-3 - operating voltage corner mode for 11g.
  6274. * bit 4-5 - operating voltage corner mode for 11n, 20MHz, 1x1.
  6275. * bit 6-7 - operating voltage corner mode for 11n, 20MHz, 2x2.
  6276. * bit 8-9 - operating voltage corner mode for 11n, 40MHz, 1x1.
  6277. * bit 10-11 - operating voltage corner mode for 11n, 40MHz, 2x2.
  6278. * bit 12-13 - operating voltage corner mode for 11ac, 20MHz, 1x1.
  6279. * bit 14-15 - operating voltage corner mode for 11ac, 20MHz, 2x2.
  6280. * bit 16-17 - operating voltage corner mode for 11ac, 40MHz, 1x1.
  6281. * bit 18-19 - operating voltage corner mode for 11ac, 40MHz, 2x2.
  6282. * bit 20-21 - operating voltage corner mode for 11ac, 80MHz, 1x1.
  6283. * bit 22-23 - operating voltage corner mode for 11ac, 80MHz, 2x2.
  6284. * bit 24-25 - operating voltage corner mode for 11ac, 160MHz, 1x1.
  6285. * bit 26-27 - operating voltage corner mode for 11ac, 160MHz, 2x2.
  6286. * ---------------------------------------------
  6287. * 00 - Static voltage corner SVS
  6288. * 01 - static voltage corner LOW SVS
  6289. * 10 - Dynamic voltage corner selection based on TPUT
  6290. * 11 - Dynamic voltage corner selection based on TPUT and Tx Flush counters
  6291. */
  6292. WMI_PDEV_UPDATE_WDCVS_ALGO, /* 0x9a */
  6293. /* Enable/Disable data stall detection */
  6294. WMI_PDEV_PARAM_DATA_STALL_DETECT_ENABLE, /* 0x9b */
  6295. /* GCMP Support indication to FW */
  6296. WMI_PDEV_PARAM_GCMP_SUPPORT_ENABLE, /* 0x9c */
  6297. /** Enable/Disable chain selection optimization for one chain dtim
  6298. * non-zero - Enable optimization and use this non-zero value as the
  6299. * chain imbalance threshold for optimization to kick in
  6300. * (units = dB)
  6301. * 0- Disable optimization
  6302. */
  6303. WMI_PDEV_PARAM_1CH_DTIM_OPTIMIZED_CHAIN_SELECTION,/* 0x9d */
  6304. /*
  6305. * Override default FW behavior and explicitly enable / disable
  6306. * the use of CCK for PPDU transmissions.
  6307. *
  6308. * When CCK transmissions are disabled, the default OFDM legacy
  6309. * rate will be used instead.
  6310. */
  6311. WMI_PDEV_PARAM_CCK_TX_ENABLE, /* 0x9e */
  6312. /*
  6313. * Set the user-specified antenna gain, but in 0.5 dB units.
  6314. * This is a finer-granularity version of WMI_PDEV_PARAM_ANTENNA_GAIN.
  6315. * E.g. to set a gain of 15.5 dB, a value of 31 could be provided as the
  6316. * value accompanying the PDEV_PARAM_ANTENNA_GAIN_HALF_DB parameter type.
  6317. */
  6318. WMI_PDEV_PARAM_ANTENNA_GAIN_HALF_DB, /* 0x9f */
  6319. /*
  6320. * Global Enable/Disable control for Secondary Retry Feature Set
  6321. *
  6322. * Bit-0 : Enable/Disable Control for "PPDU Secondary Retry Support"
  6323. * Bit-1 : Enable/Disable Control for "RTS Black/White-listing Support"
  6324. * Bit-2 : Enable/Disable Control for "Higher MCS retry restriction on XRETRY failures"
  6325. * Bit 3-5: "Xretry threshold" to use
  6326. */
  6327. WMI_PDEV_PARAM_SECONDARY_RETRY_ENABLE, /* 0xA0 */
  6328. /** Set global uplink triggered PPDU duration limit (usec). */
  6329. WMI_PDEV_PARAM_SET_UL_PPDU_DURATION, /* 0xA1 */
  6330. /** Set target buffer status report trigger interval (ms) */
  6331. WMI_PDEV_PARAM_SET_UL_BSR_TRIG_INTERVAL, /* 0xA2 */
  6332. /** Use simplified equal RU allocation for DL and UL OFDMA */
  6333. WMI_PDEV_PARAM_EQUAL_RU_ALLOCATION_ENABLE, /* 0xA3 */
  6334. /** Enable/disable MWS-COEX 4G (LTE) Quick FTDM.
  6335. * 0 - Don't allow quick FTDM Policy (Default)
  6336. * 1 - Allow quick FTDM policy.
  6337. */
  6338. WMI_PDEV_PARAM_MWSCOEX_4G_ALLOW_QUICK_FTDM, /* 0xA4 */
  6339. /** Set MWS-COEX 5G-NR power limit.
  6340. * 0: Don't apply user specific power limit,
  6341. * use internal power limit (Default)
  6342. * 1-2: invalid value (ignored)
  6343. * 3-21: apply the specified value as the external power limit, in dBm
  6344. * >21: invalid value (ignored)
  6345. */
  6346. WMI_PDEV_PARAM_MWSCOEX_SET_5GNR_PWR_LIMIT, /* 0xA5 */
  6347. /** Set max msdus available for cong ctrl in target */
  6348. WMI_PDEV_PARAM_SET_CONG_CTRL_MAX_MSDUS, /* 0xA6 */
  6349. /*
  6350. * Configures the Estimated Throughput Calculation indication (802.11mc) settings.
  6351. * The accompanying A_UINT32 parameter, in units of seconds, specifies how often FW needs to send the ESP estimation indication to the host.
  6352. * Value 0: Disable this feature
  6353. * Non zero Value: Periodicity (seconds)
  6354. */
  6355. WMI_PDEV_PARAM_ESP_INDICATION_PERIOD, /* 0xA7 */
  6356. /*
  6357. * Enable/Disable periodic peer CFR capture
  6358. * WMI_PEER_CFR_CAPTURE_ENABLE - Enable per peer periodic CFR capture
  6359. * WMI_PEER_CFR_CAPTURE_DISABLE - Disable per peer periodic CFR capture
  6360. */
  6361. WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE,
  6362. /*
  6363. * Set the base timer for the periodic CFR capture. By default this is 10ms.
  6364. * The period ('periodicity' param in wmi_peer_cfr_capture_cmd) of
  6365. * CFR measurment of other peers will be in multiples of this base timer.
  6366. * The unit is in milliseconds.
  6367. */
  6368. WMI_PDEV_PARAM_PERIODIC_CFR_BASE_TIMER,
  6369. /*
  6370. * Once the periodic capture is enabled using
  6371. * WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE, the timer starts running in
  6372. * the target. This parameter will ensure that the timer stops if there are
  6373. * no active peers in the capture list. Once the peers are added again to
  6374. * the capture list, the timer will not start again. The timer has to be
  6375. * started again using WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE.
  6376. * Value 1: Enable this feature
  6377. * Value 0: Disable this feature
  6378. */
  6379. WMI_PDEV_PARAM_ENABLE_OPTIMIZED_PERIODIC_CFR_TIMER,
  6380. /*
  6381. * Configures a portion of the Estimated Service Params indication
  6382. * (802.11mc) settings, which together specify estimated throughput.
  6383. * The accompanying A_UINT32 parameter is the ESP BA WINDOW size advertised
  6384. * Value 0: Disable this feature
  6385. * Non zero Value: ESP BA WINDOW size
  6386. */
  6387. WMI_PDEV_PARAM_ESP_BA_WINDOW,
  6388. /*
  6389. * Configures a portion of the Estimated Service Params indication
  6390. * (802.11mc) settings, which together specify estimated throughput.
  6391. * The accompanying A_UINT32 parameter is the air time fraction to be
  6392. * advertised in the ESP IE
  6393. * Value 0: Disable this feature
  6394. * Non zero Value: Air time fraction in percentage
  6395. */
  6396. WMI_PDEV_PARAM_ESP_AIRTIME_FRACTION,
  6397. /*
  6398. * Configures a portion of the Estimated Service Params indication
  6399. * (802.11mc) settings, which together specify estimated throughput.
  6400. * The accompanying A_UINT32 parameter specifies PPDU duration in units
  6401. * of milliseconds.
  6402. * Value 0: Disable this feature
  6403. * Non zero Value: PPDU duration in milliseconds
  6404. */
  6405. WMI_PDEV_PARAM_ESP_PPDU_DURATION,
  6406. /*
  6407. * Enable/Disable NOL(Non Occupancy list) in firmware
  6408. * 1- Use NOL in firmware
  6409. * 0- Don't use NOL in firmware
  6410. */
  6411. WMI_PDEV_PARAM_USE_NOL,
  6412. /*
  6413. * Allow / Not Allow RU26 in any user's RU allocation field in UL OFDMA
  6414. * trigger frames sent by AP
  6415. * 1 - Allow RU26
  6416. * 0 - Do not allow RU26
  6417. */
  6418. WMI_PDEV_PARAM_UL_RU26_ALLOWED,
  6419. /*
  6420. * Enable/Disable sub channel marking
  6421. * 1 - Enable sub channel marking
  6422. * 0 - Disable sub channel marking (default value)
  6423. */
  6424. WMI_PDEV_PARAM_SUB_CHANNEL_MARKING,
  6425. /*
  6426. * Enable/Disable/Set MGMT_TTL in milliseconds.
  6427. * non_zero - Enable, with the specified value
  6428. * 0 - Disable
  6429. */
  6430. WMI_PDEV_PARAM_SET_MGMT_TTL,
  6431. /*
  6432. * Enable/Disable/Set PROBE_RESP_TTL in milliseconds.
  6433. * non_zero - Enable, with the specified value
  6434. * 0 - Disable
  6435. */
  6436. WMI_PDEV_PARAM_SET_PROBE_RESP_TTL,
  6437. /*
  6438. * TBTT_CTRL_CFG
  6439. * BITS 0 - 2 (refer to WMI_TBTT_CTRL_CFG enum)
  6440. * 0 - DEFAULT -> HW_TBTT
  6441. * 1 - SW_TBTT -> HW_TBTT disabled,
  6442. * software would truncate BURST near TBTT
  6443. * 2 - IGNORE_TBTT
  6444. *
  6445. * BITS 3 - 31 Reserved, must be set to 0x0
  6446. */
  6447. WMI_PDEV_PARAM_SET_TBTT_CTRL,
  6448. /*
  6449. * BITS0 ~1 (refer to enum)
  6450. * 0 - default --> always update
  6451. * 1 - ignore to update
  6452. * 2 - update if larger than threshould
  6453. * 3 - update if less or equal than threshould
  6454. *
  6455. * BITS 2 ~ 31 Threshould
  6456. */
  6457. WMI_PDEV_PARAM_NAV_OVERRIDE_CONFIG,
  6458. /* Set global MU PPDU duration for DL (usec units) */
  6459. WMI_PDEV_PARAM_SET_MU_PPDU_DURATION,
  6460. /*
  6461. * Enable / disable test mode configuration.
  6462. * By default FW will always send triggers dynamically (mix of BSR/Basic).
  6463. * The below testmode are only used for certain tests.
  6464. * A value of 1 in a given bit enables corresponding test mode.
  6465. * bit | test mode
  6466. * ---------------
  6467. * 0 | FW only sends BSR triggers.
  6468. * 1 | FW only sends Basic triggers.
  6469. * 2 | If set, FW enables MU-RTS trigger.
  6470. * | If cleared, FW uses implementation-specific internal default setting.
  6471. * 3 | FW enables unicast embedded trigger in HE MU PPDU.
  6472. * 4-31| reserved.
  6473. */
  6474. WMI_PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_TYPE_ENABLE,
  6475. /*
  6476. * Configure test command to set LSIG len.
  6477. * Value 0: Dynamic LSIG based on STA's qdepth.
  6478. * Non zero Value: LSIG length to be configured
  6479. * as part of trigger frame.
  6480. * bit |
  6481. * ---------------
  6482. * 0 - 30 | Bits storing the host supplied <value>.
  6483. * 31 | If set: The legitimate value closest to the value specified in
  6484. * | in bits 30:0 is directly set in UL len in trigger frame.
  6485. * | The FW performs calculations to determine which legitimate
  6486. * | value is closest to the specified value, if the specified
  6487. * | value is not already legitimate.
  6488. * | If not set: The value in lower bits is the duration (in ms),
  6489. * | from which the UL len is derived.
  6490. * | Example: if host sets 2000 (2ms), then UL Len in trigger
  6491. * | will be derived to accomodate the given duration.
  6492. */
  6493. WMI_PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_LSIG_LEN,
  6494. /*
  6495. * Configure test cmd for fixed rate setting used for UL Trigger
  6496. * (only Basic/BSR triggers).
  6497. * The top nibble is used to select which format to use for encoding
  6498. * the rate specification: 0xVXXXXXXX, V must be 1 for the UL
  6499. * format.
  6500. * If V == 0b0001: format is: 0x1000RRRR.
  6501. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  6502. *
  6503. */
  6504. WMI_PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_FIXED_RATE,
  6505. /*
  6506. * Configure test command to set the mac padding duration.
  6507. * 0 - FW set Mac Padding to 0us
  6508. * 1 - FW set Mac Padding to 8us
  6509. * 2 - FW set Mac Padding to 16us
  6510. */
  6511. WMI_PDEV_PARAM_SET_TEST_CMD_UL_MAC_PADDING,
  6512. /*
  6513. * Configure test command to set the fc duration in BSR trigger frame.
  6514. * value 0 - FW calulates the duration(default).
  6515. * Non zero Value: Duration to be configured.
  6516. */
  6517. WMI_PDEV_PARAM_SET_TEST_CMD_UL_BSR_FC_DURATION,
  6518. /* Parameter used for configuring TWT scheduling properties
  6519. * bit | config_mode
  6520. * -----------------
  6521. * 0 | Disables DL MU for TWT peers within TWT SP
  6522. * 1 | Disables UL MU for TWT peers within TWT SP
  6523. * 2 | Disables scheduling from WMM sched context for TWT peers
  6524. * 3 | If set, FW only sends Basic triggers in TWT SP.
  6525. * 4-31| reserved.
  6526. */
  6527. WMI_PDEV_PARAM_SET_TEST_CMD_TWT_SCHED_CONFIG,
  6528. /* Parameter used to configure OBSS Packet Detect threshold
  6529. * for Non-SRG / SRG based Spatial Reuse feature.
  6530. * (SRG = Spatial Reuse Group)
  6531. * The accepted values are in between 0x00 and 0xFF, inclusive.
  6532. * The parameter value is programmed into the appropriate spatial reuse
  6533. * regsiter, to specify how low the background signal strength from
  6534. * neighboring BSS cells must be, for this AP to employ spatial reuse.
  6535. *
  6536. * The value of the parameter is compared against the OBSS RSSI in dB.
  6537. * It is a 8-bit value whose
  6538. * range is -128 to 127 (after two's complement operation).
  6539. * For example, if the parameter value is 0xF5, the target will
  6540. * allow spatial reuse if the RSSI detected from other BSS
  6541. * is below -10 dB.
  6542. * Similarly, if the parameter value is 0x0A, the target will
  6543. * allow spatial reuse only if the RSSI detected from neighboring
  6544. * BSS cells is no more than 10 dB.
  6545. *
  6546. * If Bit 29 is set, then input value will be in dBm. This is used
  6547. * for chipsets that uses dBm for comparision across MAC/Phy blocks.
  6548. * Older chipsets support input in dB units. For newer chipsets, dBm
  6549. * units will be used.
  6550. * The host will use the WMI_SERVICE_SRG_SRP_SPATIAL_REUSE_SUPPORT
  6551. * service ready bit to differentiate between providing input as dB or dBm.
  6552. *
  6553. * bit | purpose
  6554. * -----------------
  6555. * 0 - 7 | Param Value for non-SRG based Spatial Reuse
  6556. * 8 - 15| Param value for SRG based Spatial Reuse
  6557. * 16 - 28| Reserved
  6558. * 29 | Param value is in dBm units rather than dB units
  6559. * 30 | Enable/Disable SRG based spatial reuse.
  6560. * | If set to 0, ignore bits 8-15.
  6561. * 31 | Enable/Disable Non-SRG based spatial reuse.
  6562. * | If set to 0, ignore bits 0-7.
  6563. */
  6564. WMI_PDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD,
  6565. /* Parameter used for enabling/disabling non wlan coex from boot */
  6566. WMI_PDEV_PARAM_ENABLE_NON_WLAN_COEX_FROM_BOOT,
  6567. /* Parameter used to configure OBSS Packet Detection per Access Category
  6568. * for SRP based and OBSS_PD based spatial reuse feature.
  6569. * (SRP = Spatial Reuse Parameter)
  6570. * Based on the bits set, the corresponding Access Category Queues will have
  6571. * spatial reuse enabled / disabled.
  6572. * bit | AC
  6573. * ------------
  6574. * 0 | BK for SRG/Non-SRG
  6575. * 1 | BE for SRG/Non-SRG
  6576. * 2 | VI for SRG/Non-SRG
  6577. * 3 | VO for SRG/Non-SRG
  6578. * 4 - 15 | Reserved
  6579. * 16 | BK for SRP
  6580. * 17 | BE for SRP
  6581. * 18 | VI for SRP
  6582. * 19 | VO for SRP
  6583. * 20 - 31 | Reserved
  6584. */
  6585. WMI_PDEV_PARAM_SET_CMD_OBSS_PD_PER_AC,
  6586. /*
  6587. * Parameter used to enable/disable FW control of MU-EDCA and AP back-off
  6588. * parameters.
  6589. * If set to zero, FW mode is disabled; if set to 1, FW mode is enabled.
  6590. * Default setting is to have it enabled, and user can disable it in
  6591. * favor of manual mode or host control mode.
  6592. */
  6593. WMI_PDEV_PARAM_ENABLE_FW_DYNAMIC_HE_EDCA,
  6594. /*
  6595. * Parameter used to set default 6 GHz rate.
  6596. * Applies to all non data transmissions in 6 GHz unless
  6597. * overwritten by respective VDEV params.
  6598. */
  6599. WMI_PDEV_PARAM_DEFAULT_6GHZ_RATE,
  6600. /*
  6601. * Configures the duration (in seconds) to delay the channel avoidance
  6602. * indication at WLAN firmware before indicating it to WLAN host,
  6603. * when WWAN (LTE/5GNR) PCC is in conflict due to WWAN-WLAN coexistence.
  6604. * Default value is 60 seconds.
  6605. * If set to zero, FW sends channel avoidance indcation immediately to Host.
  6606. */
  6607. WMI_PDEV_PARAM_MWSCOEX_PCC_CHAVD_DELAY,
  6608. /*
  6609. * Configures the duration (in seconds) to delay the channel avoidance
  6610. * indication at WLAN firmware before indicating it to WLAN host,
  6611. * when WWAN (LTE/5GNR) SCC is in conflict due to WWAN-WLAN coexistence.
  6612. * Default value is 120 seconds.
  6613. * If set to zero, FW sends channel avoidance indcation immediately to Host.
  6614. */
  6615. WMI_PDEV_PARAM_MWSCOEX_SCC_CHAVD_DELAY,
  6616. /*
  6617. * Parameter used to set ageout timer value from host (units = seconds).
  6618. * If not set, FW use default value 2 seconds.
  6619. * ageout time: the time upto which DFS channel information such as
  6620. * beacon found is remembered
  6621. */
  6622. WMI_PDEV_PARAM_SET_DFS_CHAN_AGEOUT_TIME,
  6623. /* Parameter used for enabling/disabling xlna bypass for SAP mode*/
  6624. WMI_PDEV_PARAM_SET_SAP_XLNA_BYPASS,
  6625. /* Parameter used to enable/disable SRP feature */
  6626. WMI_PDEV_PARAM_ENABLE_SRP,
  6627. /* Parameter used to enable/disable SR prohibit feature */
  6628. WMI_PDEV_PARAM_ENABLE_SR_PROHIBIT,
  6629. /*
  6630. * Parameter used to enable/disable UL OFDMA mBSSID support for
  6631. * trigger frames. It is disabled by default.
  6632. * bit | config_mode
  6633. * -----------------
  6634. * 0 | Enable/Disable mBSSID trigger support for basic triggers.
  6635. * 1 | Enable/Disable mBSSID trigger support for BSR triggers.
  6636. */
  6637. WMI_PDEV_PARAM_ENABLE_MBSSID_CTRL_FRAME,
  6638. /*
  6639. * Parameter to set preamble punctured band as a bitmask, i.e.
  6640. * which 20MHz in the 80MHz bandwidth or 40MHz in 160MHz bandwidth.
  6641. * E.g. if first 20MHz is the primary and preamble puncturing is
  6642. * desired for 3rd 20Mhz, then the host will send 0x0100.
  6643. * FW doesn't expect the primary 20MHz to be punctured.
  6644. * This param is required only for 11ax release.
  6645. */
  6646. WMI_PDEV_PARAM_SET_PREAM_PUNCT_BW,
  6647. /*
  6648. * Parameter used to set the Margin dB value to be included for calculating
  6649. * the spatial reuse value in common info field of the UL Trigger frame.
  6650. * Accepted value as per Spec are 0 to 5 dB (inclusive).
  6651. */
  6652. WMI_PDEV_PARAM_SR_TRIGGER_MARGIN,
  6653. /* Param to enable/disable PCIE HW ILP */
  6654. WMI_PDEV_PARAM_PCIE_HW_ILP,
  6655. /*
  6656. * Configure the TXTD_START_TIMESTAMP parameters
  6657. * The timestamp units are nanoseconds.
  6658. * This parameter can be used to adjust at what point the TXTD module
  6659. * will start operating after the STA connects to an AP.
  6660. */
  6661. WMI_PDEV_PARAM_SET_TXTD_START_TIMESTAMP,
  6662. /*
  6663. * Parameter to configure and enable/disable features for mesh usecases
  6664. * bit | config_mode
  6665. * -----------------
  6666. * 0 | Set to 1 to disable BSSID based spatial reuse.
  6667. * 1-31 | Reserved.
  6668. */
  6669. WMI_PDEV_PARAM_SET_MESH_PARAMS,
  6670. /* Param to enable low latency mode */
  6671. WMI_PDEV_PARAM_LOW_LATENCY_SCHED_MODE,
  6672. /* Param to enable per USERPD SSR - for MultiPD enabled chips */
  6673. WMI_PDEV_PARAM_MPD_USERPD_SSR,
  6674. /*
  6675. * Param to disable Hardware Assist feature,
  6676. * i.e. Disables HW feature that reconstructs the PPDU
  6677. * by picking failing MPDUs from prior FES attempt.
  6678. */
  6679. WMI_PDEV_PARAM_DISABLE_HW_ASSIST,
  6680. /*
  6681. * Param to Enable/Disable Tx on DFS for Scan Radio RDP
  6682. * Send MGMT frames on the DFS channel before Tx on the said channel
  6683. * when in monitor mode.
  6684. * Scan Radio RDP should do Tx on DFS channel based on available
  6685. * Tx frame on DFS without doing CAC.
  6686. * Host should ensure to send this param only for Scan Radio RDP.
  6687. * This param used to inform Scan Radio Supports Tx on DFS channel.
  6688. */
  6689. WMI_PDEV_PARAM_SCAN_RADIO_TX_ON_DFS,
  6690. } WMI_PDEV_PARAM;
  6691. #define WMI_PDEV_ONLY_BSR_TRIG_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 0, 1)
  6692. #define WMI_PDEV_ONLY_BSR_TRIG_ENABLE(trig_type) WMI_SET_BITS(trig_type, 0, 1, 1)
  6693. #define WMI_PDEV_ONLY_BSR_TRIG_DISABLE(trig_type) WMI_SET_BITS(trig_type, 0, 1, 0)
  6694. #define WMI_PDEV_ONLY_BASIC_TRIG_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 1, 1)
  6695. #define WMI_PDEV_ONLY_BASIC_TRIG_ENABLE(trig_type) WMI_SET_BITS(trig_type, 1, 1, 1)
  6696. #define WMI_PDEV_ONLY_BASIC_TRIG_DISABLE(trig_type) WMI_SET_BITS(trig_type, 1, 1, 0)
  6697. #define WMI_PDEV_MU_RTS_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 2, 1)
  6698. #define WMI_PDEV_MU_RTS_ENABLE(trig_type) WMI_SET_BITS(trig_type, 2, 1, 1)
  6699. #define WMI_PDEV_MU_RTS_DISABLE(trig_type) WMI_SET_BITS(trig_type, 2, 1, 0)
  6700. #define WMI_PDEV_EMBEDDED_TRIGGER_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 3, 1)
  6701. #define WMI_PDEV_EMBEDDED_TRIGGER_ENABLE(trig_type) WMI_SET_BITS(trig_type, 3, 1, 1)
  6702. #define WMI_PDEV_EMBEDDED_TRIGGER_DISABLE(trig_type) WMI_SET_BITS(trig_type, 3, 1, 0)
  6703. #define WMI_PDEV_TWT_SCHED_CFG_IS_DL_MU_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 0, 1)
  6704. #define WMI_PDEV_TWT_SCHED_CFG_DL_MU_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 0, 1, 1)
  6705. #define WMI_PDEV_TWT_SCHED_CFG_DL_MU_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 0, 1, 0)
  6706. #define WMI_PDEV_TWT_SCHED_CFG_IS_UL_MU_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 1, 1)
  6707. #define WMI_PDEV_TWT_SCHED_CFG_UL_MU_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 1, 1, 1)
  6708. #define WMI_PDEV_TWT_SCHED_CFG_UL_MU_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 1, 1, 0)
  6709. #define WMI_PDEV_TWT_SCHED_CFG_IS_WMM_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 2, 1)
  6710. #define WMI_PDEV_TWT_SCHED_CFG_WMM_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 2, 1, 1)
  6711. #define WMI_PDEV_TWT_SCHED_CFG_WMM_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 2, 1, 0)
  6712. #define WMI_PDEV_TWT_SCHED_CFG_IS_USE_ONLY_BASIC_TRIGGER_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 3, 1)
  6713. #define WMI_PDEV_TWT_SCHED_CFG_USE_ONLY_BASIC_TRIGGER_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 3, 1, 1)
  6714. #define WMI_PDEV_TWT_SCHED_CFG_USE_ONLY_BASIC_TRIGGER_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 3, 1, 0)
  6715. #define WMI_PDEV_LSIG_LEN_DURATION_ENABLE(lsig_len) WMI_SET_BITS(lsig_len, 0, 31, 1)
  6716. #define WMI_PDEV_LSIG_LEN_DURATION_DISABLE(lsig_len) WMI_SET_BITS(lsig_len, 0, 31, 0)
  6717. #define WMI_PDEV_LSIG_LEN_DURATION_GET(lsig_len) WMI_GET_BITS(lsig_len, 0, 30)
  6718. #define WMI_PDEV_LSIG_LEN_DURATION_SET(lsig_len, value) WMI_SET_BITS(lsig_len, 0, 30, value)
  6719. #define WMI_PDEV_IS_NON_SRG_ENABLED(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 31, 1)
  6720. #define WMI_PDEV_NON_SRG_ENABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 31, 1, 1)
  6721. #define WMI_PDEV_NON_SRG_DISABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 31, 1, 0)
  6722. #define WMI_PDEV_NON_SRG_PD_THRESHOLD_SET(pd_threshold_cfg, value) WMI_SET_BITS(pd_threshold_cfg, 0, 8, value)
  6723. #define WMI_PDEV_NON_SRG_PD_THRESHOLD_GET(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 0, 8)
  6724. #define WMI_PDEV_IS_SRG_ENABLED(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 30, 1)
  6725. #define WMI_PDEV_SRG_ENABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 30, 1, 1)
  6726. #define WMI_PDEV_SRG_DISABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 30, 1, 0)
  6727. #define WMI_PDEV_SRG_PD_THRESHOLD_SET(pd_threshold_cfg, value) WMI_SET_BITS(pd_threshold_cfg, 8, 8, value)
  6728. #define WMI_PDEV_SRG_PD_THRESHOLD_GET(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 8, 8)
  6729. #define WMI_PDEV_IS_PD_THRESHOLD_IN_DBM(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 29, 1)
  6730. #define WMI_PDEV_SET_PD_THRESHOLD_IN_DBM(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 29, 1, 1)
  6731. #define WMI_PDEV_OBSS_PD_ENABLE_PER_AC_SET(per_ac_cfg, value) WMI_SET_BITS(per_ac_cfg, 0, 4, value)
  6732. #define WMI_PDEV_OBSS_PD_ENABLE_PER_AC_GET(per_ac_cfg) WMI_GET_BITS(per_ac_cfg, 0, 4)
  6733. #define WMI_PDEV_SRP_ENABLE_PER_AC_SET(per_ac_cfg, value) WMI_SET_BITS(per_ac_cfg, 16, 4, value)
  6734. #define WMI_PDEV_SRP_ENABLE_PER_AC_GET(per_ac_cfg) WMI_GET_BITS(per_ac_cfg, 16, 4)
  6735. typedef struct {
  6736. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param */
  6737. /** pdev_id for identifying the MAC
  6738. * See macros starting with WMI_PDEV_ID_ for values.
  6739. */
  6740. A_UINT32 pdev_id;
  6741. /** parameter id */
  6742. A_UINT32 param_id; /* WMI_PDEV_PARAM */
  6743. /** parameter value */
  6744. A_UINT32 param_value;
  6745. } wmi_pdev_set_param_cmd_fixed_param;
  6746. /* param values for WMI_PDEV_PARAM_SET_TBTT_CTRL's TBTT_CTRL_CFG bit-field */
  6747. typedef enum {
  6748. WMI_TBTT_CTRL_HW_TRUNCATE = 0,
  6749. WMI_TBTT_CTRL_SW_TRUNCATE,
  6750. WMI_TBTT_CTRL_IGNORE_TBTT,
  6751. WMI_TBTT_CTRL_MAX = 0x7,
  6752. } WMI_TBTT_CTRL_CFG;
  6753. /** MACRO to set / get TBTT_CTRL_CFG bit-field within
  6754. * WMI_PDEV_PARAM_SET_TBTT_CTRL:
  6755. * bits 0~2 : TBTT_CTRL_CFG
  6756. * bits 3~31: Reserved (set to 0x0)
  6757. */
  6758. #define WMI_PDEV_PARAM_TBTT_CTRL_CFG_S 0
  6759. #define WMI_PDEV_PARAM_TBTT_CTRL_CFG 0x00000007
  6760. #define WMI_PDEV_PARAM_GET_TBTT_CTRL_CFG(word32) \
  6761. WMI_F_MS(word32, WMI_PDEV_PARAM_TBTT_CTRL_CFG)
  6762. #define WMI_PDEV_PARAM_SET_TBTT_CTRL_CFG(word32, value) \
  6763. WMI_F_RMW(word32,value,WMI_PDEV_PARAM_TBTT_CTRL_CFG)
  6764. /** MACRO define to set / get 11b and 11ag mode TX chain number:
  6765. * bit 0~15 : 11b mode TX chain number.
  6766. * bit 16~31: 11ag mode TX chain number.
  6767. */
  6768. #define WMI_PDEV_PARAM_11B_TX_CHAIN_NUM_S 0
  6769. #define WMI_PDEV_PARAM_11B_TX_CHAIN_NUM 0x0000FFFF
  6770. #define WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM_S 16
  6771. #define WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM 0xFFFF0000
  6772. #define WMI_PDEV_PARAM_GET_11B_TX_CHAIN_NUM(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_11B_TX_CHAIN_NUM)
  6773. #define WMI_PDEV_PARAM_SET_11B_TX_CHAIN_NUM(word32, value) WMI_F_RMW(word32,value,WMI_PDEV_PARAM_11B_TX_CHAIN_NUM)
  6774. #define WMI_PDEV_PARAM_GET_11AG_TX_CHAIN_NUM(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM)
  6775. #define WMI_PDEV_PARAM_SET_11AG_TX_CHAIN_NUM(word32, value) WMI_F_RMW(word32,value,WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM)
  6776. /* param_value for param_id WMI_PDEV_PARAM_CTS_CBW */
  6777. typedef enum {
  6778. WMI_CTS_CBW_INVALID = 0,
  6779. WMI_CTS_CBW_20,
  6780. WMI_CTS_CBW_40,
  6781. WMI_CTS_CBW_80,
  6782. WMI_CTS_CBW_80_80,
  6783. WMI_CTS_CBW_160,
  6784. } WMI_CTS_CBW;
  6785. typedef struct {
  6786. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param */
  6787. /** pdev_id for identifying the MAC
  6788. * See macros starting with WMI_PDEV_ID_ for values.
  6789. */
  6790. A_UINT32 pdev_id;
  6791. /** parameter */
  6792. A_UINT32 param;
  6793. } wmi_pdev_get_tpc_config_cmd_fixed_param;
  6794. typedef struct {
  6795. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_div_get_rssi_antid_fixed_param */
  6796. /** pdev_id for identifying the MAC */
  6797. A_UINT32 pdev_id;
  6798. /** RSSI (rssi_chain_x_pri20) on each chain (units: dB above noise floor) */
  6799. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  6800. /** index of the last-used antenna for each chain */
  6801. A_UINT32 ant_id[WMI_MAX_CHAINS];
  6802. /** mac address of diversity peer */
  6803. wmi_mac_addr macaddr;
  6804. } wmi_pdev_div_get_rssi_antid_fixed_param;
  6805. typedef enum {
  6806. WMI_TPC_STATS_EVENT_SEND_REG = 0x00000001,
  6807. WMI_TPC_STATS_EVENT_SEND_RATE = 0x00000002,
  6808. WMI_TPC_STATS_EVENT_SEND_CTL = 0x00000004,
  6809. WMI_TPC_STATS_EVENT_SEND_REG_RATE_CTL = 0x00000007, /* REG | RATE | CTL */
  6810. } WMI_PDEV_TPC_STATS_PARAMS;
  6811. typedef struct {
  6812. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_stats_cmd_fixed_param */
  6813. /** pdev_id for identifying the MAC
  6814. * See macros starting with WMI_PDEV_ID_ for values.
  6815. */
  6816. A_UINT32 pdev_id;
  6817. /** parameter -
  6818. * This is to specify whether we want only the target power
  6819. * information (rates array) or the CTL power or the regulatory
  6820. * power information. At present, we send all of them.
  6821. */
  6822. A_UINT32 param; /* Currently expect WMI_TPC_STATS_EVENT_SEND_REG_RATE_CTL
  6823. * as a host specification that rates array, regulatory
  6824. * power array, and ctl power array are all to be sent.
  6825. * See WMI_PDEV_TPC_STATS_PARAMS.
  6826. */
  6827. } wmi_pdev_get_tpc_stats_cmd_fixed_param;
  6828. typedef struct {
  6829. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_stats_event_fixed_param */
  6830. A_UINT32 pdev_id; /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values */
  6831. 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 */
  6832. A_UINT32 event_count; /* Incremented for every event chunk for Host to know the sequence */
  6833. /* wmi_tpc_configs TLV to optionally follow */
  6834. /* wmi_max_reg_power_allowed TLVs to optionally follow */
  6835. /* wmi_tpc_rates_array TLVs to optionally follow */
  6836. /* wmi_tpc_ctl_pwr_table TLVs to optionally follow */
  6837. } wmi_pdev_get_tpc_stats_event_fixed_param;
  6838. typedef struct {
  6839. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tpc_configs */
  6840. A_UINT32 regDomain;
  6841. A_UINT32 chanFreq; /* current channel in MHz */
  6842. A_UINT32 phyMode; /* current phy mode - See WLAN_PHY_MODE for the different phy modes */
  6843. A_UINT32 maxAntennaGain; /* Maximum antenna gain for the current regulatory in 0.25 dBm steps */
  6844. A_UINT32 twiceMaxRDPower; /* Maximum transmit power allowed in the regulatory domain in 0.25 dBm steps */
  6845. A_INT32 userAntennaGain; /* User specified antenna gain in 0.25 dBm steps */
  6846. A_UINT32 powerLimit; /* The overall power limit in 0.25 dBm steps */
  6847. A_UINT32 rateMax; /* The total number of rates supported */
  6848. A_UINT32 numTxChain; /* The total number of active chains */
  6849. A_UINT32 ctl; /* See CONFORMANCE_TEST_LIMITS enumeration */
  6850. A_UINT32 flags; /* See WMI_TPC_CONFIG_EVENT_FLAG */
  6851. } wmi_tpc_configs;
  6852. typedef struct {
  6853. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_max_reg_power_allowed */
  6854. A_UINT32 reg_power_type; /* 0: maxRegAllowedPower (1D array),
  6855. * 1: maxRegAllowedPowerAGCDD (2D array),
  6856. * 2: maxRegAllowedPowerAGSTBC (2D array),
  6857. * 3: maxRegAllowedPowerAGTXBF (2D array)
  6858. */
  6859. A_UINT32 reg_power_array_len; /* Length of the regulatory power array being sent in bytes */
  6860. A_UINT32 d1; /* the length of 1st (innermost) dimension array */
  6861. A_UINT32 d2; /* the length of 2nd dimension array */
  6862. A_UINT32 d3; /* the length of 3rd dimension array (for future use) */
  6863. A_UINT32 d4; /* the length of 4th dimension array (for future use) */
  6864. /*
  6865. * This TLV is followed by an A_INT16 TLV-array that will carry
  6866. * one of the four types of regulatory power arrays.
  6867. *
  6868. * The multi-dimensional regulatory power array will be communicated
  6869. * as a flat array: Host to stitch it back as 2D array.
  6870. * For an array[a][b][c][d], d1 = d, d2 = c, d3 = b, d4 = a
  6871. * For a 2D array, array[a][b], d1 = b, d2 = a, d3 = 1, d4 = 1
  6872. * The possible types of following A_INT16 TLV arrays are
  6873. * 1. A_INT16 maxRegAllowedPower[WHAL_TPC_TX_NUM_CHAIN];
  6874. * 2. A_INT16 maxRegAllowedPowerAGCDD[WHAL_TPC_TX_NUM_CHAIN - 1][WHAL_TPC_TX_NUM_CHAIN - 1];
  6875. * 3. A_INT16 maxRegAllowedPowerAGSTBC[WHAL_TPC_TX_NUM_CHAIN - 1][WHAL_TPC_TX_NUM_CHAIN - 1];
  6876. * 4. A_INT16 maxRegAllowedPowerAGTXBF[WHAL_TPC_TX_NUM_CHAIN - 1][WHAL_TPC_TX_NUM_CHAIN - 1];
  6877. * where WHAL_TPC_TX_NUM_CHAIN=2 for CYP and 8 for HK.
  6878. */
  6879. } wmi_max_reg_power_allowed;
  6880. typedef struct {
  6881. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tpc_rates_array */
  6882. A_UINT32 rate_array_type; /* 0: ratesArray,
  6883. * 1: ratesArray2 (for chain > 4),
  6884. * 2: dl_ofdma rate array
  6885. */
  6886. A_UINT32 rate_array_len;
  6887. /* This TLV will be followed by an A_UINT16 TLV array that will
  6888. * carry one of the types of TPC rate arrays.
  6889. * All the rates arrays are 1D arrays.
  6890. * The possible types of following A_UINT16 TLV arrays are
  6891. * 1. A_UINT16 ratesArray[WHAL_TPC_RATE_MAX];
  6892. * This array has to be referred when number of active chains is < 4
  6893. * 2. A_UINT16 ratesArray2[WHAL_TPC_RATE_MAX];
  6894. * This array has to be referred when number of active chains is > 4
  6895. * 3. A_UINT16 ratesArray_DL_OFDMA[72];
  6896. * WHAL_TPC_RATE_MAX is 748 for HK (considering PHY A0 8x8)
  6897. * WHAL_TPC_RATE_MAX is 188 for CYP (considering PHY A0 2x2)
  6898. * Each 16 bit value in the rates array carries both SU and MU
  6899. * target power information.
  6900. * Bits 0:7 contained the SU target power (signed value, 0.25 dBm units),
  6901. * bits 8:15 denote the MU target power (signed value, 0.25 dBm units).
  6902. */
  6903. } wmi_tpc_rates_array;
  6904. typedef struct {
  6905. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tpc_ctl_pwr_table */
  6906. A_UINT32 ctl_array_type; /* 0: ctl_array,
  6907. * 1: ctl_160 array,
  6908. * 2: ctl_dlOfdma array,
  6909. * 3: ctl_ulOfdma array
  6910. */
  6911. A_UINT32 ctl_array_len; /* Length of the CTL array being sent in bytes */
  6912. A_UINT32 end_of_ctl_pwr; /* Message MAY be split into smaller chunks
  6913. * to fit in the WMI svc msg size limit:
  6914. * 0 indicates more chunks of CTL info to follow,
  6915. * 1 indicates end of CTL info.
  6916. */
  6917. A_UINT32 ctl_pwr_count; /* Incremented for every CTL info chunk
  6918. * for Host to know the sequence.
  6919. */
  6920. A_UINT32 d1; /* the length of 1st (innermost) dimension array */
  6921. A_UINT32 d2; /* the length of 2nd dimension array */
  6922. A_UINT32 d3; /* the length of 3rd dimension array */
  6923. A_UINT32 d4; /* the length of 4th dimension array */
  6924. /* This TLV will be followed by an A_INT8 TLV-array that will
  6925. * carry one the types of CTL power arrays.
  6926. * The CTL array will be multi-dimensional, but will be communicated as
  6927. * a flat array; the host has to stitch it back into a 4D array.
  6928. * The possible types of following A_INT8 arrays are
  6929. * 1. A_INT8 ctlEdgePwrBF[WHAL_MAX_NUM_CHAINS][2][10][8];
  6930. * 2. A_INT8 ctlEdgePwr160[WHAL_MAX_NUM_CHAINS/2][2][2][4];
  6931. * 3. A_INT8 ctlEdgePwrBF_dlOFDMA[WHAL_MAX_NUM_CHAINS][2][3][8];
  6932. * For e.g., in ctlEdgePwrBF
  6933. * D4 = WHAL_MAX_NUM_CHAINS = 8 for HK, 2 for CYP, 4 for Pine
  6934. * D3 = BF on/off = 2
  6935. * D2 = 10 which the number of different tx modes,
  6936. * like cck, legacy, HT20, HT40, VHT80, etc.
  6937. * D1 = NSS = 8, number of spatial streams
  6938. * Total number of elements = D4*D3*D2*D1
  6939. * The same will apply for ctl_dlOfdma array, except that the values
  6940. * of d1,d2,d3,d4 will be different.
  6941. */
  6942. } wmi_tpc_ctl_pwr_table;
  6943. typedef struct {
  6944. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_bss_chan_info_request_fixed_param */
  6945. A_UINT32 param; /* 1 = read only, 2= read and clear */
  6946. A_UINT32 pdev_id; /* pdev_id for identifying mac */
  6947. } wmi_pdev_bss_chan_info_request_fixed_param;
  6948. typedef struct {
  6949. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_update_ctltable_request_fixed_param */
  6950. A_UINT32 total_len; /* the total number of ctl table bytes to be transferred */
  6951. A_UINT32 len; /* the number of ctltable bytes in current payload */
  6952. A_UINT32 seq; /* the number of current transfers */
  6953. /*
  6954. * This TLV is followed by the following additional TLVs:
  6955. * ARRAY_BYTE TLV of ctltable_data
  6956. */
  6957. } wmi_pdev_update_ctltable_request_fixed_param;
  6958. #define WMI_ESP_ESTIMATE_GET_BE(airtime) WMI_GET_BITS(airtime, 0, 8)
  6959. #define WMI_ESP_ESTIMATE_SET_BE(airtime, value) WMI_SET_BITS(airtime, 0, 8, value)
  6960. #define WMI_ESP_ESTIMATE_GET_BK(airtime) WMI_GET_BITS(airtime, 8, 8)
  6961. #define WMI_ESP_ESTIMATE_SET_BK(airtime, value) WMI_SET_BITS(airtime, 8, 8, value)
  6962. #define WMI_ESP_ESTIMATE_GET_VI(airtime) WMI_GET_BITS(airtime, 16, 8)
  6963. #define WMI_ESP_ESTIMATE_SET_VI(airtime, value) WMI_SET_BITS(airtime, 16, 8, value)
  6964. #define WMI_ESP_ESTIMATE_GET_VO(airtime) WMI_GET_BITS(airtime, 24, 8)
  6965. #define WMI_ESP_ESTIMATE_SET_VO(airtime, value) WMI_SET_BITS(airtime, 24, 8, value)
  6966. typedef struct {
  6967. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_esp_estimate_event_fixed_param */
  6968. /** pdev_id for identifying the MAC
  6969. * See macros starting with WMI_PDEV_ID_ for values.
  6970. * In non-DBDC case host should set it to 0
  6971. */
  6972. A_UINT32 pdev_id;
  6973. /*
  6974. * Percentage of air time available for each AC
  6975. * BIT[0-7] : AC_BE
  6976. * BIT[8-15] : AC_BK
  6977. * BIT[16-23] : AC_VI
  6978. * BIT[24-31] : AC_VO
  6979. */
  6980. A_UINT32 ac_airtime_percentage;
  6981. } wmi_esp_estimate_event_fixed_param;
  6982. #define WMI_FAST_DIVERSITY_BIT_OFFSET 0
  6983. #define WMI_SLOW_DIVERSITY_BIT_OFFSET 1
  6984. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT 2
  6985. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
  6986. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_GET_BITS(word32) \
  6987. (((word32) & WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
  6988. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SET_BITS(word32, value) \
  6989. do { \
  6990. (word32) &= ~WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
  6991. (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT) & \
  6992. WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
  6993. } while (0)
  6994. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT 6
  6995. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
  6996. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_GET_BITS(word32) \
  6997. (((word32) & WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
  6998. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SET_BITS(word32, value) \
  6999. do { \
  7000. (word32) &= ~WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
  7001. (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT) & \
  7002. WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
  7003. } while (0)
  7004. typedef struct {
  7005. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param */
  7006. union {
  7007. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  7008. /** pdev_id for identifying the MAC
  7009. * See macros starting with WMI_PDEV_ID_ for values.
  7010. */
  7011. A_UINT32 pdev_id;
  7012. };
  7013. /**
  7014. * The following "value" field is divided into bit fields as follows:
  7015. * bits | purpose
  7016. * -----+---------------------------------------
  7017. * 0 | enable/disable FAST diversity
  7018. * 1 | enable/disable SLOW diversity
  7019. * 5:2 | chain0 slow-diversity weighting factor
  7020. * 9:6 | chain1 slow-diversity weighting factor
  7021. * 31:10| currenty unused (set to 0x0)
  7022. * Refer to the above WMI_[FAST/SLOW]_DIVERSITY constants.
  7023. */
  7024. A_UINT32 value;
  7025. } wmi_pdev_set_antenna_diversity_cmd_fixed_param;
  7026. #define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3
  7027. typedef struct {
  7028. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param */
  7029. A_UINT32 vdev_id; /* vdev_id, where RSSI monitoring will take place */
  7030. A_UINT32 request_id; /* host will configure request_id and firmware echo this id in RSSI_BREACH_EVENT */
  7031. A_UINT32 enabled_bitmap; /* bit [0-2] = low_rssi_breach_enabled[0-2] enabled, bit [3-5] = hi_rssi_breach_enabled[0-2] */
  7032. A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] > [1] > [2] */
  7033. A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] < [1] < [2] */
  7034. 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] */
  7035. 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] */
  7036. A_UINT32 min_report_interval; /* After last event is generated, we wait until this interval to generate next event */
  7037. A_UINT32 max_num_report; /* this is to suppress number of event to be generated */
  7038. } wmi_rssi_breach_monitor_config_fixed_param;
  7039. typedef struct {
  7040. /** parameter */
  7041. A_UINT32 param;
  7042. } wmi_pdev_dump_cmd;
  7043. typedef enum {
  7044. PAUSE_TYPE_CHOP = 0x1, /** for MCC (switch channel), only vdev_map is valid */
  7045. PAUSE_TYPE_PS = 0x2, /** for peer station sleep in sap mode, only peer_id is valid */
  7046. PAUSE_TYPE_UAPSD = 0x3, /** for uapsd, only peer_id and tid_map are valid. */
  7047. PAUSE_TYPE_P2P_CLIENT_NOA = 0x4, /** only vdev_map is valid, actually only one vdev id is set at one time */
  7048. PAUSE_TYPE_P2P_GO_PS = 0x5, /** only vdev_map is valid, actually only one vdev id is set at one time */
  7049. PAUSE_TYPE_STA_ADD_BA = 0x6, /** only peer_id and tid_map are valid, actually only one tid is set at one time */
  7050. PAUSE_TYPE_AP_PS = 0x7, /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */
  7051. PAUSE_TYPE_IBSS_PS = 0x8, /** for pausing IBSS vdev when all the peers are in PS. only vdev_map is valid */
  7052. PAUSE_TYPE_CHOP_TDLS_OFFCHAN = 0x9, /** for TDLS offchannel MCC (switch channel), only vdev_map is valid, TDLS connection tracker needs to be notified */
  7053. PAUSE_TYPE_HOST = 0x15, /* host is requesting vdev pause */
  7054. } wmi_tx_pause_type;
  7055. typedef enum {
  7056. ACTION_PAUSE = 0x0,
  7057. ACTION_UNPAUSE = 0x1,
  7058. } wmi_tx_pause_action;
  7059. typedef struct {
  7060. A_UINT32 tlv_header;
  7061. A_UINT32 pause_type;
  7062. A_UINT32 action;
  7063. A_UINT32 vdev_map;
  7064. A_UINT32 peer_id;
  7065. A_UINT32 tid_map;
  7066. } wmi_tx_pause_event_fixed_param;
  7067. typedef enum {
  7068. WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK = 0,
  7069. WMI_MGMT_TX_COMP_TYPE_DISCARD,
  7070. WMI_MGMT_TX_COMP_TYPE_INSPECT,
  7071. WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK,
  7072. WMI_MGMT_TX_COMP_TYPE_MAX,
  7073. } WMI_MGMT_TX_COMP_STATUS_TYPE;
  7074. typedef struct {
  7075. A_UINT32 tlv_header;
  7076. A_UINT32 desc_id; /* from tx_send_cmd */
  7077. A_UINT32 status; /* WMI_MGMT_TX_COMP_STATUS_TYPE */
  7078. /** pdev_id for identifying the MAC that transmitted the mgmt frame
  7079. * See macros starting with WMI_PDEV_ID_ for values.
  7080. */
  7081. A_UINT32 pdev_id;
  7082. /* ppdu_id
  7083. * Hardware PPDU ID for tracking the completion stats
  7084. * A ppdu_id value of 0x0 is invalid, and should be ignored.
  7085. */
  7086. A_UINT32 ppdu_id;
  7087. /* ack_rssi
  7088. * TX mgmt ack RSSI report to host.
  7089. * Only valid when status == COMPLETE_OK and the ACK_RSSI report is enabled
  7090. * ACK RSSI is reported as SNR dB, i.e. how many dB the RSSI is above
  7091. * the noise floor.
  7092. */
  7093. A_UINT32 ack_rssi;
  7094. /* xmit rate in kbps */
  7095. A_UINT32 tx_rate;
  7096. /* phy mode WLAN_PHY_MODE of the channel defined in wlan_defs.h */
  7097. A_UINT32 peer_phymode;
  7098. A_UINT32 retries_count;
  7099. /* current 64 bit TSF timestamp */
  7100. A_UINT32 tx_tsf_l32;
  7101. A_UINT32 tx_tsf_u32;
  7102. } wmi_mgmt_tx_compl_event_fixed_param;
  7103. typedef struct {
  7104. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offchan_data_tx_compl_event_fixed_param */
  7105. A_UINT32 desc_id; /* from tx_send_cmd */
  7106. A_UINT32 status; /* same status as WMI_MGMT_TX_COMP_STATUS_TYPE */
  7107. /** pdev_id for identifying the MAC that transmitted the mgmt frame
  7108. * See macros starting with WMI_PDEV_ID_ for values.
  7109. */
  7110. A_UINT32 pdev_id;
  7111. /* ppdu_id
  7112. * Hardware PPDU ID for tracking the completion stats
  7113. * A ppdu_id value of 0x0 is invalid, and should be ignored.
  7114. */
  7115. A_UINT32 ppdu_id;
  7116. } wmi_offchan_data_tx_compl_event_fixed_param;
  7117. typedef struct {
  7118. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_qos_null_frame_tx_compl_event_fixed_param */
  7119. A_UINT32 desc_id; /* echoed from tx_send_cmd */
  7120. A_UINT32 status; /* same status as WMI_MGMT_TX_COMP_STATUS_TYPE */
  7121. /** pdev_id for identifying the MAC that transmitted the QoS NULL frame
  7122. * See macros starting with WMI_PDEV_ID_ for values.
  7123. */
  7124. A_UINT32 pdev_id;
  7125. /* ppdu_id
  7126. * Hardware PPDU ID for tracking the completion stats
  7127. * A ppdu_id value of 0x0 is invalid, and should be ignored.
  7128. */
  7129. A_UINT32 ppdu_id;
  7130. /* ack_rssi
  7131. * TX mgmt ack RSSI report to host.
  7132. * Only valid when status == COMPLETE_OK and the ACK_RSSI report is enabled
  7133. * ack_rssi is reported in dBm.
  7134. */
  7135. A_INT32 ack_rssi;
  7136. } wmi_qos_null_frame_tx_compl_event_fixed_param;
  7137. typedef struct {
  7138. A_UINT32 tlv_header;
  7139. A_UINT32 num_reports;
  7140. /* tlv for completion
  7141. * A_UINT32 desc_ids[num_reports]; <- from tx_send_cmd
  7142. * A_UINT32 status[num_reports]; <- WMI_MGMT_TX_COMP_STATUS_TYPE
  7143. * A_UINT32 ppdu_id[num_reports]; <- list of PPDU IDs
  7144. * A_UINT32 ack_rssi[num_reports]; <- list of ack RSSI
  7145. * RSSI units = dB w.r.t. noise floor
  7146. */
  7147. } wmi_mgmt_tx_compl_bundle_event_fixed_param;
  7148. #define WMI_TPC_RATE_MAX 160
  7149. /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
  7150. #define WMI_TPC_TX_NUM_CHAIN 4
  7151. typedef enum {
  7152. /* bits 0-7 for table flags */
  7153. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
  7154. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
  7155. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
  7156. /* bits 8-11 for interface version flags */
  7157. WMI_TPC_CONFIG_EVENT_FLAG_IF_MASK = 0x0F00,
  7158. WMI_TPC_CONFIG_EVENT_FLAG_IF_V1 = 0x0100,
  7159. } WMI_TPC_CONFIG_EVENT_FLAG;
  7160. typedef struct {
  7161. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param */
  7162. A_UINT32 regDomain;
  7163. A_UINT32 chanFreq;
  7164. A_UINT32 phyMode;
  7165. A_UINT32 twiceAntennaReduction;
  7166. A_UINT32 twiceMaxRDPower;
  7167. A_INT32 twiceAntennaGain;
  7168. A_UINT32 powerLimit;
  7169. A_UINT32 rateMax;
  7170. A_UINT32 numTxChain;
  7171. A_UINT32 ctl;
  7172. A_UINT32 flags;
  7173. /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
  7174. A_INT8 maxRegAllowedPower[WMI_TPC_TX_NUM_CHAIN];
  7175. A_INT8 maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  7176. A_INT8 maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  7177. A_INT8 maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  7178. /** pdev_id for identifying the MAC
  7179. * See macros starting with WMI_PDEV_ID_ for values.
  7180. */
  7181. A_UINT32 pdev_id;
  7182. /* This TLV is followed by further TLVs:
  7183. * 1. byte array:
  7184. * A_UINT8 ratesArray[];
  7185. * 2a. multi-dimensional array dimension spec:
  7186. * wmi_tlv_arrays_len_param ctlPwrTbl_param[0 or 1]
  7187. *
  7188. * 2b. ctl power table
  7189. * A_UINT8 ctlPwrTbl_buf[bf][modes][nss], i.e.
  7190. * A_UINT8 ctlPwrTbl_buf[d3_len * d2_len * d1_len]
  7191. * bf is [0 or 1] for [on or off].
  7192. * For 2G, modes is [0, 1, 2, or 3] for
  7193. * [cck, legacy, (v)ht20, or (v)ht40]
  7194. * For 5G, modes is [0, 1, 2, or 3] for
  7195. * [legacy, (v)ht20, (v)ht40, or vht80]
  7196. * nss is [0, 1, 2, or 3] for the number of streams 1~4.
  7197. */
  7198. } wmi_pdev_tpc_config_event_fixed_param;
  7199. typedef struct {
  7200. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_div_rssi_antid_event_fixed_param */
  7201. A_UINT32 tlv_header;
  7202. /** how many elements in the MAX_CHAINS arrays below contain valid info */
  7203. A_UINT32 num_chains_valid;
  7204. /** RSSI (rssi_chain_x_pri20) on each chain (units: dB above noise floor) */
  7205. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  7206. /** index of the last-used antenna for each chain */
  7207. A_UINT32 ant_id[WMI_MAX_CHAINS];
  7208. /** mac address of diversity peer */
  7209. wmi_mac_addr macaddr;
  7210. /* EVM value for stream0 and stream1 20Mhz, dB units */
  7211. A_INT32 chain_evm[WMI_MAX_CHAINS];
  7212. } wmi_pdev_div_rssi_antid_event_fixed_param;
  7213. typedef struct {
  7214. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_bss_chan_info_event_fixed_param */
  7215. A_UINT32 freq; /* Units in MHz */
  7216. A_INT32 noise_floor; /* units are dBm */
  7217. /* rx clear - how often the channel was unused */
  7218. A_UINT32 rx_clear_count_low; /* low 31 bits of rx_clear cnt in 64bits format */
  7219. A_UINT32 rx_clear_count_high; /* high 31 bits of rx_clear cnt in 64bits format */
  7220. /* cycle count - elapsed time during the measured period, in clock ticks */
  7221. A_UINT32 cycle_count_low; /* low 31 bits of cycle cnt in 64bits format */
  7222. A_UINT32 cycle_count_high; /* high 31 bits of cycle cnt in 64bits format */
  7223. /* tx cycle count - elapsed time spent in tx, in clock ticks */
  7224. A_UINT32 tx_cycle_count_low; /* low 31 bits of tx_cycle cnt in 64bits format */
  7225. A_UINT32 tx_cycle_count_high; /* high 31 bits of tx_cycle cnt in 64bits format */
  7226. /* rx cycle count - elapsed time spent in rx, in clock ticks */
  7227. A_UINT32 rx_cycle_count_low; /* low 31 bits of rx_cycle cnt in 64bits format */
  7228. A_UINT32 rx_cycle_count_high; /* high 31 bits of rx_cycle cnt in 64bits format */
  7229. A_UINT32 rx_bss_cycle_count_low; /* low 31 bits of rx cycle cnt for my bss in 64bits format */
  7230. A_UINT32 rx_bss_cycle_count_high; /* high 31 bits of rx_cycle cnt for my bss in 64bits format */
  7231. A_UINT32 pdev_id; /* pdev_id for identifying the MAC */
  7232. } wmi_pdev_bss_chan_info_event_fixed_param;
  7233. typedef struct {
  7234. /* WMI event response update ctltable request to host */
  7235. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_update_ctltable_event_fixed_param */
  7236. A_UINT32 total_len; /* the total number of bytes to be transferred */
  7237. A_UINT32 len; /* the number of FW received bytes from host */
  7238. A_UINT32 seq; /* the number of current transfers */
  7239. } wmi_pdev_update_ctltable_event_fixed_param;
  7240. typedef struct {
  7241. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param */
  7242. A_UINT32 periodCnt;
  7243. A_UINT32 L1Cnt;
  7244. A_UINT32 L11Cnt;
  7245. A_UINT32 L12Cnt;
  7246. A_UINT32 L1Entry;
  7247. A_UINT32 L11Entry;
  7248. A_UINT32 L12Entry;
  7249. /** pdev_id for identifying the MAC
  7250. * See macros starting with WMI_PDEV_ID_ for values.
  7251. */
  7252. A_UINT32 pdev_id;
  7253. } wmi_pdev_l1ss_track_event_fixed_param;
  7254. typedef struct {
  7255. A_UINT32 len;
  7256. A_UINT32 msgref;
  7257. A_UINT32 segmentInfo;
  7258. } wmi_pdev_seg_hdr_info;
  7259. /*
  7260. * Transmit power scale factor.
  7261. *
  7262. */
  7263. typedef enum {
  7264. WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
  7265. WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
  7266. WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
  7267. WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
  7268. WMI_TP_SCALE_MIN = 4, /* min, but still on */
  7269. WMI_TP_SCALE_SIZE = 5, /* max num of enum */
  7270. } WMI_TP_SCALE;
  7271. #define WMI_MAX_DEBUG_MESG (sizeof(A_UINT32) * 32)
  7272. typedef struct {
  7273. /** message buffer, NULL terminated */
  7274. char bufp[WMI_MAX_DEBUG_MESG];
  7275. } wmi_debug_mesg_event;
  7276. enum {
  7277. /** P2P device */
  7278. VDEV_SUBTYPE_P2PDEV = 0,
  7279. /** P2P client */
  7280. VDEV_SUBTYPE_P2PCLI,
  7281. /** P2P GO */
  7282. VDEV_SUBTYPE_P2PGO,
  7283. /** BT3.0 HS */
  7284. VDEV_SUBTYPE_BT,
  7285. };
  7286. typedef struct {
  7287. /** idnore power , only use flags , mode and freq */
  7288. wmi_channel chan;
  7289. } wmi_pdev_set_channel_cmd;
  7290. typedef enum {
  7291. WMI_PKTLOG_EVENT_RX = 0x00000001,
  7292. WMI_PKTLOG_EVENT_TX = 0x00000002,
  7293. WMI_PKTLOG_EVENT_RCF = 0x00000004, /* Rate Control Find */
  7294. WMI_PKTLOG_EVENT_RCU = 0x00000008, /* Rate Control Update */
  7295. /* 0x10 used by deprecated DBG_PRINT */
  7296. WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x00000020, /* To support Smart Antenna */
  7297. WMI_PKTLOG_EVENT_SW = 0x00000040, /* To support SW defined events */
  7298. WMI_PKTLOG_EVENT_PHY = 0x00000080, /* To support PHY stats */
  7299. WMI_PKTLOG_EVENT_CBF = 0x00000100, /* To support CBF's filter in */
  7300. } WMI_PKTLOG_EVENT;
  7301. typedef enum {
  7302. WMI_PKTLOG_ENABLE_AUTO = 0, /* (default) FW will decide under what conditions to enable pktlog */
  7303. WMI_PKTLOG_ENABLE_FORCE = 1, /* pktlog unconditionally enabled */
  7304. } WMI_PKTLOG_ENABLE;
  7305. typedef enum {
  7306. WMI_PKTLOG_FILTER_IN = 0, /* capture only for the MAC addresses in pktlog_mac_addr_list*/
  7307. WMI_PKTLOG_FILTER_OUT = 1, /* capture for all MAC addresses except those in pktlog_mac_addr_list */
  7308. } WMI_PKTLOG_FILTER_TYPE;
  7309. typedef struct {
  7310. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param */
  7311. /** pdev_id for identifying the MAC
  7312. * See macros starting with WMI_PDEV_ID_ for values.
  7313. */
  7314. A_UINT32 pdev_id;
  7315. A_UINT32 evlist; /* WMI_PKTLOG_EVENT */
  7316. A_UINT32 enable; /* WMI_PKTLOG_ENABLE */
  7317. } wmi_pdev_pktlog_enable_cmd_fixed_param;
  7318. typedef struct {
  7319. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param */
  7320. /** pdev_id for identifying the MAC
  7321. * See macros starting with WMI_PDEV_ID_ for values.
  7322. */
  7323. A_UINT32 pdev_id;
  7324. } wmi_pdev_pktlog_disable_cmd_fixed_param;
  7325. typedef struct {
  7326. /** TLV tag and len; tag equals
  7327. * WMITLV_TAG_STRUC_wmi_pdev_pktlog_filter_info */
  7328. A_UINT32 tlv_header;
  7329. /** mac addr of the peer to be filtered */
  7330. wmi_mac_addr peer_mac_address;
  7331. } wmi_pdev_pktlog_filter_info;
  7332. typedef struct {
  7333. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_filter_cmd_fixed_param */
  7334. /** pdev_id for identifying the MAC
  7335. * See macros starting with WMI_PDEV_ID_ for values.
  7336. */
  7337. A_UINT32 pdev_id;
  7338. /** 0 - disable filtering, 1 - enable filtering */
  7339. A_UINT32 enable;
  7340. A_UINT32 filter_type; /* WMI_PKTLOG_FILTER_TYPE */
  7341. A_UINT32 num_of_mac_addresses;
  7342. /* This TLV is followed by another TLV of array of structs
  7343. * wmi_pdev_pktlog_filter_info pdev_pktlog_filter_info[];
  7344. */
  7345. } wmi_pdev_pktlog_filter_cmd_fixed_param;
  7346. typedef enum {
  7347. WMI_ROGUE_AP_ON_STA_PS = 1, /* rogue ap on sta ps module */
  7348. } WMI_ROGUE_AP_TYPE;
  7349. typedef struct {
  7350. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rap_config_fixed_param */
  7351. /** pdev_id for identifying the MAC, the default value is WMI_PDEV_ID_SOC
  7352. * See macros starting with WMI_PDEV_ID_ for values.
  7353. */
  7354. A_UINT32 pdev_id;
  7355. /** rogue ap type, see WMI_ROGUE_AP_TYPE */
  7356. A_UINT32 type;
  7357. /** Enable detection of rogue ap in the ps module
  7358. *
  7359. * 0 -> disabled
  7360. * 1 -> enabled (default)
  7361. */
  7362. A_UINT32 sta_ps_detection_enabled;
  7363. /* This TLV is followed by rap_param for each rogue ap:
  7364. * wmi_pdev_set_rap_config_on_sta_ps_tlv_param rap_param[];
  7365. */
  7366. } wmi_pdev_set_rap_config_fixed_param;
  7367. typedef struct {
  7368. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rap_config_on_sta_ps_tlv_param */
  7369. /** bssid of rogue ap */
  7370. wmi_mac_addr bssid;
  7371. } wmi_pdev_set_rap_config_on_sta_ps_tlv_param;
  7372. typedef struct {
  7373. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mib_stats_enable_cmd_fixed_param */
  7374. /** pdev_id for identifying the MAC
  7375. * See macros starting with WMI_PDEV_ID_ for values.
  7376. */
  7377. A_UINT32 pdev_id;
  7378. A_UINT32 enable_Mib; /** enable for mib stats collection. Stats are delivered to host in wmi_mib_stats structure.
  7379. * If enable_Mib=1, stats collection is enabled. If enable_Mib=0, stats collection does not happen */
  7380. } wmi_mib_stats_enable_cmd_fixed_param;
  7381. /** Customize the DSCP (bit) to TID (0-7) mapping for QOS.
  7382. * NOTE: This constant cannot be changed without breaking
  7383. * WMI Compatibility. */
  7384. #define WMI_DSCP_MAP_MAX (64)
  7385. /*
  7386. * @brief dscp_tid_map_cmdid - command to send the dscp to tid map to the target
  7387. * @details
  7388. * Create an API for sending the custom DSCP-to-TID map to the target
  7389. * If this is a request from the user space or from above the UMAC
  7390. * then the best place to implement this is in the umac_if_offload of the OL path.
  7391. * Provide a place holder for this API in the ieee80211com (ic).
  7392. *
  7393. * This API will be a function pointer in the ieee80211com (ic). Any user space calls for manually setting the DSCP-to-TID mapping
  7394. * in the target should be directed to the function pointer in the ic.
  7395. *
  7396. * Implementation details of the API to send the map to the target are as described-
  7397. *
  7398. * 1. The function will have 2 arguments- struct ieee80211com, DSCP-to-TID map.
  7399. * DSCP-to-TID map is a one dimensional u_int32_t array of length 64 to accomodate
  7400. * 64 TID values for 2^6 (64) DSCP ids.
  7401. * Example:
  7402. * A_UINT32 dscp_tid_map[WMI_DSCP_MAP_MAX] = {
  7403. * 0, 0, 0, 0, 0, 0, 0, 0,
  7404. * 1, 1, 1, 1, 1, 1, 1, 1,
  7405. * 2, 2, 2, 2, 2, 2, 2, 2,
  7406. * 3, 3, 3, 3, 3, 3, 3, 3,
  7407. * 4, 4, 4, 4, 4, 4, 4, 4,
  7408. * 5, 5, 5, 5, 5, 5, 5, 5,
  7409. * 6, 6, 6, 6, 6, 6, 6, 6,
  7410. * 7, 7, 7, 7, 7, 7, 7, 7,
  7411. * };
  7412. *
  7413. * 2. Request for the WMI buffer of size equal to the size of the DSCP-to-TID map.
  7414. *
  7415. * 3. Copy the DSCP-to-TID map into the WMI buffer.
  7416. *
  7417. * 4. Invoke the wmi_unified_cmd_send to send the cmd buffer to the target with the
  7418. * WMI_PDEV_SET_DSCP_TID_MAP_CMDID. Arguments to the wmi send cmd API
  7419. * (wmi_unified_send_cmd) are wmi handle, cmd buffer, length of the cmd buffer and
  7420. * the WMI_PDEV_SET_DSCP_TID_MAP_CMDID id.
  7421. *
  7422. */
  7423. /* DEPRECATED - use VDEV level command instead
  7424. * (wmi_vdev_set_dscp_tid_map_cmd_fixed_param)
  7425. */
  7426. typedef struct {
  7427. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param */
  7428. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  7429. /* map indicating DSCP to TID conversion */
  7430. A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  7431. } wmi_pdev_set_dscp_tid_map_cmd_fixed_param;
  7432. typedef struct {
  7433. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_dscp_tid_map_cmd_fixed_param */
  7434. A_UINT32 vdev_id;
  7435. /** map indicating DSCP to TID conversion */
  7436. A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  7437. A_UINT32 enable_override;
  7438. } wmi_vdev_set_dscp_tid_map_cmd_fixed_param;
  7439. enum WMI_WAKE_GPIO_TYPE {
  7440. WMI_WAKE_GPIO_LOW = 1,
  7441. WMI_WAKE_GPIO_HIGH = 2,
  7442. WMI_WAKE_GPIO_RISING_EDGE = 3,
  7443. WMI_WAKE_GPIO_FALLING_EDGE = 4,
  7444. };
  7445. /**
  7446. * Set GPIO numbers used to wakeup host and wakeup target.
  7447. */
  7448. typedef struct {
  7449. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param */
  7450. A_UINT32 host_wakeup_gpio; /* gpio num used to wakeup host, 0xff disable wakeup gpio */
  7451. A_UINT32 host_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
  7452. A_UINT32 target_wakeup_gpio; /* gpio num used to wakeup target, 0xff disable wakeup gpio */
  7453. A_UINT32 target_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
  7454. } WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param;
  7455. /** Fixed rate (rate-code) for broadcast/ multicast data frames */
  7456. /* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames
  7457. * @details
  7458. * Create an API for setting the custom rate for the MCAST and BCAST frames
  7459. * in the target. If this is a request from the user space or from above the UMAC
  7460. * then the best place to implement this is in the umac_if_offload of the OL path.
  7461. * Provide a place holder for this API in the ieee80211com (ic).
  7462. *
  7463. * Implementation details of the API to set custom rates for MCAST and BCAST in
  7464. * the target are as described-
  7465. *
  7466. * 1. The function will have 3 arguments-
  7467. * vap structure,
  7468. * MCAST/ BCAST identifier code,
  7469. * 8 bit rate code
  7470. *
  7471. * The rate-code is a 1-byte field in which:for given rate, nss and preamble
  7472. * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
  7473. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
  7474. * b'3-b'0 indicate the rate, which is indicated as follows:
  7475. * OFDM : 0: OFDM 48 Mbps
  7476. * 1: OFDM 24 Mbps
  7477. * 2: OFDM 12 Mbps
  7478. * 3: OFDM 6 Mbps
  7479. * 4: OFDM 54 Mbps
  7480. * 5: OFDM 36 Mbps
  7481. * 6: OFDM 18 Mbps
  7482. * 7: OFDM 9 Mbps
  7483. * CCK (pream == 1)
  7484. * 0: CCK 11 Mbps Long
  7485. * 1: CCK 5.5 Mbps Long
  7486. * 2: CCK 2 Mbps Long
  7487. * 3: CCK 1 Mbps Long
  7488. * 4: CCK 11 Mbps Short
  7489. * 5: CCK 5.5 Mbps Short
  7490. * 6: CCK 2 Mbps Short
  7491. * HT/VHT (pream == 2/3)
  7492. * 0..7: MCS0..MCS7 (HT)
  7493. * 0..9: MCS0..MCS9 (VHT)
  7494. *
  7495. * 2. Invoke the wmi_unified_vdev_set_param_send to send the rate value
  7496. * to the target.
  7497. * Arguments to the API are-
  7498. * wmi handle,
  7499. * VAP interface id (av_if_id) defined in ol_ath_vap_net80211,
  7500. * WMI_VDEV_PARAM_BCAST_DATA_RATE/ WMI_VDEV_PARAM_MCAST_DATA_RATE,
  7501. * rate value.
  7502. */
  7503. typedef enum {
  7504. WMI_SET_MCAST_RATE,
  7505. WMI_SET_BCAST_RATE
  7506. } MCAST_BCAST_RATE_ID;
  7507. typedef struct {
  7508. MCAST_BCAST_RATE_ID rate_id;
  7509. A_UINT32 rate;
  7510. } mcast_bcast_rate;
  7511. typedef struct {
  7512. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_params */
  7513. A_UINT32 cwmin;
  7514. A_UINT32 cwmax;
  7515. A_UINT32 aifs;
  7516. A_UINT32 txoplimit;
  7517. A_UINT32 acm;
  7518. A_UINT32 no_ack;
  7519. } wmi_wmm_params;
  7520. /* DEPRECATED - use VDEV level command instead
  7521. * (wmi_vdev_set_wmm_params_cmd_fixed_param)
  7522. */
  7523. typedef struct {
  7524. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */
  7525. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  7526. A_UINT32 dg_type;
  7527. /* The TLVs for the 4 AC follows:
  7528. * wmi_wmm_params wmm_params_ac_be;
  7529. * wmi_wmm_params wmm_params_ac_bk;
  7530. * wmi_wmm_params wmm_params_ac_vi;
  7531. * wmi_wmm_params wmm_params_ac_vo;
  7532. */
  7533. } wmi_pdev_set_wmm_params_cmd_fixed_param;
  7534. typedef enum {
  7535. WMI_REQUEST_PEER_STAT = 0x00001,
  7536. WMI_REQUEST_AP_STAT = 0x00002,
  7537. WMI_REQUEST_PDEV_STAT = 0x00004,
  7538. WMI_REQUEST_VDEV_STAT = 0x00008,
  7539. WMI_REQUEST_BCNFLT_STAT = 0x00010,
  7540. WMI_REQUEST_VDEV_RATE_STAT = 0x00020,
  7541. WMI_REQUEST_INST_STAT = 0x00040,
  7542. WMI_REQUEST_MIB_STAT = 0x00080,
  7543. WMI_REQUEST_RSSI_PER_CHAIN_STAT = 0x00100,
  7544. WMI_REQUEST_CONGESTION_STAT = 0x00200,
  7545. WMI_REQUEST_PEER_EXTD_STAT = 0x00400,
  7546. WMI_REQUEST_BCN_STAT = 0x00800,
  7547. WMI_REQUEST_BCN_STAT_RESET = 0x01000,
  7548. WMI_REQUEST_PEER_EXTD2_STAT = 0x02000,
  7549. WMI_REQUEST_MIB_EXTD_STAT = 0x04000,
  7550. WMI_REQUEST_PMF_BCN_PROTECT_STAT = 0x08000,
  7551. WMI_REQUEST_VDEV_EXTD_STAT = 0x10000,
  7552. WMI_REQUEST_PDEV_EXTD_STAT = 0x20000,
  7553. } wmi_stats_id;
  7554. /*
  7555. * cfg_retry_count is set to max number of times the AP should try sending
  7556. * QoS Null frames to the STA for measuring the instantaneous RSSI
  7557. *
  7558. * retry_count is used to maintain the number of times the AP has tried sending
  7559. * QoS Null frames to the STA for measuring the instantaneous RSSI
  7560. */
  7561. typedef struct {
  7562. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_sub_struc_param */
  7563. A_UINT32 cfg_retry_count;
  7564. A_UINT32 retry_count;
  7565. } wmi_inst_rssi_stats_params;
  7566. typedef struct {
  7567. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param */
  7568. wmi_stats_id stats_id;
  7569. /** unique id identifying the VDEV, generated by the caller */
  7570. A_UINT32 vdev_id;
  7571. /** peer MAC address */
  7572. wmi_mac_addr peer_macaddr;
  7573. 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. */
  7574. /*
  7575. * This TLV is (optionally) followed by other TLVs:
  7576. * wmi_inst_rssi_stats_params inst_rssi_params;
  7577. * A_UINT32 vdev_id_bitmap[];
  7578. * This array is present and non-zero length in MLO case, stats should
  7579. * only be provided from the vdev_id_bitmap in the bitmap when it is
  7580. * present.
  7581. * wmi_mac_addr mld_macaddr[];
  7582. * This array is present and non-zero length in MLO case, stats should
  7583. * only be provided from the peers with the MLD MAC addresses specified
  7584. * in the array.
  7585. */
  7586. } wmi_request_stats_cmd_fixed_param;
  7587. /* stats type bitmap */
  7588. #define WMI_LINK_STATS_RADIO 0x00000001
  7589. #define WMI_LINK_STATS_IFACE 0x00000002
  7590. #define WMI_LINK_STATS_ALL_PEER 0x00000004
  7591. #define WMI_LINK_STATS_PER_PEER 0x00000008
  7592. /* wifi clear statistics bitmap */
  7593. #define WIFI_STATS_RADIO 0x00000001 /** all radio statistics */
  7594. #define WIFI_STATS_RADIO_CCA 0x00000002 /** cca_busy_time (within radio statistics) */
  7595. #define WIFI_STATS_RADIO_CHANNELS 0x00000004 /** all channel statistics (within radio statistics) */
  7596. #define WIFI_STATS_RADIO_SCAN 0x00000008 /** all scan statistics (within radio statistics) */
  7597. #define WIFI_STATS_IFACE 0x00000010 /** all interface statistics */
  7598. #define WIFI_STATS_IFACE_TXRATE 0x00000020 /** all tx rate statistics (within interface statistics) */
  7599. #define WIFI_STATS_IFACE_AC 0x00000040 /** all ac statistics (within interface statistics) */
  7600. #define WIFI_STATS_IFACE_CONTENTION 0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */
  7601. #define WMI_STATS_IFACE_ALL_PEER 0x00000100 /** All peer stats on this interface */
  7602. #define WMI_STATS_IFACE_PER_PEER 0x00000200 /** Clear particular peer stats depending on the peer_mac */
  7603. /** Default value for stats if the stats collection has not started */
  7604. #define WMI_STATS_VALUE_INVALID 0xffffffff
  7605. #define WMI_DIAG_ID_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 0, 16)
  7606. #define WMI_DIAG_ID_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 0, 16, value)
  7607. #define WMI_DIAG_TYPE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 16, 1)
  7608. #define WMI_DIAG_TYPE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 16, 1, value)
  7609. #define WMI_DIAG_ID_ENABLED_DISABLED_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
  7610. #define WMI_DIAG_ID_ENABLED_DISABLED_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
  7611. typedef struct {
  7612. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param */
  7613. A_UINT32 num_of_diag_events_logs;
  7614. /* The TLVs will follow.
  7615. * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
  7616. * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
  7617. * Bit 17 Indicate if the DIAG type is Enabled/Disabled.
  7618. */
  7619. } wmi_diag_event_log_config_fixed_param;
  7620. #define WMI_DIAG_FREQUENCY_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
  7621. #define WMI_DIAG_FREQUENCY_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
  7622. #define WMI_DIAG_EXT_FEATURE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 18, 1)
  7623. #define WMI_DIAG_EXT_FEATURE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 18, 1, value)
  7624. typedef struct {
  7625. A_UINT32 tlv_header;
  7626. A_UINT32 num_of_diag_events_logs;
  7627. /* The TLVs will follow.
  7628. * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
  7629. * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
  7630. * Bit 17 - Frequncy of the DIAG EVENT/LOG High Frequency -1, Low Frequency - 0
  7631. * Bit 18 - Set if the EVENTS/LOGs are used for EXT DEBUG Framework
  7632. */
  7633. } wmi_diag_event_log_supported_event_fixed_params;
  7634. typedef struct {
  7635. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param*/
  7636. A_UINT32 reserved0; /** placeholder for future */
  7637. } wmi_debug_mesg_flush_fixed_param;
  7638. typedef struct {
  7639. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_fw_data_stall_param */
  7640. A_UINT32 vdev_id_bitmap; /** bitmap representation for vdev_id's where data stall happened */
  7641. A_UINT32 data_stall_type; /** wlan_dbg_data_stall_type_e */
  7642. /** reason_code1:
  7643. * The information stored in reason_code1 varies based on the data stally
  7644. * type values:
  7645. * data_stall_type | reason_code1
  7646. * -----------------------------------------------------
  7647. * HWSCHED_CMD_FLUSH | flush req reason (0-40)
  7648. * RX_REFILL_FAILED | ring_id (0-7)
  7649. * RX_FCS_LEN_ERROR | exact error type
  7650. */
  7651. A_UINT32 reason_code1;
  7652. A_UINT32 reason_code2; /** on which tid/hwq stall happened */
  7653. A_UINT32 recovery_type; /** wlan_dbg_data_stall_recovery_type_e */
  7654. } wmi_debug_mesg_fw_data_stall_param;
  7655. typedef struct {
  7656. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param*/
  7657. A_UINT32 reserved0; /** placeholder for future */
  7658. } wmi_debug_mesg_flush_complete_fixed_param;
  7659. typedef struct {
  7660. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param */
  7661. /* vdev_id, where RSSI breach event occurred */
  7662. A_UINT32 vdev_id;
  7663. /* request id */
  7664. A_UINT32 request_id;
  7665. /* bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is corresponding to hi_rssi[0-2]*/
  7666. A_UINT32 event_bitmap;
  7667. /* rssi at the time of RSSI breach. Unit dBm */
  7668. A_UINT32 rssi;
  7669. /* bssid of the monitored AP's */
  7670. wmi_mac_addr bssid;
  7671. } wmi_rssi_breach_event_fixed_param;
  7672. typedef struct {
  7673. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fw_mem_dump */
  7674. /** unique id identifying the segment */
  7675. A_UINT32 seg_id;
  7676. /** Start address of the segment to be read */
  7677. A_UINT32 seg_start_addr_lo;
  7678. A_UINT32 seg_start_addr_hi;
  7679. /** Length of the segment to be read */
  7680. A_UINT32 seg_length;
  7681. /** Host bufeer address to which the segment will be read and dumped */
  7682. A_UINT32 dest_addr_lo;
  7683. A_UINT32 dest_addr_hi;
  7684. } wmi_fw_mem_dump;
  7685. /* Command to get firmware memory dump*/
  7686. typedef struct {
  7687. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */
  7688. /** unique id identifying the request */
  7689. A_UINT32 request_id;
  7690. /** number of memory dump segments */
  7691. A_UINT32 num_fw_mem_dump_segs;
  7692. /**
  7693. * This TLV is followed by another TLV
  7694. * wmi_fw_mem_dump fw_mem_dump[];
  7695. */
  7696. } wmi_get_fw_mem_dump_fixed_param;
  7697. /** Event to indicate the completion of fw mem dump */
  7698. typedef struct {
  7699. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */
  7700. /** unique id identifying the request, given in the request stats command */
  7701. A_UINT32 request_id;
  7702. /*In case of Firmware memory dump */
  7703. A_UINT32 fw_mem_dump_complete;
  7704. } wmi_update_fw_mem_dump_fixed_param;
  7705. typedef enum {
  7706. WMI_ROAMING_IDLE = 0,
  7707. WMI_ROAMING_ACTIVE = 1,
  7708. } wmi_roam_state;
  7709. /* access categories */
  7710. typedef enum {
  7711. WMI_AC_VO = 0,
  7712. WMI_AC_VI = 1,
  7713. WMI_AC_BE = 2,
  7714. WMI_AC_BK = 3,
  7715. WMI_AC_MAX = 4,
  7716. } wmi_traffic_ac;
  7717. typedef enum {
  7718. WMI_STA_STATS = 0,
  7719. WMI_SOFTAP_STATS = 1,
  7720. WMI_IBSS_STATS = 2,
  7721. WMI_P2P_CLIENT_STATS = 3,
  7722. WMI_P2P_GO_STATS = 4,
  7723. WMI_NAN_STATS = 5,
  7724. WMI_MESH_STATS = 6,
  7725. } wmi_link_iface_type;
  7726. /* channel operating width */
  7727. typedef enum {
  7728. WMI_CHAN_WIDTH_20 = 0,
  7729. WMI_CHAN_WIDTH_40 = 1,
  7730. WMI_CHAN_WIDTH_80 = 2,
  7731. WMI_CHAN_WIDTH_160 = 3,
  7732. WMI_CHAN_WIDTH_80P80 = 4,
  7733. WMI_CHAN_WIDTH_5 = 5,
  7734. WMI_CHAN_WIDTH_10 = 6,
  7735. WMI_CHAN_WIDTH_165 = 7,
  7736. WMI_CHAN_WIDTH_160P160 = 8,
  7737. WMI_CHAN_WIDTH_320 = 9,
  7738. } wmi_channel_width;
  7739. /*Clear stats*/
  7740. typedef struct {
  7741. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */
  7742. /** unique id identifying the VDEV, generated by the caller */
  7743. A_UINT32 vdev_id;
  7744. /** stop_stats_collection_req = 1 will imply stop the statistics collection */
  7745. A_UINT32 stop_stats_collection_req;
  7746. /** identifies what stats to be cleared */
  7747. A_UINT32 stats_clear_req_mask;
  7748. /** identifies which peer stats to be cleared. Valid only while clearing PER_REER */
  7749. wmi_mac_addr peer_macaddr;
  7750. /*
  7751. * This TLV is (optionally) followed by other TLVs:
  7752. * A_UINT32 vdev_id_bitmap[];
  7753. * This array is present and non-zero length in MLO case, stats should
  7754. * only be cleared for the VDEVs in vdev_id_bitmap in the bitmap when
  7755. * it is present.
  7756. * wmi_mac_addr mld_macaddr[];
  7757. * This array is present and non-zero length in MLO case, stats should
  7758. * only be cleared for the peers with the MLD MAC addresses specified
  7759. * in the array.
  7760. */
  7761. } wmi_clear_link_stats_cmd_fixed_param;
  7762. /* Link Stats configuration params. Trigger the link layer statistics collection*/
  7763. typedef struct {
  7764. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param */
  7765. /** threshold to classify the pkts as short or long */
  7766. A_UINT32 mpdu_size_threshold;
  7767. /** set for field debug mode. Driver should collect all statistics regardless of performance impact.*/
  7768. A_UINT32 aggressive_statistics_gathering;
  7769. } wmi_start_link_stats_cmd_fixed_param;
  7770. typedef struct {
  7771. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_link_stats_cmd_fixed_param */
  7772. /** Type of stats required. This is a bitmask WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
  7773. A_UINT32 stats_type;
  7774. /** unique id identifying the VDEV, generated by the caller */
  7775. A_UINT32 vdev_id;
  7776. /** unique id identifying the request, generated by the caller */
  7777. A_UINT32 request_id;
  7778. /** peer MAC address */
  7779. wmi_mac_addr peer_macaddr;
  7780. /*
  7781. * This TLV is (optionally) followed by other TLVs:
  7782. * A_UINT32 vdev_id_bitmap[];
  7783. * This array is present and non-zero length in MLO case, stats should only
  7784. * be provided from the vdev_id_bitmap in the bitmap when it is present.
  7785. * wmi_mac_addr mld_macaddr[];
  7786. * This array is present and non-zero length in MLO case, stats should only
  7787. * be provided from the peers with the MLD MAC addresses specified
  7788. * in the array.
  7789. */
  7790. } wmi_request_link_stats_cmd_fixed_param;
  7791. typedef struct {
  7792. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unified_request_ll_get_sta_cmd_fixed_param */
  7793. /** Type of stats required. This is a bitmask of WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
  7794. A_UINT32 link_stats_type;
  7795. /** unique id identifying the VDEV, generated by the caller */
  7796. A_UINT32 vdev_id;
  7797. /** unique id identifying the request, generated by the caller */
  7798. A_UINT32 request_id;
  7799. /** peer MAC address */
  7800. wmi_mac_addr peer_macaddr;
  7801. /** Type of stats required for get station cmd (see wmi_stats_id enum) */
  7802. A_UINT32 get_sta_stats_id;
  7803. /** 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. */
  7804. A_UINT32 pdev_id;
  7805. /*
  7806. * This TLV is (optionally) followed by other TLVs:
  7807. * A_UINT32 vdev_id_bitmap[];
  7808. * This array is present and non-zero length in MLO case, stats should only
  7809. * be provided from the vdev_id_bitmap in the bitmap when it is present.
  7810. * wmi_mac_addr mld_macaddr[];
  7811. * This array is present and non-zero length in MLO case, stats should only
  7812. * be provided from the peers with the MLD MAC addresses specified
  7813. * in the array.
  7814. */
  7815. } wmi_request_unified_ll_get_sta_cmd_fixed_param;
  7816. #define WLM_STATS_REQ_LINK 0x00000001
  7817. typedef struct {
  7818. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlm_stats_cmd_fixed_param */
  7819. /** unique id identifying the VDEV, generated by the caller */
  7820. A_UINT32 vdev_id;
  7821. /** WLM event request bitmask
  7822. * Used by host to customize the wlm stats report.
  7823. * Filled with a combination of WLM_STATS_xxx values.
  7824. */
  7825. A_UINT32 request_bitmask;
  7826. } wmi_request_wlm_stats_cmd_fixed_param;
  7827. /* channel statistics */
  7828. typedef struct {
  7829. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */
  7830. /** Channel width (20, 40, 80, 80+80, 160) enum wmi_channel_width*/
  7831. A_UINT32 channel_width;
  7832. /** Primary 20 MHz channel */
  7833. A_UINT32 center_freq;
  7834. /** center frequency (MHz) first segment */
  7835. A_UINT32 center_freq0;
  7836. /** center frequency (MHz) second segment */
  7837. A_UINT32 center_freq1;
  7838. /** msecs the radio is awake (32 bits number accruing over time) */
  7839. A_UINT32 radio_awake_time;
  7840. /** msecs the CCA register is busy (32 bits number accruing over time)
  7841. * Includes rx_time but not tx_time.
  7842. */
  7843. A_UINT32 cca_busy_time;
  7844. /** msecs the radio is transmitting (32 bits number accruing over time) */
  7845. A_UINT32 tx_time;
  7846. /** msecs the radio is in active receive (32 bits number accruing over time) */
  7847. A_UINT32 rx_time;
  7848. /*** NOTE ***
  7849. * Be cautious about adding new fields in wmi_channel_stats.
  7850. * STA-centric targets may instantiate many instances of per-channel
  7851. * stats, and consequently may consume a non-trivial amount of on-chip
  7852. * memory for storing the channel stats.
  7853. */
  7854. } wmi_channel_stats;
  7855. /*
  7856. * Each step represents 0.5 dB. The starting value is 0 dBm.
  7857. * Thus the TPC levels cover 0 dBm to 31.5 dBm inclusive in 0.5 dB steps.
  7858. */
  7859. #define MAX_TPC_LEVELS 64
  7860. /* radio statistics */
  7861. typedef struct {
  7862. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats */
  7863. /** Wifi radio (if multiple radio supported) */
  7864. A_UINT32 radio_id;
  7865. /** msecs the radio is awake (32 bits number accruing over time) */
  7866. A_UINT32 on_time;
  7867. /** msecs the radio is transmitting (32 bits number accruing over time) */
  7868. A_UINT32 tx_time;
  7869. /** msecs the radio is in active receive (32 bits number accruing over time) */
  7870. A_UINT32 rx_time;
  7871. /** msecs the radio is awake due to all scan (32 bits number accruing over time) */
  7872. A_UINT32 on_time_scan;
  7873. /** msecs the radio is awake due to NAN (32 bits number accruing over time) */
  7874. A_UINT32 on_time_nbd;
  7875. /** msecs the radio is awake due to G?scan (32 bits number accruing over time) */
  7876. A_UINT32 on_time_gscan;
  7877. /** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */
  7878. A_UINT32 on_time_roam_scan;
  7879. /** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */
  7880. A_UINT32 on_time_pno_scan;
  7881. /** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */
  7882. A_UINT32 on_time_hs20;
  7883. /** number of channels */
  7884. A_UINT32 num_channels;
  7885. /** tx time per TPC level - DEPRECATED
  7886. * This field is deprecated.
  7887. * It is superseded by the WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID message.
  7888. */
  7889. A_UINT32 tx_time_per_tpc[MAX_TPC_LEVELS];
  7890. /** msecs the radio is awake due to Host initiated scan (accruing over time) */
  7891. A_UINT32 on_time_host_scan;
  7892. /** msecs the radio is awake due to LPI scan (accruing over time) */
  7893. A_UINT32 on_time_lpi_scan;
  7894. } wmi_radio_link_stats;
  7895. /** tx time per power level statistics */
  7896. typedef struct {
  7897. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_power_level_stats_evt_fixed_param */
  7898. /** total number of tx power levels */
  7899. A_UINT32 total_num_tx_power_levels;
  7900. /** number of tx power levels that are carried in this event */
  7901. A_UINT32 num_tx_power_levels;
  7902. /** offset of current stats
  7903. * If ((num_tx_power_levels + power_level_offset)) ==
  7904. * total_num_tx_power_levels)
  7905. * this message completes the report of tx time per power levels.
  7906. * Otherwise, additional WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID messages
  7907. * will be sent by the target to deliver the remainder of the tx time
  7908. * per power level stats.
  7909. */
  7910. A_UINT32 power_level_offset;
  7911. /* radio id for this tx time per power level statistics (if multiple radio supported) */
  7912. A_UINT32 radio_id;
  7913. /*
  7914. * This TLV will be followed by a TLV containing a variable-length array of
  7915. * A_UINT32 with tx time per power level data
  7916. * A_UINT32 tx_time_per_power_level[num_tx_power_levels]
  7917. * The tx time is in units of milliseconds.
  7918. * The power levels are board-specific values; a board-specific translation
  7919. * has to be applied to determine what actual power corresponds to each
  7920. * power level.
  7921. * Just as the host has a BDF file available, the host should also have
  7922. * a data file available that provides the power level to power translations.
  7923. */
  7924. } wmi_tx_power_level_stats_evt_fixed_param;
  7925. /** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */
  7926. typedef struct {
  7927. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
  7928. /** unique id identifying the request, given in the request stats command */
  7929. A_UINT32 request_id;
  7930. /** Number of radios*/
  7931. A_UINT32 num_radio;
  7932. /** more_data will be set depending on the number of radios */
  7933. A_UINT32 more_radio_events;
  7934. /*
  7935. * For the event WMI_RADIO_LINK_STATS_EVENTID = 0x16004,
  7936. * FW may not be able to send all the channels (2Ghz, 5Ghz & 6Ghz)
  7937. * together in one event message, due to buffer size limitations.
  7938. * To avoid this limitation, FW will send multiple events to HOST
  7939. * depending upon the number of channels.
  7940. * If more_channels is set to 0 means FW has indicated all the
  7941. * channels for this radio.
  7942. * If more_channels is set to 1, it indicates FW will send another
  7943. * event having additional channels for the same radio.
  7944. */
  7945. A_UINT32 more_channels;
  7946. /*
  7947. * This TLV is followed by another TLV of array of bytes
  7948. * size of(struct wmi_radio_link_stats);
  7949. *
  7950. * This TLV is followed by another TLV of array of bytes
  7951. * num_channels * size of(struct wmi_channel_stats)
  7952. */
  7953. } wmi_radio_link_stats_event_fixed_param;
  7954. /* per rate statistics */
  7955. typedef struct {
  7956. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rate_stats */
  7957. /** rate information
  7958. * The rate-code is a 1-byte field in which:for given rate, nss and preamble
  7959. * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
  7960. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
  7961. * b'3-b'0 indicate the rate, which is indicated as follows:
  7962. * OFDM : 0: OFDM 48 Mbps
  7963. * 1: OFDM 24 Mbps
  7964. * 2: OFDM 12 Mbps
  7965. * 3: OFDM 6 Mbps
  7966. * 4: OFDM 54 Mbps
  7967. * 5: OFDM 36 Mbps
  7968. * 6: OFDM 18 Mbps
  7969. * 7: OFDM 9 Mbps
  7970. * CCK (pream == 1)
  7971. * 0: CCK 11 Mbps Long
  7972. * 1: CCK 5.5 Mbps Long
  7973. * 2: CCK 2 Mbps Long
  7974. * 3: CCK 1 Mbps Long
  7975. * 4: CCK 11 Mbps Short
  7976. * 5: CCK 5.5 Mbps Short
  7977. * 6: CCK 2 Mbps Short
  7978. * HT/VHT (pream == 2/3)
  7979. * 0..7: MCS0..MCS7 (HT)
  7980. * 0..9: MCS0..MCS9 (VHT)
  7981. */
  7982. A_UINT32 rate;
  7983. /** units of 100 Kbps */
  7984. A_UINT32 bitrate;
  7985. /** number of successfully transmitted data pkts (ACK rcvd) */
  7986. A_UINT32 tx_mpdu;
  7987. /** number of received data pkts */
  7988. A_UINT32 rx_mpdu;
  7989. /** number of data packet losses (no ACK) */
  7990. A_UINT32 mpdu_lost;
  7991. /** total number of data pkt retries */
  7992. A_UINT32 retries;
  7993. /** number of short data pkt retries */
  7994. A_UINT32 retries_short;
  7995. /** number of long data pkt retries */
  7996. A_UINT32 retries_long;
  7997. } wmi_rate_stats;
  7998. typedef struct {
  7999. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_link_stats */
  8000. /** peer type (AP, TDLS, GO etc.) enum wmi_peer_type*/
  8001. A_UINT32 peer_type;
  8002. /** mac address */
  8003. wmi_mac_addr peer_mac_address;
  8004. /** peer wmi_CAPABILITY_XXX */
  8005. A_UINT32 capabilities;
  8006. /** number of rates */
  8007. A_UINT32 num_rates;
  8008. } wmi_peer_link_stats;
  8009. /** PEER statistics (once started) reset and start afresh after each connection */
  8010. typedef struct {
  8011. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_stats_event_fixed_param */
  8012. /** unique id identifying the request, given in the request stats command */
  8013. A_UINT32 request_id;
  8014. /** number of peers accomidated in this particular event */
  8015. A_UINT32 num_peers;
  8016. /** Indicates the fragment number */
  8017. A_UINT32 peer_event_number;
  8018. /** Indicates if there are more peers which will be sent as seperate peer_stats event */
  8019. A_UINT32 more_data;
  8020. /**
  8021. * This TLV is followed by another TLV
  8022. * num_peers * size of(struct wmi_peer_stats)
  8023. * num_rates * size of(struct wmi_rate_stats). num_rates is the sum of the rates of all the peers.
  8024. */
  8025. } wmi_peer_stats_event_fixed_param;
  8026. /* per access category statistics */
  8027. typedef struct {
  8028. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_ac_stats */
  8029. /** access category (VI, VO, BE, BK) enum wmi_traffic_ac*/
  8030. A_UINT32 ac_type;
  8031. /** number of successfully transmitted unicast data pkts (ACK rcvd) */
  8032. A_UINT32 tx_mpdu;
  8033. /** number of received unicast mpdus */
  8034. A_UINT32 rx_mpdu;
  8035. /** number of succesfully transmitted multicast data packets */
  8036. /** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */
  8037. A_UINT32 tx_mcast;
  8038. /** number of received multicast data packets */
  8039. A_UINT32 rx_mcast;
  8040. /** number of received unicast a-mpdus */
  8041. A_UINT32 rx_ampdu;
  8042. /** number of transmitted unicast a-mpdus */
  8043. A_UINT32 tx_ampdu;
  8044. /** number of data pkt losses (no ACK) */
  8045. A_UINT32 mpdu_lost;
  8046. /** total number of data pkt retries */
  8047. A_UINT32 retries;
  8048. /** number of short data pkt retries */
  8049. A_UINT32 retries_short;
  8050. /** number of long data pkt retries */
  8051. A_UINT32 retries_long;
  8052. /** data pkt min contention time (usecs) */
  8053. A_UINT32 contention_time_min;
  8054. /** data pkt max contention time (usecs) */
  8055. A_UINT32 contention_time_max;
  8056. /** data pkt avg contention time (usecs) */
  8057. A_UINT32 contention_time_avg;
  8058. /** num of data pkts used for contention statistics */
  8059. A_UINT32 contention_num_samples;
  8060. /** number of pending pkts */
  8061. A_UINT32 tx_pending_msdu;
  8062. } wmi_wmm_ac_stats;
  8063. /* interface statistics */
  8064. typedef struct {
  8065. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats */
  8066. /** access point beacon received count from connected AP */
  8067. A_UINT32 beacon_rx;
  8068. /** access point mgmt frames received count from connected AP (including Beacon) */
  8069. A_UINT32 mgmt_rx;
  8070. /** action frames received count */
  8071. A_UINT32 mgmt_action_rx;
  8072. /** action frames transmit count */
  8073. A_UINT32 mgmt_action_tx;
  8074. /** access Point Beacon and Management frames RSSI (averaged) */
  8075. A_UINT32 rssi_mgmt;
  8076. /** access Point Data Frames RSSI (averaged) from connected AP */
  8077. A_UINT32 rssi_data;
  8078. /** access Point ACK RSSI (averaged) from connected AP */
  8079. A_UINT32 rssi_ack;
  8080. /** number of peers */
  8081. A_UINT32 num_peers;
  8082. /** Indicates how many peer_stats events will be sent depending on the num_peers. */
  8083. A_UINT32 num_peer_events;
  8084. /** number of ac */
  8085. A_UINT32 num_ac;
  8086. /** Roaming Stat */
  8087. A_UINT32 roam_state;
  8088. /** Average Beacon spread offset is the averaged time delay between TBTT and beacon TSF */
  8089. /** Upper 32 bits of averaged 64 bit beacon spread offset */
  8090. A_UINT32 avg_bcn_spread_offset_high;
  8091. /** Lower 32 bits of averaged 64 bit beacon spread offset */
  8092. A_UINT32 avg_bcn_spread_offset_low;
  8093. /** Takes value of 1 if AP leaks packets after sending an ACK for PM=1 otherwise 0 */
  8094. A_UINT32 is_leaky_ap;
  8095. /** Average number of frames received from AP after receiving the ACK for a frame with PM=1 */
  8096. A_UINT32 avg_rx_frms_leaked;
  8097. /** Rx leak watch window currently in force to minimize data loss because of leaky AP. Rx leak window is the
  8098. time driver waits before shutting down the radio or switching the channel and after receiving an ACK for
  8099. a data frame with PM bit set) */
  8100. A_UINT32 rx_leak_window;
  8101. A_UINT32 tx_rts_succ_cnt;
  8102. A_UINT32 tx_rts_fail_cnt;
  8103. A_UINT32 tx_ppdu_succ_cnt;
  8104. A_UINT32 tx_ppdu_fail_cnt;
  8105. /** msecs the interface is in Connected state (accruing over time) */
  8106. A_UINT32 connected_duration;
  8107. /** msecs the interface is in DisConnected state (accruing over time) */
  8108. A_UINT32 disconnected_duration;
  8109. /** msecs the interface is doing RTT ranging (accruing over time) */
  8110. A_UINT32 rtt_ranging_duration;
  8111. /** msecs the interface is in RTT responder mode (accruing over time) */
  8112. A_UINT32 rtt_responder_duration;
  8113. /** Number of Probes (Tx) sent on the interface (accruing over time) */
  8114. A_UINT32 num_probes_tx;
  8115. /** Number of Beacon misses on this interface (accruing over time) */
  8116. A_UINT32 num_beacon_miss;
  8117. } wmi_iface_link_stats;
  8118. typedef enum {
  8119. WMI_OFFLOAD_STATS_TYPE_SOC_BCAST = 0,
  8120. WMI_OFFLOAD_STATS_TYPE_SOC_MCAST = 1,
  8121. WMI_OFFLOAD_STATS_TYPE_SOC_UCAST = 2,
  8122. WMI_OFFLOAD_STATS_TYPE_ARP = 3,
  8123. WMI_OFFLOAD_STATS_TYPE_NS = 4,
  8124. WMI_OFFLOAD_STATS_TYPE_APF_BCAST = 5,
  8125. WMI_OFFLOAD_STATS_TYPE_APF_MCAST = 6,
  8126. WMI_OFFLOAD_STATS_TYPE_APF_UCAST = 7,
  8127. /* Add New offload stat type here */
  8128. WMI_OFFLOAD_STATS_TYPE_MAX,
  8129. } wmi_offload_stats_type;
  8130. typedef struct {
  8131. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_offload_stats */
  8132. /** Type of offload stat. enum wmi_offload_stats_type **/
  8133. A_UINT32 type;
  8134. /** Number of (MSDUs) frames Received **/
  8135. A_UINT32 rx_count;
  8136. /** Number of frames Dropped **/
  8137. A_UINT32 drp_count;
  8138. /** Number of frames for which FW Responded (Valid for ARP and NS only). (or)
  8139. * Number of frames forwarded to Host (Valid for stats type except ARP and NS). **/
  8140. A_UINT32 fwd_count;
  8141. } wmi_iface_offload_stats;
  8142. /** Interface statistics (once started) reset and start afresh after each connection */
  8143. typedef struct {
  8144. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param */
  8145. /** unique id identifying the request, given in the request stats command */
  8146. A_UINT32 request_id;
  8147. /** unique id identifying the VDEV, generated by the caller */
  8148. A_UINT32 vdev_id;
  8149. /** Number of offload stats **/
  8150. A_UINT32 num_offload_stats;
  8151. /*
  8152. * This TLV is followed by other TLVs:
  8153. * wmi_iface_link_stats iface_link_stats;
  8154. * num_ac * size of(struct wmi_wmm_ac_stats)
  8155. * wmi_iface_offload_stats iface_offload_stats[num_offload_stats]
  8156. */
  8157. } wmi_iface_link_stats_event_fixed_param;
  8158. typedef struct {
  8159. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlm_stats_event_fixed_param */
  8160. /** bitmask listing which WLM stats are provided.
  8161. * Copied from wlm_stats_cmd_fixed_param.
  8162. * (This field is provided for convenience rather than necessity, since
  8163. * the recipient can directly check which TLV arrays have non-zero length.)
  8164. */
  8165. A_UINT32 request_bitmask;
  8166. /** unique id identifying the VDEV, generated by the caller */
  8167. A_UINT32 vdev_id;
  8168. /**
  8169. * timestamp of event report, in microseconds units
  8170. * This timestamp is for debugging purposes only.
  8171. * It can be used to correlate this WLM stats event data with
  8172. * other WLM information uploaded through other means.
  8173. */
  8174. A_UINT32 timestamp;
  8175. /**
  8176. * Interval between two consecutive WLM stats query requests,
  8177. * in microseconds units.
  8178. * This interval is used for converting the scan_period and pwr_on_period
  8179. * values from within wmi_wlm_link_stats from percentage units to time
  8180. * units.
  8181. */
  8182. A_UINT32 req_interval;
  8183. /*
  8184. * This TLV is followed by an A_UINT32 array TLV carrying an opaque payload.
  8185. */
  8186. } wmi_wlm_stats_event_fixed_param;
  8187. /** Suspend option */
  8188. enum {
  8189. WMI_PDEV_SUSPEND, /* suspend */
  8190. WMI_PDEV_SUSPEND_AND_DISABLE_INTR, /* suspend and disable all interrupts */
  8191. };
  8192. typedef struct {
  8193. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_suspend_cmd_fixed_param */
  8194. /* suspend option sent to target */
  8195. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  8196. A_UINT32 suspend_opt;
  8197. } wmi_pdev_suspend_cmd_fixed_param;
  8198. typedef struct {
  8199. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_cmd_fixed_param */
  8200. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  8201. } wmi_pdev_resume_cmd_fixed_param;
  8202. typedef struct {
  8203. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, */
  8204. A_UINT32 num_vdev_stats; /* number of vdevs */
  8205. } wmi_vdev_rate_stats_event_fixed_param;
  8206. typedef struct {
  8207. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_ht_info*/
  8208. A_UINT32 vdevid; /* Id of the wlan vdev*/
  8209. A_UINT32 tx_nss; /* Bit 28 of tx_rate_kbps has this info - based on last data packet transmitted*/
  8210. A_UINT32 rx_nss; /* Bit 24 of rx_rate_kbps - same as above*/
  8211. A_UINT32 tx_preamble; /* Bits 30-29 from tx_rate_kbps */
  8212. A_UINT32 rx_preamble; /* Bits 26-25 from rx_rate_kbps */
  8213. } wmi_vdev_rate_ht_info;
  8214. typedef struct {
  8215. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_rx_aggr_failure_event_fixed_param */
  8216. A_UINT32 num_failure_info; /* How many holes on rx aggregation */
  8217. } wmi_rx_aggr_failure_event_fixed_param;
  8218. typedef struct {
  8219. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_wmi_rx_aggr_failure_info */
  8220. A_UINT32 start_seq; /* start sequence number of the hole */
  8221. A_UINT32 end_seq; /* end sequence number of the hole */
  8222. } wmi_rx_aggr_failure_info;
  8223. typedef struct {
  8224. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_pn_request_cmd_fixed_param */
  8225. /** unique id identifying the VDEV, generated by the caller */
  8226. A_UINT32 vdev_id;
  8227. /** peer MAC address */
  8228. wmi_mac_addr peer_macaddr;
  8229. A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
  8230. /** key index **/
  8231. A_UINT32 key_ix;
  8232. } wmi_peer_tx_pn_request_cmd_fixed_param;
  8233. typedef struct {
  8234. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_pn_response_event_fixed_param */
  8235. /** unique id identifying the VDEV, generated by the caller */
  8236. A_UINT32 vdev_id;
  8237. /** peer MAC address */
  8238. wmi_mac_addr peer_macaddr;
  8239. A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
  8240. /** Packet Number
  8241. * The PN is provided in little endian order, with bits 7:0 of the PN
  8242. * residing in pn[0].
  8243. * The key_type indirectly specifies the packet number length, and thus
  8244. * how many bytes within pn[] are filled with valid data.
  8245. */
  8246. A_UINT8 pn[16];
  8247. /** key index **/
  8248. A_UINT32 key_ix;
  8249. } wmi_peer_tx_pn_response_event_fixed_param;
  8250. typedef struct {
  8251. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
  8252. wmi_stats_id stats_id;
  8253. /** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */
  8254. A_UINT32 num_pdev_stats;
  8255. /** number of vdev stats event structures (wmi_vdev_stats) 0 or max vdevs */
  8256. A_UINT32 num_vdev_stats;
  8257. /** number of peer stats event structures (wmi_peer_stats) 0 or max peers */
  8258. A_UINT32 num_peer_stats;
  8259. A_UINT32 num_bcnflt_stats;
  8260. /** number of chan stats event structures (wmi_chan_stats) 0 to MAX MCC CHANS */
  8261. A_UINT32 num_chan_stats;
  8262. /** number of MIB stats event structures (wmi_mib_stats) */
  8263. A_UINT32 num_mib_stats;
  8264. 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. */
  8265. /** number of beacon stats event structures (wmi_bcn_stats) */
  8266. A_UINT32 num_bcn_stats;
  8267. /** number of extended peer stats event structures (wmi_peer_extd_stats) */
  8268. A_UINT32 num_peer_extd_stats;
  8269. /** number of extd2 peer stats event structures (wmi_peer_extd2_stats) */
  8270. A_UINT32 num_peer_extd2_stats;
  8271. /** last_event
  8272. * The most significant bit is set to 1 to indicate whether the last_event
  8273. * field contains valid data. The least significant bit is set to 1 to
  8274. * indicate this is the final WMI_STATS_EVENT in a series.
  8275. */
  8276. A_UINT32 last_event;
  8277. /** number of extended MIB stats event structures (wmi_mib_extd_stats) */
  8278. A_UINT32 num_mib_extd_stats;
  8279. /* This TLV is followed by another TLV of array of bytes
  8280. * A_UINT8 data[];
  8281. * This data array contains
  8282. * num_pdev_stats * size of(struct wmi_pdev_stats)
  8283. * num_vdev_stats * size of(struct wmi_vdev_stats)
  8284. * num_peer_stats * size of(struct wmi_peer_stats)
  8285. * num_bcnflt_stats * size_of()
  8286. * num_chan_stats * size of(struct wmi_chan_stats)
  8287. * num_mib_stats * size of(struct wmi_mib_stats)
  8288. * num_bcn_stats * size of(struct wmi_bcn_stats)
  8289. */
  8290. /* If WMI_REQUEST_PEER_EXTD_STAT is set in stats_id,
  8291. * the data[] array also contains num_peer_stats * size of wmi_peer_extd_stats
  8292. * following the information elements listed above.
  8293. */
  8294. /* If WMI_REQUEST_MIB_EXTD_STAT is set in stats_id,
  8295. * the data[] array also contains
  8296. * num_mib_extd_stats * size of(struct wmi_mib_extd_stats)
  8297. * following the information elements listed above.
  8298. */
  8299. /* If WMI_REQUEST_PMF_BCN_PROTECT_STAT is set in stats_id, then TLV
  8300. * wmi_pmf_bcn_protect_stats pmf_bcn_protect_stats[]
  8301. * follows the other TLVs
  8302. */
  8303. /* If WMI_REQUEST_VDEV_EXTD_STAT is set in stats_id, then TLV
  8304. * wmi_vdev_extd_stats wmi_vdev_extd_stats[]
  8305. * follows the other TLVs
  8306. */
  8307. /* If WMI_REQUEST_PDEV_EXTD_STAT is set in stats_id, then TLV
  8308. * wmi_pdev_extd_stats wmi_pdev_extd_stats[]
  8309. * follows the other TLVs
  8310. */
  8311. } wmi_stats_event_fixed_param;
  8312. /* WLAN channel CCA stats bitmap */
  8313. #define WLAN_STATS_IDLE_TIME_SHIFT 0
  8314. #define WLAN_STATS_IDLE_TIME_TIME 0x00000001
  8315. #define WLAN_STATS_TX_TIME_SHIFT 1
  8316. #define WLAN_STATS_TX_TIME_MASK 0x00000002
  8317. #define WLAN_STATS_RX_IN_BSS_TIME_SHIFT 2
  8318. #define WLAN_STATS_RX_IN_BSS_TIME_MASK 0x00000004
  8319. #define WLAN_STATS_RX_OUT_BSS_TIME_SHIFT 3
  8320. #define WLAN_STATS_RX_OUT_BSS_TIME_MASK 0x00000008
  8321. #define WLAN_STATS_RX_BUSY_TIME_SHIFT 4
  8322. #define WLAN_STATS_RX_BUSY_TIME_MASK 0x00000010
  8323. #define WLAN_STATS_RX_IN_BAD_COND_TIME_SHIFT 5
  8324. #define WLAN_STATS_RX_IN_BAD_COND_TIME_MASK 0x00000020
  8325. #define WLAN_STATS_TX_IN_BAD_COND_TIME_SHIFT 6
  8326. #define WLAN_STATS_TX_IN_BAD_COND_TIME_MASK 0x00000040
  8327. #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_SHIFT 7
  8328. #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_MASK 0x00000080
  8329. /* WLAN peer signal stats bitmap */
  8330. #define WLAN_STATS_PER_CHAIN_SNR_SHIFT 0
  8331. #define WLAN_STATS_PER_CHAIN_SNR_MASK 0x00000001
  8332. #define WLAN_STATS_PER_CHAIN_NF_SHIFT 1
  8333. #define WLAN_STATS_PER_CHAIN_NF_MASK 0x00000002
  8334. /* WLAN TX stats bitmap */
  8335. #define WLAN_STATS_TX_MSDU_CNT_SHIFT 0
  8336. #define WLAN_STATS_TX_MSDU_CNT_MASK 0x00000001
  8337. #define WLAN_STATS_TX_MPDU_CNT_SHIFT 1
  8338. #define WLAN_STATS_TX_MPDU_CNT_MASK 0x00000002
  8339. #define WLAN_STATS_TX_PPDU_CNT_SHIFT 2
  8340. #define WLAN_STATS_TX_PPDU_CNT_MASK 0x00000004
  8341. #define WLAN_STATS_TX_BYTES_SHIFT 3
  8342. #define WLAN_STATS_TX_BYTES_MASK 0x00000008
  8343. #define WLAN_STATS_TX_MSDU_DROP_CNT_SHIFT 4
  8344. #define WLAN_STATS_TX_MSDU_DROP_CNT_MASK 0x00000010
  8345. #define WLAN_STATS_TX_DROP_BYTES_SHIFT 5
  8346. #define WLAN_STATS_TX_DROP_BYTES_MASK 0x00000020
  8347. #define WLAN_STATS_TX_MPDU_RETRY_CNT_SHIFT 6
  8348. #define WLAN_STATS_TX_MPDU_RETRY_CNT_MASK 0x00000040
  8349. #define WLAN_STATS_TX_MPDU_FAIL_CNT_SHIFT 7
  8350. #define WLAN_STATS_TX_MPDU_FAIL_CNT_MASK 0x00000080
  8351. #define WLAN_STATS_TX_PPDU_FAIL_CNT_SHIFT 8
  8352. #define WLAN_STATS_TX_PPDU_FAIL_CNT_MASK 0x00000100
  8353. #define WLAN_STATS_TX_MPDU_AGGR_SHIFT 9
  8354. #define WLAN_STATS_TX_MPDU_AGGR_MASK 0x00000200
  8355. #define WLAN_STATS_TX_SUCC_MCS_SHIFT 10
  8356. #define WLAN_STATS_TX_SUCC_MCS_MASK 0x00000400
  8357. #define WLAN_STATS_TX_FAIL_MCS_SHIFT 11
  8358. #define WLAN_STATS_TX_FAIL_MCS_MASK 0x00000800
  8359. #define WLAN_STATS_TX_PPDU_DELAY_SHIFT 12
  8360. #define WLAN_STATS_TX_PPDU_DELAY_MASK 0x00001000
  8361. /* WLAN RX stats bitmap */
  8362. #define WLAN_STATS_MAC_RX_MPDU_CNT_SHIFT 0
  8363. #define WLAN_STATS_MAC_RX_MPDU_CNT_MASK 0x00000001
  8364. #define WLAN_STATS_MAC_RX_BYTES_SHIFT 1
  8365. #define WLAN_STATS_MAC_RX_BYTES_MASK 0x00000002
  8366. #define WLAN_STATS_PHY_RX_PPDU_CNT_SHIFT 2
  8367. #define WLAN_STATS_PHY_RX_PPDU_CNT_MASK 0x00000004
  8368. #define WLAN_STATS_PHY_RX_BYTES_SHIFT 3
  8369. #define WLAN_STATS_PHY_RX_BYTES_MASK 0x00000008
  8370. #define WLAN_STATS_RX_DISORDER_CNT_SHIFT 4
  8371. #define WLAN_STATS_RX_DISORDER_CNT_MASK 0x00000010
  8372. #define WLAN_STATS_RX_MPDU_RETRY_CNT_SHIFT 5
  8373. #define WLAN_STATS_RX_MPDU_RETRY_CNT_MASK 0x00000020
  8374. #define WLAN_STATS_RX_MPDU_DUP_CNT_SHIFT 6
  8375. #define WLAN_STATS_RX_MPDU_DUP_CNT_MASK 0x00000040
  8376. #define WLAN_STATS_RX_MPDU_DISCARD_CNT_SHIFT 7
  8377. #define WLAN_STATS_RX_MPDU_DISCARD_CNT_MASK 0x00000080
  8378. #define WLAN_STATS_RX_MPDU_AGGR_SHIFT 8
  8379. #define WLAN_STATS_RX_MPDU_AGGR_MASK 0x00000100
  8380. #define WLAN_STATS_RX_MCS_SHIFT 9
  8381. #define WLAN_STATS_RX_MCS_MASK 0x00000200
  8382. #define WLAN_STATS_STA_PS_INDS_SHIFT 10
  8383. #define WLAN_STATS_STA_PS_INDS_MASK 0x00000400
  8384. #define WLAN_STATS_STA_PS_DURS_SHIFT 11
  8385. #define WLAN_STATS_STA_PS_DURS_MASK 0x00000800
  8386. #define WLAN_STATS_RX_PROBE_REQS_SHIFT 12
  8387. #define WLAN_STATS_RX_PROBE_REQS_MASK 0x00001000
  8388. #define WLAN_STATS_RX_OTH_MGMTS_SHIFT 13
  8389. #define WLAN_STATS_RX_OTH_MGMTS_MASK 0x00002000
  8390. typedef struct
  8391. {
  8392. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats */
  8393. A_UINT32 vdev_id;
  8394. /** Percentage of idle time, no TX, no RX, no interference */
  8395. A_UINT32 idle_time;
  8396. /** Percentage of time transmitting packets */
  8397. A_UINT32 tx_time;
  8398. /** Percentage of time receiving packets in current BSSs */
  8399. A_UINT32 rx_in_bss_time;
  8400. /** Percentage of time receiving packets not in current BSSs */
  8401. A_UINT32 rx_out_bss_time;
  8402. /** Percentage of time interference detected. */
  8403. A_UINT32 rx_busy_time;
  8404. /** Percentage of time receiving packets with errors
  8405. * or packets flagged as retransmission or seqnum discontinued. */
  8406. A_UINT32 rx_in_bad_cond_time;
  8407. /** Percentage of time the device transmitted packets that haven't been ACKed. */
  8408. A_UINT32 tx_in_bad_cond_time;
  8409. /** Percentage of time the chip is unable to work in normal conditions. */
  8410. A_UINT32 wlan_not_avail_time;
  8411. } wmi_chan_cca_stats;
  8412. /** Thresholds of cca stats, stands for percentages of stats variation.
  8413. * Check wmi_chan_cca_stats for each stats's meaning.
  8414. */
  8415. typedef struct
  8416. {
  8417. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats_thresh */
  8418. A_UINT32 idle_time; /* units = percent */
  8419. A_UINT32 tx_time; /* units = percent */
  8420. A_UINT32 rx_in_bss_time; /* units = percent */
  8421. A_UINT32 rx_out_bss_time; /* units = percent */
  8422. A_UINT32 rx_busy_time; /* units = percent */
  8423. A_UINT32 rx_in_bad_cond_time; /* units = percent */
  8424. A_UINT32 tx_in_bad_cond_time; /* units = percent */
  8425. A_UINT32 wlan_not_avail_time; /* units = percent */
  8426. } wmi_chan_cca_stats_thresh;
  8427. typedef struct
  8428. {
  8429. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats */
  8430. A_UINT32 vdev_id;
  8431. A_UINT32 peer_id;
  8432. /** per chain SNR in current bss, units are dB */
  8433. A_INT32 per_chain_snr[WMI_MAX_CHAINS];
  8434. /** per chain background noise, units are dBm */
  8435. A_INT32 per_chain_nf[WMI_MAX_CHAINS];
  8436. /** per antenna rx MPDUs */
  8437. A_UINT32 per_antenna_rx_mpdus[WMI_MAX_CHAINS];
  8438. /** per antenna tx MPDUs */
  8439. A_UINT32 per_antenna_tx_mpdus[WMI_MAX_CHAINS];
  8440. /** num of valid chains for per antenna rx/tx MPDU cnts*/
  8441. A_UINT32 num_chains_valid;
  8442. } wmi_peer_signal_stats;
  8443. /** Thresholds of signal stats, stand for percentage of stats variation.
  8444. * Check wmi_peer_signal_stats for each stats's meaning.
  8445. */
  8446. typedef struct
  8447. {
  8448. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats_thresh */
  8449. A_UINT32 per_chain_snr; /* units = dB */
  8450. A_UINT32 per_chain_nf; /* units = dBm */
  8451. } wmi_peer_signal_stats_thresh;
  8452. typedef struct
  8453. {
  8454. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats */
  8455. /** Number of total TX MSDUs on MAC layer in the period */
  8456. A_UINT32 tx_msdu_cnt;
  8457. /** Number of total TX MPDUs on MAC layer in the period */
  8458. A_UINT32 tx_mpdu_cnt;
  8459. /** Number of total TX PPDUs on MAC layer in the period */
  8460. A_UINT32 tx_ppdu_cnt;
  8461. /** Bytes of tx data on MAC layer in the period */
  8462. A_UINT32 tx_bytes;
  8463. /** Number of TX MSDUs cancelled due to any reason in the period,
  8464. * such as WMM limitation/bandwidth limitation/radio congestion */
  8465. A_UINT32 tx_msdu_drop_cnt;
  8466. /** Bytes of dropped TX packets in the period */
  8467. A_UINT32 tx_drop_bytes;
  8468. /** Number of unacked transmissions of MPDUs */
  8469. A_UINT32 tx_mpdu_retry_cnt;
  8470. /** Number of MPDUs have not been ACKed despite retried */
  8471. A_UINT32 tx_mpdu_fail_cnt;
  8472. /** Number of PPDUs which received no block ack */
  8473. A_UINT32 tx_ppdu_fail_cnt;
  8474. /* This TLV is followed by TLVs below: :
  8475. * A_UINT32 tx_mpdu_aggr[tx_mpdu_aggr_array_len];
  8476. * A_UINT32 tx_succ_mcs[tx_succ_mcs_array_len];
  8477. * A_UINT32 tx_fail_mcs[tx_fail_mcs_array_len];
  8478. * A_UINT32 tx_ppdu_delay[tx_ppdu_delay_array_len];
  8479. */
  8480. } wmi_tx_stats;
  8481. /** Thresholds of tx stats, stand for percentage of stats variation.
  8482. * Check wmi_tx_stats for each stats's meaning.
  8483. */
  8484. typedef struct
  8485. {
  8486. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats_thresh */
  8487. A_UINT32 tx_msdu_cnt;
  8488. A_UINT32 tx_mpdu_cnt;
  8489. A_UINT32 tx_ppdu_cnt;
  8490. A_UINT32 tx_bytes;
  8491. A_UINT32 tx_msdu_drop_cnt;
  8492. A_UINT32 tx_drop_bytes;
  8493. A_UINT32 tx_mpdu_retry_cnt;
  8494. A_UINT32 tx_mpdu_fail_cnt;
  8495. A_UINT32 tx_ppdu_fail_cnt;
  8496. A_UINT32 tx_mpdu_aggr;
  8497. A_UINT32 tx_succ_mcs;
  8498. A_UINT32 tx_fail_mcs;
  8499. A_UINT32 tx_ppdu_delay;
  8500. } wmi_tx_stats_thresh;
  8501. typedef struct
  8502. {
  8503. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_tx_stats */
  8504. A_UINT32 vdev_id;
  8505. A_UINT32 peer_id;
  8506. /* The TLVs for the 4 AC follows:
  8507. * wmi_tx_stats tx_stats[]; wmi_tx_stats for BE/BK/VI/VO
  8508. */
  8509. } wmi_peer_ac_tx_stats;
  8510. typedef struct
  8511. {
  8512. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats */
  8513. /** Number of RX MPDUs on MAC layer */
  8514. A_UINT32 mac_rx_mpdu_cnt;
  8515. /** Bytes of RX packets on MAC layer */
  8516. A_UINT32 mac_rx_bytes;
  8517. /** Number of RX PPDU on PHY layer */
  8518. A_UINT32 phy_rx_ppdu_cnt;
  8519. /** Bytes of RX packets on PHY layer */
  8520. A_UINT32 phy_rx_bytes;
  8521. /** Number of discontinuity in seqnum */
  8522. A_UINT32 rx_disorder_cnt;
  8523. /** Number of RX MPDUs flagged as retransmissions */
  8524. A_UINT32 rx_mpdu_retry_cnt;
  8525. /** Number of RX MPDUs identified as duplicates */
  8526. A_UINT32 rx_mpdu_dup_cnt;
  8527. /** Number of RX MPDUs discarded */
  8528. A_UINT32 rx_mpdu_discard_cnt;
  8529. /* This TLV is followed by TLVs below:
  8530. * A_UINT32 rx_mpdu_aggr[rx_mpdu_aggr_array_len];
  8531. * A_UINT32 rx_mcs[rx_mcs_array_len];
  8532. */
  8533. } wmi_rx_stats;
  8534. /** Thresholds of rx stats, stands for percentage of stats variation.
  8535. * Check wmi_rx_stats for each stats's meaning.
  8536. */
  8537. typedef struct
  8538. {
  8539. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats_thresh */
  8540. A_UINT32 mac_rx_mpdu_cnt;
  8541. A_UINT32 mac_rx_bytes;
  8542. A_UINT32 phy_rx_ppdu_cnt;
  8543. A_UINT32 phy_rx_bytes;
  8544. A_UINT32 rx_disorder_cnt;
  8545. A_UINT32 rx_mpdu_retry_cnt;
  8546. A_UINT32 rx_mpdu_dup_cnt;
  8547. A_UINT32 rx_mpdu_discard_cnt;
  8548. A_UINT32 rx_mpdu_aggr;
  8549. A_UINT32 rx_mcs;
  8550. A_UINT32 sta_ps_inds;
  8551. A_UINT32 sta_ps_durs;
  8552. A_UINT32 rx_probe_reqs;
  8553. A_UINT32 rx_oth_mgmts;
  8554. } wmi_rx_stats_thresh;
  8555. typedef struct
  8556. {
  8557. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_rx_stats */
  8558. A_UINT32 vdev_id;
  8559. A_UINT32 peer_id;
  8560. /** How many times STAs go to sleep */
  8561. A_UINT32 sta_ps_inds;
  8562. /** Total sleep time of STAs, milliseconds units */
  8563. A_UINT32 sta_ps_durs;
  8564. /** Number of probe requests received */
  8565. A_UINT32 rx_probe_reqs;
  8566. /** Number of other management frames received, not including probe requests */
  8567. A_UINT32 rx_oth_mgmts;
  8568. /* The TLVs for the 4 AC follows:
  8569. * wmi_rx_stats rx_stats[]; wmi_rx_stats for BE/BK/VI/VO
  8570. */
  8571. } wmi_peer_ac_rx_stats;
  8572. typedef struct
  8573. {
  8574. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_period */
  8575. /*
  8576. * This struct provides the timestamps from a low-frequency timer
  8577. * for the start and end of a stats period.
  8578. * Each timestamp is reported twice, with different units.
  8579. * The _msec timestamp is in millisecond units.
  8580. * The _count timestamp is in clock tick units.
  8581. * The timestamp is reported in clock ticks as well as in milliseconds
  8582. * so that if the stats start and end times fall within the same
  8583. * millisecond, the clock tick timestamps can still be used to
  8584. * determine what fraction of a millisecond the stats period occupied.
  8585. */
  8586. A_UINT32 start_low_freq_msec;
  8587. A_UINT32 start_low_freq_count;
  8588. A_UINT32 end_low_freq_msec;
  8589. A_UINT32 end_low_freq_count;
  8590. } wmi_stats_period;
  8591. typedef enum {
  8592. /** Periodic timer timed out, based on the period specified
  8593. * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
  8594. */
  8595. TRIGGER_COND_ID_TIMER_TIMED_OUT = 0x1,
  8596. /** Any of the (enabled) stats thresholds specified
  8597. * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
  8598. * within the current stats period.
  8599. */
  8600. TRIGGER_COND_ID_THRESH_EXCEEDED = 0x2,
  8601. /** In Response to the one-time wlan stats request of
  8602. * WMI_REQUEST_WLAN_STATS_CMDID from host.
  8603. */
  8604. TRIGGER_COND_ID_ONE_TIME_REQUEST = 0x3,
  8605. } wmi_report_stats_event_trigger_cond_id;
  8606. typedef struct
  8607. {
  8608. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_interference */
  8609. /** For cases where a single rx chain has options to be connected to
  8610. * different rx antennas, show which rx antennas were in use during
  8611. * receipt of a given PPDU.
  8612. * This sa_ant_matrix provides a bitmask of the antennas used while
  8613. * receiving this frame.
  8614. */
  8615. A_UINT32 sa_ant_matrix;
  8616. /** Count how many times the hal_rxerr_phy is marked, in this time period.
  8617. * The counter value is reset each period. The host specifies the period
  8618. * via WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD.
  8619. */
  8620. A_UINT32 phyerr_count;
  8621. /** The timestamp at which the WMI event is reported.
  8622. * In targets that have a WBTIMER_1 timer, this timestamp is taken
  8623. * from WBTIMER_1.
  8624. */
  8625. A_UINT32 timestamp;
  8626. } wmi_stats_interference;
  8627. typedef struct {
  8628. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_report_stats_event_fixed_param */
  8629. /** Indicate what triggered this event, check wmi_report_stats_event_trigger_cond_id for details */
  8630. A_UINT32 trigger_cond_id;
  8631. /** Bitmap to indicate changed channel CCA stats which exceeded the thresholds */
  8632. A_UINT32 cca_chgd_bitmap;
  8633. /** Bitmap to indicate changed peer signal stats which exceeded the thresholds */
  8634. A_UINT32 sig_chgd_bitmap;
  8635. /** Bitmap to indicate changed TX counters which exceeded the thresholds */
  8636. A_UINT32 tx_chgd_bitmap;
  8637. /** Bitmap to indicate changed RX counters which exceeded the thresholds */
  8638. A_UINT32 rx_chgd_bitmap;
  8639. /** number of per channel CCA stats structures (wmi_chan_cca_stats), 0 to max vdevs*/
  8640. A_UINT32 num_chan_cca_stats;
  8641. /** number of per peer signal stats structures (wmi_peer_signal_stats), 0 to max peers*/
  8642. A_UINT32 num_peer_signal_stats;
  8643. /** number of per peer ac TX stats structures (wmi_peer_ac_tx_stats), 0 to max peers*/
  8644. A_UINT32 num_peer_ac_tx_stats;
  8645. /** Array length of tx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
  8646. * The array indicates number of MPDUs sent on specified aggregation size
  8647. * (per number of MPDUs per AMPDUs / 1 to 7 and 8+).
  8648. * Array length can be set per WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN */
  8649. A_UINT32 tx_mpdu_aggr_array_len;
  8650. /** Array length of tx_succ_mcs[] which is histogram of encoding rate.
  8651. * The array indicates number of acked PPDUs sent at a specific rate */
  8652. A_UINT32 tx_succ_mcs_array_len;
  8653. /** Array length of tx_fail_mcs[] which is histogram of encoding rate.
  8654. * The array indicates number of unacked PPDUs sent at a specific rate */
  8655. A_UINT32 tx_fail_mcs_array_len;
  8656. /** tx_ppdu_delay[]is a histogram of delays on MAC layer.
  8657. * The array counts numbers of PPDUs encountering different TX time delays.
  8658. * TX delay here means time interval between the time a PPDU is queued
  8659. * to the MAC HW for transmission and the time the lower layers of
  8660. * tx FW return a tx status.
  8661. *
  8662. * The bin size tx_ppdu_delay_bin_size_ms specifies how many milliseconds
  8663. * each bin of the tx_ppdu_delay histogram represents.
  8664. * By default the bin size is 10ms.
  8665. * tx_ppdu_delay[0] -> delays between 0-9 ms
  8666. * tx_ppdu_delay[1] -> delays between 10-19 ms
  8667. * ...
  8668. * tx_ppdu_delay[9] -> delays between 90-99 ms
  8669. * tx_ppdu_delay[10] -> delays >= 100 ms
  8670. * Bin size can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS.
  8671. */
  8672. A_UINT32 tx_ppdu_delay_bin_size_ms;
  8673. /** Array length of tx_ppdu_delay[]. It can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN */
  8674. A_UINT32 tx_ppdu_delay_array_len;
  8675. /** number of per peer ac RX stats structures (wmi_peer_ac_rx_stats), 0 to max peers*/
  8676. A_UINT32 num_peer_ac_rx_stats;
  8677. /** Array length of rx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
  8678. * It can be set per WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN */
  8679. A_UINT32 rx_mpdu_aggr_array_len;
  8680. /** Array size of rx_mcs[] which is histogram of encoding rate.
  8681. * The array indicates number of PPDUs received at a specific rate */
  8682. A_UINT32 rx_mcs_array_len;
  8683. /** Array size of stats_period[] which contains several stats periods. */
  8684. A_UINT32 stats_period_array_len;
  8685. /**
  8686. * This TLV is followed by TLVs below:
  8687. * wmi_chan_cca_stats chan_cca_stats[]; Array length is specified by num_chan_cca_stats
  8688. * wmi_peer_signal_stats peer_signal_stats[]; Array length is specified by num_peer_signal_stats
  8689. * wmi_peer_ac_tx_stats peer_ac_tx_stats[]; Array length is specified by num_peer_ac_tx_stats
  8690. * 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)
  8691. * A_UINT32 tx_mpdu_aggr[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_mpdu_aggr_array_len,
  8692. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_mpdu_aggr_array_len + A-MPDU aggregation index
  8693. * A_UINT32 tx_succ_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_succ_mcs_array_len,
  8694. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_succ_mcs_array_len + MCS index
  8695. * A_UINT32 tx_fail_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_fail_mcs_array_len,
  8696. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_fail_mcs_array_len + MCS index
  8697. * A_UINT32 tx_ppdu_delay[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_ppdu_delay_array_len,
  8698. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_ppdu_delay_array_len + tx delay index
  8699. * wmi_peer_ac_rx_stats peer_ac_rx_stats[]; Array length is specified by num_peer_ac_rx_stats
  8700. * 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)
  8701. * A_UINT32 rx_mpdu_aggr[][][]; Array length is num_peer_ac_rx_stats * WLAN_MAX_AC * rx_mpdu_aggr_array_len,
  8702. * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mpdu_aggr_array_len + A-MPDU aggregation index
  8703. * A_UINT32 rx_mcs[][][]; Array length is (num_peer_ac_rx_stats * WLAN_MAX_AC) * rx_mcs_array_len,
  8704. * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mcs_array_len + MCS index
  8705. * wmi_stats_period stats_period[]; Array length is specified by stats_period_array_len
  8706. * 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.
  8707. **/
  8708. } wmi_report_stats_event_fixed_param;
  8709. typedef struct {
  8710. /** TLV tag and len; tag equals
  8711. * WMITLV_TAG_STRUC_wmi_peer_stats_info */
  8712. A_UINT32 tlv_header;
  8713. /** peer MAC address */
  8714. wmi_mac_addr peer_macaddr;
  8715. /** bytes (size of MPDUs) transmitted to this peer */
  8716. struct {
  8717. /* lower 32 bits of the tx_bytes value */
  8718. A_UINT32 low_32;
  8719. /* upper 32 bits of the tx_bytes value */
  8720. A_UINT32 high_32;
  8721. } tx_bytes;
  8722. /** packets (MSDUs) transmitted to this peer */
  8723. struct {
  8724. /* lower 32 bits of the tx_packets value */
  8725. A_UINT32 low_32;
  8726. /* upper 32 bits of the tx_packets value */
  8727. A_UINT32 high_32;
  8728. } tx_packets;
  8729. /** bytes (size of MPDUs) received from this peer */
  8730. struct {
  8731. /* lower 32 bits of the rx_bytes value */
  8732. A_UINT32 low_32;
  8733. /* upper 32 bits of the rx_bytes value */
  8734. A_UINT32 high_32;
  8735. } rx_bytes;
  8736. /** packets (MSDUs) received from this peer */
  8737. struct {
  8738. /* lower 32 bits of the rx_packets value */
  8739. A_UINT32 low_32;
  8740. /* upper 32 bits of the rx_packets value */
  8741. A_UINT32 high_32;
  8742. } rx_packets;
  8743. /** cumulative retry counts (MPDUs) */
  8744. A_UINT32 tx_retries;
  8745. /** number of failed transmissions (MPDUs) (retries exceeded, no ACK) */
  8746. A_UINT32 tx_failed;
  8747. /** rate information, it is output of WMI_ASSEMBLE_RATECODE_V1
  8748. * (in format of 0x1000RRRR)
  8749. * The rate-code is a 4-bytes field in which,
  8750. * for given rate, nss and preamble
  8751. *
  8752. * b'31-b'29 unused / reserved
  8753. * b'28 indicate the version of rate-code (1 = RATECODE_V1)
  8754. * b'27-b'11 unused / reserved
  8755. * b'10-b'8 indicate the preamble (0 OFDM, 1 CCK, 2 HT, 3 VHT)
  8756. * b'7-b'5 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3, 3 - 4x4)
  8757. * b'4-b'0 indicate the rate, which is indicated as follows:
  8758. * OFDM : 0: OFDM 48 Mbps
  8759. * 1: OFDM 24 Mbps
  8760. * 2: OFDM 12 Mbps
  8761. * 3: OFDM 6 Mbps
  8762. * 4: OFDM 54 Mbps
  8763. * 5: OFDM 36 Mbps
  8764. * 6: OFDM 18 Mbps
  8765. * 7: OFDM 9 Mbps
  8766. * CCK (pream == 1)
  8767. * 0: CCK 11 Mbps Long
  8768. * 1: CCK 5.5 Mbps Long
  8769. * 2: CCK 2 Mbps Long
  8770. * 3: CCK 1 Mbps Long
  8771. * 4: CCK 11 Mbps Short
  8772. * 5: CCK 5.5 Mbps Short
  8773. * 6: CCK 2 Mbps Short
  8774. * HT/VHT (pream == 2/3)
  8775. * 0..7: MCS0..MCS7 (HT)
  8776. * 0..9: MCS0..MCS9 (11AC VHT)
  8777. * 0..11: MCS0..MCS11 (11AX VHT)
  8778. */
  8779. /** rate-code of the last transmission */
  8780. A_UINT32 last_tx_rate_code;
  8781. /** rate-code of the last received PPDU */
  8782. A_UINT32 last_rx_rate_code;
  8783. /** bitrate of the last transmission, in units of kbps */
  8784. A_UINT32 last_tx_bitrate_kbps;
  8785. /** bitrate of the last received PPDU, in units of kbps */
  8786. A_UINT32 last_rx_bitrate_kbps;
  8787. /** combined RSSI of the last received PPDU, in unit of dBm */
  8788. A_INT32 peer_rssi;
  8789. /** number of succeed transmissions (MPDUs) (ACK) */
  8790. A_UINT32 tx_succeed;
  8791. /**
  8792. * The RSSI values are in dBm units, and are exponentially time-averaged.
  8793. * The averaging is performed on the dB values (rather than the linear
  8794. * values).
  8795. */
  8796. A_INT32 peer_rssi_per_chain[WMI_MAX_CHAINS];
  8797. } wmi_peer_stats_info;
  8798. typedef struct {
  8799. /** TLV tag and len; tag equals
  8800. * WMITLV_TAG_STRUC_wmi_peer_stats_info_event_fixed_param */
  8801. A_UINT32 tlv_header;
  8802. /** VDEV to which the peers belong to */
  8803. A_UINT32 vdev_id;
  8804. /** number of peers in peer_stats_info[] */
  8805. A_UINT32 num_peers;
  8806. /** flag to indicate if there are more peers which will
  8807. * be sent a following seperate peer_stats_info event */
  8808. A_UINT32 more_data;
  8809. /* This TLV is followed by another TLV of array of structs
  8810. * wmi_peer_stats_info peer_stats_info[];
  8811. */
  8812. } wmi_peer_stats_info_event_fixed_param;
  8813. /**
  8814. * WMI arrays of length WMI_MGMT_FRAME_SUBTYPE_MAX use the
  8815. * IEEE802.11 standard's enumeration of mgmt frame subtypes:
  8816. * 0 -> IEEE80211_FC0_SUBTYPE_ASSOC_REQ
  8817. * 1 -> IEEE80211_FC0_SUBTYPE_ASSOC_RESP
  8818. * 2 -> IEEE80211_FC0_SUBTYPE_REASSOC_REQ
  8819. * 3 -> IEEE80211_FC0_SUBTYPE_REASSOC_RESP
  8820. * 4 -> IEEE80211_FC0_SUBTYPE_PROBE_REQ
  8821. * 5 -> IEEE80211_FC0_SUBTYPE_PROBE_RESP
  8822. * 6 -> Reserved
  8823. * 7 -> Reserved
  8824. * 8 -> IEEE80211_FC0_SUBTYPE_BEACON
  8825. * 9 -> IEEE80211_FC0_SUBTYPE_ATIM
  8826. * 10 -> IEEE80211_FC0_SUBTYPE_DISASSOC
  8827. * 11 -> IEEE80211_FC0_SUBTYPE_AUTH
  8828. * 12 -> IEEE80211_FC0_SUBTYPE_DEAUTH
  8829. * 13 -> IEEE80211_FCO_SUBTYPE_ACTION
  8830. * 14 -> IEEE80211_FC0_SUBTYPE_ACTION_NOACK
  8831. * 15 -> IEEE80211_FC0_SUBTYPE_RESERVED
  8832. */
  8833. #define WMI_MGMT_FRAME_SUBTYPE_MAX 16
  8834. typedef struct {
  8835. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_pdev_stats_struct*/
  8836. A_UINT32 tlv_header;
  8837. /** pdev_id for identifying the MAC */
  8838. A_UINT32 pdev_id;
  8839. /** counter of how many times this pdev has
  8840. * transmitted each management frame sub-type */
  8841. A_UINT32 tx_mgmt_subtype[WMI_MGMT_FRAME_SUBTYPE_MAX];
  8842. /** counter of how many times this pdev has
  8843. * received each management frame sub-type */
  8844. A_UINT32 rx_mgmt_subtype[WMI_MGMT_FRAME_SUBTYPE_MAX];
  8845. /** scan fail dfs violation time in ms */
  8846. A_UINT32 scan_fail_dfs_violation_time_ms;
  8847. /** NOL check failed latest channel frequency in MHz */
  8848. A_UINT32 nol_check_fail_last_chan_freq;
  8849. /** NOL check failed timestamp in ms */
  8850. A_UINT32 nol_check_fail_time_stamp_ms;
  8851. /** total peer create count */
  8852. A_UINT32 total_peer_create_cnt;
  8853. /** total peer delete count */
  8854. A_UINT32 total_peer_delete_cnt;
  8855. /** total peer delete response count */
  8856. A_UINT32 total_peer_delete_resp_cnt;
  8857. /** sched algo FIFO full count */
  8858. A_UINT32 vdev_pause_fail_rt_to_sched_algo_fifo_full_cnt;
  8859. /** total number of qos null tx frame queued over WMI */
  8860. A_UINT32 qos_null_tx_over_wmi;
  8861. /** total qos null tx frame completion received count */
  8862. A_UINT32 qos_null_tx_send_compl_over_wmi;
  8863. /** total event alloc failure count for qos null tx send */
  8864. A_UINT32 qos_null_tx_send_event_alloc_failed;
  8865. } wmi_ctrl_path_pdev_stats_struct;
  8866. typedef enum {
  8867. WMI_CTRL_PATH_STATS_ARENA_HRAM,
  8868. WMI_CTRL_PATH_STATS_ARENA_HCRAM,
  8869. WMI_CTRL_PATH_STATS_ARENA_HREMOTE,
  8870. WMI_CTRL_PATH_STATS_ARENA_HCREMOTE,
  8871. WMI_CTRL_PATH_STATS_ARENA_REMOTE,
  8872. WMI_CTRL_PATH_STATS_ARENA_SRAM,
  8873. WMI_CTRL_PATH_STATS_ARENA_SRAM_AUX,
  8874. WMI_CTRL_PATH_STATS_ARENA_PAGEABLE,
  8875. WMI_CTRL_PATH_STATS_ARENA_CMEM,
  8876. WMI_CTRL_PATH_STATS_ARENA_TRAM,
  8877. WMI_CTRL_PATH_STATS_ARENA_HWIO,
  8878. WMI_CTRL_PATH_STATS_ARENA_CALDB,
  8879. WMI_CTRL_PATH_STATS_ARENA_M3,
  8880. WMI_CTRL_PATH_STATS_ARENA_ETMREMOTE,
  8881. WMI_CTRL_PATH_STATS_ARENA_M3_DUMP,
  8882. WMI_CTRL_PATH_STATS_ARENA_EMUPHY,
  8883. WMI_CTRL_PATH_STATS_ARENA_DBG_SRAM,
  8884. WMI_CTRL_PATH_STATS_ARENA_DBG_SRAM_AUX,
  8885. WMI_CTRL_PATH_STATS_ARENA_SRAM_AUX_OVERFLOW,
  8886. WMI_CTRL_PATH_STATS_ARENA_AMSS,
  8887. WMI_CTRL_PATH_STATS_ARENA_MAX,
  8888. } wmi_ctrl_path_fw_arena_ids;
  8889. /*
  8890. * Used by some hosts to print names of arenas, based on
  8891. * wmi_ctrl_path_fw_arena_ids values specified in
  8892. * wmi_ctrl_path_mem_stats_struct in ctrl_path_stats event msg.
  8893. */
  8894. static INLINE A_UINT8 *wmi_ctrl_path_fw_arena_id_to_name(A_UINT32 arena_id)
  8895. {
  8896. switch(arena_id)
  8897. {
  8898. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HRAM);
  8899. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HCRAM);
  8900. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HREMOTE);
  8901. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HCREMOTE);
  8902. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_REMOTE);
  8903. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_SRAM);
  8904. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_SRAM_AUX);
  8905. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_PAGEABLE);
  8906. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_CMEM);
  8907. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_TRAM);
  8908. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HWIO);
  8909. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_CALDB);
  8910. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_M3);
  8911. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_ETMREMOTE);
  8912. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_M3_DUMP);
  8913. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_EMUPHY);
  8914. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_DBG_SRAM);
  8915. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_DBG_SRAM_AUX);
  8916. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_SRAM_AUX_OVERFLOW);
  8917. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_AMSS);
  8918. }
  8919. return (A_UINT8 *) "WMI_CTRL_PATH_STATS_ARENA_UNKNOWN";
  8920. }
  8921. typedef struct {
  8922. /** TLV tag and len; tag equals
  8923. * WMITLV_TAG_STRUC_wmi_ctrl_path_mem_stats_struct */
  8924. A_UINT32 tlv_header;
  8925. A_UINT32 arena_id; /* see wmi_ctrl_path_fw_arena_ids */
  8926. A_UINT32 total_bytes; /* total bytes in each arena */
  8927. A_UINT32 allocated_bytes; /* allocated bytes in each arena */
  8928. } wmi_ctrl_path_mem_stats_struct;
  8929. /* status code of Get stats TWT dialog */
  8930. typedef enum _WMI_GET_STATS_TWT_STATUS_T {
  8931. WMI_GET_STATS_TWT_STATUS_OK, /* Get status TWT dialog successfully completed */
  8932. WMI_GET_STATS_TWT_STATUS_DIALOG_ID_NOT_EXIST,/* TWT dialog ID does not exist */
  8933. WMI_GET_STATS_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  8934. } WMI_GET_STATS_TWT_STATUS_T;
  8935. typedef struct {
  8936. /** TLV tag and len; tag equals
  8937. * WMITLV_TAG_STRUC_wmi_ctrl_path_twt_stats_struct */
  8938. A_UINT32 tlv_header;
  8939. A_UINT32 dialog_id; /* TWT dialog ID */
  8940. A_UINT32 status; /* refer to WMI_GET_STATS_TWT_STATUS_T */
  8941. A_UINT32 num_sp_cycles; /* Number of TWT SP's*/
  8942. A_UINT32 avg_sp_dur_us; /* Average SP time */
  8943. A_UINT32 min_sp_dur_us; /* Minimum SP time */
  8944. A_UINT32 max_sp_dur_us; /* Maximum SP time */
  8945. A_UINT32 tx_mpdu_per_sp; /* Average pkts tx per SP */
  8946. A_UINT32 rx_mpdu_per_sp; /* Average pkts rx per SP */
  8947. A_UINT32 tx_bytes_per_sp; /* Average tx bytes per SP */
  8948. A_UINT32 rx_bytes_per_sp; /* Average rx bytes per SP */
  8949. } wmi_ctrl_path_twt_stats_struct;
  8950. typedef enum {
  8951. WMI_CTRL_PATH_STATS_CAL_PROFILE_COLD_BOOT_CAL = 0x0,
  8952. WMI_CTRL_PATH_STATS_CAL_PROFILE_FULL_CHAN_SWITCH = 0x1,
  8953. WMI_CTRL_PATH_STATS_CAL_PROFILE_SCAN_CHAN_SWITCH = 0x2,
  8954. WMI_CTRL_PATH_STATS_CAL_PROFILE_DPD_SPLIT_CAL = 0x3,
  8955. WMI_CTRL_PATH_STATS_CAL_PROFILE_TEMP_TRIGEER_CAL = 0x4,
  8956. WMI_CTRL_PATH_STATS_CAL_PROFILE_POWER_SAVE_WAKE_UP = 0x5,
  8957. WMI_CTRL_PATH_STATS_CAL_PROFILE_TIMER_TRIGGER_CAL = 0x6,
  8958. WMI_CTRL_PATH_STATS_CAL_PROFILE_FTM_TRIGGER_CAL = 0x7,
  8959. WMI_CTRL_PATH_STATS_CAL_PROFILE_AGILE_OR_POWER_DOWN_DTIM = 0x8,
  8960. WMI_CTRL_PATH_STATS_CAL_PROFILE_NOISY_ENV_RXDO = 0x9,
  8961. /* add new cal profiles above this line */
  8962. WMI_CTRL_PATH_STATS_CAL_PROFILE_INVALID = 0x1F
  8963. } wmi_ctrl_path_stats_cal_profile_ids;
  8964. typedef enum {
  8965. WMI_CTRL_PATH_STATS_CAL_TYPE_ADC = 0x0,
  8966. WMI_CTRL_PATH_STATS_CAL_TYPE_DAC = 0x1,
  8967. WMI_CTRL_PATH_STATS_CAL_TYPE_PROCESS = 0x2,
  8968. WMI_CTRL_PATH_STATS_CAL_TYPE_NOISE_FLOOR = 0x3,
  8969. WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO = 0x4,
  8970. WMI_CTRL_PATH_STATS_CAL_TYPE_COMB_TXLO_TXIQ_RXIQ = 0x5,
  8971. WMI_CTRL_PATH_STATS_CAL_TYPE_TXLO = 0x6,
  8972. WMI_CTRL_PATH_STATS_CAL_TYPE_TXIQ = 0x7,
  8973. WMI_CTRL_PATH_STATS_CAL_TYPE_RXIQ = 0x8,
  8974. WMI_CTRL_PATH_STATS_CAL_TYPE_IM2 = 0x9,
  8975. WMI_CTRL_PATH_STATS_CAL_TYPE_LNA = 0xa,
  8976. WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXDCO = 0xb,
  8977. WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXIQ = 0xc,
  8978. WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORYLESS = 0xd,
  8979. WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORY = 0xe,
  8980. WMI_CTRL_PATH_STATS_CAL_TYPE_IBF = 0xf,
  8981. WMI_CTRL_PATH_STATS_CAL_TYPE_PDET_AND_PAL = 0x10,
  8982. WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO_IQ = 0x11,
  8983. WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO_DTIM = 0x12,
  8984. WMI_CTRL_PATH_STATS_CAL_TYPE_TPC_CAL = 0x13,
  8985. WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_TIMEREQ = 0x14,
  8986. WMI_CTRL_PATH_STATS_CAL_TYPE_BWFILTER = 0x15,
  8987. WMI_CTRL_PATH_STATS_CAL_TYPE_PEF = 0x16,
  8988. WMI_CTRL_PATH_STATS_CAL_TYPE_PADROOP = 0x17,
  8989. WMI_CTRL_PATH_STATS_CAL_TYPE_SELFCALTPC = 0x18,
  8990. /* add new cal types above this line */
  8991. WMI_CTRL_PATH_STATS_CAL_TYPE_INVALID = 0xFF
  8992. } wmi_ctrl_path_stats_cal_type_ids;
  8993. typedef enum {
  8994. WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_NOISE_FLOOR = 0x0,
  8995. WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_DPD_MEMORYLESS = 0x1,
  8996. WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_DPD_MEMORY = 0x2,
  8997. /* add new periodic cal types above this line */
  8998. WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_INVALID = 0xFF
  8999. } wmi_ctrl_path_stats_periodic_cal_type_ids;
  9000. /*
  9001. * Used by some hosts to print names of cal profile, based on
  9002. * wmi_ctrl_path_cal_profile_ids values specified in
  9003. * wmi_ctrl_path_calibration_stats_struct in ctrl_path_stats event msg.
  9004. */
  9005. static INLINE
  9006. A_UINT8 *wmi_ctrl_path_cal_profile_id_to_name(A_UINT32 cal_profile_id)
  9007. {
  9008. switch (cal_profile_id)
  9009. {
  9010. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_COLD_BOOT_CAL);
  9011. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_FULL_CHAN_SWITCH);
  9012. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_SCAN_CHAN_SWITCH);
  9013. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_DPD_SPLIT_CAL);
  9014. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_TEMP_TRIGEER_CAL);
  9015. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_POWER_SAVE_WAKE_UP);
  9016. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_TIMER_TRIGGER_CAL);
  9017. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_FTM_TRIGGER_CAL);
  9018. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_AGILE_OR_POWER_DOWN_DTIM);
  9019. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_NOISY_ENV_RXDO);
  9020. }
  9021. return (A_UINT8 *) "WMI_CTRL_PATH_STATS_CAL_PROFILE_UNKNOWN";
  9022. }
  9023. /*
  9024. * Used by some hosts to print names of cal type, based on
  9025. * wmi_ctrl_path_cal_type_ids values specified in
  9026. * wmi_ctrl_path_calibration_stats_struct in ctrl_path_stats event msg.
  9027. */
  9028. static INLINE A_UINT8 *wmi_ctrl_path_cal_type_id_to_name(A_UINT32 cal_type_id)
  9029. {
  9030. switch (cal_type_id)
  9031. {
  9032. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_ADC);
  9033. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DAC);
  9034. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_PROCESS);
  9035. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_NOISE_FLOOR);
  9036. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO);
  9037. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_COMB_TXLO_TXIQ_RXIQ);
  9038. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_TXLO);
  9039. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_TXIQ);
  9040. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXIQ);
  9041. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_IM2);
  9042. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_LNA);
  9043. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXDCO);
  9044. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXIQ);
  9045. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORYLESS);
  9046. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORY);
  9047. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_IBF);
  9048. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_PDET_AND_PAL);
  9049. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO_IQ);
  9050. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO_DTIM);
  9051. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_TPC_CAL);
  9052. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_TIMEREQ);
  9053. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_BWFILTER);
  9054. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_PEF);
  9055. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_PADROOP);
  9056. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_SELFCALTPC);
  9057. }
  9058. return (A_UINT8 *) "WMI_CTRL_PATH_STATS_CAL_TYPE_UNKNOWN";
  9059. }
  9060. /*
  9061. * Used by some hosts to print names of peridodic cal type, based on
  9062. * wmi_ctrl_path_periodic_cal_type_ids values specified in
  9063. * wmi_ctrl_path_calibration_stats_struct in ctrl_path_stats event msg.
  9064. */
  9065. static INLINE A_UINT8 *wmi_ctrl_path_periodic_cal_type_id_to_name(A_UINT32 periodic_cal_type_id)
  9066. {
  9067. switch (periodic_cal_type_id)
  9068. {
  9069. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_NOISE_FLOOR);
  9070. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_DPD_MEMORYLESS);
  9071. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_DPD_MEMORY);
  9072. }
  9073. return (A_UINT8 *) "WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_UNKNOWN";
  9074. }
  9075. typedef struct {
  9076. /** TLV tag and len; tag equals
  9077. * WMITLV_TAG_STRUC_wmi_ctrl_path_calibration_stats_struct*/
  9078. A_UINT32 tlv_header;
  9079. /** pdev_id for identifying the MAC/PHY */
  9080. A_UINT32 pdev_id;
  9081. /** Bit 0 - 7 : cal type / periodic cal type
  9082. * These bits hold either a wmi_ctrl_path_stats_cal_type_ids
  9083. * value for generic cal (if bit 13 is cleared) or a
  9084. * wmi_ctrl_path_stats_periodic_cal_type_ids value for
  9085. * periodic cal (if bit 13 is set).
  9086. * Signifies the type of calibration
  9087. * cal_type : 8
  9088. * Bit 8 - 12 : These bits hold a wmi_ctrl_path_stats_cal_profile_ids value.
  9089. * Signifies the type of cal profile
  9090. * cal_profile : 5
  9091. * Bit 13 : Signifies whether stats is for generic cal or periodic cal
  9092. * is_cal_periodic : 1
  9093. * 0 -> generic cal
  9094. * 1 -> periodic cal
  9095. * Bit 14 - 31: Reserved for future
  9096. */
  9097. A_UINT32 cal_info;
  9098. A_UINT32 cal_triggered_cnt; /* Count of number of times calibration triggered */
  9099. A_UINT32 cal_fail_cnt; /* Count of number of times calibration failed */
  9100. A_UINT32 cal_fcs_cnt; /* Count of number of times FCS done for cal */
  9101. A_UINT32 cal_fcs_fail_cnt; /* Count of number of times FCS failed for cal */
  9102. } wmi_ctrl_path_calibration_stats_struct;
  9103. #define WMI_CTRL_PATH_CALIBRATION_STATS_CAL_TYPE_GET(cal_info) WMI_GET_BITS(cal_info, 0, 8)
  9104. #define WMI_CTRL_PATH_CALIBRATION_STATS_CAL_TYPE_SET(cal_info, cal_type) WMI_SET_BITS(cal_info, 0, 8, cal_type)
  9105. #define WMI_CTRL_PATH_CALIBRATION_STATS_CAL_PROFILE_GET(cal_info) WMI_GET_BITS(cal_info, 8, 5)
  9106. #define WMI_CTRL_PATH_CALIBRATION_STATS_CAL_PROFILE_SET(cal_info, cal_profile) WMI_SET_BITS(cal_info, 8, 5, cal_profile)
  9107. #define WMI_CTRL_PATH_CALIBRATION_STATS_IS_PERIODIC_CAL_GET(cal_info) WMI_GET_BITS(cal_info, 13, 1)
  9108. #define WMI_CTRL_PATH_CALIBRATION_STATS_IS_PERIODIC_CAL_SET(cal_info, is_periodic) WMI_SET_BITS(cal_info, 13, 1, is_periodic)
  9109. typedef struct {
  9110. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_dfs_channel_stats_struct*/
  9111. A_UINT32 tlv_header;
  9112. /** pdev_id for identifying the PHY */
  9113. A_UINT32 pdev_id;
  9114. /** nol element num */
  9115. A_UINT32 nol;
  9116. /** Channel in MHz */
  9117. A_UINT32 channel;
  9118. /** Channel width in MHz */
  9119. A_UINT32 chwidth;
  9120. /** Time left for the channel to remain in NOL list (in seconds) */
  9121. A_UINT32 timeleft;
  9122. } wmi_ctrl_path_dfs_channel_stats_struct;
  9123. typedef struct {
  9124. /** TLV tag and len; tag equals
  9125. * WMITLV_TAG_STRUC_wmi_ctrl_path_stats_event_fixed_param */
  9126. A_UINT32 tlv_header;
  9127. /** Request ID */
  9128. A_UINT32 request_id;
  9129. /** more flag
  9130. * 1 - More events sent after this event.
  9131. * 0 - no more events after this event.
  9132. */
  9133. A_UINT32 more;
  9134. /** status:
  9135. * The status field's value shows whether the WMI_REQUEST_CTRL_PATH_STATS
  9136. * request was completed successfully,
  9137. * 0 - status is success
  9138. * 1 - status is failure
  9139. */
  9140. A_UINT32 status;
  9141. /** This TLV is (optionally) followed by TLV arrays containing
  9142. * different types of stats:
  9143. * 1. wmi_ctrl_path_pdev_stats_struct ctrl_path_pdev_stats[];
  9144. * This TLV array contains zero or more pdev stats instances.
  9145. * 2. wmi_vdev_extd_stats vdev_extd_stats[];
  9146. * This TLV array contains zero or more vdev_extd_stats instances.
  9147. */
  9148. } wmi_ctrl_path_stats_event_fixed_param;
  9149. typedef struct {
  9150. /** TLV tag and len; tag equals
  9151. * WMITLV_TAG_STRUC_wmi_radio_chan_stats */
  9152. A_UINT32 tlv_header;
  9153. /** primary channel freq of the channel whose stats is sent */
  9154. A_UINT32 chan_mhz;
  9155. /** accumulation of time the radio is tuned to this channel,
  9156. * in units of microseconds */
  9157. A_UINT32 on_chan_us;
  9158. /** accumulation of the TX PPDU duration over the measurement period,
  9159. * in units of microseconds */
  9160. A_UINT32 tx_duration_us;
  9161. /** accumulation of the RX PPDU duration over the measurement period,
  9162. * in units of microseconds */
  9163. A_UINT32 rx_duration_us;
  9164. /** ratio of channel busy time to on_chan_us, in units of percent */
  9165. A_UINT32 chan_busy_ratio;
  9166. /** ratio of on_chan_us to the measurement period, in units of percent */
  9167. A_UINT32 on_chan_ratio;
  9168. /** measurement period, in units of microseconds */
  9169. A_UINT32 measurement_period_us;
  9170. /** MPDUs transmitted on this channel */
  9171. A_UINT32 tx_mpdus;
  9172. /** MSDUs transmitted on this channel */
  9173. A_UINT32 tx_msdus;
  9174. /** MPDUS successfully received on this channel */
  9175. A_UINT32 rx_succ_mpdus;
  9176. /** Failed MPDUs (CRC failures) received on this channel */
  9177. A_UINT32 rx_fail_mpdus;
  9178. } wmi_radio_chan_stats;
  9179. typedef struct {
  9180. /** TLV tag and len; tag equals
  9181. * WMITLV_TAG_STRUC_wmi_radio_chan_stats_event_fixed_param */
  9182. A_UINT32 tlv_header;
  9183. /** number of channel stats in radio_chan_stats[] */
  9184. A_UINT32 num_chans;
  9185. /* This TLV is followed by another TLV of array of structs
  9186. * wmi_radio_chan_stats radio_chan_stats[];
  9187. */
  9188. } wmi_radio_chan_stats_event_fixed_param;
  9189. /**
  9190. * PDEV statistics
  9191. *
  9192. * This struct incorporates the wlan_dbg_stats struct, which is
  9193. * conditionally defined, based on the AR900B flag.
  9194. * The below _v1 struct variant is the unconditional definition
  9195. * that matches what would be conditionally defined by builds that
  9196. * don't use the AR900B flag. The _v2 struct variant is the
  9197. * unconditional definition that matches what would be conditionally
  9198. * defined by builds that use the AR900B flag.
  9199. * The _v2 struct def can be used within host or target builds
  9200. * that don't use the AR900B flag, but needs to interoperate with a
  9201. * target or host build that does use the AR900B flag.
  9202. * Similarly, the _v1 struct def can be used by a host or target build
  9203. * that does use the AR900B flag, but needs to interoperate with a
  9204. * target or host build that doesn't use the AR900B flag.
  9205. *
  9206. * For backwards compatibility, wmi_pdev_stats is still (conditionally)
  9207. * defined, as an alias for either the _v1 or _v2 variant.
  9208. */
  9209. typedef struct {
  9210. /** Channel noise floor */
  9211. A_INT32 chan_nf;
  9212. /** TX frame count */
  9213. A_UINT32 tx_frame_count;
  9214. /** RX frame count */
  9215. A_UINT32 rx_frame_count;
  9216. /** rx clear count */
  9217. A_UINT32 rx_clear_count;
  9218. /** cycle count */
  9219. A_UINT32 cycle_count;
  9220. /** Phy error count */
  9221. A_UINT32 phy_err_count;
  9222. /** Channel Tx Power */
  9223. A_UINT32 chan_tx_pwr;
  9224. /** WAL dbg stats */
  9225. struct wlan_dbg_stats_v1 pdev_stats;
  9226. } wmi_pdev_stats_v1;
  9227. typedef struct {
  9228. /** Channel noise floor */
  9229. A_INT32 chan_nf;
  9230. /** TX frame count */
  9231. A_UINT32 tx_frame_count;
  9232. /** RX frame count */
  9233. A_UINT32 rx_frame_count;
  9234. /** rx clear count */
  9235. A_UINT32 rx_clear_count;
  9236. /** cycle count */
  9237. A_UINT32 cycle_count;
  9238. /** Phy error count */
  9239. A_UINT32 phy_err_count;
  9240. /** Channel Tx Power */
  9241. A_UINT32 chan_tx_pwr;
  9242. /** WAL dbg stats */
  9243. struct wlan_dbg_stats_v2 pdev_stats;
  9244. } wmi_pdev_stats_v2;
  9245. #if defined(AR900B)
  9246. #define wmi_pdev_stats wmi_pdev_stats_v2
  9247. #else
  9248. #define wmi_pdev_stats wmi_pdev_stats_v1
  9249. #endif
  9250. /**
  9251. * pdev extension statistics
  9252. */
  9253. typedef struct {
  9254. A_UINT32 tlv_header;
  9255. /* pdev id */
  9256. A_UINT32 pdev_id;
  9257. /** my_rx_count
  9258. * What portion of time, as measured by the MAC HW clock was occupied
  9259. * by receiving PPDUs addressed to one of the vdevs within this pdev.
  9260. */
  9261. A_UINT32 my_rx_count;
  9262. /** rx_matched_11ax_msdu_cnt
  9263. * number of Rx 11ax MSDUs with matching BSS color counter
  9264. * updated at EOP (end of packet)
  9265. */
  9266. A_UINT32 rx_matched_11ax_msdu_cnt;
  9267. /** rx_other_11ax_msdu_cnt
  9268. * number of Rx 11ax MSDUs with other BSS color counter updated at EOP
  9269. * (end of packet)
  9270. */
  9271. A_UINT32 rx_other_11ax_msdu_cnt;
  9272. } wmi_pdev_extd_stats;
  9273. /**
  9274. * VDEV statistics
  9275. * @todo
  9276. * add all VDEV stats here
  9277. */
  9278. typedef struct {
  9279. A_INT32 bcn_snr;
  9280. A_INT32 dat_snr;
  9281. } wmi_snr_info;
  9282. typedef struct {
  9283. /** unique id identifying the VDEV, generated by the caller */
  9284. A_UINT32 vdev_id;
  9285. wmi_snr_info vdev_snr;
  9286. 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) */
  9287. A_UINT32 rx_frm_cnt;/* Total number of packets that were successfully received (after appropriate filter rules including multi-cast, broadcast)*/
  9288. A_UINT32 multiple_retry_cnt[WLAN_MAX_AC];/*The number of MSDU packets and MMPDU frames per AC
  9289. that the 802.11 station successfully transmitted after more than one retransmission attempt*/
  9290. A_UINT32 fail_cnt[WLAN_MAX_AC]; /*Total number packets(per AC) failed to transmit */
  9291. A_UINT32 rts_fail_cnt;/*Total number of RTS/CTS sequence failures for transmission of a packet*/
  9292. A_UINT32 rts_succ_cnt;/*Total number of RTS/CTS sequence success for transmission of a packet*/
  9293. A_UINT32 rx_err_cnt;/*The receive error count. HAL will provide the RxP FCS error global */
  9294. A_UINT32 rx_discard_cnt;/* The sum of the receive error count and dropped-receive-buffer error count. (FCS error)*/
  9295. A_UINT32 ack_fail_cnt;/*Total number packets failed transmit because of no ACK from the remote entity*/
  9296. A_UINT32 tx_rate_history[MAX_TX_RATE_VALUES];/*History of last ten transmit rate, in units of 500 kbit/sec*/
  9297. A_UINT32 bcn_rssi_history[MAX_RSSI_VALUES];/*History of last ten Beacon rssi of the connected Bss*/
  9298. } wmi_vdev_stats;
  9299. /*
  9300. * vdev ext stats with additonal bcn stats
  9301. * (Due to backward compatiblity requirements, these new stats fields cannot be
  9302. * added inside wmi_vdev_stats.)
  9303. */
  9304. typedef struct {
  9305. A_UINT32 vdev_id;
  9306. A_UINT32 tx_bcn_succ_cnt; /* Total number of beacon frame transmitted successfully */
  9307. A_UINT32 tx_bcn_outage_cnt; /* Total number of failed beacons */
  9308. } wmi_bcn_stats;
  9309. /**
  9310. * vdev extension statistics
  9311. */
  9312. typedef struct {
  9313. A_UINT32 tlv_header;
  9314. /* vdev id */
  9315. A_UINT32 vdev_id;
  9316. /* Total number of Fils Discovery frames transmitted successfully */
  9317. A_UINT32 fd_succ_cnt;
  9318. /* Total number of Fils Discovery frames failed */
  9319. A_UINT32 fd_fail_cnt;
  9320. /* Total number of unsolicited probe response frames transmitted successfully */
  9321. A_UINT32 unsolicited_prb_succ_cnt;
  9322. /* Total number of unsolicited probe response frames failed */
  9323. A_UINT32 unsolicited_prb_fail_cnt;
  9324. } wmi_vdev_extd_stats;
  9325. /**
  9326. * peer statistics.
  9327. */
  9328. typedef struct {
  9329. /** peer MAC address */
  9330. wmi_mac_addr peer_macaddr;
  9331. /** rssi */
  9332. A_UINT32 peer_rssi;
  9333. /** last tx data rate used for peer */
  9334. A_UINT32 peer_tx_rate;
  9335. /** last rx data rate used for peer */
  9336. A_UINT32 peer_rx_rate;
  9337. } wmi_peer_stats;
  9338. /**
  9339. * Peer extension statistics
  9340. */
  9341. typedef struct {
  9342. /** peer MAC address */
  9343. wmi_mac_addr peer_macaddr;
  9344. /* lower 32 bits of rx duration in microseconds */
  9345. A_UINT32 rx_duration;
  9346. /** Total TX bytes (including dot11 header) sent to peer */
  9347. A_UINT32 peer_tx_bytes;
  9348. /** Total RX bytes (including dot11 header) received from peer */
  9349. A_UINT32 peer_rx_bytes;
  9350. /** last TX ratecode */
  9351. A_UINT32 last_tx_rate_code;
  9352. /** TX power used by peer - units are 0.5 dBm */
  9353. A_INT32 last_tx_power;
  9354. /* Total number of received multicast & broadcast data frames corresponding to this peer */
  9355. A_UINT32 rx_mc_bc_cnt; /* 1 in the MSB of rx_mc_bc_cnt represents a valid data */
  9356. /* upper 32 bits of rx duration in microseconds */
  9357. A_UINT32 rx_duration_u32; /* 1 in the most significant bit indicates this field contains valid data */
  9358. A_UINT32 reserved[2]; /** for future use - add new peer stats here */
  9359. } wmi_peer_extd_stats;
  9360. typedef struct {
  9361. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_extd2_stats */
  9362. /** peer MAC address */
  9363. wmi_mac_addr peer_macaddr;
  9364. /*
  9365. * The following rx_bytes field (lower/upper pair) counts only the
  9366. * MSDU bytes (after 802.11 decap, if applicable), and thus doesn't
  9367. * count the 802.11 header, unlike the wmi_peer_extd_stats.peer_rx_bytes
  9368. * and wmi_peer_stats_info.rx_bytes fields.
  9369. */
  9370. /** Lower 32 bits of the rx_bytes (size of MSDUs) excluding dot11 header from this peer */
  9371. A_UINT32 rx_bytes_l32;
  9372. /** Upper 32 bits of the rx_bytes (size of MSDUs) excluding dot11 header from this peer */
  9373. A_UINT32 rx_bytes_u32;
  9374. /** Number of MPDUS received with FCS error from this peer */
  9375. A_UINT32 rx_fcs_err;
  9376. /** Number of MPDUs(both data and non data) received from this peer */
  9377. A_UINT32 rx_mpdus;
  9378. /** nss of last tx data to peer */
  9379. A_UINT32 last_tx_nss;
  9380. /** nss of last rx data from peer */
  9381. A_UINT32 last_rx_nss;
  9382. /** chain mask used for last tx data to peer */
  9383. A_UINT32 last_tx_chain_mask;
  9384. /** chain mask used for last rx data from peer */
  9385. A_UINT32 last_rx_chain_mask;
  9386. } wmi_peer_extd2_stats;
  9387. typedef struct {
  9388. /** Primary channel freq of the channel for which stats are sent */
  9389. A_UINT32 chan_mhz;
  9390. /** Time spent on the channel */
  9391. A_UINT32 sampling_period_us;
  9392. /** Aggregate duration over a sampling period for which channel activity was observed */
  9393. A_UINT32 rx_clear_count;
  9394. /** Accumalation of the TX PPDU duration over a sampling period */
  9395. A_UINT32 tx_duration_us;
  9396. /** Accumalation of the RX PPDU duration over a sampling period */
  9397. A_UINT32 rx_duration_us;
  9398. } wmi_chan_stats;
  9399. /**
  9400. * MIB statistics. See 802.11 spec for the meaning of each field.
  9401. */
  9402. typedef struct {
  9403. A_UINT32 tx_mpdu_grp_frag_cnt; /*dot11TransmittedFragmentCount */
  9404. A_UINT32 tx_msdu_grp_frm_cnt; /*dot11GroupTransmittedFrameCount */
  9405. A_UINT32 tx_msdu_fail_cnt; /*dot11FailedCount*/
  9406. A_UINT32 rx_mpdu_frag_cnt; /*dot11ReceivedFragmentCount*/
  9407. A_UINT32 rx_msdu_grp_frm_cnt; /*dot11GroupReceivedFrameCount*/
  9408. A_UINT32 rx_mpdu_fcs_err; /*dot11FCSErrorCount*/
  9409. A_UINT32 tx_msdu_frm_cnt; /*dot11TransmittedFrameCount*/
  9410. A_UINT32 tx_msdu_retry_cnt; /*dot11RetryCount*/
  9411. A_UINT32 rx_frm_dup_cnt; /*dot11FrameDuplicateCount */
  9412. A_UINT32 tx_rts_success_cnt; /*dot11RTSSuccessCount*/
  9413. A_UINT32 tx_rts_fail_cnt; /*dot11RTSFailureCount*/
  9414. A_UINT32 tx_Qos_mpdu_grp_frag_cnt; /*dot11QosTransmittedFragmentCount */
  9415. A_UINT32 tx_Qos_msdu_fail_UP; /*dot11QosFailedCount */
  9416. A_UINT32 tx_Qos_msdu_retry_UP; /*dot11QosRetryCount */
  9417. A_UINT32 rx_Qos_frm_dup_cnt_UP; /*dot11QosFrameDuplicateCount*/
  9418. A_UINT32 tx_Qos_rts_success_cnt_UP; /*dot11QosRTSSuccessCount*/
  9419. A_UINT32 tx_Qos_rts_fail_cnt_UP; /*dot11QosRTSFailureCount*/
  9420. A_UINT32 rx_Qos_mpdu_frag_cnt_UP; /*dot11QosReceivedFragmentCount*/
  9421. A_UINT32 tx_Qos_msdu_frm_cnt_UP; /*dot11QosTransmittedFrameCount*/
  9422. A_UINT32 rx_Qos_msdu_discard_cnt_UP; /*dot11QosDiscardedFrameCount*/
  9423. A_UINT32 rx_Qos_mpdu_cnt; /*dot11QosMPDUsReceivedCount*/
  9424. A_UINT32 rx_Qos_mpdu_retryBit_cnt; /*dot11QosRetriesReceivedCount*/
  9425. A_UINT32 rsna_Mgmt_discard_CCMP_replay_err_cnt; /*dot11RSNAStatsRobustMgmtCCMPReplays*/
  9426. A_UINT32 rsna_TKIP_icv_err_cnt; /*dot11RSNAStatsTKIPICVErrors*/
  9427. A_UINT32 rsna_TKIP_replay_err_cnt; /*dot11RSNAStatsTKIPReplays*/
  9428. A_UINT32 rsna_CCMP_decrypt_err_cnt; /*dot11RSNAStatsCCMPDecryptErrors*/
  9429. A_UINT32 rsna_CCMP_replay_err_cnt; /*dot11RSNAStatsCCMPReplays*/
  9430. A_UINT32 tx_ampdu_cnt; /*dot11TransmittedAMPDUCount*/
  9431. A_UINT32 tx_mpdu_cnt_in_ampdu; /*dot11TransmittedMPDUsInAMPDUCount*/
  9432. union {
  9433. A_UINT64 counter; /* for use by target only */
  9434. struct {
  9435. A_UINT32 low;
  9436. A_UINT32 high;
  9437. } upload; /* for use by host */
  9438. } tx_octets_in_ampdu; /*dot11TransmittedOctetsInAMPDUCount*/
  9439. A_UINT32 rx_ampdu_cnt; /*dot11AMPDUReceivedCount*/
  9440. A_UINT32 rx_mpdu_cnt_in_ampdu; /*dot11MPDUInReceivedAMPDUCount*/
  9441. union {
  9442. A_UINT64 counter; /* for use by target only */
  9443. struct {
  9444. A_UINT32 rx_octets_in_ampdu_low;
  9445. A_UINT32 rx_octets_in_ampdu_high;
  9446. } upload; /* for use by host */
  9447. } rx_octets_in_ampdu; /*dot11ReceivedOctetsInAMPDUCount*/
  9448. A_UINT32 reserved_1;
  9449. A_UINT32 reserved_2;
  9450. A_UINT32 reserved_3;
  9451. A_UINT32 reserved_4;
  9452. } wmi_mib_stats;
  9453. /**
  9454. * MIB extension statistics.
  9455. */
  9456. typedef struct {
  9457. A_UINT32 tx_msdu_multi_retry_cnt; /*dot11MultipleRetryCount*/
  9458. A_UINT32 tx_ack_fail_cnt; /*dot11ACKFailureCount*/
  9459. A_UINT32 tx_qos_msdu_multi_retry_up; /*dot11QosMultipleRetryCount*/
  9460. A_UINT32 tx_qos_ack_fail_cnt_up; /*dot11QosACKFailureCount*/
  9461. A_UINT32 rsna_cmac_icv_err_cnt; /*dot11RSNAStatsCMACICVErrors*/
  9462. A_UINT32 rsna_cmac_replay_err_cnt; /*dot11RSNAStatsCMACReplays*/
  9463. A_UINT32 rx_ampdu_deli_crc_err_cnt; /*dot11AMPDUDelimiterCRCErrorCount*/
  9464. A_UINT32 reserved[8]; /* Reserve more fields for future extension */
  9465. } wmi_mib_extd_stats;
  9466. /**
  9467. * Beacon protection statistics.
  9468. */
  9469. typedef struct {
  9470. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmf_bcn_protect_stats */
  9471. A_UINT32 igtk_mic_fail_cnt; /* MIC failure count of management packets using IGTK */
  9472. A_UINT32 igtk_replay_cnt; /* Replay detection count of management packets using IGTK */
  9473. A_UINT32 bcn_mic_fail_cnt; /* MIC failure count of beacon packets using BIGTK */
  9474. A_UINT32 bcn_replay_cnt; /* Replay detection count of beacon packets using BIGTK */
  9475. } wmi_pmf_bcn_protect_stats;
  9476. typedef struct {
  9477. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_stats */
  9478. A_UINT32 vdev_id;
  9479. A_INT32 rssi_avg_beacon[WMI_MAX_CHAINS];
  9480. A_INT32 rssi_avg_data[WMI_MAX_CHAINS];
  9481. wmi_mac_addr peer_macaddr;
  9482. } wmi_rssi_stats;
  9483. typedef struct {
  9484. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_congestion_stats */
  9485. A_UINT32 vdev_id;
  9486. /* congestion -
  9487. * This field holds the congestion percentage = (busy_time/total_time)*100
  9488. * for the interval from when the vdev was started to the current time
  9489. * (or the time at which the vdev was stopped).
  9490. */
  9491. A_UINT32 congestion;
  9492. } wmi_congestion_stats;
  9493. typedef struct {
  9494. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_per_chain_rssi_stats */
  9495. A_UINT32 num_per_chain_rssi_stats;
  9496. /* This TLV is followed by another TLV of array of structs:
  9497. * wmi_rssi_stats rssi_stats[num_per_chain_rssi_stats];
  9498. */
  9499. } wmi_per_chain_rssi_stats;
  9500. /* vdev control flags (per bits) */
  9501. #define VDEV_FLAGS_NON_MBSSID_AP 0x00000001 /* legacy AP */
  9502. #define VDEV_FLAGS_TRANSMIT_AP 0x00000002 /* indicate if this vdev is transmitting AP */
  9503. #define VDEV_FLAGS_NON_TRANSMIT_AP 0x00000004 /* explicitly indicate this vdev is non-transmitting AP */
  9504. #define VDEV_FLAGS_EMA_MODE 0x00000008 /* vdev is EMA and supports multiple beacon profiles.
  9505. * Once this flag set, flags VDEV_FLAGS_TRANSMIT_AP and
  9506. * VDEV_FLAGS_NON_TRANSMIT_AP classify it as either Tx vap
  9507. * or non Tx vap.
  9508. */
  9509. #define VDEV_FLAGS_SCAN_MODE_VAP 0x00000010 /* for Scan Radio vdev will be special vap.
  9510. * There will not be WMI_VDEV_UP_CMD, there will be only WMI_VDEV_CREATE_CMD
  9511. * and WMI_VDEV_START_REQUEST_CMD. Based on this parameter need to make decision like
  9512. * vdev Pause/Unpause at WMI_VDEV_START_REQUEST_CMD.
  9513. */
  9514. /* get/set/check macros for VDEV_FLAGS_SCAN_MODE_VAP flag */
  9515. #define WMI_SCAN_MODE_VDEV_FLAG_GET(flag) WMI_GET_BITS(flag, 4, 1)
  9516. #define WMI_SCAN_MODE_VDEV_FLAG_SET(flag, val) WMI_SET_BITS(flag, 4, 1, val)
  9517. #define WMI_SCAN_MODE_VDEV_FLAG_ENABLED(flag) ((flag & VDEV_FLAGS_SCAN_MODE_VAP) ? 1 : 0)
  9518. typedef struct {
  9519. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */
  9520. /** unique id identifying the VDEV, generated by the caller */
  9521. A_UINT32 vdev_id;
  9522. /** VDEV type (AP,STA,IBSS,MONITOR) */
  9523. A_UINT32 vdev_type;
  9524. /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0)*/
  9525. A_UINT32 vdev_subtype;
  9526. /** VDEV MAC address */
  9527. wmi_mac_addr vdev_macaddr;
  9528. /** Number of configured txrx streams */
  9529. A_UINT32 num_cfg_txrx_streams;
  9530. /**
  9531. * pdev_id for identifying the MAC,
  9532. * See macros starting with WMI_PDEV_ID_ for values.
  9533. */
  9534. A_UINT32 pdev_id;
  9535. /** control flags for this vdev (DEPRECATED)
  9536. * Use @mbss_capability_flags in vdev start instead.
  9537. */
  9538. A_UINT32 flags;
  9539. /** vdevid of transmitted AP (mbssid case) (DEPRECATED)
  9540. * Use @vdevid_trans in vdev start instead.
  9541. */
  9542. A_UINT32 vdevid_trans;
  9543. /* This TLV is followed by another TLV of array of structures
  9544. * wmi_vdev_txrx_streams cfg_txrx_streams[];
  9545. * wmi_vdev_create_mlo_params mlo_params[0,1];
  9546. * optional TLV, only present for MLO vdev;
  9547. * if the vdev is not MLO the array length should be 0.
  9548. */
  9549. } wmi_vdev_create_cmd_fixed_param;
  9550. typedef struct {
  9551. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_txrx_streams */
  9552. /* band - Should take values from wmi_channel_band_mask */
  9553. A_UINT32 band;
  9554. /* max supported tx streams per given band for this vdev */
  9555. A_UINT32 supported_tx_streams;
  9556. /* max supported rx streams per given band for this vdev */
  9557. A_UINT32 supported_rx_streams;
  9558. } wmi_vdev_txrx_streams;
  9559. /* wmi_p2p_noa_descriptor structure can't be modified without breaking the compatibility for WMI_HOST_SWBA_EVENTID */
  9560. typedef struct {
  9561. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor */
  9562. A_UINT32 type_count; /** 255: continuous schedule, 0: reserved */
  9563. A_UINT32 duration; /** Absent period duration in micro seconds */
  9564. A_UINT32 interval; /** Absent period interval in micro seconds */
  9565. A_UINT32 start_time; /** 32 bit tsf time when in starts */
  9566. } wmi_p2p_noa_descriptor;
  9567. /*
  9568. * mlo_flags sub-fields:
  9569. * bits 0 - mlo enable flag;
  9570. * bits 1 - assoc link flag;
  9571. * bits 2 - primary_umac flag;
  9572. * bits 3 - is logical link index valid
  9573. * bits 4 - is mlo peer id valid
  9574. */
  9575. #define WMI_MLO_FLAGS_GET_ENABLED(mlo_flags) WMI_GET_BITS(mlo_flags, 0, 1)
  9576. #define WMI_MLO_FLAGS_SET_ENABLED(mlo_flags, value) WMI_SET_BITS(mlo_flags, 0, 1, value)
  9577. #define WMI_MLO_FLAGS_GET_ASSOC_LINK(mlo_flags) WMI_GET_BITS(mlo_flags, 1, 1)
  9578. #define WMI_MLO_FLAGS_SET_ASSOC_LINK(mlo_flags, value) WMI_SET_BITS(mlo_flags, 1, 1, value)
  9579. #define WMI_MLO_FLAGS_GET_PRIMARY_UMAC(mlo_flags) WMI_GET_BITS(mlo_flags, 2, 1)
  9580. #define WMI_MLO_FLAGS_SET_PRIMARY_UMAC(mlo_flags, value) WMI_SET_BITS(mlo_flags, 2, 1, value)
  9581. #define WMI_MLO_FLAGS_GET_LINK_INDEX_VALID(mlo_flags) WMI_GET_BITS(mlo_flags, 3, 1)
  9582. #define WMI_MLO_FLAGS_SET_LINK_INDEX_VALID(mlo_flags, value) WMI_SET_BITS(mlo_flags, 3, 1, value)
  9583. #define WMI_MLO_FLAGS_GET_PEER_ID_VALID(mlo_flags) WMI_GET_BITS(mlo_flags, 4, 1)
  9584. #define WMI_MLO_FLAGS_SET_PEER_ID_VALID(mlo_flags, value) WMI_SET_BITS(mlo_flags, 4, 1, value)
  9585. /* this structure used for pass mlo flags*/
  9586. typedef struct {
  9587. union {
  9588. struct {
  9589. A_UINT32 mlo_enabled:1, /* indicate is MLO enabled */
  9590. mlo_assoc_link:1, /* indicate is the link used to initialize the association of mlo connection */
  9591. mlo_primary_umac:1, /* indicate is the link on primary UMAC, WIN only flag */
  9592. mlo_logical_link_index_valid:1, /* indicate if the logial link index in wmi_peer_assoc_mlo_params is valid */
  9593. mlo_peer_id_valid:1, /* indicate if the mlo peer id in wmi_peer_assoc_mlo_params is valid */
  9594. unused: 27;
  9595. };
  9596. A_UINT32 mlo_flags;
  9597. };
  9598. } wmi_mlo_flags;
  9599. typedef struct {
  9600. A_UINT32 tlv_header;/** TLV tag (WMITLV_TAG_STRUC_wmi_partner_link_params) and len;*/
  9601. A_UINT32 vdev_id; /** partner vdev_id */
  9602. A_UINT32 hw_link_id; /** hw_link_id: Unique link id across SOCs, got as part of QMI handshake */
  9603. wmi_mac_addr vdev_macaddr; /** VDEV MAC address */
  9604. } wmi_partner_link_params;
  9605. /* this TLV structure used for pass mlo parameters on vdev create*/
  9606. typedef struct {
  9607. A_UINT32 tlv_header; /** TLV tag and len; */
  9608. /** MLD MAC address */
  9609. wmi_mac_addr mld_macaddr;
  9610. } wmi_vdev_create_mlo_params;
  9611. /* this TLV structure used for pass mlo parameters on vdev start*/
  9612. typedef struct {
  9613. A_UINT32 tlv_header; /** TLV tag and len; */
  9614. wmi_mlo_flags mlo_flags; /*only mlo enable and assoc link flag need by vdev start*/
  9615. } wmi_vdev_start_mlo_params;
  9616. /** values for vdev_type */
  9617. #define WMI_VDEV_TYPE_AP 0x1
  9618. #define WMI_VDEV_TYPE_STA 0x2
  9619. #define WMI_VDEV_TYPE_IBSS 0x3
  9620. #define WMI_VDEV_TYPE_MONITOR 0x4
  9621. /** VDEV type is for social wifi interface.This VDEV is Currently mainly needed
  9622. * by FW to execute the NAN specific WMI commands and also implement NAN specific
  9623. * operations like Network discovery, service provisioning and service
  9624. * subscription ..etc. If FW needs NAN VDEV then Host should issue VDEV create
  9625. * WMI command to create this VDEV once during initialization and host is not
  9626. * expected to use any VDEV specific WMI commands on this VDEV.
  9627. **/
  9628. #define WMI_VDEV_TYPE_NAN 0x5
  9629. #define WMI_VDEV_TYPE_OCB 0x6
  9630. /* NAN Data Interface */
  9631. #define WMI_VDEV_TYPE_NDI 0x7
  9632. #define WMI_VDEV_TYPE_MESH_POINT 0x8
  9633. /*
  9634. * Param values to be sent for WMI_VDEV_PARAM_SGI command
  9635. * which are used in 11ax, 11be systems
  9636. */
  9637. #define WMI_SGI_LEGACY 0x1 /* for HT and VHT */
  9638. #define WMI_SGI_HE_400_NS 0x2 /* for HE 400 nsec */
  9639. #define WMI_SGI_HE_800_NS 0x4 /* for HE 800 nsec */
  9640. #define WMI_SGI_HE_1600_NS 0x8 /* for HE 1600 nsec */
  9641. #define WMI_SGI_HE_3200_NS 0x10 /* for HE 3200 nsec */
  9642. #define WMI_SGI_EHT_800_NS 0x20 /* for EHT 800 nsec */
  9643. #define WMI_SGI_EHT_1600_NS 0x40 /* for EHT 1600 nsec */
  9644. #define WMI_SGI_EHT_3200_NS 0x80 /* for EHT 3200 nsec */
  9645. /*
  9646. * Param values to be sent for WMI_VDEV_PARAM_HE_LTF command
  9647. * which are used in 11ax systems
  9648. */
  9649. #define WMI_HE_LTF_DEFAULT 0x0
  9650. #define WMI_HE_LTF_1X 0x1
  9651. #define WMI_HE_LTF_2X 0x2
  9652. #define WMI_HE_LTF_4X 0x3
  9653. /*
  9654. * Param values to be sent for WMI_VDEV_EHT_PARAM_LTF command
  9655. * which are used in 11be systems
  9656. */
  9657. #define WMI_EHT_LTF_DEFAULT 0x4
  9658. #define WMI_EHT_LTF_1X 0x5
  9659. #define WMI_EHT_LTF_2X 0x6
  9660. #define WMI_EHT_LTF_4X 0x7
  9661. /** values for vdev_subtype */
  9662. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1
  9663. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2
  9664. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO 0x3
  9665. #define WMI_UNIFIED_VDEV_SUBTYPE_PROXY_STA 0x4
  9666. #define WMI_UNIFIED_VDEV_SUBTYPE_MESH 0x5
  9667. /* new subtype for 11S mesh is required as 11S functionality differs
  9668. * in many ways from proprietary mesh
  9669. * 11S uses 6-addr frame format and supports peering between mesh
  9670. * stations and dynamic best path selection between mesh stations.
  9671. * While in proprietary mesh, neighboring mesh station MAC is manually
  9672. * added to AST table for traffic flow between mesh stations
  9673. */
  9674. #define WMI_UNIFIED_VDEV_SUBTYPE_MESH_11S 0x6
  9675. /* Subtype to indicate that the AP VAP is in smart monitor mode
  9676. * This is needed to differentiate in firmware betweem normal AP mode
  9677. * with smart monitor AP mode
  9678. */
  9679. #define WMI_UNIFIED_VDEV_SUBTYPE_SMART_MON 0x7
  9680. /** values for vdev_start_request flags */
  9681. /** Indicates that AP VDEV uses hidden ssid. only valid for
  9682. * AP/GO */
  9683. #define WMI_UNIFIED_VDEV_START_HIDDEN_SSID (1<<0)
  9684. /** Indicates if robust management frame/management frame
  9685. * protection is enabled. For GO/AP vdevs, it indicates that
  9686. * it may support station/client associations with RMF enabled.
  9687. * For STA/client vdevs, it indicates that sta will
  9688. * associate with AP with RMF enabled. */
  9689. #define WMI_UNIFIED_VDEV_START_PMF_ENABLED (1<<1)
  9690. /*
  9691. * Host is sending bcn_tx_rate to override the beacon tx rates.
  9692. */
  9693. #define WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT (1<<2)
  9694. /** Indicates if LDPC RX will be advertized inside HT/VHT Capabilities IE
  9695. * of assoc request/response
  9696. */
  9697. #define WMI_UNIFIED_VDEV_START_LDPC_RX_ENABLED (1<<3)
  9698. /** Indicates HW encryption is disabled, and SW encryption is enabled.
  9699. * If This flag is set, indicates that HW encryption will be disabled
  9700. * and SW encryption will be enabled.
  9701. * If SW encryption is enabled, key plumbing will not happen in FW.
  9702. */
  9703. #define WMI_UNIFIED_VDEV_START_HW_ENCRYPTION_DISABLED (1<<4)
  9704. /* BSS color 0-6 */
  9705. #define WMI_HEOPS_COLOR_GET_D2(he_ops) WMI_GET_BITS(he_ops, 0, 6)
  9706. #define WMI_HEOPS_COLOR_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 0, 6, value)
  9707. /* Default PE Duration subfield indicates the PE duration in units of 4 us */
  9708. #define WMI_HEOPS_DEFPE_GET_D2(he_ops) WMI_GET_BITS(he_ops, 6, 3)
  9709. #define WMI_HEOPS_DEFPE_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 6, 3, value)
  9710. /* TWT required */
  9711. #define WMI_HEOPS_TWT_REQUIRED_GET_D2(he_ops) WMI_GET_BITS(he_ops, 9, 1)
  9712. #define WMI_HEOPS_TWT_REQUIRED_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 9, 1, value)
  9713. /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_GET instead */
  9714. #define WMI_HEOPS_TWT_GET_D2(he_ops) \
  9715. WMI_HEOPS_TWT_REQUIRED_GET_D2(he_ops)
  9716. /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_SET instead */
  9717. #define WMI_HEOPS_TWT_SET_D2(he_ops, value) \
  9718. WMI_HEOPS_TWT_REQUIRED_SET_D2(he_ops, value)
  9719. /* RTS threshold in units of 32 us,0 - always use RTS 1023 - this is disabled */
  9720. #define WMI_HEOPS_RTSTHLD_GET_D2(he_ops) WMI_GET_BITS(he_ops, 10, 10)
  9721. #define WMI_HEOPS_RTSTHLD_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 10, 10, value)
  9722. /* Partial BSS Color field indicates whether BSS applies an AID assignment rule using partial BSS color bits */
  9723. #define WMI_HEOPS_PARTBSSCOLOR_GET_D2(he_ops) WMI_GET_BITS(he_ops, 20, 1)
  9724. #define WMI_HEOPS_PARTBSSCOLOR_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 20, 1, value)
  9725. /* MAX BSS supported by MultiBSS element */
  9726. #define WMI_HEOPS_MAXBSSID_GET_D2(he_ops) WMI_GET_BITS(he_ops, 21, 8)
  9727. #define WMI_HEOPS_MAXBSSID_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 21, 8, value)
  9728. /* Tx BSSID Indicator indicates whether HE AP corresponds to transmitted BSSID */
  9729. #define WMI_HEOPS_TXBSSID_GET_D2(he_ops) WMI_GET_BITS(he_ops, 29, 1)
  9730. #define WMI_HEOPS_TXBSSID_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 29, 1, value)
  9731. /* when set to 1 disables use of BSS color */
  9732. #define WMI_HEOPS_BSSCOLORDISABLE_GET_D2(he_ops) WMI_GET_BITS(he_ops, 30, 1)
  9733. #define WMI_HEOPS_BSSCOLORDISABLE_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 30, 1, value)
  9734. /**--- HEOPS_DUALBEACON: DO NOT USE - DEPRECATED ---*/
  9735. /* When set to 1 HE AP transmits beacons using two PHY formats,
  9736. * one in non-HE format and other in an HE_EXT_SU PHY format
  9737. */
  9738. #define WMI_HEOPS_DUALBEACON_GET_D2(he_ops) (0)
  9739. #define WMI_HEOPS_DUALBEACON_SET_D2(he_ops, value) {;}
  9740. #define WMI_MAX_HECAP_PHY_SIZE (3)
  9741. /* Dual Band both 2.4 GHz and 5 GHz Supported */
  9742. #define WMI_HECAP_PHY_DB_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 0, 1)
  9743. #define WMI_HECAP_PHY_DB_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 0, 1, value)
  9744. /*
  9745. * B0: Indicates STA support 40 MHz channel width in 2.4 GHz
  9746. * B1: Indicates STA support 40 MHz and 80 MHz channel width in 5 GHz
  9747. * B2: Indicates STA supports 160 MHz channel width in 5 GHz
  9748. * B3: Indicates STA supports 160/80+80 MHz channel width in 5 GHz
  9749. * B4: If B1 is set to 0, then B5 indicates support of 242/106/52/26-tone
  9750. * RU mapping in 40 MHz channel width in 2.4 GHz. Otherwise Reserved.
  9751. * B5: If B2, B3, and B4 are set to 0, then B6 indicates support of
  9752. * 242-tone RU mapping in 40 MHz and 80
  9753. * MHz channel width in 5 GHz. Otherwise Reserved.
  9754. * B6: Reserved
  9755. */
  9756. #define WMI_HECAP_PHY_CBW_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 1, 7)
  9757. #define WMI_HECAP_PHY_CBW_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 1, 7, value)
  9758. /*
  9759. * B0: Indicates STA supports reception of preamble puncturing in 80 MHz,
  9760. * where in the preamble only the secondary 20 MHz is punctured
  9761. * B1: Indicates STA supports reception of preamble puncturing in 80 MHz,
  9762. * where in the preamble only one of the two 20 MHz sub-channels in the
  9763. * secondary 40 MHz is punctured
  9764. * B2: Indicates STA supports reception of preamble puncturing in 160 MHz
  9765. * or 80+80 MHz, where in the primary 80 MHz of the preamble only the
  9766. * secondary 20 MHz is punctured
  9767. * B3: Indicates STA supports reception of preamble puncturing in 160 MHz
  9768. * or 80+80 MHz, where in the primary 80 MHz of the preamble, the
  9769. * primary 40 MHz is present
  9770. */
  9771. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 8, 4)
  9772. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 8, 4, value)
  9773. /* Indicates transmitting STA is a Class A (1) or a Class B (0) device */
  9774. #define WMI_HECAP_PHY_COD_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 12, 1)
  9775. #define WMI_HECAP_PHY_COD_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 12, 1, value)
  9776. /* Indicates support of transmission and reception of LDPC encoded packets */
  9777. #define WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 13, 1)
  9778. #define WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 13, 1, value)
  9779. /* Below 2 macros are for maintaining backward compatability - Deprecated use WMI_HECAP_PHY_LDPC instead */
  9780. #define WMI_HECAP_PHY_TXLDPC_GET_D2(he_cap_phy) WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy)
  9781. #define WMI_HECAP_PHY_TXLDPC_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value)
  9782. /* Below 2 macros are for maintaining backward compatability - Deprecated use WMI_HECAP_PHY_LDPC instead */
  9783. #define WMI_HECAP_PHY_RXLDPC_GET_D2(he_cap_phy) WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy)
  9784. #define WMI_HECAP_PHY_RXLDPC_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value)
  9785. /*
  9786. * B0: Indicates support of reception of 1x LTF and 0.8us guard interval duration for HE SU PPDUs.
  9787. */
  9788. #define WMI_HECAP_PHY_LTFGIFORHE_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 14, 1)
  9789. #define WMI_HECAP_PHY_LTFGIFORHE_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 14, 1, value)
  9790. /*
  9791. * When the Doppler Rx subfield is 1, indicates the maximum number of space-
  9792. * time streams supported for reception when midamble is used in the Data field.
  9793. */
  9794. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 15, 2)
  9795. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 15, 2, value)
  9796. /*
  9797. * B0: For a transmitting STA acting as beamformee, it indicates support of
  9798. * NDP reception using 4x LTF and 3.2 us guard interval duration
  9799. */
  9800. #define WMI_HECAP_PHY_LTFGIFORNDP_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 17, 1)
  9801. #define WMI_HECAP_PHY_LTFGIFORNDP_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 17, 1, value)
  9802. /* indicates support for the transmission of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx*/
  9803. #define WMI_HECAP_PHY_TXSTBC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 18, 1)
  9804. #define WMI_HECAP_PHY_TXSTBC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 18, 1, value)
  9805. /* indicates support for the reception of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx*/
  9806. #define WMI_HECAP_PHY_RXSTBC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 19, 1)
  9807. #define WMI_HECAP_PHY_RXSTBC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 19, 1, value)
  9808. /* indicates transmitting STA supports transmitting HE PPDUs with Doppler procedure */
  9809. #define WMI_HECAP_PHY_TXDOPPLER_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 20, 1)
  9810. #define WMI_HECAP_PHY_TXDOPPLER_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 20, 1, value)
  9811. /* indicates transmitting STA supports receiving HE PPDUs with Doppler procedure */
  9812. #define WMI_HECAP_PHY_RXDOPPLER_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 21, 1)
  9813. #define WMI_HECAP_PHY_RXDOPPLER_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 21, 1, value)
  9814. /*
  9815. * If the transmitting STA is an AP:
  9816. * indicates STA supports of reception of full bandwidth UL MU-MIMO
  9817. * transmission.
  9818. * If the transmitting STA is a non-AP STA:
  9819. * indicates STA supports of transmission of full bandwidth UL MU-MIMO
  9820. * transmission.
  9821. */
  9822. #define WMI_HECAP_PHY_UL_MU_MIMO_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 22, 1)
  9823. #define WMI_HECAP_PHY_UL_MU_MIMO_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 22, 1, value)
  9824. /*
  9825. * If the transmitting STA is an AP:
  9826. * indicates STA supports of reception of UL MUMIMO transmission on an
  9827. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  9828. * If the transmitting STA is a non-AP STA:
  9829. * indicates STA supports of transmission of UL MU-MIMO transmission on an
  9830. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  9831. */
  9832. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 23, 1)
  9833. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 23, 1, value)
  9834. /* Tx DCM
  9835. * B0:B1
  9836. * 00: Does not support DCM
  9837. * 01: BPSK
  9838. * 10: QPSK
  9839. * 11: 16-QAM
  9840. * B2 signals maximum number of spatial streams with DCM
  9841. * 0: 1 spatial stream
  9842. * 1: 2 spatial streams
  9843. */
  9844. #define WMI_HECAP_PHY_DCMTX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 24, 3)
  9845. #define WMI_HECAP_PHY_DCMTX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 24, 3, value)
  9846. /* Rx DCM
  9847. * B0:B1
  9848. * 00: Does not support DCM
  9849. * 01: BPSK
  9850. * 10: QPSK
  9851. * 11: 16-QAM
  9852. * B2 signals maximum number of spatial streams with DCM
  9853. * 0: 1 spatial stream
  9854. * 1: 2 spatial streams
  9855. */
  9856. #define WMI_HECAP_PHY_DCMRX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 27, 3)
  9857. #define WMI_HECAP_PHY_DCMRX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 27, 3, value)
  9858. /*
  9859. * Indicates that the STA supports the reception of an HE MU PPDU payload
  9860. * over full bandwidth and partial bandwidth (106-tone RU within 20 MHz).
  9861. */
  9862. #define WMI_HECAP_PHY_ULHEMU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 30, 1)
  9863. #define WMI_HECAP_PHY_ULHEMU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 30, 1, value)
  9864. /* Indicates support for operation as an SU beamformer */
  9865. #define WMI_HECAP_PHY_SUBFMR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 31, 1)
  9866. #define WMI_HECAP_PHY_SUBFMR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 31, 1, value)
  9867. /* Indicates support for operation as an SU beamformee */
  9868. #define WMI_HECAP_PHY_SUBFME_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 0, 1)
  9869. #define WMI_HECAP_PHY_SUBFME_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 0, 1, value)
  9870. /* Indicates support for operation as an MU Beamformer */
  9871. #define WMI_HECAP_PHY_MUBFMR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 1, 1)
  9872. #define WMI_HECAP_PHY_MUBFMR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 1, 1, value)
  9873. /*
  9874. * Num STS -1 for <= 80MHz (min val 3)
  9875. * The maximum number of space-time streams minus 1 that the STA can
  9876. * receive in an HE NDP
  9877. */
  9878. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 2, 3)
  9879. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 2, 3, value)
  9880. /*
  9881. * Num STS -1 for > 80MHz (min val 3)
  9882. * The maximum number of space-time streams minus 1 that the STA can
  9883. * receive in an HE NDP
  9884. */
  9885. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  9886. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  9887. /*
  9888. * Number Of Sounding Dimensions For <= 80 MHz
  9889. * If SU beamformer capable, set to the maximum supported value of the
  9890. * TXVECTOR parameter NUM_STS minus 1.
  9891. * Otherwise, reserved.
  9892. */
  9893. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  9894. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  9895. /*
  9896. * Number Of Sounding Dimensions For > 80 MHz
  9897. * If SU beamformer capable, set to the maximum supported value of the
  9898. * TXVECTOR parameter NUM_STS minus 1.
  9899. * Otherwise, reserved.
  9900. */
  9901. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 11, 3)
  9902. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 11, 3, value)
  9903. /*
  9904. * Indicates if the HE beamformee is capable of feedback with tone
  9905. * grouping of 16 in the HE Compressed Beamforming Report field for
  9906. * a SU-type feedback.
  9907. */
  9908. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 14, 1)
  9909. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 14, 1, value)
  9910. /*
  9911. * Indicates if the HE beamformee is capable of feedback with tone
  9912. * grouping of 16 in the HE Compressed Beamforming Report field for
  9913. * a MU-type feedback.
  9914. */
  9915. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 15, 1)
  9916. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 15, 1, value)
  9917. /*
  9918. * Indicates if HE beamformee is capable of feedback with codebook
  9919. * size {4, 2} in the HECompressed Beamforming Report field for
  9920. * a SU-type feedback.
  9921. */
  9922. #define WMI_HECAP_PHY_CODBK42SU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 16, 1)
  9923. #define WMI_HECAP_PHY_CODBK42SU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 16, 1, value)
  9924. /*
  9925. * Indicates if HE beamformee is capable of feedback with codebook
  9926. * size {7, 5} in the HE Compressed Beamforming Report field for
  9927. * a MU-type feedback.
  9928. */
  9929. #define WMI_HECAP_PHY_CODBK75MU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 17, 1)
  9930. #define WMI_HECAP_PHY_CODBK75MU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 17, 1, value)
  9931. /*
  9932. * Beamforming Feedback With Trigger Frame
  9933. * If the transmitting STA is an AP STA:
  9934. * B0: indicates support of reception of SU-Type partial(1) and full bandwidth feedback(0)
  9935. * B1: indicates support of reception of MU-Type partial(1) bandwidth feedback
  9936. * B2: indicates support of reception of CQI-Only partial and full bandwidth feedback
  9937. * If the transmitting STA is a non-AP STA:
  9938. * B0: indicates support of transmission of SU-Type partial(1) and full bandwidth(0) feedback
  9939. * B1: indicates support of transmission of MU-Type partial(1) bandwidth feedback
  9940. * B2: indicates support of transmission of CQI-Onlypartial (1)and full bandwidth feedback
  9941. */
  9942. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 18, 3)
  9943. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 18, 3, value)
  9944. /* Indicates the support of transmission and reception of an HE extended range SU PPDU payload transmitted
  9945. * over the right 106-tone RU or partial BW ER
  9946. */
  9947. #define WMI_HECAP_PHY_HEERSU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 21, 1)
  9948. #define WMI_HECAP_PHY_HEERSU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 21, 1, value)
  9949. /* Indicates that the non-AP STA supports reception of a DL MU-MIMO transmission on an RU in an HE MU PPDU
  9950. * where the RU does not span the entire PPDU bandwidth.
  9951. */
  9952. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 22, 1)
  9953. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 22, 1, value)
  9954. /* Indicates whether or not the PPE Threshold field is present */
  9955. #define WMI_HECAP_PHY_PETHRESPRESENT_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 23, 1)
  9956. #define WMI_HECAP_PHY_PETHRESPRESENT_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 23, 1, value)
  9957. /* Indicates that the STA supports SRP-based SR operation */
  9958. #define WMI_HECAP_PHY_SRPSPRESENT_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 24, 1)
  9959. #define WMI_HECAP_PHY_SRPPRESENT_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 24, 1, value)
  9960. /* Indicates that the STA supports a power boost factor ar for the r-th RU in the range [0.5, 2] */
  9961. #define WMI_HECAP_PHY_PWRBOOSTAR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 25, 1)
  9962. #define WMI_HECAP_PHY_PWRBOOSTAR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 25, 1, value)
  9963. /* Indicates support for the reception of 4x LTF and 0.8us guard interval duration for HE SU PPDUs. */
  9964. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 26, 1)
  9965. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 26, 1, value)
  9966. /* For a transmitting STA acting as a beamformee, it indicates the maximum Nc for beamforming sounding
  9967. * feedback supported If SU beamformee capable, then set to the maximum Nc for beamforming sounding feedback
  9968. * minus 1. Otherwise, reserved.
  9969. */
  9970. #define WMI_HECAP_PHY_MAXNC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 27, 3)
  9971. #define WMI_HECAP_PHY_MAXNC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 27, 3, value)
  9972. /* Indicates support for the transmission of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  9973. * STBC with one spatial stream
  9974. */
  9975. #define WMI_HECAP_PHY_STBCTXGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 30, 1)
  9976. #define WMI_HECAP_PHY_STBCTXGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 30, 1, value)
  9977. /* Indicates support for the reception of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  9978. * STBC with one spatial stream
  9979. */
  9980. #define WMI_HECAP_PHY_STBCRXGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 31, 1)
  9981. #define WMI_HECAP_PHY_STBCRXGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 31, 1, value)
  9982. /* Indicates support for the reception of an HE ER SU PPDU with 4x LTF and 0.8 us guard interval duration */
  9983. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 0, 1)
  9984. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 0, 1, value)
  9985. /*
  9986. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  9987. * 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.
  9988. */
  9989. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 1, 1)
  9990. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 1, 1, value)
  9991. /*
  9992. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  9993. * 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.
  9994. */
  9995. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 2, 1)
  9996. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 2, 1, value)
  9997. /*
  9998. * Indicates supports of 160 MHz OFDMA for a non-AP HE STA that sets bit B1 of Channel Width Set to 1, and
  9999. * sets B2 and B3 of Channel Width Set each to 0, when operating with 80 MHz channel width. The capability
  10000. * bit is applicable while receiving a 80+80 MHz or a 160 MHz HE MU PPDU, or transmitting a 80+80 MHz or a
  10001. * 160 MHz HE TB PPDU.
  10002. */
  10003. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 3, 1)
  10004. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 3, 1, value)
  10005. /* Indicates support for the reception of an HE ER SU PPDU with 1x LTF and 0.8 us guard interval duration */
  10006. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 4, 1)
  10007. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 4, 1, value)
  10008. /*
  10009. * When the Doppler Rx subfield is 1, indicates support for receiving midambles with 2x HE-LTF, 1x HE-LTF
  10010. * 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
  10011. * HE ER SU PPDU if the HE ER SU PPDU With 1x HELTF And 0.8 s GI subfield is set to 1.
  10012. */
  10013. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 5, 1)
  10014. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 5, 1, value)
  10015. /*HTC + HE Support Set to 1 if STA supports reception of HE Variant HT control Field*/
  10016. #define WMI_HECAP_MAC_HECTRL_GET_D2(he_cap) WMI_GET_BITS(he_cap, 0, 1)
  10017. #define WMI_HECAP_MAC_HECTRL_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 0, 1, value)
  10018. /* set to 1 to for TWT Requestor support*/
  10019. #define WMI_HECAP_MAC_TWTREQ_GET_D2(he_cap) WMI_GET_BITS(he_cap, 1, 1)
  10020. #define WMI_HECAP_MAC_TWTREQ_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 1, 1, value)
  10021. /* set to 1 to for TWT Responder support*/
  10022. #define WMI_HECAP_MAC_TWTRSP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 2, 1)
  10023. #define WMI_HECAP_MAC_TWTRSP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 2, 1, value)
  10024. /* Level of frag support
  10025. Set to 0 for no support for dynamic fragmentation.
  10026. Set to 1 for support for dynamic fragments that are contained within a S-MPDU
  10027. Set to 2 for support for dynamic fragments that are contained within a Single MPDU and support for up to
  10028. one dynamic fragment for each MSDU and each MMPDU within an A-MPDU or multi-TID A-MPDU.
  10029. Set to 3 for support for dynamic fragments that are contained within a Single MPDU and support for multiple
  10030. dynamic fragments for each MSDU within an AMPDU or multi-TID AMPDU and up to one dynamic fragment
  10031. for each MMPDU in a multi-TID A-MPDU that is not a Single MPDU
  10032. */
  10033. #define WMI_HECAP_MAC_HEFRAG_GET_D2(he_cap) WMI_GET_BITS(he_cap, 3, 2)
  10034. #define WMI_HECAP_MAC_HEFRAG_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 3, 2, value)
  10035. /* The maximum number of fragmented MSDUs, Nmax,defined by this field is Nmax = 2 Maximum Number Of FMPDUs*/
  10036. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 5, 3)
  10037. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 5, 3, value)
  10038. /* 0 = no restriction on the minimum payload , 1 = 128 octets min, 2 = 256 octets min, 3 = 512 octets min */
  10039. #define WMI_HECAP_MAC_MINFRAGSZ_GET_D2(he_cap) WMI_GET_BITS(he_cap, 8, 2)
  10040. #define WMI_HECAP_MAC_MINFRAGSZ_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 8, 2, value)
  10041. /*0 = no additional processing time, 1 = 8us,2 = 16us */
  10042. #define WMI_HECAP_MAC_TRIGPADDUR_GET_D2(he_cap) WMI_GET_BITS(he_cap, 10, 2)
  10043. #define WMI_HECAP_MAC_TRIGPADDUR_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 10, 2, value)
  10044. /*number of TIDs minus 1 of QoS Data frames that HE STA can aggregate in multi-TID AMPDU*/
  10045. #define WMI_HECAP_MAC_MTID_GET_D2(he_cap) WMI_GET_BITS(he_cap, 12, 3)
  10046. #define WMI_HECAP_MAC_MTID_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 12, 3, value)
  10047. /*
  10048. * Indicates support by a STA to receive an ack-enabled A-MPDU in which an A-MSDU is carried in
  10049. * a QoS Data frame for which no block ack agreement exists.
  10050. */
  10051. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 15, 1)
  10052. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 15, 1, value)
  10053. /*--- HECAP_MAC_HELKAD: DO NOT USE - DEPRECATED ---*/
  10054. /*0=No Feedback,2=Unsolicited,3=Both*/
  10055. #define WMI_HECAP_MAC_HELKAD_GET_D2(he_cap) (0)
  10056. #define WMI_HECAP_MAC_HELKAD_SET_D2(he_cap, value) {;}
  10057. /* bit 16 reserved. */
  10058. /*Set to 1 for reception of AllAck support*/
  10059. #define WMI_HECAP_MAC_AACK_GET_D2(he_cap) WMI_GET_BITS(he_cap, 17, 1)
  10060. #define WMI_HECAP_MAC_AACK_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 17, 1, value)
  10061. /*Set to 1 if the STA supports reception of the UL MU Response Scheduling A-Control field*/
  10062. #define WMI_HECAP_MAC_ULMURSP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 18, 1)
  10063. #define WMI_HECAP_MAC_ULMURSP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 18, 1, value)
  10064. /*Set to 1 if the STA supports the BSR A-Control field functionality.*/
  10065. #define WMI_HECAP_MAC_BSR_GET_D2(he_cap) WMI_GET_BITS(he_cap, 19, 1)
  10066. #define WMI_HECAP_MAC_BSR_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 19, 1, value)
  10067. /*Set to 1 when the STA supports broadcast TWT functionality.*/
  10068. #define WMI_HECAP_MAC_BCSTTWT_GET_D2(he_cap) WMI_GET_BITS(he_cap, 20, 1)
  10069. #define WMI_HECAP_MAC_BCSTTWT_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 20, 1, value)
  10070. /*Set to 1 if STA supports rx of Multi-STA BA that has 32-bit Block Ack Bitmap*/
  10071. #define WMI_HECAP_MAC_32BITBA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 21, 1)
  10072. #define WMI_HECAP_MAC_32BITBA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 21, 1, value)
  10073. /*Set to 1 if the STA supports MU cascading operation*/
  10074. #define WMI_HECAP_MAC_MUCASCADE_GET_D2(he_cap) WMI_GET_BITS(he_cap, 22, 1)
  10075. #define WMI_HECAP_MAC_MUCASCADE_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 22, 1, value)
  10076. /*Set to 1 when the STA supports reception of this multi-TID A-MPDU format*/
  10077. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 23, 1)
  10078. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 23, 1, value)
  10079. /*Set to 1 when the STA supports its reception*/
  10080. #define WMI_HECAP_MAC_GROUPMSTABA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 24, 1)
  10081. #define WMI_HECAP_MAC_GROUPMSTABA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 24, 1, value)
  10082. /*Set to 1 if the STA supports reception of the OMI A-Control field*/
  10083. #define WMI_HECAP_MAC_OMI_GET_D2(he_cap) WMI_GET_BITS(he_cap, 25, 1)
  10084. #define WMI_HECAP_MAC_OMI_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 25, 1, value)
  10085. /*1 if OFDMA Random Access Supported*/
  10086. #define WMI_HECAP_MAC_OFDMARA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 26, 1)
  10087. #define WMI_HECAP_MAC_OFDMARA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 26, 1, value)
  10088. /* Maximum AMPDU Length Exponent.
  10089. * If the HE STA includes a VHT Capabilities element, the Maximum A-MPDU Length Exponent subfield in
  10090. * HE Capabilities element combined with the Maximum A-MPDU Length Exponent subfield in VHT
  10091. * Capabilities element indicate the maximum length of A-MPDU that the STA can Receive where EOF
  10092. * padding is not included in this limit.
  10093. */
  10094. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 27, 2)
  10095. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 27, 2, value)
  10096. /*A-MSDU Fragmentation Support*/
  10097. #define WMI_HECAP_MAC_AMSDUFRAG_GET_D2(he_cap) WMI_GET_BITS(he_cap, 29, 1)
  10098. #define WMI_HECAP_MAC_AMSDUFRAG_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 29, 1, value)
  10099. /*Flexible TWT Schedule Support*/
  10100. #define WMI_HECAP_MAC_FLEXTWT_GET_D2(he_cap) WMI_GET_BITS(he_cap, 30, 1)
  10101. #define WMI_HECAP_MAC_FLEXTWT_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 30, 1, value)
  10102. /*Rx Control Frame to MultiBSS*/
  10103. #define WMI_HECAP_MAC_MBSS_GET_D2(he_cap) WMI_GET_BITS(he_cap, 31, 1)
  10104. #define WMI_HECAP_MAC_MBSS_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 31, 1, value)
  10105. /* BSRP A-MPDU Aggregation
  10106. * maintaining compatability since we dont support this now so not wasting memory
  10107. */
  10108. #define WMI_HECAP_MAC_BSRPAMPDU_GET_D2(he_cap) (0)
  10109. #define WMI_HECAP_MAC_BSRPAMPDU_SET_D2(he_cap, value) {;}
  10110. /* Quiet Time Period (QTP) operation
  10111. * maintaining compatability since we dont support this now so not wasting memory
  10112. */
  10113. #define WMI_HECAP_MAC_QTP_GET_D2(he_cap) (0)
  10114. #define WMI_HECAP_MAC_QTP_SET_D2(he_cap, value) {;}
  10115. /* support by an AP for receiving an (A-)MPDU that contains a BQR in the
  10116. * A-Control subfield and support by a non-AP STA for generating an (A-)MPDU
  10117. * that contains a BQR in the A-Control subfield
  10118. * maintaining compatability since we dont support this now so not wasting memory
  10119. */
  10120. #define WMI_HECAP_MAC_ABQR_GET_D2(he_cap) (0)
  10121. #define WMI_HECAP_MAC_ABQR_SET_D2(he_cap, value) {;}
  10122. /*Indicates support by the STA for the role of SR Responder.*/
  10123. #define WMI_HECAP_MAC_SRRESP_GET_D2(he_cap) (0)
  10124. #define WMI_HECAP_MAC_SRRESP_SET_D2(he_cap, value) {;}
  10125. /* Indicates support for an AP to encode OPS information to TIM element of the FILS Discovery
  10126. * frames or TIM frames as described in AP operation for opportunistic power save.
  10127. * Indicates support for a non-AP STA to receive the opportunistic power save encoded TIM elements
  10128. */
  10129. #define WMI_HECAP_MAC_OPS_GET_D2(he_cap) (0)
  10130. #define WMI_HECAP_MAC_OPS_SET_D2(he_cap, value) {;}
  10131. /* Indicates support for a non-AP STA to follow the NDP feedback report procedure and respond to
  10132. * the NDP Feedback Report Poll Trigger frame.
  10133. */
  10134. #define WMI_HECAP_MAC_NDPFDBKRPT_GET_D2(he_cap) (0)
  10135. #define WMI_HECAP_MAC_NDPFDBKRPT_SET_D2(he_cap, value) {;}
  10136. /* BELOW MACROS ARE DEPRECATED Also we are not defining bits for capabilities
  10137. * beyond bit 31 we donot support as it adds additional dword to our struct which may be later
  10138. * removed by standard
  10139. */
  10140. #define WMI_HECAP_MAC_MBAHECTRL_GET_D2(he_cap) (0) /* DO NOT USE - DEPRECATED*/
  10141. #define WMI_HECAP_MAC_MBAHECTRL_SET_D2(he_cap, value) {;} /* DO NOT USE - DEPRECATED*/
  10142. #define WMI_HECAP_MAC_MURTS_GET_D2(he_cap) (0) /* DO NOT USE - DEPRECATED*/
  10143. #define WMI_HECAP_MAC_MURTS_SET_D2(he_cap, value) {;} /* DO NOT USE - DEPRECATED*/
  10144. /*Deprecate use WMI_HECAP_PHY_PREAMBLEPUNCRX instead*/
  10145. #define WMI_HECAP_PHY_CBMODE_GET_D2(he_cap_phy) WMI_HECAP_PHY_CBMODE_GET_D2(he_cap_phy)
  10146. #define WMI_HECAP_PHY_CBMODE_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_CBMODE_SET_D2(he_cap_phy, value)
  10147. /* Below 2 macros are for maintaining backward compatability - Deprecated use WMI_HECAP_PHY_LTFGIFORHE_GET instead */
  10148. #define WMI_HECAP_PHY_OLTF_GET_D2(he_cap_phy) WMI_HECAP_PHY_LTFGIFORHE_GET_D2(he_cap_phy)
  10149. #define WMI_HECAP_PHY_OLTF_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LTFGIFORHE_SET_D2(he_cap_phy, value)
  10150. /*DEPRECATED - USE WMI_HECAP_PHY_BFMENLTSGT80MHZ*/
  10151. #define WMI_HECAP_PHY_SUBFMESTS_GET_D2(he_cap_phy) WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2(he_cap_phy)
  10152. #define WMI_HECAP_PHY_SUBFMESTS_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2(he_cap_phy, value)
  10153. /*DEPRECATED - use WMI_HECAP_PHY_PETHRESPRESENT**/
  10154. #define WMI_HECAP_PHY_PADDING_GET_D2(he_cap_phy) WMI_HECAP_PHY_PETHRESPRESENT_GET_D2(he_cap_phy)
  10155. #define WMI_HECAP_PHY_PADDING_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_PETHRESPRESENT_SET_D2(he_cap_phy, value)
  10156. /**DO NOT USE - DEPRECATED*/
  10157. #define WMI_HECAP_PHY_DLOFMAMUMIMO_GET_D2(he_cap_phy) (0)
  10158. #define WMI_HECAP_PHY_DLOFDMAMUMIO_SET_D2(he_cap_phy, value) {;}
  10159. /*DO NOT USE - DEPRECATED**/
  10160. #define WMI_HECAP_PHY_32GI_GET_D2(he_cap_phy) (0)
  10161. #define WMI_HECAP_PHY_32GI_SET_D2(he_cap_phy, value) {;}
  10162. /*DO NOT USE - DEPRECATED**/
  10163. #define WMI_HECAP_PHY_NOSUNDIMENS_GET_D2(he_cap_phy) (0)
  10164. #define WMI_HECAP_PHY_NOSUNDIMENS_SET_D2(he_cap_phy, value) {;}
  10165. /*DO NOT USE - DEPRECATED**/
  10166. #define WMI_HECAP_PHY_40MHZNSS_GET_D2(he_cap_phy)(0)
  10167. #define WMI_HECAP_PHY_40MHZNSS_SET_D2(he_cap_phy, value) {;}
  10168. /* START TEMPORARY WORKAROUND -
  10169. * Leave legacy names as aliases for new names, until all references to the
  10170. * legacy names have been removed.
  10171. */
  10172. #define WMI_HECAP_PHY_ULOFDMA_GET_D2 WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2
  10173. #define WMI_HECAP_PHY_ULOFDMA_SET_D2 WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2
  10174. /* END TEMPORARY WORKAROUND */
  10175. /* DEPRECATED - use WMI_HECAP_PHY_DCMRX or WMI_HECAP_PHY_DCMTX */
  10176. #define WMI_HECAP_PHY_DCM_GET_D2(he_cap_phy) WMI_HECAP_PHY_DCMRX_GET_D2(he_cap_phy)
  10177. #define WMI_HECAP_PHY_DCM_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_DCMRX_SET_D2(he_cap_phy, value)
  10178. /*
  10179. * The maximum value for NSTS-1<=80MHz,(min val 3)total that can be sent
  10180. * to the STA in a DL MU-MIMO transmission on full or partial bandwidth
  10181. */
  10182. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  10183. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  10184. /*
  10185. * The maximum value for NSTS-1 > 80MHz (min val 3) total that can be sent
  10186. * to the STA in a DL MU-MIMO transmission on full or partial bandwidth
  10187. */
  10188. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  10189. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  10190. /*
  10191. * Indicates the spatial multiplexing power save mode after receiving a
  10192. * Trigger frame that is in operation immediately after (re)association.
  10193. */
  10194. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D2(he_cap2) (0)
  10195. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D2(he_cap2, value) {;}
  10196. /* Indicates support for Punctured Sounding */
  10197. #define WMI_HECAP_MAC_PUNCSOUNDING_GET_D2(he_cap2) (0)
  10198. #define WMI_HECAP_MAC_PUNCSOUNDING_SET_D2(he_cap2, value) {;}
  10199. /*
  10200. * Indicates support for receiving a Trigger frame in an HT PPDU and
  10201. * receiving a Trigger frame in a VHT PPDU
  10202. */
  10203. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET_D2(he_cap2) (0)
  10204. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET_D2(he_cap2, value) {;}
  10205. #define WMI_GET_HW_RATECODE_PREAM_V1(_rcode) (((_rcode) >> 8) & 0x7)
  10206. #define WMI_GET_HW_RATECODE_NSS_V1(_rcode) (((_rcode) >> 5) & 0x7)
  10207. #define WMI_GET_HW_RATECODE_RATE_V1(_rcode) (((_rcode) >> 0) & 0x1F)
  10208. #define WMI_ASSEMBLE_RATECODE_V1(_rate, _nss, _pream) \
  10209. (((1) << 28) | ((_pream) << 8) | ((_nss) << 5) | (_rate))
  10210. typedef struct {
  10211. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_request_cmd_fixed_param */
  10212. /** unique id identifying the VDEV, generated by the caller */
  10213. A_UINT32 vdev_id;
  10214. /** requestor id identifying the caller module */
  10215. A_UINT32 requestor_id;
  10216. /** beacon interval from received beacon */
  10217. A_UINT32 beacon_interval;
  10218. /** DTIM Period from the received beacon */
  10219. A_UINT32 dtim_period;
  10220. /** Flags */
  10221. A_UINT32 flags;
  10222. /** ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
  10223. wmi_ssid ssid;
  10224. /** beacon/probe reponse xmit rate. Applicable for SoftAP. */
  10225. /** This field will be invalid and ignored unless the */
  10226. /** flags field has the WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT bit. */
  10227. /** When valid, this field contains the fixed tx rate for the beacon */
  10228. /** and probe response frames send by the GO or SoftAP */
  10229. A_UINT32 bcn_tx_rate;
  10230. /** beacon/probe reponse xmit power. Applicable for SoftAP. */
  10231. A_UINT32 bcn_txPower;
  10232. /** number of p2p NOA descriptor(s) from scan entry */
  10233. A_UINT32 num_noa_descriptors;
  10234. /** Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
  10235. During CAC, Our HW shouldn't ack ditected frames */
  10236. A_UINT32 disable_hw_ack;
  10237. /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
  10238. /** The DBS policy manager indicates the preferred number of transmit streams. */
  10239. A_UINT32 preferred_tx_streams;
  10240. /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
  10241. /** the DBS policy manager indicates the preferred number of receive streams. */
  10242. A_UINT32 preferred_rx_streams;
  10243. A_UINT32 he_ops; /* refer to WMI_HEOPS_xxx macros */
  10244. A_UINT32 cac_duration_ms; /* in milliseconds */
  10245. A_UINT32 regdomain;
  10246. /* min data rate to be used in BSS in Mbps */
  10247. A_UINT32 min_data_rate;
  10248. /** @mbss_capability_flags: Bitmap of vdev's MBSS/EMA capability.
  10249. * Capabilities are combination of below flags:
  10250. * VDEV_FLAGS_NON_MBSSID_AP
  10251. * VDEV_FLAGS_TRANSMIT_AP
  10252. * VDEV_FLAGS_NON_TRANSMIT_AP
  10253. * VDEV_FLAGS_EMA_MODE
  10254. * VDEV_FLAGS_SCAN_MODE_VAP - if the vdev is used for scan radio
  10255. */
  10256. A_UINT32 mbss_capability_flags;
  10257. /** vdevid of transmitting VAP (mbssid case). Ignored for non mbssid case */
  10258. A_UINT32 vdevid_trans;
  10259. A_UINT32 eht_ops;
  10260. A_UINT32 puncture_20mhz_bitmap; /* each bit indicates one 20 MHz BW punctured */
  10261. A_UINT32 mbssid_multi_group_flag; /* Flag to indentify whether multi group mbssid is supported */
  10262. A_UINT32 mbssid_multi_group_id; /* Group id of current vdev only valid when multi group mbssid is supported */
  10263. /* The TLVs follows this structure:
  10264. * wmi_channel chan; <-- WMI channel
  10265. * wmi_p2p_noa_descriptor noa_descriptors[]; <-- actual p2p NOA descriptor from scan entry
  10266. * wmi_vdev_start_mlo_params mlo_params[0,1]; <-- vdev start MLO parameters
  10267. * optional TLV, only present for MLO vdevs,
  10268. * If the vdev is non-MLO the array length should be 0.
  10269. * wmi_partner_link_info link_info[]; <-- partner link info
  10270. * optional TLV, only present for MLO vdevs,
  10271. * If the vdev is non-MLO the array length should be 0.
  10272. */
  10273. } wmi_vdev_start_request_cmd_fixed_param;
  10274. typedef struct {
  10275. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_cmd_fixed_param */
  10276. /** unique id identifying the VDEV, generated by the caller */
  10277. A_UINT32 vdev_id;
  10278. } wmi_vdev_delete_cmd_fixed_param;
  10279. enum WMI_VDEV_UP_FLAGS {
  10280. /** EMA_MBSSID_AP
  10281. * Valid only for STA VDEV.
  10282. * This flag will be set when STA connected MBSSID AP is EMA capable.
  10283. * EMA - Enhanced Multiple BSS Advertisemet.
  10284. */
  10285. WMI_VDEV_UP_FLAG_EMA_MBSSID_AP = 0x00000001,
  10286. };
  10287. typedef struct {
  10288. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_up_cmdid_fixed_param */
  10289. /** unique id identifying the VDEV, generated by the caller */
  10290. A_UINT32 vdev_id;
  10291. /** aid (assoc id) received in association response for STA VDEV */
  10292. A_UINT32 vdev_assoc_id;
  10293. /** bssid of the BSS the VDEV is joining */
  10294. wmi_mac_addr vdev_bssid;
  10295. /** bssid of transmitted AP (mbssid case) */
  10296. wmi_mac_addr trans_bssid;
  10297. /** the profile index of the connected non-trans ap (mbssid case). 0 means invalid */
  10298. A_UINT32 profile_idx;
  10299. /** the total profile numbers of non-trans aps (mbssid case). 0 means legacy AP */
  10300. A_UINT32 profile_num;
  10301. /** flags - this is a bitwise-or combination of WMI_VDEV_UP_FLAGS values */
  10302. A_UINT32 flags;
  10303. } wmi_vdev_up_cmd_fixed_param;
  10304. typedef struct {
  10305. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stop_cmd_fixed_param */
  10306. /** unique id identifying the VDEV, generated by the caller */
  10307. A_UINT32 vdev_id;
  10308. } wmi_vdev_stop_cmd_fixed_param;
  10309. typedef struct {
  10310. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_down_cmd_fixed_param */
  10311. /** unique id identifying the VDEV, generated by the caller */
  10312. A_UINT32 vdev_id;
  10313. } wmi_vdev_down_cmd_fixed_param;
  10314. typedef struct {
  10315. /** unique id identifying the VDEV, generated by the caller */
  10316. A_UINT32 vdev_id;
  10317. } wmi_vdev_standby_response_cmd;
  10318. typedef struct {
  10319. /** unique id identifying the VDEV, generated by the caller */
  10320. A_UINT32 vdev_id;
  10321. } wmi_vdev_resume_response_cmd;
  10322. typedef struct {
  10323. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
  10324. /** unique id identifying the VDEV, generated by the caller */
  10325. A_UINT32 vdev_id;
  10326. /** parameter id */
  10327. A_UINT32 param_id;
  10328. /** parameter value */
  10329. A_UINT32 param_value;
  10330. } wmi_vdev_set_param_cmd_fixed_param;
  10331. typedef struct {
  10332. A_UINT32 key_seq_counter_l;
  10333. A_UINT32 key_seq_counter_h;
  10334. } wmi_key_seq_counter;
  10335. #define WMI_CIPHER_NONE 0x0 /* clear key */
  10336. #define WMI_CIPHER_WEP 0x1
  10337. #define WMI_CIPHER_TKIP 0x2
  10338. #define WMI_CIPHER_AES_OCB 0x3
  10339. #define WMI_CIPHER_AES_CCM 0x4
  10340. #define WMI_CIPHER_WAPI 0x5
  10341. #define WMI_CIPHER_CKIP 0x6
  10342. #define WMI_CIPHER_AES_CMAC 0x7
  10343. #define WMI_CIPHER_ANY 0x8
  10344. #define WMI_CIPHER_AES_GCM 0x9
  10345. #define WMI_CIPHER_AES_GMAC 0xa
  10346. #define WMI_CIPHER_WAPI_GCM_SM4 0xb
  10347. #define WMI_CIPHER_BIP_CMAC_128 0xc
  10348. #define WMI_CIPHER_BIP_CMAC_256 0xd
  10349. #define WMI_CIPHER_BIP_GMAC_128 0xe
  10350. #define WMI_CIPHER_BIP_GMAC_256 0xf
  10351. typedef struct {
  10352. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */
  10353. /** unique id identifying the VDEV, generated by the caller */
  10354. A_UINT32 vdev_id;
  10355. /** MAC address used for installing */
  10356. wmi_mac_addr peer_macaddr;
  10357. /** key index */
  10358. A_UINT32 key_ix;
  10359. /** key flags */
  10360. A_UINT32 key_flags;
  10361. /** key cipher, defined above */
  10362. A_UINT32 key_cipher;
  10363. /** key rsc counter */
  10364. wmi_key_seq_counter key_rsc_counter;
  10365. /** global key rsc counter */
  10366. wmi_key_seq_counter key_global_rsc_counter;
  10367. /** global key tsc counter */
  10368. wmi_key_seq_counter key_tsc_counter;
  10369. /** WAPI key rsc counter */
  10370. A_UINT8 wpi_key_rsc_counter[16];
  10371. /** WAPI key tsc counter */
  10372. A_UINT8 wpi_key_tsc_counter[16];
  10373. /** key length */
  10374. A_UINT32 key_len;
  10375. /** key tx mic length */
  10376. A_UINT32 key_txmic_len;
  10377. /** key rx mic length */
  10378. A_UINT32 key_rxmic_len;
  10379. /** specifies if the group_key_ix is valid, filled by the sender */
  10380. A_UINT32 is_group_key_ix_valid;
  10381. /** Multi group key ID */
  10382. A_UINT32 group_key_ix;
  10383. /*
  10384. * Following this struct are this TLV.
  10385. * A_UINT8 key_data[]; <-- actual key data; contains key followed by tx mic followed by rx mic
  10386. */
  10387. } wmi_vdev_install_key_cmd_fixed_param;
  10388. /** Preamble types to be used with VDEV fixed rate configuration */
  10389. typedef enum {
  10390. WMI_RATE_PREAMBLE_OFDM,
  10391. WMI_RATE_PREAMBLE_CCK,
  10392. WMI_RATE_PREAMBLE_HT,
  10393. WMI_RATE_PREAMBLE_VHT,
  10394. WMI_RATE_PREAMBLE_HE,
  10395. WMI_RATE_PREAMBLE_EHT,
  10396. } WMI_RATE_PREAMBLE;
  10397. /** Value to disable fixed rate setting */
  10398. #define WMI_FIXED_RATE_NONE (0xff)
  10399. #define WMI_GI_400_NS 1
  10400. #define WMI_GI_800_NS 0
  10401. #define WMI_GI_1600_NS 2
  10402. #define WMI_GI_3200_NS 3
  10403. /** OCE(Optimized Connectivity_Experience) Feature flags */
  10404. #define WMI_VDEV_OCE_PROBE_REQUEST_RATE_FEATURE_BITMAP 0x1
  10405. #define WMI_VDEV_OCE_PROBE_RESPONSE_RATE_FEATURE_BITMAP 0x2
  10406. #define WMI_VDEV_OCE_BEACON_RATE_FEATURE_BITMAP 0x4
  10407. #define WMI_VDEV_OCE_PROBE_REQUEST_DEFERRAL_FEATURE_BITMAP 0x8
  10408. #define WMI_VDEV_OCE_FILS_DISCOVERY_FRAME_FEATURE_BITMAP 0x10
  10409. #define WMI_VDEV_OCE_ESP_FEATURE_BITMAP 0x20
  10410. #define WMI_VDEV_OCE_REASSOC_REJECT_FEATURE_BITMAP 0x40
  10411. /** 6GHZ params **/
  10412. /* Control to enable/disable beacon tx in non-HT duplicate */
  10413. #define WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_BEACON 0x1
  10414. /* Control to enable/disable broadcast probe response tx in non-HT duplicate */
  10415. #define WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_BCAST_PROBE_RSP 0x2
  10416. /* Control to enable/disable FILS discovery frame tx in non-HT duplicate */
  10417. #define WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_FD_FRAME 0x4
  10418. /* Control to enable/disable periodic FILS discovery frame transmission */
  10419. #define WMI_VDEV_6GHZ_BITMAP_FD_FRAME 0x8 /* deprecated */
  10420. /* Control to enable/disable periodic broadcast probe response transmission */
  10421. #define WMI_VDEV_6GHZ_BITMAP_BCAST_PROBE_RSP 0x10 /* deprecated */
  10422. /** ROAM_11KV control params */
  10423. /* WMI_VDEV_ROAM_11KV_CTRL_DISABLE_FW_TRIGGER_ROAMING:
  10424. * Disable all FW-triggered roaming (e.g. low RSSI/final bmiss/BTM/PER)
  10425. * while still allowing host-invoked roaming.
  10426. */
  10427. #define WMI_VDEV_ROAM_11KV_CTRL_DISABLE_FW_TRIGGER_ROAMING 0x1
  10428. /* WMI_VDEV_ROAM_11KV_CTRL_KEEP_CONN_RECV_BTM_REQ:
  10429. * DUT do not scan or roaming when receiving BTM req frame
  10430. */
  10431. #define WMI_VDEV_ROAM_11KV_CTRL_KEEP_CONN_RECV_BTM_REQ 0x2
  10432. /* WMI_VDEV_ROAM_11KV_CTRL_DONOT_SEND_DISASSOC_ON_BTM_DI_SET:
  10433. * DUT do not send disasoc frame to AP when receiving BTM req with
  10434. * Disassoc Imminent bit set to 1.
  10435. */
  10436. #define WMI_VDEV_ROAM_11KV_CTRL_DONOT_SEND_DISASSOC_ON_BTM_DI_SET 0x4
  10437. /** NAN vdev config Feature flags */
  10438. #define WMI_VDEV_NAN_ALLOW_DW_CONFIG_CHANGE_IN_SYNC_ROLE 0x1
  10439. /** the definition of different VDEV parameters */
  10440. typedef enum {
  10441. /** RTS Threshold */
  10442. WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
  10443. /** Fragmentation threshold */
  10444. WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD, /* 0x2 */
  10445. /** beacon interval in TUs */
  10446. WMI_VDEV_PARAM_BEACON_INTERVAL, /* 0x3 */
  10447. /** Listen interval in TUs */
  10448. WMI_VDEV_PARAM_LISTEN_INTERVAL, /* 0x4 */
  10449. /** muticast rate in Mbps */
  10450. WMI_VDEV_PARAM_MULTICAST_RATE, /* 0x5 */
  10451. /** management frame rate in Mbps */
  10452. WMI_VDEV_PARAM_MGMT_TX_RATE, /* 0x6 */
  10453. /** slot time (long vs short) */
  10454. WMI_VDEV_PARAM_SLOT_TIME, /* 0x7 */
  10455. /** preamble (long vs short) */
  10456. WMI_VDEV_PARAM_PREAMBLE, /* 0x8 */
  10457. /** SWBA time (time before tbtt in msec) */
  10458. WMI_VDEV_PARAM_SWBA_TIME, /* 0x9 */
  10459. /** time period for updating VDEV stats */
  10460. WMI_VDEV_STATS_UPDATE_PERIOD, /* 0xa */
  10461. /** age out time in msec for frames queued for station in power save*/
  10462. WMI_VDEV_PWRSAVE_AGEOUT_TIME, /* 0xb */
  10463. /** Host SWBA interval (time in msec before tbtt for SWBA event generation) */
  10464. WMI_VDEV_HOST_SWBA_INTERVAL, /* 0xc */
  10465. /** DTIM period (specified in units of num beacon intervals) */
  10466. WMI_VDEV_PARAM_DTIM_PERIOD, /* 0xd */
  10467. /** scheduler air time limit for this VDEV. used by off chan scheduler */
  10468. WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT, /* 0xe */
  10469. /** enable/dsiable WDS for this VDEV */
  10470. WMI_VDEV_PARAM_WDS, /* 0xf */
  10471. /** ATIM Window */
  10472. WMI_VDEV_PARAM_ATIM_WINDOW, /* 0x10 */
  10473. /** BMISS max */
  10474. WMI_VDEV_PARAM_BMISS_COUNT_MAX, /* 0x11 */
  10475. /** BMISS first time */
  10476. WMI_VDEV_PARAM_BMISS_FIRST_BCNT, /* 0x12 */
  10477. /** BMISS final time */
  10478. WMI_VDEV_PARAM_BMISS_FINAL_BCNT, /* 0x13 */
  10479. /** WMM enables/disabled */
  10480. WMI_VDEV_PARAM_FEATURE_WMM, /* 0x14 */
  10481. /** Channel width */
  10482. WMI_VDEV_PARAM_CHWIDTH, /* 0x15 */
  10483. /** Channel Offset */
  10484. WMI_VDEV_PARAM_CHEXTOFFSET, /* 0x16 */
  10485. /** Disable HT Protection */
  10486. WMI_VDEV_PARAM_DISABLE_HTPROTECTION, /* 0x17 */
  10487. /** Quick STA Kickout */
  10488. WMI_VDEV_PARAM_STA_QUICKKICKOUT, /* 0x18 */
  10489. /** Rate to be used with Management frames */
  10490. WMI_VDEV_PARAM_MGMT_RATE, /* 0x19 */
  10491. /** Protection Mode */
  10492. WMI_VDEV_PARAM_PROTECTION_MODE, /* 0x1a */
  10493. /** Fixed rate setting
  10494. * The top nibble is used to select which format to use for encoding
  10495. * the rate specification: 0xVXXXXXXX
  10496. * If V == 0b0000: format is same as before: 0x000000RR
  10497. * If V == 0b0001: format is: 0x1000RRRR.
  10498. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  10499. * The host shall use the new V1 format (and set V = 0x1) if the target
  10500. * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
  10501. * system is configured with Nss > 4 (either at compile time within the
  10502. * host driver, or through WMI_SERVICE_READY PHY capabilities provided
  10503. * by the target).
  10504. */
  10505. WMI_VDEV_PARAM_FIXED_RATE, /* 0x1b */
  10506. /**
  10507. * 11AX: GI =
  10508. * WMI_GI_400_NS, WMI_GI_800_NS, WMI_GI_1600_NS, or WMI_GI_3200_NS
  10509. * 11N: SGI=WMI_GI_400_NS
  10510. */
  10511. WMI_VDEV_PARAM_SGI, /* 0x1c */
  10512. /** Enable LDPC */
  10513. WMI_VDEV_PARAM_LDPC, /* 0x1d */
  10514. /** Enable Tx STBC */
  10515. WMI_VDEV_PARAM_TX_STBC, /* 0x1e */
  10516. /** Enable Rx STBC */
  10517. WMI_VDEV_PARAM_RX_STBC, /* 0x1f */
  10518. /** Intra BSS forwarding */
  10519. WMI_VDEV_PARAM_INTRA_BSS_FWD, /* 0x20 */
  10520. /** Setting Default xmit key for Vdev */
  10521. WMI_VDEV_PARAM_DEF_KEYID, /* 0x21 */
  10522. /** NSS width */
  10523. WMI_VDEV_PARAM_NSS, /* 0x22 */
  10524. /** Set the custom rate for the broadcast data frames */
  10525. WMI_VDEV_PARAM_BCAST_DATA_RATE, /* 0x23 */
  10526. /** Set the custom rate (rate-code) for multicast data frames */
  10527. WMI_VDEV_PARAM_MCAST_DATA_RATE, /* 0x24 */
  10528. /** Tx multicast packet indicate Enable/Disable */
  10529. WMI_VDEV_PARAM_MCAST_INDICATE, /* 0x25 */
  10530. /** Tx DHCP packet indicate Enable/Disable */
  10531. WMI_VDEV_PARAM_DHCP_INDICATE, /* 0x26 */
  10532. /** Enable host inspection of Tx unicast packet to unknown destination */
  10533. WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE, /* 0x27 */
  10534. /* The minimum amount of time AP begins to consider STA inactive */
  10535. WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS, /* 0x28 */
  10536. /* An associated STA is considered inactive when there is no recent TX/RX
  10537. * activity and no downlink frames are buffered for it. Once a STA exceeds
  10538. * the maximum idle inactive time, the AP will send an 802.11 data-null as
  10539. * a keep alive to verify the STA is still associated. If the STA does ACK
  10540. * the data-null, or if the data-null is buffered and the STA does not
  10541. * retrieve it, the STA will be considered unresponsive (see
  10542. * WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). */
  10543. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS, /* 0x29 */
  10544. /* An associated STA is considered unresponsive if there is no recent
  10545. * TX/RX activity and downlink frames are buffered for it. Once a STA
  10546. * exceeds the maximum unresponsive time, the AP will send a
  10547. * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
  10548. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS, /* 0x2a */
  10549. /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
  10550. WMI_VDEV_PARAM_AP_ENABLE_NAWDS, /* 0x2b */
  10551. /** Enable/Disable RTS-CTS */
  10552. WMI_VDEV_PARAM_ENABLE_RTSCTS, /* 0x2c */
  10553. /* Enable TXBFee/er */
  10554. WMI_VDEV_PARAM_TXBF, /* 0x2d */
  10555. /**Set packet power save */
  10556. WMI_VDEV_PARAM_PACKET_POWERSAVE, /* 0x2e */
  10557. /**Drops un-encrypted packets if any received in an encryted connection
  10558. * otherwise forwards to host
  10559. */
  10560. WMI_VDEV_PARAM_DROP_UNENCRY, /* 0x2f */
  10561. /*
  10562. * Set TX encap type.
  10563. *
  10564. * enum wmi_pkt_type is to be used as the parameter
  10565. * specifying the encap type.
  10566. */
  10567. WMI_VDEV_PARAM_TX_ENCAP_TYPE, /* 0x30 */
  10568. /*
  10569. * Try to detect stations that woke-up and exited power save but did not
  10570. * successfully transmit data-null with PM=0 to AP. When this happens,
  10571. * STA and AP power save state are out-of-sync. Use buffered but
  10572. * undelivered MSDU to the STA as a hint that the STA is really awake
  10573. * and expecting normal ASAP delivery, rather than retrieving BU with
  10574. * PS-Poll, U-APSD trigger, etc.
  10575. *
  10576. * 0 disables out-of-sync detection. Maximum time is 255 seconds.
  10577. */
  10578. WMI_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS, /* 0x31 */
  10579. /* Enable/Disable early rx dynamic adjust feature.
  10580. * Early-rx dynamic adjust is a advance power save feature.
  10581. * Early-rx is a wakeup duration before exact TBTT,which is deemed necessary to provide a cushion for various
  10582. * timing discrepancies in the system.
  10583. * In current code branch, the duration is set to a very conservative fix value to make sure the drift impact is minimum.
  10584. * The fix early-tx will result in the unnessary power consume, so a dynamic early-rx adjust algorithm can be designed
  10585. * properly to minimum the power consume.*/
  10586. WMI_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE, /* 0x32 */
  10587. /* set target bmiss number per sample cycle if bmiss adjust was chosen.
  10588. * In this adjust policy,early-rx is adjusted by comparing the current bmiss rate to target bmiss rate
  10589. * which can be set by user through WMI command.
  10590. */
  10591. WMI_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM, /* 0x33 */
  10592. /* set sample cycle(in the unit of beacon interval) if bmiss adjust was chosen */
  10593. WMI_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE, /* 0x34 */
  10594. /* set slop_step */
  10595. WMI_VDEV_PARAM_EARLY_RX_SLOP_STEP, /* 0x35 */
  10596. /* set init slop */
  10597. WMI_VDEV_PARAM_EARLY_RX_INIT_SLOP, /* 0x36 */
  10598. /* pause adjust enable/disable */
  10599. WMI_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE, /* 0x37 */
  10600. /* Set channel pwr limit value of the vdev the minimal value of all
  10601. * vdevs operating on this channel will be set as channel tx power
  10602. * limit, which is used to configure ratearray
  10603. */
  10604. WMI_VDEV_PARAM_TX_PWRLIMIT, /* 0x38 */
  10605. /* set the count of snr value for calculation in snr monitor */
  10606. WMI_VDEV_PARAM_SNR_NUM_FOR_CAL, /* 0x39 */
  10607. /** Roaming offload */
  10608. WMI_VDEV_PARAM_ROAM_FW_OFFLOAD, /* 0x3a */
  10609. /** Enable Leader request RX functionality for RMC */
  10610. WMI_VDEV_PARAM_ENABLE_RMC, /* 0x3b */
  10611. /* IBSS does not have deauth/disassoc, vdev has to detect peer gone event
  10612. * by himself. If the beacon lost time exceed this threshold, the peer is
  10613. * thought to be gone. */
  10614. WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS, /* 0x3c */
  10615. /** max rate in kpbs, transmit rate can't go beyond it */
  10616. WMI_VDEV_PARAM_MAX_RATE, /* 0x3d */
  10617. /* enable/disable drift sample. 0: disable; 1: clk_drift; 2: ap_drift; 3 both clk and ap drift*/
  10618. WMI_VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE, /* 0x3e */
  10619. /* set Tx failure count threshold for the vdev */
  10620. WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR, /* 0x3f */
  10621. /* set ebt resync timeout value, in the unit of TU */
  10622. WMI_VDEV_PARAM_EBT_RESYNC_TIMEOUT, /* 0x40 */
  10623. /* Enable Aggregation State Trigger Event */
  10624. WMI_VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE, /* 0x41 */
  10625. /* This parameter indicates whether IBSS station can enter into power save
  10626. * mode by sending Null frame (with PM=1). When not allowed, IBSS station has to stay
  10627. * awake all the time and should never set PM=1 in its transmitted frames.
  10628. * This parameter is meaningful/valid only when WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH
  10629. * is non-zero. */
  10630. WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED, /* 0x42 */
  10631. /* This parameter indicates if this station can enter into power collapse
  10632. * for the remaining beacon interval after the ATIM window.
  10633. * This parameter is meaningful/valid only when WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED
  10634. * is set to TRUE. */
  10635. WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED, /* 0x43 */
  10636. /* This parameter indicates whether IBSS station exit power save mode and
  10637. * enter power active state (by sending Null frame with PM=0 in the immediate ATIM Window)
  10638. * whenever there is a TX/RX activity. */
  10639. WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED, /* 0x44 */
  10640. /* If Awake on TX/RX activity is enabled, this parameter indicates
  10641. * the data inactivity time in number of beacon intervals after which
  10642. * IBSS station reenters power save by sending Null frame with PM=1. */
  10643. WMI_VDEV_PARAM_INACTIVITY_CNT, /* 0x45 */
  10644. /* Inactivity time in msec after which TX Service Period (SP) is
  10645. * terminated by sending a Qos Null frame with EOSP.
  10646. * If value is 0, TX SP is terminated with the last buffered packet itself
  10647. * instead of waiting for the inactivity timeout. */
  10648. WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS, /* 0x46 */
  10649. /** DTIM policy */
  10650. WMI_VDEV_PARAM_DTIM_POLICY, /* 0x47 */
  10651. /* When IBSS network is initialized, PS-supporting device
  10652. * does not enter protocol sleep state during first
  10653. * WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */
  10654. WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS, /* 0x48 */
  10655. /* Enable/Disable 1 RX chain usage during the ATIM window */
  10656. WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE, /* 0x49 */
  10657. /* RX Leak window is the time driver waits before shutting down
  10658. * the radio or switching the channel and after receiving an ACK
  10659. * for a data frame with PM bit set) */
  10660. WMI_VDEV_PARAM_RX_LEAK_WINDOW, /* 0x4a */
  10661. /** Averaging factor(16 bit value) is used in the calculations to
  10662. * perform averaging of different link level statistics like average
  10663. * beacon spread or average number of frames leaked */
  10664. WMI_VDEV_PARAM_STATS_AVG_FACTOR, /* 0x4b */
  10665. /** disconnect threshold, once the consecutive error for specific peer
  10666. * exceed this threhold, FW will send kickout event to host */
  10667. WMI_VDEV_PARAM_DISCONNECT_TH, /* 0x4c */
  10668. /** The rate_code of RTS_CTS changed by host. Now FW can support
  10669. * more non-HT rates rather than 1Mbps or 6Mbps */
  10670. WMI_VDEV_PARAM_RTSCTS_RATE, /* 0x4d */
  10671. /** This parameter indicates whether using a long duration RTS-CTS
  10672. * protection when a SAP goes off channel in MCC mode */
  10673. WMI_VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE, /* 0x4e */
  10674. /** This parameter indicates whether using a broadcast probe response
  10675. * to increase the detectability of SAP in MCC mode */
  10676. WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE, /* 0x4f */
  10677. /** This parameter indicates the power backoff in percentage
  10678. * currently supports 100%, 50%, 25%, 12.5%, and minimum
  10679. * Host passes 0, 1, 2, 3, 4 to Firmware
  10680. * 0 --> 100% --> no changes, 1 --> 50% --> -3dB,
  10681. * 2 --> 25% --> -6dB, 3 --> 12.5% --> -9dB, 4 --> minimum --> -32dB
  10682. */
  10683. WMI_VDEV_PARAM_TXPOWER_SCALE, /* 0x50 */
  10684. /** TX power backoff in dB: tx power -= param value
  10685. * Host passes values(DB) to Halphy, Halphy reduces the power table
  10686. * by the values. Safety check will happen in Halphy.
  10687. */
  10688. WMI_VDEV_PARAM_TXPOWER_SCALE_DECR_DB, /* 0x51 */
  10689. /** Multicast to Unicast conversion setting */
  10690. WMI_VDEV_PARAM_MCAST2UCAST_SET, /* 0x52 */
  10691. /** Total number of HW retries */
  10692. WMI_VDEV_PARAM_RC_NUM_RETRIES, /* 0x53 */
  10693. /** Max tx percentage for cabq */
  10694. WMI_VDEV_PARAM_CABQ_MAXDUR, /* 0x54 */
  10695. /** MFPTEST settings */
  10696. WMI_VDEV_PARAM_MFPTEST_SET, /* 0x55 */
  10697. /** RTS Fixed rate setting */
  10698. WMI_VDEV_PARAM_RTS_FIXED_RATE, /* 0x56 */
  10699. /** VHT SGI MASK */
  10700. WMI_VDEV_PARAM_VHT_SGIMASK, /* 0x57 */
  10701. /** VHT80 Auto Rate MASK */
  10702. WMI_VDEV_PARAM_VHT80_RATEMASK, /* 0x58 */
  10703. /** set Proxy STA features for this vap */
  10704. WMI_VDEV_PARAM_PROXY_STA, /* 0x59 */
  10705. /** set virtual cell mode - enable/disable */
  10706. WMI_VDEV_PARAM_VIRTUAL_CELL_MODE, /* 0x5a */
  10707. /** Set receive packet type */
  10708. WMI_VDEV_PARAM_RX_DECAP_TYPE, /* 0x5b */
  10709. /** Set ratemask with specific Bandwidth and NSS */
  10710. WMI_VDEV_PARAM_BW_NSS_RATEMASK, /* 0x5c */
  10711. /** Set SENSOR Support */
  10712. WMI_VDEV_PARAM_SENSOR_AP, /* 0x5d */
  10713. /** Set beacon rate */
  10714. WMI_VDEV_PARAM_BEACON_RATE, /* 0x5e */
  10715. /** Enable CTS to self for DTIM beacon */
  10716. WMI_VDEV_PARAM_DTIM_ENABLE_CTS, /* 0x5f */
  10717. /** Disable station kickout at Vap level */
  10718. WMI_VDEV_PARAM_STA_KICKOUT, /* 0x60 */
  10719. /* VDEV capabilities */
  10720. WMI_VDEV_PARAM_CAPABILITIES, /* see capabilities defs below */ /* 0x61 */
  10721. /**
  10722. * Increment TSF in micro seconds to avoid beacon collision on mesh VAP.
  10723. * The host must ensure that either no other vdevs share the TSF with
  10724. * this vdev, or else that it is acceptable to apply this TSF adjustment
  10725. * to all vdevs sharing the TSF.
  10726. */
  10727. WMI_VDEV_PARAM_TSF_INCREMENT, /* 0x62 */
  10728. /** Disable/Enable AMPDU of vdev per AC:
  10729. * bit | AC
  10730. * --------
  10731. * 0 | VO
  10732. * 1 | VI
  10733. * 2 | BE
  10734. * 3 | BK
  10735. * A value of 0 in a given bit disables A-MPDU aggregation for
  10736. * that AC; a value of 1 enables A-MPDU aggregation
  10737. */
  10738. WMI_VDEV_PARAM_AMPDU_PER_AC, /* 0x63 */
  10739. /**
  10740. * Vdev level rx filter of from-ds / to-ds / no-ds / ta / ra frames.
  10741. * Used mainly for mesh-vap.
  10742. * The parameter value delivered with the RX_FILTER vdev param contains
  10743. * a bit-or mask of wmi_vdev_param_filter enum values.
  10744. */
  10745. WMI_VDEV_PARAM_RX_FILTER, /* 0x64 */
  10746. /** vdev-specific mgmt tx power in dBm units (signed integer value) */
  10747. WMI_VDEV_PARAM_MGMT_TX_POWER, /* 0x65 */
  10748. /** Vdev level non aggregration/11g sw retry threshold. 0-disable, min:0, max:31, default:15 */
  10749. WMI_VDEV_PARAM_NON_AGG_SW_RETRY_TH, /* 0x66 */
  10750. /** Vdev level aggregration sw retry threshold. 0-disable, min:0, max:31, default:15 */
  10751. WMI_VDEV_PARAM_AGG_SW_RETRY_TH, /* 0x67 */
  10752. /** disable dynamic bw RTS **/
  10753. WMI_VDEV_PARAM_DISABLE_DYN_BW_RTS, /* 0x68 */
  10754. /** per ssid (vdev) based ATF strict/fair scheduling policy
  10755. * param values are WMI_ATF_SSID_FAIR_SCHED, WMI_ATF_SSID_STRICT_SCHED,
  10756. * or WMI_ATF_SSID_FAIR_SCHED_WITH_UB
  10757. */
  10758. WMI_VDEV_PARAM_ATF_SSID_SCHED_POLICY, /* 0x69 */
  10759. /** Enable or disable Dual carrier modulation
  10760. * valid values: 0-Disable DCM, 1-Enable DCM.
  10761. */
  10762. WMI_VDEV_PARAM_HE_DCM, /* 0x6a */
  10763. /** Enable or disable Extended range
  10764. * valid values: 0-Disable ER, 1-Enable ER.
  10765. */
  10766. WMI_VDEV_PARAM_HE_RANGE_EXT, /* 0x6b */
  10767. /* enable or disable BCAST probe response feature */
  10768. WMI_VDEV_PARAM_ENABLE_BCAST_PROBE_RESPONSE, /* 0x6c */
  10769. /* param to specify probe request Tx delay during Fast Initial Link Setup */
  10770. WMI_VDEV_PARAM_FILS_MAX_CHANNEL_GUARD_TIME, /* units = milliseconds */ /* 0x6d */
  10771. /* enable or disable NOA for P2P GO */
  10772. WMI_VDEV_PARAM_DISABLE_NOA_P2P_GO, /* 0x6e */
  10773. /** Per band user management frame fix rate setting
  10774. * BIT 31: enable (1) or disable (0) mgmt fix rate for 5G
  10775. * BIT 30: enable (1) or disable (0) mgmt fix rate for 2G
  10776. *
  10777. * BIT 23: 11ax (1) or legacy (0) rate code
  10778. * BITS [22..12]: rate code for 5G
  10779. *
  10780. * BIT 11: 11ax (1) or legacy (0) rate code
  10781. * BITS [10..0]: rate code for 2G
  10782. */
  10783. WMI_VDEV_PARAM_PER_BAND_MGMT_TX_RATE, /* 0x6f */
  10784. /* This should be called before WMI_VDEV_PARAM_TXBF */
  10785. WMI_VDEV_PARAM_11AX_TXBF, /* 0x70 */
  10786. /** This parameter indicates whether VDEV is SMPS intolerant.
  10787. * I.e. - SMPS action frame cannot be transmitted by the VDEV to
  10788. * dynamically change the RX NSS.
  10789. *
  10790. * valid values: 1 - VDEV is SMPS intolerant, 0 - VDEV is SMPS tolerant
  10791. */
  10792. WMI_VDEV_PARAM_SMPS_INTOLERANT, /* 0x71 */
  10793. /** specify probe request Tx delay for scans triggered on this VDEV */
  10794. WMI_VDEV_PARAM_PROBE_DELAY, /* units = milliseconds */ /* 0x72 */
  10795. /** specify the time gap between each set of probe request transmissions.
  10796. * The number of probe requests in each set depends on the ssid_list and
  10797. * bssid_list in the scan request.
  10798. * This parameter will be applied only for scans triggered on this VDEV.
  10799. */
  10800. WMI_VDEV_PARAM_REPEAT_PROBE_TIME, /* units = milliseconds */ /* 0x73 */
  10801. /** specify the HE LTF setting that should be used for fixed rate
  10802. * transmissions.
  10803. *
  10804. * Expects values of WMI_HE_LTF_DEFAULT, WMI_HE_LTF_1X, WMI_HE_LTF_2X,
  10805. * or WMI_HE_LTF_4X.
  10806. */
  10807. WMI_VDEV_PARAM_HE_LTF, /* 0x74 */
  10808. /** VDEV parameter to configure the number of TX chains to use for
  10809. * a/b/g rates.
  10810. * bit 0~15 : 11b mode TX chain number.
  10811. * bit 16~31 : 11ag mode TX chain number.
  10812. *
  10813. * valid values:
  10814. * Should not exceed the maximum number of supported TX Chains
  10815. * 0 - Used to reset the vote. Acts as Don't Care
  10816. */
  10817. WMI_VDEV_PARAM_ABG_MODE_TX_CHAIN_NUM, /* 0x75 */
  10818. /**
  10819. * Enable or disable the multi group key feature on this VDEV.
  10820. * used for NAN APP and VLAN Tagging
  10821. */
  10822. WMI_VDEV_PARAM_ENABLE_MULTI_GROUP_KEY, /* 0x76 */
  10823. /*
  10824. * Specify the total number of multi group key on this VDEV.
  10825. */
  10826. WMI_VDEV_PARAM_NUM_GROUP_KEYS, /* 0x77 */
  10827. /** VDEV parameter to enable or disable various OCE features */
  10828. WMI_VDEV_PARAM_ENABLE_DISABLE_OCE_FEATURES, /* 0x78 */
  10829. /*
  10830. * Set/Clear 3 least-significant bits to
  10831. * Disable or Enable rate drop down for MGMT, SU data and MU data pkts
  10832. *
  10833. * bit 0 -> If set MGMT Pkt rate drop down is enabled else disabled
  10834. * bit 1 -> If set SU data Pkt rate drop down is enabled else disabled
  10835. * bit 2 -> If set MU data Pkt rate drop down is enabled else disabled
  10836. * bits 31:3 -> Reserved bits. should be set to zero.
  10837. */
  10838. WMI_VDEV_PARAM_RATE_DROPDOWN_BMAP, /* 0x79 */
  10839. /** VDEV parameter to config modulated DTIM count */
  10840. WMI_VDEV_PARAM_MODDTIM_CNT, /* 0x7a */
  10841. /**
  10842. * VDEV parameter to config max listen interval,
  10843. * when modulated DTIM is enabled.
  10844. * Units are 100TU.
  10845. */
  10846. WMI_VDEV_PARAM_MAX_LI_OF_MODDTIM, /* 0x7b */
  10847. /** VDEV parameter to config dynamic DTIM count */
  10848. WMI_VDEV_PARAM_DYNDTIM_CNT, /* 0x7c */
  10849. /** VDEV parameter to enable or disable RTT responder role
  10850. * valid values: 0-Disable responder role 1-Enable responder role
  10851. */
  10852. WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_RESPONDER_ROLE, /* 0x7d */
  10853. /** Parameter to configure BA mode.
  10854. * Valid values: 0- Auto mode,
  10855. * 1- Manual mode(addba req not sent).
  10856. * 2- buffer size 64
  10857. * 3- buffer size 256
  10858. */
  10859. WMI_VDEV_PARAM_BA_MODE, /* 0x7e */
  10860. /**
  10861. * VDEV parameter to force to set modulate DTIM count as listen interval,
  10862. * no matter whether WoW is enabled
  10863. * Default: Disabled.
  10864. * Valid values: 0- Disabled,
  10865. * 1- Enabled.
  10866. */
  10867. WMI_VDEV_PARAM_FORCED_MODDTIM_ENABLE, /* 0x7f */
  10868. /** specify the setting that are valid for auto rate transmissions.
  10869. * bits 7:0 (LTF): When bitmask is set, then corresponding LTF value is
  10870. * used for auto rate.
  10871. * BIT0 = 1 (WMI_HE_LTF_1X)
  10872. * BIT1 = 1 (WMI_HE_LTF_2X)
  10873. * BIT2 = 1 (WMI_HE_LTF_4X)
  10874. * BIT3 = 1 (WMI_EHT_LTF_1X)
  10875. * BIT4 = 1 (WMI_EHT_LTF_2X)
  10876. * BIT5 = 1 (WMI_EHT_LTF_4X)
  10877. * BIT6-7 = Reserved bits.
  10878. * bits 15:8 (SGI): When bitmask is set, then corresponding SGI value is
  10879. * used for auto rate.
  10880. * BIT8 = 1 (400 NS)
  10881. * BIT9 = 1 (800 NS)
  10882. * BIT10 = 1 (1600 NS)
  10883. * BIT11 = 1 (3200 NS)
  10884. * BIT12-15 = Reserved bits.
  10885. * bits 31:16: Reserved bits. should be set to zero.
  10886. */
  10887. WMI_VDEV_PARAM_AUTORATE_MISC_CFG, /* 0x80 */
  10888. /** VDEV parameter to enable or disable RTT initiator mac address
  10889. * randomization.
  10890. * Default: Disabled.
  10891. * valid values: 0-Disable random mac 1-Enable random mac
  10892. */
  10893. WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_INITIATOR_RANDOM_MAC, /* 0x81 */
  10894. /**
  10895. * For each AC, configure how many tx retries to send without RTS
  10896. * before enabling RTS
  10897. * bits 0:7 :BE
  10898. * bits 8:15 :BK
  10899. * bits 16:23 :VI
  10900. * bits 24:31 :VO
  10901. * A value of 0 in specific AC means default configuration for that AC.
  10902. */
  10903. WMI_VDEV_PARAM_TX_RETRIES_BEFORE_RTS_PER_AC, /* 0x82 */
  10904. /**
  10905. * Parameter to enable/disable AMSDU aggregation size auto-selection logic.
  10906. * We have logic where AMSDU aggregation size is dynamically decided
  10907. * based on MCS. That logic is enabled by default.
  10908. * For certain tests, we need a method to disable this optimization,
  10909. * and base AMSDU size only on the peer's capability rather than our logic.
  10910. * A value of 0 means disable internal optimization,
  10911. * 1 means enable internal optimzation.
  10912. */
  10913. WMI_VDEV_PARAM_AMSDU_AGGREGATION_SIZE_OPTIMIZATION, /* 0x83 */
  10914. /**
  10915. * In RAW mode, FW will not know whether the encryption is enabled
  10916. * on this vdev or not.
  10917. * Because of this, FW will not program the right info into the
  10918. * RawNwifi TLV resulting in the connection failure in RAW mode.
  10919. * So to program the right info, FW should know whether the security
  10920. * is enabled on this VDEV.
  10921. * Host will send this VDEV param command (With Value = 1) in case of
  10922. * RAW secure mode.
  10923. */
  10924. WMI_VDEV_PARAM_RAW_IS_ENCRYPTED, /* 0x84 */
  10925. /**
  10926. * Dynamically enable/disable green tx (GTX) on supported rates.
  10927. * Host will set this param to 1 for enabling GTX & 0 for disabling it.
  10928. * Note: If GTX was already running (since the global GTX control
  10929. * resides with default BDF setting) & host wants to disable GTX,
  10930. * the VDEV does not exercise any more TPC changes on the GTX supported
  10931. * rates & goes to a default GTX SM where all PPDU's sent on default TPC.
  10932. * Whenever, host wants to reenable GTX, the enable command resumes the
  10933. * GTX functionality & TPC convergence to lower power levels can be
  10934. * attained as long as PER on GTX supported rates is within the pre-defined
  10935. * PER margin configured through the BDF.
  10936. */
  10937. WMI_VDEV_PARAM_GTX_ENABLE, /* 0x85 */
  10938. /*
  10939. * Enable/Disable multicast buffer.
  10940. * A FLAG to enable & disable buffering of multicast frames at AP
  10941. * when stations are in Power Save mode.
  10942. * Once AP disables buffering of multicast frame,
  10943. * clients which goes into Power save mode will not receive these frames.
  10944. * by default MCAST buffering will be enabled.
  10945. * (CABQ = Content After Beacon Queue = multicast queue)
  10946. * Host will send this VDEV param command,
  10947. * With Value = 1 means fw will disable the MCAST buffering
  10948. * With Value = 0 means fw will enable the MCAST buffering.
  10949. */
  10950. WMI_VDEV_PARAM_DISABLE_CABQ, /* 0x86 */
  10951. /**
  10952. * For SU and MU sounding
  10953. * switch between su ac/ax sounding and mu ac/ax sounding
  10954. * switch between triggered/ non-triggered on ax sounding enabled.
  10955. * each bit toggles the corresponding modes by enabling/disabling
  10956. *
  10957. * Bit 1 doesn't carry any operation for now and may change later,
  10958. * so reserved.
  10959. *
  10960. *-----------------------
  10961. * bit(0) | mode
  10962. *-----------------------
  10963. * 0 | AC
  10964. * 1 | AX
  10965. *-----------------------
  10966. *
  10967. * bit(1) | Reserved
  10968. *
  10969. *-----------------------
  10970. * bit(2) | mode
  10971. *-----------------------
  10972. * 0 | SU
  10973. * 1 | MU
  10974. *-----------------------
  10975. * bit(3) | mode
  10976. *-----------------------
  10977. * 0 | non -triggered
  10978. * 1 | triggered
  10979. */
  10980. WMI_VDEV_PARAM_SET_HE_SOUNDING_MODE, /* 0x87 */
  10981. /** Fixed rate setting used in UL Trigger
  10982. * The top nibble is used to select which format to use for encoding
  10983. * the rate specification: 0xVXXXXXXX, V must be 1 for the UL
  10984. * format.
  10985. * If V == 0b0001: format is: 0x1000RRRR.
  10986. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  10987. *
  10988. * This parameter controls the UL OFDMA and UL MU-MIMO vdev fixed rate.
  10989. */
  10990. WMI_VDEV_PARAM_UL_FIXED_RATE, /* 0x88 */
  10991. /**
  10992. * Uplink MU-MIMO & OFDMA GI configuration used in UL Trigger
  10993. * 11AX: GI =
  10994. * WMI_GI_400_NS, WMI_GI_800_NS, WMI_GI_1600_NS, or WMI_GI_3200_NS
  10995. * 11N: SGI=WMI_GI_400_NS
  10996. */
  10997. WMI_VDEV_PARAM_UL_GI, /* 0x89 */
  10998. /** Enable/Disable LDPC in UL Trigger */
  10999. WMI_VDEV_PARAM_UL_LDPC, /* 0x8A */
  11000. /** Max NSS allowed in UL Trigger */
  11001. WMI_VDEV_PARAM_UL_NSS, /* 0x8B */
  11002. /** Enable/Disable STBC in UL Trigger */
  11003. WMI_VDEV_PARAM_UL_STBC, /* 0x8C */
  11004. /** specify the HE LTF setting that should be used for fixed rate
  11005. * uplink transmissions.
  11006. *
  11007. * Expects values of WMI_HE_LTF_DEFAULT, WMI_HE_LTF_1X, WMI_HE_LTF_2X,
  11008. * or WMI_HE_LTF_4X.
  11009. */
  11010. WMI_VDEV_PARAM_UL_HE_LTF, /* 0x8D */
  11011. /** Uplink OFDMA PPDU bandwidth (0: 20MHz, 1: 40MHz, 2: 80Mhz, 3: 160MHz)*/
  11012. WMI_VDEV_PARAM_UL_PPDU_BW, /* 0x8E */
  11013. /** Enable/Disable FW handling MU EDCA change from AP (1: En, 0:Dis) */
  11014. WMI_VDEV_PARAM_MU_EDCA_FW_UPDATE_EN, /* 0x8F */
  11015. /** Update dot11ObssNbruToleranceTime in fw. Param value: seconds */
  11016. WMI_VDEV_PARAM_UPDATE_OBSS_RU_TOLERANCE_TIME, /* 0x90 */
  11017. /** Parameter used when MTU size is sent by the host
  11018. * In particular, this configuration message is used for cases where the
  11019. * encapsulation header results in a larger max frame size than the
  11020. * typical 802.3 + SNAP/LLC frame.
  11021. */
  11022. WMI_VDEV_PARAM_MAX_MTU_SIZE, /* 0x91 */
  11023. /** Send every nth beacon to host
  11024. * if value of n is 0, it means this Nth beacon upload is disabled
  11025. */
  11026. WMI_VDEV_PARAM_NTH_BEACON_TO_HOST, /* 0x92 */
  11027. /**
  11028. * To capture the MGMT OR DATA OR BOTH packets.
  11029. * Refer to enum WMI_PKT_CAPTURE_MODE_CONFIG for specifications of
  11030. * which parameter value enables which kind of packet captures.
  11031. */
  11032. WMI_VDEV_PARAM_PACKET_CAPTURE_MODE, /* 0x93 */
  11033. /**
  11034. * To configure duration of how many seconds without tx unicast traffic is
  11035. * considered stale for mcast rate adaptation
  11036. */
  11037. WMI_VDEV_PARAM_MCAST_RC_STALE_PERIOD, /* 0x94 */
  11038. /*
  11039. * Bits 3:0 - AST0_FLOW_MASK(4)
  11040. * Bits 7:4 - AST1_FLOW_MASK(4)
  11041. * Bits 11:8 - AST2_FLOW_MASK(4)
  11042. * Bits 15:12 - AST3_FLOW_MASK(4)
  11043. * Bits 23:16 - TID_VALID_HI_PRI(8)
  11044. * Bits 31:24 - TID_VALID_LOW_PRI(8)
  11045. *
  11046. * The below macros can be used to set/get the relevent fields.
  11047. * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET(msdu_flow_config1, ast_x)
  11048. * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET(msdu_flow_config1, ast_x, mask)
  11049. * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET(msdu_flow_config1)
  11050. * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET(msdu_flow_config1, mask)
  11051. * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET(msdu_flow_config1)
  11052. * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET(msdu_flow_config1, mask)
  11053. */
  11054. WMI_VDEV_PARAM_MSDU_FLOW_OVERRIDE_CONFIG, /* 0x95 */
  11055. /* Enable/Disable using NULL frame for leaky AP */
  11056. WMI_VDEV_PARAM_ENABLE_NULL_FOR_LEAKY_AP, /* 0x96 */
  11057. /**
  11058. * To configure duration of how many seconds without TX/RX data traffic,
  11059. * NDI vdev can kickout the connected peer (i.e. NDP Termination).
  11060. */
  11061. WMI_VDEV_PARAM_NDP_INACTIVITY_TIMEOUT, /* 0x97 */
  11062. /* To enable/disable multicast rate adaptation feature at vdev level */
  11063. WMI_VDEV_PARAM_ENABLE_MCAST_RC, /* 0x98 */
  11064. /*
  11065. * Params related to 6GHz operation
  11066. * The parameter value is formed from WMI_VDEV_6GHZ_BITMAP flags.
  11067. */
  11068. WMI_VDEV_PARAM_6GHZ_PARAMS, /* 0x99 */
  11069. /**
  11070. * VDEV parameter to enable or disable RTT initiator role
  11071. * Default : Enabled
  11072. * valid values: 0-Disable initiator role, 1-Enable initiator role.
  11073. */
  11074. WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_INITIATOR_ROLE, /* 0x9A */
  11075. /**
  11076. * To configure duration of how many seconds to wait to kickout peer
  11077. * if peer is not reachable
  11078. */
  11079. WMI_VDEV_PARAM_NDP_KEEPALIVE_TIMEOUT, /* 0x9B*/
  11080. /**
  11081. * To support discovery of NAN cluster with Master Preference (MP) as 0
  11082. * when a new device is enabling NAN
  11083. */
  11084. WMI_VDEV_PARAM_ALLOW_NAN_INITIAL_DISCOVERY_OF_MP0_CLUSTER, /* 0x9C */
  11085. /**
  11086. * VDEV parameter to enable or disable roaming reason VSIE in
  11087. * re-association request
  11088. *
  11089. * Default : Disabled
  11090. * valid values: 0 - Disable 1 - Enable
  11091. */
  11092. WMI_VDEV_PARAM_ENABLE_DISABLE_ROAM_REASON_VSIE, /* 0x9D */
  11093. /* Parameter used to configure OBSS Packet Detect threshold
  11094. * for Non-SRG / SRG based Spatial Reuse feature.
  11095. * (SRG = Spatial Reuse Group)
  11096. * The accepted values are in between 0x00 and 0xFF, inclusive.
  11097. * The parameter value is programmed into the appropriate spatial reuse
  11098. * regsiter, to specify how low the background signal strength from
  11099. * neighboring BSS cells must be, for this AP to employ spatial reuse.
  11100. *
  11101. * The value of the parameter is compared against the OBSS RSSI in dB.
  11102. * It is a 8-bit value whose
  11103. * range is -128 to 127 (after two's complement operation).
  11104. * For example, if the parameter value is 0xF5, the target will
  11105. * allow spatial reuse if the RSSI detected from other BSS
  11106. * is below -10 dB.
  11107. * Similarly, if the parameter value is 0x0A, the target will
  11108. * allow spatial reuse only if the RSSI detected from neighboring
  11109. * BSS cells is no more than 10 dB.
  11110. *
  11111. * If Bit 29 is set, then input value will be in dBm. This is used
  11112. * for chipsets that uses dBm for comparision across MAC/Phy blocks.
  11113. * Older chipsets support input in dB units. For newer chipsets, dBm
  11114. * units will be used.
  11115. * The host will use the WMI_SERVICE_SRG_SRP_SPATIAL_REUSE_SUPPORT
  11116. * service ready bit to differentiate between providing input as dB or dBm.
  11117. *
  11118. * bit | purpose
  11119. * -----------------
  11120. * 0 - 7 | Param Value for non-SRG based Spatial Reuse
  11121. * 8 - 15| Param value for SRG based Spatial Reuse
  11122. * 16 - 28| Reserved
  11123. * 29 | Param value is in dBm units rather than dB units
  11124. * 30 | Enable/Disable SRG based spatial reuse.
  11125. * | If set to 0, ignore bits 8-15.
  11126. * 31 | Enable/Disable Non-SRG based spatial reuse.
  11127. * | If set to 0, ignore bits 0-7.
  11128. *
  11129. * The WMI_VDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD setting will only
  11130. * take effect if the WMI_PDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD
  11131. * setting is also set for the pdev that the vdev belongs to.
  11132. */
  11133. WMI_VDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD, /* 0x9E */
  11134. /* Parameter used to configure OBSS Packet Detection per Access Category
  11135. * for SRP based and OBSS_PD based spatial reuse feature.
  11136. * (SRP = Spatial Reuse Parameter)
  11137. * Based on the bits set, the corresponding Access Category Queues will have
  11138. * spatial reuse enabled / disabled.
  11139. * bit | AC
  11140. * ------------
  11141. * 0 | BK for SRG/Non-SRG
  11142. * 1 | BE for SRG/Non-SRG
  11143. * 2 | VI for SRG/Non-SRG
  11144. * 3 | VO for SRG/Non-SRG
  11145. * 4 - 15 | Reserved
  11146. * 16 | BK for SRP
  11147. * 17 | BE for SRP
  11148. * 18 | VI for SRP
  11149. * 19 | VO for SRP
  11150. * 20 - 31 | Reserved
  11151. *
  11152. * The WMI_VDEV_PARAM_SET_CMD_OBSS_PD_PER_AC setting will only take effect
  11153. * if the WMI_PDEV_PARAM_SET_CMD_OBSS_PD_PER_AC setting is also set for
  11154. * the pdev that the vdev belongs to.
  11155. */
  11156. WMI_VDEV_PARAM_SET_CMD_OBSS_PD_PER_AC, /* 0x9F */
  11157. /**
  11158. * VDEV parameter to indicate RSN (Robust Security Network) capability.
  11159. * This value will be intersection of the local vdev's (STA's)
  11160. * RSN capability and the peer's (AP's) RSN capability.
  11161. */
  11162. WMI_VDEV_PARAM_RSN_CAPABILITY, /* 0xA0 */
  11163. /* Parameter used to enable/disable SRP feature */
  11164. WMI_VDEV_PARAM_ENABLE_SRP, /* 0xA1 */
  11165. /*
  11166. * Parameter used to control roaming/11kv (BTM) / etc. behavior
  11167. * bit | purpose
  11168. * -----------------
  11169. * 0 | Disable any FW side roaming except host invoke roaming
  11170. * 1 | Do not trans away on receiving BTM req
  11171. * 2 | Do not send disassoc to AP when receiving BTM req with
  11172. * | Disassoc Imminent bit set to 1
  11173. * 3 - 31 | Reserved
  11174. */
  11175. WMI_VDEV_PARAM_ROAM_11KV_CTRL, /* 0xA2 */
  11176. /* vdev param to enable or disable various NAN config features
  11177. * param value bitmap set to 1 for enable and 0 for disable respectively
  11178. */
  11179. WMI_VDEV_PARAM_ENABLE_DISABLE_NAN_CONFIG_FEATURES, /* 0xA3 */
  11180. /* vdev param to enable the SAP HW offload
  11181. * Bit : 0 - enable/disable SHO
  11182. * Bit : 1 - enable for Sta connected state as well.
  11183. * Bit : 2-31 - reserved
  11184. */
  11185. WMI_VDEV_PARAM_SHO_CONFIG, /* 0xA4 */
  11186. /** Enable or disable Non-data HE Extended range
  11187. * valid values: 0-Disable ER, 1-Enable ER.
  11188. */
  11189. WMI_VDEV_PARAM_NON_DATA_HE_RANGE_EXT, /* 0xA5 */
  11190. /** Prohibit data & mgmt except keepalive pkt */
  11191. WMI_VDEV_PARAM_PROHIBIT_DATA_MGMT, /* 0xA6 */
  11192. /** Enable or disable Txop requirement feature
  11193. * 0 - Disable feature
  11194. * 1 - Enable feature
  11195. */
  11196. WMI_VDEV_PARAM_WMM_TXOP_ENABLE, /* 0xA7 */
  11197. /** Value of DTIM to be applied in Suspend mode
  11198. */
  11199. WMI_VDEV_PARAM_FORCE_DTIM_CNT, /* 0xA8 */
  11200. /* vdev param to configure the Smart Monitor features
  11201. * Bit : 0 - enable/disable Trigger frames
  11202. * Bit : 1 - enable/disable QOS frames
  11203. * Bit : 2-31 - reserved
  11204. */
  11205. WMI_VDEV_PARAM_SMART_MONITOR_CONFIG, /* 0xA9 */
  11206. /*=== ADD NEW VDEV PARAM TYPES ABOVE THIS LINE ===
  11207. * The below vdev param types are used for prototyping, and are
  11208. * prone to change.
  11209. */
  11210. WMI_VDEV_PARAM_PROTOTYPE = 0x8000,
  11211. /* 11AX SPECIFIC defines */
  11212. /* USE this for BSS color change */
  11213. WMI_VDEV_PARAM_BSS_COLOR, /* 0x8001 */
  11214. /*
  11215. * Enable / disable trigger access for a AP vdev's peers.
  11216. * For a STA mode vdev this will enable/disable triggered access
  11217. * and enable/disable Multi User mode of operation.
  11218. * A value of 0 in a given bit disables corresponding mode.
  11219. * bit | hemu mode
  11220. * ---------------
  11221. * 0 | HE SUBFEE
  11222. * 1 | HE SUBFER
  11223. * 2 | HE MUBFEE
  11224. * 3 | HE MUBFER
  11225. * 4 | DL OFDMA, for AP its DL Tx OFDMA for Sta its Rx OFDMA
  11226. * 5 | UL OFDMA, for AP its Tx OFDMA trigger for Sta its Rx OFDMA
  11227. * | trigger receive & UL response
  11228. * 6 | UL MUMIMO
  11229. * 7 | TXBF+OFDMA
  11230. */
  11231. WMI_VDEV_PARAM_SET_HEMU_MODE, /* 0x8002 */
  11232. WMI_VDEV_PARAM_HEOPS_0_31, /* 0x8003 */
  11233. WMI_VDEV_PARAM_OBSSPD, /* 0x8004 */
  11234. /*
  11235. * Enable / disable trigger access for a AP vdev's peers.
  11236. * For a STA mode vdev this will enable/disable triggered access
  11237. * and enable/disable Multi User mode of operation.
  11238. * A value of 0 in a given bit disables corresponding mode.
  11239. * bit | EHT mu mode
  11240. * ---------------
  11241. * 0 | EHT SUBFEE
  11242. * 1 | EHT SUBFER
  11243. * 2 | EHT MUBFEE
  11244. * 3 | EHT MUBFER
  11245. * 4 | EHT DL OFDMA, for AP its DL Tx OFDMA for Sta its Rx OFDMA
  11246. * 5 | EHT UL OFDMA, for AP its Tx OFDMA trigger for Sta its Rx OFDMA
  11247. * | trigger receive & UL response
  11248. * 6 | EHT MUMIMO
  11249. * 7 | EHT DL OFDMA + TXBF
  11250. * 8 | EHT DL OFDMA + MU-MIMO
  11251. * 9 | EHT UL OFDMA + MU-MIMO
  11252. */
  11253. WMI_VDEV_PARAM_SET_EHT_MU_MODE, /* 0x8005 */
  11254. /**
  11255. * Specify the EHT LTF setting that should be used for fixed rate
  11256. * transmissions.
  11257. *
  11258. * Expects values of WMI_EHT_LTF_DEFAULT, WMI_EHT_LTF_1X,
  11259. * WMI_EHT_LTF_2X, or WMI_EHT_LTF_4X.
  11260. */
  11261. WMI_VDEV_PARAM_EHT_LTF, /* 0x8006 */
  11262. /**
  11263. * Expects values of WMI_EHT_LTF_DEFAULT, WMI_EHT_LTF_1X,
  11264. * WMI_EHT_LTF_2X, or WMI_EHT_LTF_4X.
  11265. */
  11266. WMI_VDEV_PARAM_UL_EHT_LTF, /* 0x8007 */
  11267. /**
  11268. * Enable or disable Dual Carrier Modulation
  11269. * valid values: 0-Disable EHT DCM, 1-Enable EHT DCM.
  11270. */
  11271. WMI_VDEV_PARAM_EHT_DCM, /* 0x8008 */
  11272. /**
  11273. * Enable or disable Extended range
  11274. * valid values: 0-Disable ER, 1-Enable ER.
  11275. */
  11276. WMI_VDEV_PARAM_EHT_RANGE_EXT, /* 0x8009 */
  11277. /**
  11278. * Enable or disable Non-data EHT Extended range
  11279. * valid values: 0-Disable ER, 1-Enable ER.
  11280. */
  11281. WMI_VDEV_PARAM_NON_DATA_EHT_RANGE_EXT, /* 0x800A */
  11282. /*
  11283. * 0 - fixed pattern disable,
  11284. * 1 - Fixed pattern enable and value pointed by
  11285. * WMI_VDEV_PARAM_FIXED_PUNCTURE_PATTERN
  11286. * punctured mode for 11be systems
  11287. */
  11288. WMI_VDEV_PARAM_FIXED_PUNCTURE_PATTERN, /* 0x800B */
  11289. WMI_VDEV_PARAM_EHTOPS_0_31, /* 0x800C */
  11290. /*
  11291. * 0 - eht 11be puncturing disable,
  11292. * 1 - eht 11be puncturing enable
  11293. */
  11294. WMI_VDEV_PARAM_SET_EHT_PUNCTURING_MODE, /* 0x800D */
  11295. /*
  11296. * 0 - Disable MCAST Beamforming
  11297. * 1 - Enable MCAST Beamforming
  11298. */
  11299. WMI_VDEV_PARAM_MCAST_STEERING, /* 0x800E */
  11300. /*=== END VDEV_PARAM_PROTOTYPE SECTION ===*/
  11301. } WMI_VDEV_PARAM;
  11302. /* EHT Modes */
  11303. #define WMI_VDEV_EHT_SUBFEE_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 0, 1)
  11304. #define WMI_VDEV_EHT_SUBFEE_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 0, 1, 1)
  11305. #define WMI_VDEV_EHT_SUBFEE_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 0, 1, 0)
  11306. #define WMI_VDEV_EHT_SUBFER_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 1, 1)
  11307. #define WMI_VDEV_EHT_SUBFER_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 1, 1, 1)
  11308. #define WMI_VDEV_EHT_SUBFER_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 1, 1, 0)
  11309. #define WMI_VDEV_EHT_MUBFEE_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 2, 1)
  11310. #define WMI_VDEV_EHT_MUBFEE_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 2, 1, 1)
  11311. #define WMI_VDEV_EHT_MUBFEE_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 2, 1, 0)
  11312. #define WMI_VDEV_EHT_MUBFER_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 3, 1)
  11313. #define WMI_VDEV_EHT_MUBFER_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 3, 1, 1)
  11314. #define WMI_VDEV_EHT_MUBFER_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 3, 1, 0)
  11315. #define WMI_VDEV_EHT_DLOFDMA_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 4, 1)
  11316. #define WMI_VDEV_EHT_DLOFDMA_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 4, 1, 1)
  11317. #define WMI_VDEV_EHT_DLOFDMA_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 4, 1, 0)
  11318. #define WMI_VDEV_EHT_ULOFDMA_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 5, 1)
  11319. #define WMI_VDEV_EHT_ULOFDMA_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 5, 1, 1)
  11320. #define WMI_VDEV_EHT_ULOFDMA_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 5, 1, 0)
  11321. #define WMI_VDEV_EHT_ULMUMIMO_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 6, 1)
  11322. #define WMI_VDEV_EHT_ULMUMIMO_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 6, 1, 1)
  11323. #define WMI_VDEV_EHT_ULMUMIMO_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 6, 1, 0)
  11324. #define WMI_VDEV_EHT_TXBF_OFDMA_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 7, 1)
  11325. #define WMI_VDEV_EHT_TXBF_OFDMA_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 7, 1, 1)
  11326. #define WMI_VDEV_EHT_TXBF_OFDMA_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 7, 1, 0)
  11327. #define WMI_VDEV_EHT_DLOFDMA_W_MUMIMO_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 8, 1)
  11328. #define WMI_VDEV_EHT_DLOFDMA_W_MUMIMO_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 8, 1, 1)
  11329. #define WMI_VDEV_EHT_DLOFDMA_W_MUMIMO_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 8, 1, 0)
  11330. #define WMI_VDEV_EHT_ULOFDMA_W_MUMIMO_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 9, 1)
  11331. #define WMI_VDEV_EHT_ULOFDMA_W_MUMIMO_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 9, 1, 1)
  11332. #define WMI_VDEV_EHT_ULOFDMA_W_MUMIMO_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 9, 1, 0)
  11333. /* HE Modes */
  11334. #define WMI_VDEV_HE_SUBFEE_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 0, 1)
  11335. #define WMI_VDEV_HE_SUBFEE_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 0, 1, 1)
  11336. #define WMI_VDEV_HE_SUBFEE_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 0, 1, 0)
  11337. #define WMI_VDEV_HE_SUBFER_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 1, 1)
  11338. #define WMI_VDEV_HE_SUBFER_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 1, 1, 1)
  11339. #define WMI_VDEV_HE_SUBFER_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 1, 1, 0)
  11340. #define WMI_VDEV_HE_MUBFEE_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 2, 1)
  11341. #define WMI_VDEV_HE_MUBFEE_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 2, 1, 1)
  11342. #define WMI_VDEV_HE_MUBFEE_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 2, 1, 0)
  11343. #define WMI_VDEV_HE_MUBFER_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 3, 1)
  11344. #define WMI_VDEV_HE_MUBFER_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 3, 1, 1)
  11345. #define WMI_VDEV_HE_MUBFER_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 3, 1, 0)
  11346. #define WMI_VDEV_HE_DLOFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 4, 1)
  11347. #define WMI_VDEV_HE_DLOFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 4, 1, 1)
  11348. #define WMI_VDEV_HE_DLOFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 4, 1, 0)
  11349. #define WMI_VDEV_HE_ULOFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 5, 1)
  11350. #define WMI_VDEV_HE_ULOFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 5, 1, 1)
  11351. #define WMI_VDEV_HE_ULOFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 5, 1, 0)
  11352. #define WMI_VDEV_HE_ULMUMIMO_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 6, 1)
  11353. #define WMI_VDEV_HE_ULMUMIMO_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 6, 1, 1)
  11354. #define WMI_VDEV_HE_ULMUMIMO_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 6, 1, 0)
  11355. #define WMI_VDEV_HE_TXBF_OFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 7, 1)
  11356. #define WMI_VDEV_HE_TXBF_OFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 7, 1, 1)
  11357. #define WMI_VDEV_HE_TXBF_OFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 7, 1, 0)
  11358. #define WMI_VDEV_HE_AX_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 0, 1)
  11359. #define WMI_VDEV_HE_MU_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 2, 1)
  11360. #define WMI_VDEV_HE_AX_TRIG_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 3, 1)
  11361. /* vdev capabilities bit mask */
  11362. #define WMI_VDEV_BEACON_SUPPORT 0x1
  11363. #define WMI_VDEV_WDS_LRN_ENABLED 0x2
  11364. #define WMI_VDEV_VOW_ENABLED 0x4
  11365. #define WMI_VDEV_IS_BEACON_SUPPORTED(param) ((param) & WMI_VDEV_BEACON_SUPPORT)
  11366. #define WMI_VDEV_IS_WDS_LRN_ENABLED(param) ((param) & WMI_VDEV_WDS_LRN_ENABLED)
  11367. #define WMI_VDEV_IS_VOW_ENABLED(param) ((param) & WMI_VDEV_VOW_ENABLED)
  11368. /* Per VAP rate dropdown masks */
  11369. #define WMI_VDEV_MGMT_RATE_DROPDOWN_M 0x01
  11370. #define WMI_VDEV_MGMT_RATE_DROPDOWN_S 0
  11371. #define WMI_VDEV_MGMT_RATE_DROPDOWN (WMI_VDEV_MGMT_RATE_DROPDOWN_M << WMI_VDEV_MGMT_RATE_DROPDOWN_S)
  11372. #define WMI_VDEV_MGMT_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_MGMT_RATE_DROPDOWN)
  11373. #define WMI_VDEV_MGMT_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_MGMT_RATE_DROPDOWN)
  11374. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_M 0x01
  11375. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_S 1
  11376. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN (WMI_VDEV_SU_DATA_RATE_DROPDOWN_M << WMI_VDEV_SU_DATA_RATE_DROPDOWN_S)
  11377. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_SU_DATA_RATE_DROPDOWN)
  11378. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_SU_DATA_RATE_DROPDOWN)
  11379. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_M 0x01
  11380. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_S 2
  11381. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN (WMI_VDEV_MU_DATA_RATE_DROPDOWN_M << WMI_VDEV_MU_DATA_RATE_DROPDOWN_S)
  11382. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_MU_DATA_RATE_DROPDOWN)
  11383. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_MU_DATA_RATE_DROPDOWN)
  11384. /* TXBF capabilities masks */
  11385. #define WMI_TXBF_CONF_SU_TX_BFEE_S 0
  11386. #define WMI_TXBF_CONF_SU_TX_BFEE_M 0x1
  11387. #define WMI_TXBF_CONF_SU_TX_BFEE (WMI_TXBF_CONF_SU_TX_BFEE_M << WMI_TXBF_CONF_SU_TX_BFEE_S)
  11388. #define WMI_TXBF_CONF_SU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFEE)
  11389. #define WMI_TXBF_CONF_SU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFEE)
  11390. #define WMI_TXBF_CONF_MU_TX_BFEE_S 1
  11391. #define WMI_TXBF_CONF_MU_TX_BFEE_M 0x1
  11392. #define WMI_TXBF_CONF_MU_TX_BFEE (WMI_TXBF_CONF_MU_TX_BFEE_M << WMI_TXBF_CONF_MU_TX_BFEE_S)
  11393. #define WMI_TXBF_CONF_MU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFEE)
  11394. #define WMI_TXBF_CONF_MU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFEE)
  11395. #define WMI_TXBF_CONF_SU_TX_BFER_S 2
  11396. #define WMI_TXBF_CONF_SU_TX_BFER_M 0x1
  11397. #define WMI_TXBF_CONF_SU_TX_BFER (WMI_TXBF_CONF_SU_TX_BFER_M << WMI_TXBF_CONF_SU_TX_BFER_S)
  11398. #define WMI_TXBF_CONF_SU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFER)
  11399. #define WMI_TXBF_CONF_SU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFER)
  11400. #define WMI_TXBF_CONF_MU_TX_BFER_S 3
  11401. #define WMI_TXBF_CONF_MU_TX_BFER_M 0x1
  11402. #define WMI_TXBF_CONF_MU_TX_BFER (WMI_TXBF_CONF_MU_TX_BFER_M << WMI_TXBF_CONF_MU_TX_BFER_S)
  11403. #define WMI_TXBF_CONF_MU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFER)
  11404. #define WMI_TXBF_CONF_MU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFER)
  11405. #define WMI_TXBF_CONF_STS_CAP_S 4
  11406. #define WMI_TXBF_CONF_STS_CAP_M 0x7
  11407. #define WMI_TXBF_CONF_STS_CAP (WMI_TXBF_CONF_STS_CAP_M << WMI_TXBF_CONF_STS_CAP_S)
  11408. #define WMI_TXBF_CONF_STS_CAP_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_STS_CAP);
  11409. #define WMI_TXBF_CONF_STS_CAP_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_STS_CAP)
  11410. #define WMI_TXBF_CONF_IMPLICIT_BF_S 7
  11411. #define WMI_TXBF_CONF_IMPLICIT_BF_M 0x1
  11412. #define WMI_TXBF_CONF_IMPLICIT_BF (WMI_TXBF_CONF_IMPLICIT_BF_M << WMI_TXBF_CONF_IMPLICIT_BF_S)
  11413. #define WMI_TXBF_CONF_IMPLICIT_BF_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_IMPLICIT_BF)
  11414. #define WMI_TXBF_CONF_IMPLICIT_BF_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_IMPLICIT_BF)
  11415. #define WMI_TXBF_CONF_BF_SND_DIM_S 8
  11416. #define WMI_TXBF_CONF_BF_SND_DIM_M 0x7
  11417. #define WMI_TXBF_CONF_BF_SND_DIM (WMI_TXBF_CONF_BF_SND_DIM_M << WMI_TXBF_CONF_BF_SND_DIM_S)
  11418. #define WMI_TXBF_CONF_BF_SND_DIM_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_BF_SND_DIM)
  11419. #define WMI_TXBF_CONF_BF_SND_DIM_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_BF_SND_DIM)
  11420. /* commands for 11ax TXBF capabilities */
  11421. #define WMI_TXBF_CONF_11AX_SU_TX_BFER_GET(x) WMI_GET_BITS((x,0,1)
  11422. #define WMI_TXBF_CONF_11AX_SU_TX_BFER_SET(x,z) WMI_SET_BITS(x,0,1,z)
  11423. #define WMI_TXBF_CONF_11AX_SU_TX_BFEE_GET(x) WMI_GET_BITS((x,1,1)
  11424. #define WMI_TXBF_CONF_11AX_SU_TX_BFEE_SET(x,z) WMI_SET_BITS(x,1,1,z)
  11425. #define WMI_TXBF_CONF_11AX_MU_TX_BFER_GET(x) WMI_GET_BITS((x,2,1)
  11426. #define WMI_TXBF_CONF_11AX_MU_TX_BFER_SET(x,z) WMI_SET_BITS(x,2,1,z)
  11427. #define WMI_TXBF_CONF_11AX_BFEE_NDP_STS_LT_EQ_80_GET(x) WMI_GET_BITS((x,3,3)
  11428. #define WMI_TXBF_CONF_11AX_BFEE_NDP_STS_LT_EQ_80_SET(x,z) WMI_SET_BITS(x,3,3,z)
  11429. #define WMI_TXBF_CONF_11AX_NSTS_LT_EQ_80_GET(x) WMI_GET_BITS((x,6,3)
  11430. #define WMI_TXBF_CONF_11AX_NSTS_LT_EQ_80_SET(x,z) WMI_SET_BITS(x,6,3,z)
  11431. #define WMI_TXBF_CONF_11AX_TX_BFEE_NDP_STS_GT_80_GET(x) WMI_GET_BITS((x,9,3)
  11432. #define WMI_TXBF_CONF_11AX_TX_BFEE_NDP_STS_GT_80_SET(x,z) WMI_SET_BITS(x,9,3,z)
  11433. #define WMI_TXBF_CONF_11AX_NSTS_GT_80_GET(x) WMI_GET_BITS((x,12,3)
  11434. #define WMI_TXBF_CONF_11AX_NSTS_GT_80_SET(x,z) WMI_SET_BITS(x,12,3,z)
  11435. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_LT_EQ_80_SND_DIM_GET(x) WMI_GET_BITS((x,15,3)
  11436. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_LT_EQ_80_SND_DIM_SET(x,z) WMI_SET_BITS(x,15,3,z)
  11437. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_GT_80_SND_DIM_GET(x) WMI_GET_BITS((x,18,3)
  11438. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_GT_80_SND_DIM_SET(x,z) WMI_SET_BITS(x,18,3,z)
  11439. #define WMI_TXBF_CONF_AX_SU_BFEE_NG16_FDBK_GET(x) WMI_GET_BITS((x,21,1)
  11440. #define WMI_TXBF_CONF_AX_SU_BFEE_NG16_FDBK_SET(x,z) WMI_SET_BITS(x,21,1,z)
  11441. #define WMI_TXBF_CONF_AX_MU_BFEE_NG16_FDBK_GET(x) WMI_GET_BITS((x,22,1)
  11442. #define WMI_TXBF_CONF_AX_MU_BFEE_NG16_FDBK_SET(x,z) WMI_SET_BITS(x,22,1,z)
  11443. #define WMI_TXBF_CONF_AX_SU_BFEE_CDBK_4_2_GET(x) WMI_GET_BITS((x,23,1)
  11444. #define WMI_TXBF_CONF_AX_SU_BFEE_CDBK_4_2_SET(x,z) WMI_SET_BITS(x,23,1,z)
  11445. #define WMI_TXBF_CONF_AX_MU_BFEE_CDBK_7_5_GET(x) WMI_GET_BITS((x,24,1)
  11446. #define WMI_TXBF_CONF_AX_MU_BFEE_CDBK_7_5_SET(x,z) WMI_SET_BITS(x,24,1,z)
  11447. #define WMI_TXBF_CONF_AX_FDBK_TRIG_GET(x) WMI_GET_BITS((x,25,1)
  11448. #define WMI_TXBF_CONF_AX_FDBK_TRIG_SET(x,z) WMI_SET_BITS(x,25,1,z)
  11449. /* TXBF capabilities */
  11450. typedef struct {
  11451. A_UINT32 txbf_cap;
  11452. } wmi_vdev_txbf_cap;
  11453. /* vdev rx filters (for mesh) */
  11454. typedef enum {
  11455. WMI_VDEV_RX_ALLOW_ALL_FRAMES = 0x0, /* Don't drop any frames - Default */
  11456. WMI_VDEV_RX_FILTER_OUT_FROMDS = 0x1, /* Drop FromDS frames */
  11457. WMI_VDEV_RX_FILTER_OUT_TODS = 0x2, /* Drop ToDS frames */
  11458. WMI_VDEV_RX_FILTER_OUT_NODS = 0x4, /* Drop NODS frames */
  11459. WMI_VDEV_RX_FILTER_OUT_RA = 0x8, /* Drop RA frames */
  11460. WMI_VDEV_RX_FILTER_OUT_TA = 0x10, /* Drop TA frames */
  11461. } wmi_vdev_param_filter;
  11462. /* Length of ATIM Window in TU */
  11463. #define WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH WMI_VDEV_PARAM_ATIM_WINDOW
  11464. enum wmi_pkt_type {
  11465. WMI_PKT_TYPE_RAW = 0,
  11466. WMI_PKT_TYPE_NATIVE_WIFI = 1,
  11467. WMI_PKT_TYPE_ETHERNET = 2,
  11468. };
  11469. /*******************************************************************
  11470. * wmi_vdev_txbf_en is DEPRECATED in favor of wmi_vdev_txbf_cap
  11471. * Do not use it!
  11472. *******************************************************************/
  11473. typedef struct {
  11474. A_UINT8 sutxbfee : 1,
  11475. mutxbfee : 1,
  11476. sutxbfer : 1,
  11477. mutxbfer : 1,
  11478. txb_sts_cap : 3,
  11479. implicit_bf : 1;
  11480. } wmi_vdev_txbf_en;
  11481. /** Upto 8 bits are available for Roaming module to be sent along with
  11482. WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/
  11483. /* Bit 0: Enable Roaming FW offload LFR1.5/LFR2.0 implementation */
  11484. #define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG 0x1
  11485. /* Bit 1: Enable Roaming module in FW to do scan based on Final BMISS */
  11486. #define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG 0x2
  11487. /* Bit 2:
  11488. * To enable/disable EAPOL_4WAY_HANDSHAKE process while roaming.
  11489. * param value = 0 --> Enable EAPOL 4way handshake
  11490. * param value = 1 --> Skip EAPOL 4way handshake
  11491. */
  11492. #define WMI_VDEV_PARAM_SKIP_ROAM_EAPOL_4WAY_HANDSHAKE 0x4
  11493. /* Bit 3:
  11494. * Scan type when WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG is set:
  11495. * value = 0 --> Chanmap scan followed by one full scan if no candidate found.
  11496. * value = 1 --> Chanmap scan only
  11497. */
  11498. #define WMI_ROAM_BMISS_FINAL_SCAN_TYPE_FLAG 0x8
  11499. /* Bit 4:
  11500. * To enable/disable feature: EAPOL offload to FW while SAE roaming.
  11501. * param value = 0 --> Enable EAPOL offload to FW for SAE roaming
  11502. * param value = 1 --> Disable EAPOL offload to FW for SAE roaming
  11503. */
  11504. #define WMI_VDEV_PARAM_SKIP_SAE_ROAM_4WAY_HANDSHAKE 0x10
  11505. /** slot time long */
  11506. #define WMI_VDEV_SLOT_TIME_LONG 0x1
  11507. /** slot time short */
  11508. #define WMI_VDEV_SLOT_TIME_SHORT 0x2
  11509. /** preablbe long */
  11510. #define WMI_VDEV_PREAMBLE_LONG 0x1
  11511. /** preablbe short */
  11512. #define WMI_VDEV_PREAMBLE_SHORT 0x2
  11513. /** the definition of different START/RESTART Event response */
  11514. typedef enum {
  11515. /* Event respose of START CMD */
  11516. WMI_VDEV_START_RESP_EVENT = 0,
  11517. /* Event respose of RESTART CMD */
  11518. WMI_VDEV_RESTART_RESP_EVENT,
  11519. } WMI_START_EVENT_PARAM;
  11520. typedef struct {
  11521. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_response_event_fixed_param */
  11522. /** unique id identifying the VDEV, generated by the caller */
  11523. A_UINT32 vdev_id;
  11524. /** requestor id that requested the VDEV start request */
  11525. A_UINT32 requestor_id;
  11526. /* Respose of Event type START/RESTART */
  11527. WMI_START_EVENT_PARAM resp_type;
  11528. /** status of the response */
  11529. A_UINT32 status;
  11530. /** Vdev chain mask */
  11531. A_UINT32 chain_mask;
  11532. /** Vdev mimo power save mode */
  11533. A_UINT32 smps_mode;
  11534. union {
  11535. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  11536. /** pdev_id for identifying the MAC
  11537. * See macros starting with WMI_PDEV_ID_ for values.
  11538. */
  11539. A_UINT32 pdev_id;
  11540. };
  11541. /** Configured Transmit Streams **/
  11542. A_UINT32 cfgd_tx_streams;
  11543. /** Configured Receive Streams **/
  11544. A_UINT32 cfgd_rx_streams;
  11545. /**
  11546. * maximum allowed Tx power (in dBm) for this connection.
  11547. * max_allowed_tx_power = 0 dBm means value is not specified.
  11548. */
  11549. A_INT32 max_allowed_tx_power;
  11550. } wmi_vdev_start_response_event_fixed_param;
  11551. typedef struct {
  11552. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stopped_event_fixed_param */
  11553. /** unique id identifying the VDEV, generated by the caller */
  11554. A_UINT32 vdev_id;
  11555. } wmi_vdev_stopped_event_fixed_param;
  11556. typedef struct {
  11557. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_resp_event_fixed_param */
  11558. /** unique id identifying the VDEV, generated by the caller */
  11559. A_UINT32 vdev_id;
  11560. } wmi_vdev_delete_resp_event_fixed_param;
  11561. /** common structure used for simple events (stopped, resume_req, standby response) */
  11562. typedef struct {
  11563. A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to actual event */
  11564. /** unique id identifying the VDEV, generated by the caller */
  11565. A_UINT32 vdev_id;
  11566. } wmi_vdev_simple_event_fixed_param;
  11567. /* Commands for getting and setting protected bit : bss max idle time */
  11568. #define WMI_BSS_MAX_IDLE_TIME_PROTECTED_GET(idle_options) \
  11569. WMI_GET_BITS(idle_options, 0, 1)
  11570. #define WMI_BSS_MAX_IDLE_TIME_PROTECTED_SET(idle_options, val) \
  11571. WMI_SET_BITS(idle_options, 0, 1, val)
  11572. typedef struct {
  11573. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_VDEV_BSS_MAX_IDLE_TIME_fixed_param */
  11574. A_UINT32 vdev_id; /** unique id identifying the VDEV, generated by the caller */
  11575. A_UINT32 max_idle_period; /* time interval in seconds */
  11576. /* idle_options:
  11577. * bit 0 - Protected bit
  11578. * Refer to WMI_BSS_MAX_IDLE_TIME_PROTECTED_GET,SET macros.
  11579. * bit 31:1 - Reserved bits
  11580. */
  11581. A_UINT32 idle_options;
  11582. } wmi_vdev_bss_max_idle_time_cmd_fixed_param;
  11583. /** VDEV start response status codes */
  11584. #define WMI_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0 /** VDEV succesfully started */
  11585. #define WMI_VDEV_START_RESPONSE_INVALID_VDEVID 0x1 /** requested VDEV not found */
  11586. #define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2 /** unsupported VDEV combination */
  11587. #define WMI_VDEV_START_RESPONSE_DFS_VIOLATION 0x3 /** DFS_VIOLATION since channel in the NOL is selected */
  11588. #define WMI_VDEV_START_RESPONSE_INVALID_REGDOMAIN 0x4 /** Invalid regulatory domain in VDEV start */
  11589. #define WMI_VDEV_START_RESPONSE_INVALID_BAND 0x5 /** Band unsupported by current hw mode in VDEV start */
  11590. /** Beacon processing related command and event structures */
  11591. typedef struct {
  11592. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tx_hdr */
  11593. /** unique id identifying the VDEV, generated by the caller */
  11594. A_UINT32 vdev_id;
  11595. /** xmit rate */
  11596. A_UINT32 tx_rate;
  11597. /** xmit power */
  11598. A_UINT32 txPower;
  11599. /** beacon buffer length in bytes */
  11600. A_UINT32 buf_len;
  11601. /* This TLV is followed by array of bytes:
  11602. * A_UINT8 bufp[]; <-- beacon frame buffer
  11603. */
  11604. } wmi_bcn_tx_hdr;
  11605. /* Beacon filter */
  11606. #define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
  11607. #define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
  11608. #define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
  11609. #define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
  11610. #define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
  11611. typedef struct {
  11612. /** Filter ID */
  11613. A_UINT32 bcn_filter_id;
  11614. /** Filter type - wmi_bcn_filter */
  11615. A_UINT32 bcn_filter;
  11616. /** Buffer len */
  11617. A_UINT32 bcn_filter_len;
  11618. /** Filter info (threshold, BSSID, RSSI) */
  11619. A_UINT8 *bcn_filter_buf;
  11620. } wmi_bcn_filter_rx_cmd;
  11621. /** Capabilities and IEs to be passed to firmware */
  11622. typedef struct {
  11623. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_prb_info */
  11624. /** Capabilities */
  11625. A_UINT32 caps;
  11626. /** ERP info */
  11627. A_UINT32 erp;
  11628. /** Advanced capabilities */
  11629. /** HT capabilities */
  11630. /** HT Info */
  11631. /** ibss_dfs */
  11632. /** wpa Info */
  11633. /** rsn Info */
  11634. /** rrm info */
  11635. /** ath_ext */
  11636. /** app IE */
  11637. } wmi_bcn_prb_info;
  11638. enum wmi_frame_inject_type {
  11639. /* Transmit QoS null frame each period */
  11640. WMI_FRAME_INJECT_TYPE_QOS_NULL,
  11641. /* Transmit CTS to self each period */
  11642. WMI_FRAME_INJECT_TYPE_CTS_TO_SELF,
  11643. /* Transmit HOST provided buffer instead of forming frame in FW */
  11644. WMI_FRAME_INJECT_TYPE_HOST_BUFFER,
  11645. /* Max valid frame inject type for sanity checks*/
  11646. WMI_FRAME_INJECT_TYPE_MAX,
  11647. };
  11648. typedef struct {
  11649. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_frame_inject_cmd_fixed_param */
  11650. A_UINT32 tlv_header;
  11651. /** unique id identifying the VDEV, generated by the caller.
  11652. * At any time only one vdev per mac can have this feature enabled.
  11653. * Two consecutive enable commands on same mac will result in previous
  11654. * command being disabled and new one being enabled.
  11655. */
  11656. A_UINT32 vdev_id;
  11657. /** enable or disable injection */
  11658. A_UINT32 enable;
  11659. /** frame type to be used for frame injection. possible values are
  11660. * defined in enum wmi_frame_inject_type.
  11661. */
  11662. A_UINT32 frame_type;
  11663. /** periodicity of frame injection in milliseconds */
  11664. A_UINT32 frame_inject_period;
  11665. /** Destination address of frame */
  11666. wmi_mac_addr frame_addr1;
  11667. /** Frame control duration field to be set in CTS_TO_SELF.
  11668. * Applicable to frame_type WMI_FRAME_INJECT_TYPE_CTS_TO_SELF only.
  11669. */
  11670. A_UINT32 fc_duration;
  11671. /** variable buffer length. Can be used for frame template.
  11672. * data is in TLV data[]
  11673. */
  11674. A_UINT32 buf_len;
  11675. /*
  11676. * The TLVs follows:
  11677. * A_UINT8 data[]; <-- Variable length data
  11678. */
  11679. } wmi_frame_inject_cmd_fixed_param;
  11680. #define WMI_BEACON_TMPLT_PROFILE_PERIOD_BITPOS (0)
  11681. #define WMI_BEACON_TMPLT_PROFILE_PERIOD_MASK (0xff << WMI_BEACON_TMPLT_PROFILE_PERIOD_BITPOS)
  11682. #define WMI_BEACON_TMPLT_SET_PROFILE_PERIOD(_ema_param, _val) \
  11683. WMI_SET_BITS(_ema_param, WMI_BEACON_TMPLT_PROFILE_PERIOD_BITPOS, 8, _val)
  11684. #define WMI_BEACON_TMPLT_GET_PROFILE_PERIOD(_ema_param) \
  11685. WMI_GET_BITS(_ema_param, WMI_BEACON_TMPLT_PROFILE_PERIOD_BITPOS, 8)
  11686. #define WMI_BEACON_TMPLT_TEMPLATE_INDEX_BITPOS (8)
  11687. #define WMI_BEACON_TMPLT_TEMPLATE_INDEX_MASK (0xff << WMI_BEACON_TMPLT_TEMPLATE_INDEX_BITPOS)
  11688. #define WMI_BEACON_TMPLT_SET_TEMPLATE_INDEX(_ema_param, _val) \
  11689. WMI_SET_BITS(_ema_param, WMI_BEACON_TMPLT_TEMPLATE_INDEX_BITPOS, 8, _val)
  11690. #define WMI_BEACON_TMPLT_GET_TEMPLATE_INDEX(_ema_param) \
  11691. WMI_GET_BITS(_ema_param, WMI_BEACON_TMPLT_TEMPLATE_INDEX_BITPOS, 8)
  11692. #define WMI_BEACON_TMPLT_FIRST_TEMPLATE_BITPOS (16)
  11693. #define WMI_BEACON_TMPLT_FIRST_TEMPLATE_MASK (0xff << WMI_BEACON_TMPLT_FIRST_TEMPLATE_BITPOS)
  11694. #define WMI_BEACON_TMPLT_SET_FIRST_TEMPLATE(_ema_param, _val) \
  11695. WMI_SET_BITS(_ema_param, WMI_BEACON_TMPLT_FIRST_TEMPLATE_BITPOS, 8, _val)
  11696. #define WMI_BEACON_TMPLT_GET_FIRST_TEMPLATE(_ema_param) \
  11697. WMI_GET_BITS(_ema_param, WMI_BEACON_TMPLT_FIRST_TEMPLATE_BITPOS, 8)
  11698. #define WMI_BEACON_TMPLT_LAST_TEMPLATE_BITPOS (24)
  11699. #define WMI_BEACON_TMPLT_LAST_TEMPLATE_MASK (0xff << WMI_BEACON_TMPLT_LAST_TEMPLATE_BITPOS)
  11700. #define WMI_BEACON_TMPLT_SET_LAST_TEMPLATE(_ema_param, _val) \
  11701. WMI_SET_BITS(_ema_param, WMI_BEACON_TMPLT_LAST_TEMPLATE_BITPOS, 8, _val)
  11702. #define WMI_BEACON_TMPLT_GET_LAST_TEMPLATE(_ema_param) \
  11703. WMI_GET_BITS(_ema_param, WMI_BEACON_TMPLT_LAST_TEMPLATE_BITPOS, 8)
  11704. typedef struct {
  11705. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_ml_params */
  11706. A_UINT32 vdev_id; /* partner vdev_id */
  11707. A_UINT32 hw_link_id; /* hw_link_id: Unique link id across SOCs, got as part of QMI handshake */
  11708. A_UINT32 beacon_interval; /* beacon interval in TU from received beacon of the partner link */
  11709. /** CSA IE switch count offset from the beginning of data[]
  11710. * Value 0 indicates CSA IE is not present in beacon template.
  11711. */
  11712. A_UINT32 csa_switch_count_offset; /* units = bytes */
  11713. /** Extended CSA IE switch count offset from the beginning of data[]
  11714. * Value 0 indicates ECSA IE is not present in beacon template.
  11715. */
  11716. A_UINT32 ext_csa_switch_count_offset; /* units = bytes */
  11717. /** Per-STA profile Subelement offset from the beginning of the template. */
  11718. A_UINT32 per_sta_profile_offset;
  11719. /** Quiet IE offset from the beginning of the template. */
  11720. A_UINT32 quiet_ie_offset;
  11721. } wmi_bcn_tmpl_ml_params;
  11722. typedef struct {
  11723. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_cmd_fixed_param */
  11724. /** unique id identifying the VDEV, generated by the caller */
  11725. A_UINT32 vdev_id;
  11726. /** TIM IE offset from the beginning of the template. */
  11727. A_UINT32 tim_ie_offset;
  11728. /** beacon buffer length. data is in TLV data[] */
  11729. A_UINT32 buf_len;
  11730. /** CSA IE switch count offset from the beginning of data[]
  11731. * Value 0 indicates CSA IE is not present in beacon template.
  11732. */
  11733. A_UINT32 csa_switch_count_offset; /* units = bytes */
  11734. /** Extended CSA IE switch count offset from the beginning of data[]
  11735. * Value 0 indicates CSA IE is not present in beacon template.
  11736. */
  11737. A_UINT32 ext_csa_switch_count_offset; /* units = bytes */
  11738. /** Specify when to send the CSA switch count status from FW to host.
  11739. * See WMI_CSA_EVENT_BMAP* below for more information.
  11740. * E.g. if CSA switch count event is needed to be sent when the switch count
  11741. * is 0, 1, 4 and 5, set the bitmap to (0X80000033)
  11742. */
  11743. A_UINT32 csa_event_bitmap;
  11744. /** offset (in octets/bytes) of MBSSID IE in beacon frame */
  11745. A_UINT32 mbssid_ie_offset;
  11746. /** offset (in octets/bytes) of ESP IE in beacon frame */
  11747. A_UINT32 esp_ie_offset;
  11748. /** CSC IE color switch count offset from the beginning of data[]
  11749. * Value 0 indicates CSC IE is not present in beacon template.
  11750. */
  11751. A_UINT32 csc_switch_count_offset; /* units = bytes */
  11752. /** Specify when to send the CSC switch count status from FW to host.
  11753. * See WMI_CSC_EVENT_BMAP* below for more information.
  11754. * E.g. if CSA switch count event is needed to be sent when the switch count
  11755. * is 0, 1, 4 and 5, set the bitmap to (0X80000033)
  11756. */
  11757. A_UINT32 csc_event_bitmap;
  11758. /** Specify offset for FW to overwrite MU EDCA parameters in the beacon.
  11759. * This is done during FW tuning of EDCA parameters.
  11760. * Based on number of HE and Legacy stations.
  11761. * If mu_edca_ie_offset == 0, it is ignored.
  11762. * Only non-zero values are considered.
  11763. */
  11764. A_UINT32 mu_edca_ie_offset;
  11765. /** Specify features that need to be enabled/disabled for the beacon.
  11766. *
  11767. * Bit 0:
  11768. * Beacon Protection feature enable/disable indication.
  11769. * Refer to WMI_BEACON_PROTECTION_EN_SET/GET macros.
  11770. *
  11771. * More features can be added to this bitmap.
  11772. */
  11773. A_UINT32 feature_enable_bitmap;
  11774. /**
  11775. * @ema_params: Applicable only for EMA tx VAPs (VAPs having both flags
  11776. * VDEV_FLAGS_EMA_MODE and VDEV_FLAGS_TRANSMIT_AP set) and should
  11777. * remain 0 otherwise. For EMA vaps it carries below information
  11778. * encoded in each byte:
  11779. * Byte 0: (@ema_beacon_profile_periodicity) - beacon profile periodicity
  11780. * (number of beacons) after which nontransmitted MBSS info repeats.
  11781. * Assumes values [1, N] inclusive.
  11782. * Refer to WMI_BEACON_TMPLT_[SET,GET]_PROFILE_PERIOD macros.
  11783. * Byte 1: (@ema_beacon_tmpl_idx) - Specifies the position of beacon
  11784. * templates within profile periodicity.
  11785. * Assumes values [0, ema_beacon_profile_periodicity-1] inclusive.
  11786. * Multiple templates having same @ema_beacon_max_tmpl_idx will
  11787. * overwrite previous template.
  11788. * Refer to WMI_BEACON_TMPLT_[SET,GET]_TEMPLATE_INDEX macros.
  11789. * Byte 2: (@ema_first_tmpl) - Specifies whether it's a last template in
  11790. * sequence of @ema_beacon_profile_periodicity templates
  11791. * (end of new template update exchange).
  11792. * If this template is the only template being updated,
  11793. * @ema_first_tmpl and @ema_last_tmpl both shall be set to 1.
  11794. * Refer to WMI_BEACON_TMPLT_[SET,GET]_FIRST_TEMPLATE macros.
  11795. * Byte 3: (@ema_last_tmpl) - pecifies whether it's a last template in
  11796. * sequence of @ema_beacon_profile_periodicity templates
  11797. * (end of new template update exchange).
  11798. * If this template is the only template being updated,
  11799. * @ema_first_tmpl and @ema_last_tmpl both shall be set to 1.
  11800. * Refer to WMI_BEACON_TMPLT_[SET,GET]_LAST_TEMPLATE macros.
  11801. */
  11802. A_UINT32 ema_params;
  11803. /*
  11804. * The TLVs follows:
  11805. * wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
  11806. * A_UINT8 data[]; <-- Variable length data
  11807. * wmi_bcn_tmpl_ml_params ml_bcn_param[]; <-- per-MLO-link beacon data
  11808. * wmi_bcn_tmpl_ml_params will have multiple instances equal to
  11809. * the number of links in an AP MLD
  11810. */
  11811. } wmi_bcn_tmpl_cmd_fixed_param;
  11812. #define WMI_CSA_EVENT_BMAP_VALID_MASK 0X80000000 /* Follow bitmap for sending the CSA switch count event */
  11813. #define WMI_CSA_EVENT_BMAP_SWITCH_COUNT_ZERO 0 /* Send only when the switch count becomes zero, added for backward compatibility
  11814. Same can also be achieved by setting bitmap to 0X80000001 */
  11815. #define WMI_CSA_EVENT_BMAP_ALL 0XFFFFFFFF /* Send CSA switch count event for every update to switch count */
  11816. #define WMI_CSC_EVENT_BMAP_VALID_MASK 0X80000000 /* Follow bitmap for sending the CSC switch count event */
  11817. #define WMI_CSC_EVENT_BMAP_SWITCH_COUNT_ZERO 0 /* Send only when the switch count becomes zero, added for backward compatibility
  11818. Same can also be achieved by setting bitmap to 0X80000001 */
  11819. #define WMI_CSC_EVENT_BMAP_ALL 0XFFFFFFFF /* Send CSC switch count event for every update to switch count */
  11820. #define WMI_BEACON_PROTECTION_BIT_POS 0 /* Beacon Protection enable/disable indication */
  11821. #define WMI_BEACON_PROTECTION_EN_SET(param, value) \
  11822. WMI_SET_BITS(param, WMI_BEACON_PROTECTION_BIT_POS, 1, value)
  11823. #define WMI_BEACON_PROTECTION_EN_GET(param) \
  11824. WMI_GET_BITS(param, WMI_BEACON_PROTECTION_BIT_POS, 1)
  11825. typedef struct {
  11826. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param */
  11827. /** unique id identifying the VDEV, generated by the caller */
  11828. A_UINT32 vdev_id;
  11829. /** beacon buffer length. data is in TLV data[] */
  11830. A_UINT32 buf_len;
  11831. /*
  11832. * The TLVs follows:
  11833. * wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
  11834. * A_UINT8 data[]; <-- Variable length data
  11835. */
  11836. } wmi_prb_tmpl_cmd_fixed_param;
  11837. typedef struct {
  11838. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fd_tmpl_cmd_fixed_param */
  11839. /** unique id identifying the VDEV, generated by the caller */
  11840. A_UINT32 vdev_id;
  11841. /** fd frame buffer length. data is in TLV data[] */
  11842. A_UINT32 buf_len;
  11843. /*
  11844. * The TLVs follows:
  11845. * A_UINT8 data[]; <-- Variable length data
  11846. */
  11847. } wmi_fd_tmpl_cmd_fixed_param;
  11848. typedef struct {
  11849. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */
  11850. A_UINT32 tlv_header;
  11851. /** unique id identifying the VDEV */
  11852. A_UINT32 vdev_id;
  11853. /** bcn tx status, values defined in enum WMI_FRAME_TX_STATUS */
  11854. A_UINT32 tx_status;
  11855. } wmi_offload_bcn_tx_status_event_fixed_param;
  11856. enum wmi_sta_ps_mode {
  11857. /** enable power save for the given STA VDEV */
  11858. WMI_STA_PS_MODE_DISABLED = 0,
  11859. /** disable power save for a given STA VDEV */
  11860. WMI_STA_PS_MODE_ENABLED = 1,
  11861. };
  11862. typedef struct {
  11863. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_mode_cmd_fixed_param */
  11864. /** unique id identifying the VDEV, generated by the caller */
  11865. A_UINT32 vdev_id;
  11866. /** Power save mode
  11867. *
  11868. * (see enum wmi_sta_ps_mode)
  11869. */
  11870. A_UINT32 sta_ps_mode;
  11871. } wmi_sta_powersave_mode_cmd_fixed_param;
  11872. typedef struct {
  11873. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_tdcc_config_cmd_fixed_param */
  11874. /** Set a max tx period: percentage of one beacon interval. range: 0 - 100 */
  11875. A_UINT32 tx_cycle_percentage;
  11876. /** Enable/disable TX Duty Cycle Control powersave */
  11877. A_UINT32 enabled;
  11878. } wmi_sta_tdcc_config_cmd_fixed_param;
  11879. enum wmi_csa_offload_en {
  11880. WMI_CSA_OFFLOAD_DISABLE = 0,
  11881. WMI_CSA_OFFLOAD_ENABLE = 1,
  11882. };
  11883. typedef struct {
  11884. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_enable_cmd_fixed_param */
  11885. A_UINT32 vdev_id;
  11886. A_UINT32 csa_offload_enable;
  11887. } wmi_csa_offload_enable_cmd_fixed_param;
  11888. typedef struct {
  11889. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_chanswitch_cmd_fixed_param */
  11890. A_UINT32 vdev_id;
  11891. /*
  11892. * The TLVs follows:
  11893. * wmi_channel chan;
  11894. */
  11895. } wmi_csa_offload_chanswitch_cmd_fixed_param;
  11896. /**
  11897. * This parameter controls the policy for retrieving frames from AP while the
  11898. * STA is in sleep state.
  11899. *
  11900. * Only takes affect if the sta_ps_mode is enabled
  11901. */
  11902. enum wmi_sta_ps_param_rx_wake_policy {
  11903. /* Wake up when ever there is an RX activity on the VDEV. In this mode
  11904. * the Power save SM(state machine) will come out of sleep by either
  11905. * sending null frame (or) a data frame (with PS==0) in response to TIM
  11906. * bit set in the received beacon frame from AP.
  11907. */
  11908. WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
  11909. /* Here the power save state machine will not wakeup in response to TIM
  11910. * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
  11911. * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
  11912. * access categories are delivery-enabled, the station will send a UAPSD
  11913. * trigger frame, otherwise it will send a PS-Poll.
  11914. */
  11915. WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
  11916. };
  11917. /** Number of tx frames/beacon that cause the power save SM to wake up.
  11918. *
  11919. * Value 1 causes the SM to wake up for every TX. Value 0 has a special
  11920. * meaning, It will cause the SM to never wake up. This is useful if you want
  11921. * to keep the system to sleep all the time for some kind of test mode . host
  11922. * can change this parameter any time. It will affect at the next tx frame.
  11923. */
  11924. enum wmi_sta_ps_param_tx_wake_threshold {
  11925. WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
  11926. WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
  11927. /* Values greater than one indicate that many TX attempts per beacon
  11928. * interval before the STA will wake up
  11929. */
  11930. };
  11931. /**
  11932. * The maximum number of PS-Poll frames the FW will send in response to
  11933. * traffic advertised in TIM before waking up (by sending a null frame with PS
  11934. * = 0). Value 0 has a special meaning: there is no maximum count and the FW
  11935. * will send as many PS-Poll as are necessary to retrieve buffered BU. This
  11936. * parameter is used when the RX wake policy is
  11937. * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
  11938. * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
  11939. */
  11940. enum wmi_sta_ps_param_pspoll_count {
  11941. WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
  11942. /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW
  11943. * will send before waking up.
  11944. */
  11945. };
  11946. /*
  11947. * This will include the delivery and trigger enabled state for every AC.
  11948. * This is the negotiated state with AP. The host MLME needs to set this based
  11949. * on AP capability and the state Set in the association request by the
  11950. * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
  11951. */
  11952. #define WMI_UAPSD_AC_TYPE_DELI 0
  11953. #define WMI_UAPSD_AC_TYPE_TRIG 1
  11954. #define WMI_UAPSD_AC_BIT_MASK(ac,type) \
  11955. ((type == WMI_UAPSD_AC_TYPE_DELI) ? \
  11956. (1 << (ac<<1)) : \
  11957. (1 << ((ac<<1)+1)))
  11958. enum wmi_sta_ps_param_uapsd {
  11959. WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  11960. WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  11961. WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  11962. WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  11963. WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  11964. WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  11965. WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  11966. WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  11967. };
  11968. enum wmi_sta_powersave_param {
  11969. /**
  11970. * Controls how frames are retrievd from AP while STA is sleeping
  11971. *
  11972. * (see enum wmi_sta_ps_param_rx_wake_policy)
  11973. */
  11974. WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
  11975. /**
  11976. * The STA will go active after this many TX
  11977. *
  11978. * (see enum wmi_sta_ps_param_tx_wake_threshold)
  11979. */
  11980. WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
  11981. /**
  11982. * Number of PS-Poll to send before STA wakes up
  11983. *
  11984. * (see enum wmi_sta_ps_param_pspoll_count)
  11985. *
  11986. */
  11987. WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
  11988. /**
  11989. * TX/RX inactivity time in msec before going to sleep.
  11990. *
  11991. * The power save SM will monitor tx/rx activity on the VDEV, if no
  11992. * activity for the specified msec of the parameter the Power save SM will
  11993. * go to sleep.
  11994. */
  11995. WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
  11996. /**
  11997. * Set uapsd configuration.
  11998. *
  11999. * (see enum wmi_sta_ps_param_uapsd)
  12000. */
  12001. WMI_STA_PS_PARAM_UAPSD = 4,
  12002. /**
  12003. * Number of PS-Poll to send before STA wakes up in QPower Mode
  12004. */
  12005. WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5,
  12006. /**
  12007. * Enable QPower
  12008. */
  12009. WMI_STA_PS_ENABLE_QPOWER = 6,
  12010. /**
  12011. * Number of TX frames before the entering the Active state
  12012. */
  12013. WMI_STA_PS_PARAM_QPOWER_MAX_TX_BEFORE_WAKE = 7,
  12014. /**
  12015. * QPower SPEC PSPOLL interval
  12016. */
  12017. WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL = 8,
  12018. /**
  12019. * Max SPEC PSPOLL to be sent when the PSPOLL response has
  12020. * no-data bit set
  12021. */
  12022. WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL = 9,
  12023. /**
  12024. * Max value of ITO reset when there is no tx-rx
  12025. * after AP has set the TIM bit
  12026. */
  12027. WMI_STA_PS_PARAM_MAX_RESET_ITO_COUNT_ON_TIM_NO_TXRX = 10,
  12028. /**
  12029. * Flag to enable/disable Powersave Optimization
  12030. * in WOW
  12031. */
  12032. WMI_STA_PS_PARAM_ENABLE_PS_OPT_IN_WOW = 11,
  12033. };
  12034. typedef struct {
  12035. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_param_cmd_fixed_param */
  12036. /** unique id identifying the VDEV, generated by the caller */
  12037. A_UINT32 vdev_id;
  12038. /** station power save parameter (see enum wmi_sta_powersave_param) */
  12039. A_UINT32 param;
  12040. A_UINT32 value;
  12041. } wmi_sta_powersave_param_cmd_fixed_param;
  12042. /** No MIMO power save */
  12043. #define WMI_STA_MIMO_PS_MODE_DISABLE
  12044. /** mimo powersave mode static*/
  12045. #define WMI_STA_MIMO_PS_MODE_STATIC
  12046. /** mimo powersave mode dynamic */
  12047. #define WMI_STA_MIMO_PS_MODE_DYNAMI
  12048. typedef struct {
  12049. /** unique id identifying the VDEV, generated by the caller */
  12050. A_UINT32 vdev_id;
  12051. /** mimo powersave mode as defined above */
  12052. A_UINT32 mimo_pwrsave_mode;
  12053. } wmi_sta_mimo_ps_mode_cmd;
  12054. /** U-APSD configuration of peer station from (re)assoc request and TSPECs */
  12055. enum wmi_ap_ps_param_uapsd {
  12056. WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  12057. WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  12058. WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  12059. WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  12060. WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  12061. WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  12062. WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  12063. WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  12064. };
  12065. /** U-APSD maximum service period of peer station */
  12066. enum wmi_ap_ps_peer_param_max_sp {
  12067. WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
  12068. WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
  12069. WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
  12070. WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
  12071. /* keep last! */
  12072. MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
  12073. };
  12074. /** param values for WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE */
  12075. enum wmi_ap_ps_param_sifs_resp_frmtype {
  12076. WMI_SIFS_RESP_PSPOLL = (1 << 0),
  12077. WMI_SIFS_RESP_UAPSD = (1 << 1),
  12078. WMI_SIFS_RESP_QBST_EXP = (1 << 2),
  12079. WMI_SIFS_RESP_QBST_DATA = (1 << 3),
  12080. WMI_SIFS_RESP_QBST_BAR = (1 << 4),
  12081. };
  12082. /**
  12083. * AP power save parameter
  12084. * Set a power save specific parameter for a peer station
  12085. */
  12086. enum wmi_ap_ps_peer_param {
  12087. /** Set uapsd configuration for a given peer.
  12088. *
  12089. * This will include the delivery and trigger enabled state for every AC.
  12090. * The host MLME needs to set this based on AP capability and stations
  12091. * request Set in the association request received from the station.
  12092. *
  12093. * Lower 8 bits of the value specify the UAPSD configuration.
  12094. *
  12095. * (see enum wmi_ap_ps_param_uapsd)
  12096. * The default value is 0.
  12097. */
  12098. WMI_AP_PS_PEER_PARAM_UAPSD = 0,
  12099. /**
  12100. * Set the service period for a UAPSD capable station
  12101. *
  12102. * The service period from wme ie in the (re)assoc request frame.
  12103. *
  12104. * (see enum wmi_ap_ps_peer_param_max_sp)
  12105. */
  12106. WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
  12107. /** Time in seconds for aging out buffered frames for STA in power save */
  12108. WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
  12109. /**
  12110. * Specify frame types that are considered SIFS RESP trigger frame
  12111. * (see enum wmi_ap_ps_param_sifs_resp_frmtype)
  12112. */
  12113. WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
  12114. /** Specifies the trigger state of TID. Valid only for UAPSD frame type */
  12115. WMI_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
  12116. /** Specifies the WNM sleep state of a STA */
  12117. WMI_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
  12118. };
  12119. typedef struct {
  12120. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_ps_peer_cmd_fixed_param */
  12121. /** unique id identifying the VDEV, generated by the caller */
  12122. A_UINT32 vdev_id;
  12123. /** peer MAC address */
  12124. wmi_mac_addr peer_macaddr;
  12125. /** AP powersave param (see enum wmi_ap_ps_peer_param) */
  12126. A_UINT32 param;
  12127. /** AP powersave param value (see defines) */
  12128. A_UINT32 value;
  12129. } wmi_ap_ps_peer_cmd_fixed_param;
  12130. /** Configure peer station 11v U-APSD coexistance
  12131. *
  12132. * Two parameters from uaspd coexistence ie info (as specified in 11v) are
  12133. * sent down to FW along with this command.
  12134. *
  12135. * The semantics of these fields are described in the following text extracted
  12136. * from 802.11v.
  12137. *
  12138. * --- If the non-AP STA specified a non-zero TSF 0 Offset value in the
  12139. * U-APSD Coexistence element, the AP should not transmit frames to the
  12140. * non-AP STA outside of the U-APSD Coexistence Service Period, which
  12141. * begins when the AP receives the U-APSD trigger frame and ends after
  12142. * the transmission period specified by the result of the following
  12143. * calculation:
  12144. *
  12145. * End of transmission period = T + (Interval . ((T . TSF 0 Offset) mod Interval))
  12146. *
  12147. * Where T is the time the U-APSD trigger frame was received at the AP
  12148. * Interval is the UAPSD Coexistence element Duration/Interval field
  12149. * value (see 7.3.2.91) or upon the successful transmission of a frame
  12150. * with EOSP bit set to 1, whichever is earlier.
  12151. *
  12152. *
  12153. * --- If the non-AP STA specified a zero TSF 0 Offset value in the U-APSD
  12154. * Coexistence element, the AP should not transmit frames to the non-AP
  12155. * STA outside of the U-APSD Coexistence Service Period, which begins
  12156. * when the AP receives a U-APSD trigger frame and ends after the
  12157. * transmission period specified by the result of the following
  12158. * calculation: End of transmission period = T + Duration
  12159. */
  12160. typedef struct {
  12161. /** unique id identifying the VDEV, generated by the caller */
  12162. A_UINT32 vdev_id;
  12163. /** peer MAC address */
  12164. wmi_mac_addr peer_macaddr;
  12165. /** Enable U-APSD coexistence support for this peer
  12166. *
  12167. * 0 -> disabled (default)
  12168. * 1 -> enabled
  12169. */
  12170. A_UINT32 enabled;
  12171. /** Duration/Interval as defined by 11v U-ASPD coexistance */
  12172. A_UINT32 duration_interval;
  12173. /** Upper 32 bits of 64-bit TSF offset */
  12174. A_UINT32 tsf_offset_high;
  12175. /** Lower 32 bits of 64-bit TSF offset */
  12176. A_UINT32 tsf_offset_low;
  12177. } wmi_ap_powersave_peer_uapsd_coex_cmd;
  12178. typedef enum {
  12179. WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION = 0x0001,
  12180. WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE = 0x0002,
  12181. WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY = 0x0004,
  12182. WMI_AP_PS_EGAP_FLAG_MAX = 0x8000
  12183. } wmi_ap_ps_egap_flag_type;
  12184. #define WMI_EGAP_GET_REDUCED_2G_TX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 0, 8)
  12185. #define WMI_EGAP_GET_REDUCED_2G_RX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 8, 8)
  12186. #define WMI_EGAP_GET_REDUCED_5G_TX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 16, 8)
  12187. #define WMI_EGAP_GET_REDUCED_5G_RX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 24, 8)
  12188. #define WMI_EGAP_SET_REDUCED_2G_TX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 0, 8, val)
  12189. #define WMI_EGAP_SET_REDUCED_2G_RX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 8, 8, val)
  12190. #define WMI_EGAP_SET_REDUCED_5G_TX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 16, 8, val)
  12191. #define WMI_EGAP_SET_REDUCED_5G_RX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 24, 8, val)
  12192. /**
  12193. * configure enhanced green ap parameters
  12194. */
  12195. typedef struct {
  12196. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param */
  12197. /** Enable enhanced green ap
  12198. * 0 -> disabled
  12199. * 1 -> enabled
  12200. */
  12201. A_UINT32 enable;
  12202. /** The param indicates a duration that all STAs connected
  12203. * to S-AP have no traffic.
  12204. */
  12205. A_UINT32 inactivity_time; /* in unit of milliseconds */
  12206. /** The param indicates a duration that all STAs connected
  12207. * to S-AP have no traffic, after all STAs have entered powersave.
  12208. */
  12209. A_UINT32 wait_time; /* in unit of milliseconds */
  12210. /** The param is used to turn on/off some functions within E-GAP.
  12211. */
  12212. A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */
  12213. /** Reduced_txrx_chainmask
  12214. * [7:0] - 2G band tx chain mask
  12215. * [15:8] - 2G band rx chain mask
  12216. * [23:16] - 5G band tx chain mask
  12217. * [31:24] - 5G band rx chain mask
  12218. */
  12219. A_UINT32 reduced_txrx_chainmask;
  12220. } wmi_ap_ps_egap_param_cmd_fixed_param;
  12221. typedef enum {
  12222. WMI_AP_PS_EGAP_STATUS_IDLE = 1,
  12223. WMI_AP_PS_EGAP_STATUS_PWRSAVE_OFF = 2,
  12224. WMI_AP_PS_EGAP_STATUS_PWRSAVE_ON = 3,
  12225. WMI_AP_PS_EGAP_STATUS_MAX = 15
  12226. } wmi_ap_ps_egap_status_type;
  12227. /**
  12228. * send ehanced green ap status to host
  12229. */
  12230. typedef struct
  12231. {
  12232. /** TLV tag and len; tag equals
  12233. * WMITLV_TAG_STRUC_wmi_ap_ps_egap_info_chainmask_list */
  12234. A_UINT32 tlv_header;
  12235. union {
  12236. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  12237. /** pdev_id for identifying the MAC
  12238. * See macros starting with WMI_PDEV_ID_ for values.
  12239. */
  12240. A_UINT32 pdev_id;
  12241. };
  12242. /** The param indicates the current tx chainmask with the mac id. */
  12243. A_UINT32 tx_chainmask;
  12244. /** The param indicates the current rx chainmask with the mac id. */
  12245. A_UINT32 rx_chainmask;
  12246. } wmi_ap_ps_egap_info_chainmask_list;
  12247. typedef struct {
  12248. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param */
  12249. /** Enhanced green ap status (WMI_AP_PS_EGAP_STATUS). */
  12250. A_UINT32 status;
  12251. /* This TLV is followed by
  12252. * wmi_ap_ps_egap_info_chainmask_list chainmask_list[];
  12253. */
  12254. } wmi_ap_ps_egap_info_event_fixed_param;
  12255. /* 128 clients = 4 words */
  12256. /* WMI_TIM_BITMAP_ARRAY_SIZE can't be modified without breaking the compatibility */
  12257. #define WMI_TIM_BITMAP_ARRAY_SIZE 4
  12258. typedef struct {
  12259. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
  12260. /** TIM bitmap len (in bytes) */
  12261. A_UINT32 tim_len;
  12262. /** TIM Partial Virtual Bitmap */
  12263. A_UINT32 tim_mcast;
  12264. A_UINT32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
  12265. A_UINT32 tim_changed;
  12266. A_UINT32 tim_num_ps_pending;
  12267. /** Use the vdev_id only if vdev_id_valid is set */
  12268. A_UINT32 vdev_id_valid;
  12269. /** unique id identifying the VDEV */
  12270. A_UINT32 vdev_id;
  12271. } wmi_tim_info;
  12272. typedef struct {
  12273. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
  12274. /** TIM Partial Virtual Bitmap */
  12275. A_UINT32 tim_mcast;
  12276. A_UINT32 tim_changed;
  12277. A_UINT32 tim_num_ps_pending;
  12278. /** Use the vdev_id only if vdev_id_valid is set */
  12279. A_UINT32 vdev_id_valid;
  12280. /** unique id identifying the VDEV */
  12281. A_UINT32 vdev_id;
  12282. /** TIM bitmap len (in bytes) */
  12283. A_UINT32 tim_len;
  12284. /* followed by WMITLV_TAG_ARRAY_BYTE holding the TIM bitmap */
  12285. } wmi_tim_info_v2;
  12286. typedef struct {
  12287. /** Flag to enable quiet period IE support */
  12288. A_UINT32 is_enabled;
  12289. /** Quiet start */
  12290. A_UINT32 tbttcount;
  12291. /** Beacon intervals between quiets*/
  12292. A_UINT32 period;
  12293. /** TUs of each quiet*/
  12294. A_UINT32 duration;
  12295. /** TUs of from TBTT of quiet start*/
  12296. A_UINT32 offset;
  12297. } wmi_quiet_info;
  12298. /* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */
  12299. #define WMI_P2P_MAX_NOA_DESCRIPTORS 4 /* Maximum number of NOA Descriptors supported */
  12300. typedef struct {
  12301. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info */
  12302. /** Bit 0: Flag to indicate an update in NOA schedule
  12303. * Bits 7-1: Reserved
  12304. * Bits 15-8: Index (identifies the instance of NOA sub element)
  12305. * Bit 16: Opp PS state of the AP
  12306. * Bits 23-17: Ctwindow in TUs
  12307. * Bits 31-24: Number of NOA descriptors
  12308. */
  12309. A_UINT32 noa_attributes;
  12310. wmi_p2p_noa_descriptor noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
  12311. /** Use the vdev_id only if vdev_id_valid is set */
  12312. A_UINT32 vdev_id_valid;
  12313. /** unique id identifying the VDEV */
  12314. A_UINT32 vdev_id;
  12315. } wmi_p2p_noa_info;
  12316. typedef struct {
  12317. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_quiet_offload_info */
  12318. A_UINT32 vdev_id; /* unique id identifying the VDEV */
  12319. A_UINT8 tbttcount; /* quiet start */
  12320. A_UINT8 period; /* beacon intervals between quiets */
  12321. A_UINT16 duration; /* TUs of each quiet */
  12322. A_UINT16 offset; /* TUs of from TBTT of quiet start */
  12323. } wmi_quiet_offload_info;
  12324. #define WMI_UNIFIED_NOA_ATTR_MODIFIED 0x1
  12325. #define WMI_UNIFIED_NOA_ATTR_MODIFIED_S 0
  12326. #define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr) \
  12327. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED)
  12328. #define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr) \
  12329. WMI_F_RMW((hdr)->noa_attributes, 0x1, \
  12330. WMI_UNIFIED_NOA_ATTR_MODIFIED);
  12331. #define WMI_UNIFIED_NOA_ATTR_INDEX 0xff00
  12332. #define WMI_UNIFIED_NOA_ATTR_INDEX_S 8
  12333. #define WMI_UNIFIED_NOA_ATTR_INDEX_GET(hdr) \
  12334. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_INDEX)
  12335. #define WMI_UNIFIED_NOA_ATTR_INDEX_SET(hdr, v) \
  12336. WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
  12337. WMI_UNIFIED_NOA_ATTR_INDEX);
  12338. #define WMI_UNIFIED_NOA_ATTR_OPP_PS 0x10000
  12339. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_S 16
  12340. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(hdr) \
  12341. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_OPP_PS)
  12342. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_SET(hdr) \
  12343. WMI_F_RMW((hdr)->noa_attributes, 0x1, \
  12344. WMI_UNIFIED_NOA_ATTR_OPP_PS);
  12345. #define WMI_UNIFIED_NOA_ATTR_CTWIN 0xfe0000
  12346. #define WMI_UNIFIED_NOA_ATTR_CTWIN_S 17
  12347. #define WMI_UNIFIED_NOA_ATTR_CTWIN_GET(hdr) \
  12348. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_CTWIN)
  12349. #define WMI_UNIFIED_NOA_ATTR_CTWIN_SET(hdr, v) \
  12350. WMI_F_RMW((hdr)->noa_attributes, (v) & 0x7f, \
  12351. WMI_UNIFIED_NOA_ATTR_CTWIN);
  12352. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC 0xff000000
  12353. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_S 24
  12354. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(hdr) \
  12355. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_NUM_DESC)
  12356. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v) \
  12357. WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
  12358. WMI_UNIFIED_NOA_ATTR_NUM_DESC);
  12359. typedef struct {
  12360. /** TIM info */
  12361. wmi_tim_info tim_info;
  12362. /** P2P NOA info */
  12363. wmi_p2p_noa_info p2p_noa_info;
  12364. /* TBD: More info elements to be added later */
  12365. } wmi_bcn_info;
  12366. typedef struct {
  12367. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param */
  12368. /** bitmap identifying the VDEVs, generated by the caller */
  12369. A_UINT32 vdev_map;
  12370. /** how many vdev's info is included in this message
  12371. * If this field is zero, then the number of vdevs is specified by
  12372. * the number of bits set in the vdev_map bitmap.
  12373. */
  12374. A_UINT32 num_vdevs;
  12375. /* This TLV is followed by tim_info and p2p_noa_info for each vdev:
  12376. * wmi_tim_info tim_info[];
  12377. * wmi_p2p_noa_info p2p_noa_info[];
  12378. * wmi_quiet_offload_info quiet_offload_info[0/1];
  12379. *
  12380. */
  12381. } wmi_host_swba_event_fixed_param;
  12382. #define WMI_MAX_AP_VDEV 16
  12383. typedef struct {
  12384. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swfda_event_fixed_param */
  12385. /** vdev_id identifying the VDEV for which FILS should be generated */
  12386. A_UINT32 vdev_id;
  12387. /** time (in TU) at which current FILS Discovery frame is scheduled for Tx */
  12388. A_UINT32 fils_tt;
  12389. /** next TBTT time (in TU) for this vdev */
  12390. A_UINT32 tbtt;
  12391. } wmi_host_swfda_event_fixed_param;
  12392. typedef struct {
  12393. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param */
  12394. /** bimtap of VDEVs that has tbtt offset updated */
  12395. A_UINT32 vdev_map;
  12396. /* The TLVs for tbttoffset_list, tbtt_qtime_low_us_list, and
  12397. * tbtt_qtime_high_us_list will follow this TLV.
  12398. * - tbtt offset list in the order of the LSb to MSb in the vdev_map bitmap
  12399. * A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV];
  12400. * - tbtt qtime_low_us list(Lower 32 bit of qtime us) in the order of the
  12401. * LSb to MSb in the vdev_map bitmap
  12402. * A_UINT32 tbtt_qtime_low_us_list[WMI_MAX_AP_VDEV];
  12403. * - tbtt qtime_high_us list(Higher 32 bit of qtime us) in the order of the
  12404. * LSb to MSb in the vdev_map bitmap
  12405. * A_UINT32 tbtt_qtime_high_us_list[WMI_MAX_AP_VDEV];
  12406. */
  12407. } wmi_tbtt_offset_event_fixed_param;
  12408. #define WMI_TBTT_OFFSET_INVALID 0xffffffff /* tbttoffset is not updated by FW */
  12409. typedef struct {
  12410. A_UINT32 tlv_header;/* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_info */
  12411. /** unique id identifying the VDEV */
  12412. A_UINT32 vdev_id;
  12413. /** tbttoffset in TUs */
  12414. A_UINT32 tbttoffset;
  12415. /** absolute tbtt time in qtime us */
  12416. A_UINT32 tbtt_qtime_low_us; /* bits 31:0 of qtime */
  12417. A_UINT32 tbtt_qtime_high_us; /* bits 63:32 of qtime */
  12418. } wmi_tbtt_offset_info;
  12419. /** Use this event if number of vdevs > 32 */
  12420. typedef struct {
  12421. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_ext_event_fixed_param */
  12422. A_UINT32 num_vdevs;
  12423. /*
  12424. * The TLVs for tbttoffset will follow this TLV.
  12425. * Of size num_vdevs * wmi_tbtt_offset_info
  12426. */
  12427. } wmi_tbtt_offset_ext_event_fixed_param;
  12428. /* Peer Specific commands and events */
  12429. typedef struct {
  12430. A_UINT32 percentage; /* in unit of 12.5% */
  12431. A_UINT32 min_delta; /* in unit of Mbps */
  12432. } rate_delta_t;
  12433. #define PEER_RATE_REPORT_COND_FLAG_DELTA 0x01
  12434. #define PEER_RATE_REPORT_COND_FLAG_THRESHOLD 0x02
  12435. #define MAX_NUM_OF_RATE_THRESH 4
  12436. typedef struct {
  12437. A_UINT32 val_cond_flags; /* PEER_RATE_REPORT_COND_FLAG_DELTA, PEER_RATE_REPORT_COND_FLAG_THRESHOLD
  12438. Any of these two conditions or both of them can be set. */
  12439. rate_delta_t rate_delta;
  12440. A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH]; /* In unit of Mbps. There are at most 4 thresholds.
  12441. If the threshold count is less than 4, set zero to
  12442. the one following the last threshold */
  12443. } report_cond_per_phy_t;
  12444. enum peer_rate_report_cond_phy_type {
  12445. PEER_RATE_REPORT_COND_11B = 0,
  12446. PEER_RATE_REPORT_COND_11A_G,
  12447. PEER_RATE_REPORT_COND_11N,
  12448. PEER_RATE_REPORT_COND_11AC,
  12449. PEER_RATE_REPORT_COND_MAX_NUM
  12450. };
  12451. typedef struct {
  12452. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_rate_report_condtion_fixed_param */
  12453. A_UINT32 enable_rate_report; /* 1= enable, 0=disable */
  12454. A_UINT32 report_backoff_time; /* in unit of msecond */
  12455. A_UINT32 report_timer_period; /* in unit of msecond */
  12456. /* In the following field, the array index means the phy type,
  12457. * please see enum peer_rate_report_cond_phy_type for detail */
  12458. report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM];
  12459. } wmi_peer_set_rate_report_condition_fixed_param;
  12460. /* Peer Type:
  12461. * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based
  12462. * on address and vdev opmode. This is largely here to allow host to indicate that
  12463. * peer is explicitly a TDLS peer
  12464. */
  12465. enum wmi_peer_type {
  12466. WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */
  12467. WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */
  12468. WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */
  12469. WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */
  12470. WMI_PEER_TYPE_NAN_DATA = 4, /* Peer is NAN DATA */
  12471. WMI_PEER_TYPE_TRANS_BSS = 5, /* For creating BSS peer when connecting with non-transmit AP */
  12472. WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type is assigned up to 127 */
  12473. /* Reserved from 128 - 255 for target internal use.*/
  12474. WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */
  12475. };
  12476. /* this TLV structure used for providing mlo parameters on peer create */
  12477. typedef struct {
  12478. A_UINT32 tlv_header; /** TLV tag and len */
  12479. wmi_mlo_flags mlo_flags; /* only mlo enable flag need by STA mode peer create */
  12480. } wmi_peer_create_mlo_params;
  12481. typedef struct {
  12482. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */
  12483. /** unique id identifying the VDEV, generated by the caller */
  12484. A_UINT32 vdev_id;
  12485. /** peer MAC address */
  12486. wmi_mac_addr peer_macaddr;
  12487. /** peer type: see enum values above */
  12488. A_UINT32 peer_type;
  12489. /* The TLVs follows this structure:
  12490. * wmi_peer_create_mlo_params mlo_params[]; <-- MLO flags on peer_create
  12491. * Optional TLV, only present for MLO peers.
  12492. * If the peer is non-MLO, the array length should be 0.
  12493. * Only mlo_enable flag required by MCC to decide MAC address to be used.
  12494. */
  12495. } wmi_peer_create_cmd_fixed_param;
  12496. typedef struct {
  12497. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */
  12498. /** unique id identifying the VDEV, generated by the caller */
  12499. A_UINT32 vdev_id;
  12500. /** peer MAC address */
  12501. wmi_mac_addr peer_macaddr;
  12502. } wmi_peer_delete_cmd_fixed_param;
  12503. typedef struct {
  12504. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delete_all_peer_cmd_fixed_param */
  12505. /** unique id identifying the VDEV, generated by the caller */
  12506. A_UINT32 vdev_id;
  12507. } wmi_vdev_delete_all_peer_cmd_fixed_param;
  12508. typedef struct {
  12509. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_unmap_response_cmd_fixed_param */
  12510. A_UINT32 tlv_header;
  12511. /*
  12512. * Following this struct is the TLV:
  12513. * A_UINT32 peer_ids[]; <-- variable-length array of peer_ids
  12514. * that have been unmapped by the host
  12515. */
  12516. } wmi_peer_unmap_response_cmd_fixed_param;
  12517. typedef struct {
  12518. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_rx_blocksize_cmd_fixed_param */
  12519. /** unique id identifying the VDEV, generated by the caller */
  12520. A_UINT32 vdev_id;
  12521. /** peer MAC address */
  12522. wmi_mac_addr peer_macaddr;
  12523. /**
  12524. * maximum block ack window size to use during a rx block ack negotiation,
  12525. * i.e. the maximum number of MPDUs per A-MPDU that will be received
  12526. */
  12527. A_UINT32 rx_block_ack_win_limit;
  12528. } wmi_peer_set_rx_blocksize_cmd_fixed_param;
  12529. typedef struct {
  12530. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param */
  12531. /** unique id identifying the VDEV, generated by the caller */
  12532. A_UINT32 vdev_id;
  12533. /** peer MAC address */
  12534. wmi_mac_addr peer_macaddr;
  12535. /** tid bitmap identifying the tids to flush */
  12536. A_UINT32 peer_tid_bitmap;
  12537. } wmi_peer_flush_tids_cmd_fixed_param;
  12538. typedef struct {
  12539. /** rate mode . 0: disable fixed rate (auto rate)
  12540. * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
  12541. * 2: ht20 11n rate specified as mcs index
  12542. * 3: ht40 11n rate specified as mcs index
  12543. */
  12544. A_UINT32 rate_mode;
  12545. /** 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
  12546. * and series 3 is stored at byte 3 (MSB) */
  12547. A_UINT32 rate_series;
  12548. /** 4 retry counts for 4 rate series. retry count for rate 0 is stored in byte 0 (LSB)
  12549. * and retry count for rate 3 is stored at byte 3 (MSB) */
  12550. A_UINT32 rate_retries;
  12551. } wmi_fixed_rate;
  12552. typedef struct {
  12553. /** unique id identifying the VDEV, generated by the caller */
  12554. A_UINT32 vdev_id;
  12555. /** peer MAC address */
  12556. wmi_mac_addr peer_macaddr;
  12557. /** fixed rate */
  12558. wmi_fixed_rate peer_fixed_rate;
  12559. } wmi_peer_fixed_rate_cmd;
  12560. #define WMI_MGMT_TID 17
  12561. typedef struct {
  12562. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_clear_resp_cmd_fixed_param */
  12563. /** unique id identifying the VDEV, generated by the caller */
  12564. A_UINT32 vdev_id;
  12565. /** peer MAC address */
  12566. wmi_mac_addr peer_macaddr;
  12567. } wmi_addba_clear_resp_cmd_fixed_param;
  12568. typedef struct {
  12569. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param */
  12570. /** unique id identifying the VDEV, generated by the caller */
  12571. A_UINT32 vdev_id;
  12572. /** peer MAC address */
  12573. wmi_mac_addr peer_macaddr;
  12574. /** Tid number */
  12575. A_UINT32 tid;
  12576. /** Buffer/Window size*/
  12577. A_UINT32 buffersize;
  12578. } wmi_addba_send_cmd_fixed_param;
  12579. typedef struct {
  12580. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param */
  12581. /** unique id identifying the VDEV, generated by the caller */
  12582. A_UINT32 vdev_id;
  12583. /** peer MAC address */
  12584. wmi_mac_addr peer_macaddr;
  12585. /** Tid number */
  12586. A_UINT32 tid;
  12587. /** Is Initiator */
  12588. A_UINT32 initiator;
  12589. /** Reason code */
  12590. A_UINT32 reasoncode;
  12591. } wmi_delba_send_cmd_fixed_param;
  12592. typedef struct {
  12593. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_setresponse_cmd_fixed_param */
  12594. /** unique id identifying the vdev, generated by the caller */
  12595. A_UINT32 vdev_id;
  12596. /** peer mac address */
  12597. wmi_mac_addr peer_macaddr;
  12598. /** Tid number */
  12599. A_UINT32 tid;
  12600. /** status code */
  12601. A_UINT32 statuscode;
  12602. } wmi_addba_setresponse_cmd_fixed_param;
  12603. typedef struct {
  12604. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_send_singleamsdu_cmd_fixed_param */
  12605. /** unique id identifying the vdev, generated by the caller */
  12606. A_UINT32 vdev_id;
  12607. /** peer mac address */
  12608. wmi_mac_addr peer_macaddr;
  12609. /** Tid number */
  12610. A_UINT32 tid;
  12611. } wmi_send_singleamsdu_cmd_fixed_param;
  12612. /* Type of Station DTIM Power Save method */
  12613. enum {
  12614. /* For NORMAL DTIM, the parameter is the number of beacon intervals and
  12615. * also the same value as the listen interval. For this method, the
  12616. * station will wake up based on the listen interval. If this
  12617. * listen interval is not equal to DTIM, then the station may
  12618. * miss certain DTIM beacons. If this value is 1, then the
  12619. * station will wake up for every beacon.
  12620. */
  12621. WMI_STA_DTIM_PS_NORMAL_DTIM = 0x01,
  12622. /* For MODULATED_DTIM, parameter is a multiple of DTIM beacons to skip.
  12623. * When this value is 1, then the station will wake at every DTIM beacon.
  12624. * If this value is >1, then the station will skip certain DTIM beacons.
  12625. * This value is the multiple of DTIM intervals that the station will
  12626. * wake up to receive the DTIM beacons.
  12627. */
  12628. WMI_STA_DTIM_PS_MODULATED_DTIM = 0x02,
  12629. };
  12630. /* Parameter structure for the WMI_STA_DTIM_PS_METHOD_CMDID */
  12631. typedef struct {
  12632. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_dtim_ps_method_cmd_fixed_param */
  12633. /** unique id identifying the VDEV, generated by the caller */
  12634. A_UINT32 vdev_id;
  12635. /** Station DTIM Power Save method as defined above */
  12636. A_UINT32 dtim_pwrsave_method;
  12637. /** DTIM PS value. Contents depends on the method */
  12638. A_UINT32 value;
  12639. /** Modulated DTIM value */
  12640. A_UINT32 MaxLIModulatedDTIM;
  12641. } wmi_sta_dtim_ps_method_cmd_fixed_param;
  12642. /*
  12643. * For Station UAPSD Auto Trigger feature, the Firmware monitors the
  12644. * uAPSD uplink and downlink traffic for each uAPSD enabled WMM ACs.
  12645. * If there is no uplink/download for the specified service interval (field service_interval),
  12646. * firmware will auto generate a QOS-NULL trigger for that WMM-AP with the TID value
  12647. * specified in the UP (field user_priority).
  12648. * Firmware also monitors the responses for these QOS-NULL triggers.
  12649. * If the peer does not have any delivery frames, it will respond with
  12650. * QOS-NULL (EOSP=1). This feature of only using service interval is assumed to be mandatory for all
  12651. * firmware implementation. For this basic implementation, the suspend_interval and delay_interval
  12652. * are unused and should be set to 0.
  12653. * When service_interval is 0, then the firmware will not send any trigger frames. This is for
  12654. * certain host-based implementations that don't want this firmware offload.
  12655. * Note that the per-AC intervals are required for some usage scenarios. This is why the intervals
  12656. * are given in the array of ac_param[]. For example, Voice service interval may defaults to 20 ms
  12657. * and rest of the AC default to 300 ms.
  12658. *
  12659. * The service bit, WMI_STA_UAPSD_VAR_AUTO_TRIG, will indicate that the more advanced feature
  12660. * of variable auto trigger is supported. The suspend_interval and delay_interval is used in
  12661. * the more advanced monitoring method.
  12662. * If the PEER does not have any delivery enabled data frames (non QOS-NULL) for the
  12663. * suspend interval (field suspend_interval), firmware will change its auto trigger interval
  12664. * to delay interval (field delay_interval). This way, when there is no traffic, the station
  12665. * will save more power by waking up less and sending less trigger frames.
  12666. * The (service_interval < suspend_interval) and (service_interval < delay_interval).
  12667. * If this variable auto trigger is not required, then the suspend_interval and delay_interval
  12668. * should be 0.
  12669. */
  12670. typedef struct {
  12671. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_param */
  12672. /** WMM Access category from 0 to 3 */
  12673. A_UINT32 wmm_ac;
  12674. /** User priority to use in trigger frames. It is the TID
  12675. * value. This field needs to be specified and may not be
  12676. * equivalent to AC since some implementation may use the TSPEC
  12677. * to enable UAPSD and negotiate a particular user priority. */
  12678. A_UINT32 user_priority;
  12679. /** service interval in ms */
  12680. A_UINT32 service_interval;
  12681. /** Suspend interval in ms */
  12682. A_UINT32 suspend_interval;
  12683. /** delay interval in ms */
  12684. A_UINT32 delay_interval;
  12685. } wmi_sta_uapsd_auto_trig_param;
  12686. typedef struct {
  12687. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_cmd_fixed_param */
  12688. /** unique id identifying the VDEV, generated by the caller */
  12689. A_UINT32 vdev_id;
  12690. /** peer mac address */
  12691. wmi_mac_addr peer_macaddr;
  12692. /** Number of AC to specify */
  12693. A_UINT32 num_ac;
  12694. /*
  12695. * Following this struc is the TLV:
  12696. * wmi_sta_uapsd_auto_trig_param ac_param[]; <-- Variable number of AC parameters (defined by field num_ac)
  12697. */
  12698. } wmi_sta_uapsd_auto_trig_cmd_fixed_param;
  12699. /** mimo powersave state */
  12700. #define WMI_PEER_MIMO_PS_STATE 0x1
  12701. /** enable/disable AMPDU . initial value (enabled) */
  12702. #define WMI_PEER_AMPDU 0x2
  12703. /** authorize/unauthorize peer. initial value is unauthorized (0) */
  12704. #define WMI_PEER_AUTHORIZE 0x3
  12705. /** peer channel bandwidth */
  12706. #define WMI_PEER_CHWIDTH 0x4
  12707. /** peer NSS */
  12708. #define WMI_PEER_NSS 0x5
  12709. /** USE 4 ADDR */
  12710. #define WMI_PEER_USE_4ADDR 0x6
  12711. /* set group membership status */
  12712. #define WMI_PEER_MEMBERSHIP 0x7
  12713. #define WMI_PEER_USERPOS 0x8
  12714. /*
  12715. * A critical high-level protocol is being used with this peer. Target
  12716. * should take appropriate measures (if possible) to ensure more
  12717. * reliable link with minimal latency. This *may* include modifying the
  12718. * station power save policy, enabling more RX chains, increased
  12719. * priority of channel scheduling, etc.
  12720. *
  12721. * NOTE: This parameter should only be considered a hint as specific
  12722. * behavior will depend on many factors including current network load
  12723. * and vdev/peer configuration.
  12724. *
  12725. * For STA VDEV this peer corresponds to the AP's BSS peer.
  12726. * For AP VDEV this peer corresponds to the remote peer STA.
  12727. */
  12728. #define WMI_PEER_CRIT_PROTO_HINT_ENABLED 0x9
  12729. /* set Tx failure count threshold for the peer - Currently unused */
  12730. #define WMI_PEER_TX_FAIL_CNT_THR 0xA
  12731. /* Enable H/W retry and Enable H/W Send CTS2S before Data */
  12732. #define WMI_PEER_SET_HW_RETRY_CTS2S 0xB
  12733. /* Set peer advertised IBSS atim window length */
  12734. #define WMI_PEER_IBSS_ATIM_WINDOW_LENGTH 0xC
  12735. /** peer phy mode */
  12736. #define WMI_PEER_PHYMODE 0xD
  12737. /** Use FIXED Pwr */
  12738. #define WMI_PEER_USE_FIXED_PWR 0xE
  12739. /** Set peer fixed rate
  12740. * The top nibble is used to select which format to use for encoding
  12741. * the rate specification: 0xVXXXXXXX
  12742. * If V == 0b0000: format is same as before: 0x000000RR
  12743. * If V == 0b0001: format is: 0x1000RRRR.
  12744. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  12745. * The host shall use the new V1 format (and set V = 0x1) if the target
  12746. * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
  12747. * system is configured with Nss > 4 (either at compile time within the
  12748. * host driver, or through WMI_SERVICE_READY PHY capabilities provided
  12749. * by the target).
  12750. */
  12751. #define WMI_PEER_PARAM_FIXED_RATE 0xF
  12752. /** Whitelist peer TIDs */
  12753. #define WMI_PEER_SET_MU_WHITELIST 0x10
  12754. /** Set peer max tx rate (MCS) in adaptive rate ctrl */
  12755. #define WMI_PEER_SET_MAX_TX_RATE 0x11
  12756. /** Set peer minimal tx rate (MCS) in adaptive rate ctrl */
  12757. #define WMI_PEER_SET_MIN_TX_RATE 0x12
  12758. /**
  12759. * default ring routing for peer data packets,
  12760. * param_value = bit 0 for hash based routing enabled or not
  12761. * (value 1 is enabled, value 0 is disabled)
  12762. * bits 1:5 are for ring 32 (i.e. ring id value
  12763. * selected from 0 to 31 values)
  12764. * bit 8 for peer based ring selection enabled or not
  12765. * (value 1 is enabled, value 0 is disabled
  12766. * bits 9-15 are valid when bit 8 is set to 1)
  12767. * bit 9 is for ring selection enabled for filter-pass
  12768. * unicast or not (value 1 is enabled, value 0 is disabled)
  12769. * bit 10 is for ring selection enabled for filter-pass
  12770. * mcast or not (value 1 is enabled, value 0 is disabled)
  12771. * bit 11 is for ring selection enabled for filter-pass
  12772. * BAR or not (value 1 is enabled, value 0 is disabled)
  12773. * bit 12-13 is for source ring selection value
  12774. * (value 0 for wbm2rxdma buf ring,
  12775. * value 1 for fw2rxdma buf ring,
  12776. * value 2 for sw2rxdma buf ring,
  12777. * value 3 for no buf ring)
  12778. * bit 14-15 is for destination ring selection value
  12779. * (value 0 for wbm release ring,
  12780. * value 1 for rxdma2fw ring,
  12781. * value 2 for rxdma2sw ring,
  12782. * value 3 for rxdma2reo ring)
  12783. */
  12784. #define WMI_PEER_SET_DEFAULT_ROUTING 0x13
  12785. /* peer NSS for VHT160 - Extended NSS support */
  12786. #define WMI_PEER_NSS_VHT160 0x14
  12787. /* peer NSS for VHT160 - Extended NSS support */
  12788. #define WMI_PEER_NSS_VHT80_80 0x15
  12789. /* Peer SU TXBF sounding interval */
  12790. #define WMI_PEER_PARAM_SU_TXBF_SOUNDING_INTERVAL 0x16
  12791. /* Peer MU TXBF sounding interval */
  12792. #define WMI_PEER_PARAM_MU_TXBF_SOUNDING_INTERVAL 0x17
  12793. /* Peer TXBF sounding enable or disable */
  12794. #define WMI_PEER_PARAM_TXBF_SOUNDING_ENABLE 0x18
  12795. /* Per peer 11ax OFDMA enable or disable */
  12796. #define WMI_PEER_PARAM_OFDMA_ENABLE 0x19
  12797. /* Per peer 11ax/11ac MU enable or disable */
  12798. #define WMI_PEER_PARAM_MU_ENABLE 0x1a
  12799. /** Set peer fixed rate used in UL Trigger
  12800. * The top nibble is used to select which format to use for encoding
  12801. * the rate specification: 0xVXXXXXXX, V must be 1 for this parameter.
  12802. * If V == 0b0001: format is: 0x1000RRRR.
  12803. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  12804. *
  12805. * This parameter controls the UL OFDMA and UL MU-MIMO peer fixed rate.
  12806. */
  12807. #define WMI_PEER_PARAM_UL_FIXED_RATE 0x1b
  12808. /** send specific OMI to peer via QoS-null frame
  12809. * param_value = follow 11ax spec definition
  12810. * bit0:VHT(1), bit1:HE(1), bit2-31:A-Control
  12811. */
  12812. #define WMI_PEER_PARAM_XMIT_OMI 0x1c
  12813. #define WMI_PEER_RARAM_XMIT_OMI WMI_PEER_PARAM_XMIT_OMI /* alias due to prior typo */
  12814. /* Disable burst and assist */
  12815. #define WMI_PEER_PARAM_DISABLE_AGGRESSIVE_TX 0x1d
  12816. /* Enable 11r FT Roaming */
  12817. #define WMI_PEER_PARAM_ENABLE_FT 0x1e
  12818. /* update peer flag for ptk 4 way handshake */
  12819. #define WMI_PEER_PARAM_NEED_PTK_4_WAY 0x1f
  12820. /* update peer flag for gtk 2 way handshake */
  12821. #define WMI_PEER_PARAM_NEED_GTK_2_WAY 0x20
  12822. /* update peer flag for M4 sent */
  12823. #define WMI_PEER_PARAM_M4_SENT 0x21
  12824. /* Per peer MISC stats enable or disable */
  12825. #define WMI_PEER_PARAM_MISC_STATS_ENABLE 0x22
  12826. /* Per peer FW congestion enable or disable:
  12827. * A parameter value of 1 will disable FW tx congestion control for the peer,
  12828. * a parameter value 0f 0 will enable FW tx congestion control for the peer.
  12829. */
  12830. #define WMI_PEER_PARAM_FW_CONGESTION_DISABLE 0x23
  12831. /* Per peer dynamically change max Nss limit in supported tx modes.
  12832. * Whereas WMI_PEER_NSS cmd needs to reset PER tables and start peer rate
  12833. * control again.
  12834. * Currently supported only for 2x2 case, and also only supports setting
  12835. * all NSS up to current NSS.
  12836. * Mask is used so we can extend in future if needed.
  12837. *
  12838. * Expected values in bits:
  12839. * 00: Use autorate
  12840. * 01: Enable only 1SS
  12841. * 10: Enable only 2SS
  12842. * 11: Disable NSS clamp feature or Fallback to autorate
  12843. */
  12844. #define WMI_PEER_PARAM_DYN_NSS_EN_MASK 0x24
  12845. /** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */
  12846. #define WMI_PEER_MIMO_PS_NONE 0x0
  12847. #define WMI_PEER_MIMO_PS_STATIC 0x1
  12848. #define WMI_PEER_MIMO_PS_DYNAMIC 0x2
  12849. typedef struct {
  12850. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_cmd_fixed_param */
  12851. /** unique id identifying the VDEV, generated by the caller */
  12852. A_UINT32 vdev_id;
  12853. /** peer MAC address */
  12854. wmi_mac_addr peer_macaddr;
  12855. /** parameter id */
  12856. A_UINT32 param_id;
  12857. /** parametr value */
  12858. A_UINT32 param_value;
  12859. } wmi_peer_set_param_cmd_fixed_param;
  12860. typedef union {
  12861. /*
  12862. * The A_UINT16 "mode" and "tx_rate" fields can only be directly used
  12863. * by the target or a little-endian host.
  12864. * A big-endian host needs to use the WMI_PEER_MAX_MIN_TX_xxx_GET/SET
  12865. * macros on the A_UINT32 "value" field.
  12866. */
  12867. struct {
  12868. A_UINT16 mode; /* 0:CCK, 1:OFDM, 2:HT, 3:VHT (see WMI_RATE_PREAMBLE) */
  12869. A_UINT16 tx_rate; /* see per-mode specs below */
  12870. };
  12871. A_UINT32 value; /* for use by big-endian host */
  12872. } wmi_peer_max_min_tx_rate;
  12873. /*
  12874. * Any access to the mode/tx_rate in an big endian system should use
  12875. * the below Macros on the wmi_peer_max_min_tx_rate.value field.
  12876. */
  12877. #define WMI_PEER_MAX_MIN_TX_MODE_GET(value32) WMI_GET_BITS(value32, 0, 16)
  12878. #define WMI_PEER_MAX_MIN_TX_MODE_SET(value32, tx_mode) WMI_SET_BITS(value32, 0, 16, tx_mode)
  12879. #define WMI_PEER_MAX_MIN_TX_RATE_GET(value32) WMI_GET_BITS(value32, 16, 16)
  12880. #define WMI_PEER_MAX_MIN_TX_RATE_SET(value32, tx_mode) WMI_SET_BITS(value32, 16, 16, tx_mode)
  12881. /* CCK max/min tx Rate description
  12882. * tx_rate = 0: 1 Mbps
  12883. * tx_rate = 1: 2 Mbps
  12884. * tx_rate = 2: 5.5 Mbps
  12885. * tx_rate = 3: 11 Mbps
  12886. * tx_rate = else: invalid
  12887. */
  12888. enum {
  12889. WMI_MAX_CCK_TX_RATE_1M, /* up to 1M CCK Rate avaliable */
  12890. WMI_MAX_CCK_TX_RATE_2M, /* up to 2M CCK Rate avaliable */
  12891. WMI_MAX_CCK_TX_RATE_5_5M, /* up to 5.5M CCK Rate avaliable */
  12892. WMI_MAX_CCK_TX_RATE_11M, /* up to 11M CCK Rate avaliable */
  12893. WMI_MAX_CCK_TX_RATE = WMI_MAX_CCK_TX_RATE_11M,
  12894. };
  12895. /* OFDM max/min tx Rate description
  12896. * tx_rate = 0: 6 Mbps
  12897. * tx_rate = 1: 9 Mbps
  12898. * tx_rate = 2: 12 Mbps
  12899. * tx_rate = 3: 18 Mbps
  12900. * tx_rate = 4: 24 Mbps
  12901. * tx_rate = 5: 32 Mbps
  12902. * tx_rate = 6: 48 Mbps
  12903. * tx_rate = 7: 54 Mbps
  12904. * tx_rate = else: invalid
  12905. */
  12906. enum {
  12907. WMI_MAX_OFDM_TX_RATE_6M, /* up to 6M OFDM Rate avaliable */
  12908. WMI_MAX_OFDM_TX_RATE_9M, /* up to 9M OFDM Rate avaliable */
  12909. WMI_MAX_OFDM_TX_RATE_12M, /* up to 12M OFDM Rate avaliable */
  12910. WMI_MAX_OFDM_TX_RATE_18M, /* up to 18M OFDM Rate avaliable */
  12911. WMI_MAX_OFDM_TX_RATE_24M, /* up to 24M OFDM Rate avaliable */
  12912. WMI_MAX_OFDM_TX_RATE_36M, /* up to 36M OFDM Rate avaliable */
  12913. WMI_MAX_OFDM_TX_RATE_48M, /* up to 48M OFDM Rate avaliable */
  12914. WMI_MAX_OFDM_TX_RATE_54M, /* up to 54M OFDM Rate avaliable */
  12915. WMI_MAX_OFDM_TX_RATE = WMI_MAX_OFDM_TX_RATE_54M,
  12916. };
  12917. /* HT max/min tx rate description
  12918. * tx_rate = 0~7 : MCS Rate 0~7
  12919. * tx_rate=else : invalid.
  12920. */
  12921. #define WMI_MAX_HT_TX_MCS 0x07
  12922. /* VHT max/min tx rate description
  12923. * tx_rate = 0~9 : MCS Rate 0~9
  12924. * tx_rate=else : invalid.
  12925. */
  12926. #define WMI_MAX_VHT_TX_MCS 0x09
  12927. #define MAX_SUPPORTED_RATES 128
  12928. typedef struct {
  12929. /** total number of rates */
  12930. A_UINT32 num_rates;
  12931. /**
  12932. * rates (each 8bit value) packed into a 32 bit word.
  12933. * the rates are filled from least significant byte to most
  12934. * significant byte.
  12935. */
  12936. A_UINT32 rates[(MAX_SUPPORTED_RATES / 4) + 1];
  12937. } wmi_rate_set;
  12938. /* NOTE: It would bea good idea to represent the Tx MCS
  12939. * info in one word and Rx in another word. This is split
  12940. * into multiple words for convenience
  12941. */
  12942. typedef struct {
  12943. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */
  12944. A_UINT32 rx_max_rate; /* Max Rx data rate */
  12945. A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */
  12946. A_UINT32 tx_max_rate; /* Max Tx data rate */
  12947. /*
  12948. * bit [15:0] indicates MCS 0 to 9
  12949. * bit [23:16] indicates MCS 10 & 11
  12950. * bit [24] indicates whether MCS 10 & 11 is notified in bit [23:16]
  12951. */
  12952. A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */
  12953. A_UINT32 tx_max_mcs_nss; /* b0-b3: max mcs idx; b4-b7: max nss */
  12954. } wmi_vht_rate_set;
  12955. /* NOTE: It would bea good idea to represent the Tx MCS
  12956. * info in one word and Rx in another word. This is split
  12957. * into multiple words for convenience
  12958. * 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
  12959. */
  12960. typedef struct {
  12961. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_he_rate_set */
  12962. /* HE Supported MCS Set field Rx
  12963. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  12964. * value 0 - MCS 0-7 enabled for this NSS
  12965. * value 1 - MCS 0-9 enabled for this NSS
  12966. * value 2 - MCS 0-11 enabled for this NSS
  12967. * value 3 - NSS disabled
  12968. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  12969. */
  12970. A_UINT32 rx_mcs_set; /* Negotiated RX HE rates (i.e. rate this node can RX from peer)*/
  12971. /* HE Supported MCS Set field Tx
  12972. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  12973. * value 0 - MCS 0-7 enabled for this NSS
  12974. * value 1 - MCS 0-9 enabled for this NSS
  12975. * value 2 - MCS 0-11 enabled for this NSS
  12976. * value 3 - NSS disabled
  12977. * WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  12978. *
  12979. * - 8 bits x 2 are used for each Nss value for 2 categories of bandwidths,
  12980. * to indicate whether MCS 12 and 13 are enabled.
  12981. * Bits [16:23] used for checking if MCS 12/13 is enabled for a
  12982. * particular NSS (BW <= 80MHz)
  12983. * Bits [24:31] used for checking if MCS 12/13 is enabled for a
  12984. * particular NSS (BW > 80MHz)
  12985. * The WMI_HE_EXTRA_MCS_SS_[GET,SET] macros can be used for accessing
  12986. * these bit-fields.
  12987. */
  12988. A_UINT32 tx_mcs_set; /* Negotiated TX HE rates(i.e. rate this node can TX to peer) */
  12989. } wmi_he_rate_set;
  12990. typedef struct {
  12991. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_eht_rate_set */
  12992. A_UINT32 rx_mcs_set;
  12993. A_UINT32 tx_mcs_set;
  12994. } wmi_eht_rate_set;
  12995. /*
  12996. * IMPORTANT: Make sure the bit definitions here are consistent
  12997. * with the ni_flags definitions in wlan_peer.h
  12998. */
  12999. #define WMI_PEER_AUTH 0x00000001 /* Authorized for data */
  13000. #define WMI_PEER_QOS 0x00000002 /* QoS enabled */
  13001. #define WMI_PEER_NEED_PTK_4_WAY 0x00000004 /* Needs PTK 4 way handshake for authorization */
  13002. #define WMI_PEER_GK_INST 0x00000008 /* group Key Installed */
  13003. #define WMI_PEER_NEED_GTK_2_WAY 0x00000010 /* Needs GTK 2 way handshake after 4-way handshake */
  13004. #define WMI_PEER_PRIV 0x00000020 /* Encryption Enabled */
  13005. #define WMI_PEER_PK_INST 0x00000040 /* Pairwise Key Installed */
  13006. #define WMI_PEER_TKIP_CM_ENABLED 0x00000080 /* TKIP CounterMeasures */
  13007. #define WMI_PEER_SW_DEMIC_FRAG 0x00000100 /* S/W Demic of Frag Train */
  13008. #define WMI_PEER_CCX_ENABLED 0x00000200 /* CCX enabled */
  13009. #define WMI_PEER_HE 0x00000400 /* HE Enabled */
  13010. #define WMI_PEER_APSD 0x00000800 /* U-APSD power save enabled */
  13011. #define WMI_PEER_HT 0x00001000 /* HT enabled */
  13012. #define WMI_PEER_40MHZ 0x00002000 /* 40MHz enabld */
  13013. #define WMI_PEER_INTER_BSS_PEER 0x00004000 /* Inter BSS peer */
  13014. #define WMI_PEER_STBC 0x00008000 /* STBC Enabled */
  13015. #define WMI_PEER_LDPC 0x00010000 /* LDPC ENabled */
  13016. #define WMI_PEER_DYN_MIMOPS 0x00020000 /* Dynamic MIMO PS Enabled */
  13017. #define WMI_PEER_STATIC_MIMOPS 0x00040000 /* Static MIMO PS enabled */
  13018. #define WMI_PEER_DIS_MIMOPS 0x00080000 /* MIMO PS DISABLED */
  13019. #define WMI_PEER_SPATIAL_EXP 0x00100000 /* Enable spatial expansion for
  13020. * single stream rates to avoid
  13021. * unintentional beamforming */
  13022. #define WMI_PEER_SPATIAL_MUX 0x00200000 /* SM Enabled */
  13023. #define WMI_PEER_TWT_REQ 0x00400000 /* TWT Requester Support bit in Extended Capabilities element */
  13024. #define WMI_PEER_TWT_RESP 0x00800000 /* TWT Responder Support bit in Extended Capabilities element */
  13025. #define WMI_PEER_MULTI_BSSID 0x01000000 /* Multiple BSSID Support bit in Extended Capabilities element */
  13026. #define WMI_PEER_VHT 0x02000000 /* VHT Enabled */
  13027. #define WMI_PEER_80MHZ 0x04000000 /* 80MHz enabld */
  13028. #define WMI_PEER_PMF 0x08000000 /* Robust Management Frame Protection enabled */
  13029. #define WMI_PEER_F_PS_PRESEND_REQUIRED 0x10000000 /* Use this flag to avoid calling powersave API when STA is awake */
  13030. #define WMI_PEER_IS_P2P_CAPABLE 0x20000000 /* P2P capable peer */
  13031. #define WMI_PEER_160MHZ 0x40000000 /* 160 MHz enabled */
  13032. #define WMI_PEER_SAFEMODE_EN 0x80000000 /* Fips Mode Enabled */
  13033. /** define for peer_flags_ext */
  13034. #define WMI_PEER_EXT_EHT 0x00000001 /* EHT enabled */
  13035. #define WMI_PEER_EXT_320MHZ 0x00000002 /* 320Mhz enabled */
  13036. #define WMI_PEER_EXT_F_CRIT_PROTO_HINT_ENABLED 0x40000000
  13037. /**
  13038. * Peer rate capabilities.
  13039. *
  13040. * This is of interest to the ratecontrol
  13041. * module which resides in the firmware. The bit definitions are
  13042. * consistent with that defined in if_athrate.c.
  13043. *
  13044. * @todo
  13045. * Move this to a common header file later so there is no need to
  13046. * duplicate the definitions or maintain consistency.
  13047. */
  13048. #define WMI_RC_DS_FLAG 0x01 /* Dual stream flag */
  13049. #define WMI_RC_CW40_FLAG 0x02 /* CW 40 */
  13050. #define WMI_RC_SGI_FLAG 0x04 /* Short Guard Interval */
  13051. #define WMI_RC_HT_FLAG 0x08 /* HT */
  13052. #define WMI_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
  13053. #define WMI_RC_TX_STBC_FLAG 0x20 /* TX STBC */
  13054. #define WMI_RC_TX_STBC_FLAG_S 5 /* TX STBC */
  13055. #define WMI_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
  13056. #define WMI_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
  13057. #define WMI_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
  13058. #define WMI_RC_TS_FLAG 0x200 /* Three stream flag */
  13059. #define WMI_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
  13060. enum WMI_PEER_STA_TYPE {
  13061. WMI_PEER_STA_TYPE_INVALID = 0, /* Invalid type*/
  13062. WMI_PEER_STA_TYPE_ONLY_STAVDEV = 1, /* AP has only STAVDEV and APVDEV is not present on any radio */
  13063. WMI_PEER_STA_TYPE_APVDEV_ON_OTHER_RADIO = 2, /* AP has STAVDEV on one radio and APVDEV on other radios */
  13064. WMI_PEER_STA_TYPE_FH_APVDEV_ON_SAME_RADIO = 3, /* AP has STAVDEV and APVDEV on same radio. During STAVDEV connection,
  13065. * no repeater client is connected with this repeater APVDEV
  13066. */
  13067. WMI_PEER_STA_TYPE_BH_APVDEV_ON_SAME_RADIO = 4, /* AP has STAVDEV and APVDEV on same radio. During STAVDEV connection,
  13068. * at least one repeater client is connected with this repeater APVDEV
  13069. * (daisy chain config)
  13070. */
  13071. };
  13072. #define WMI_PEER_STA_TYPE_GET(dword) WMI_GET_BITS(dword, 0, 8)
  13073. #define WMI_PEER_STA_TYPE_SET(dword, value) WMI_SET_BITS(dword, 0, 8, value)
  13074. #define WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_BITPOS (0)
  13075. #define WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_MASK (0x1 << WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_BITPOS)
  13076. #define WMI_PEER_ASSOC_SET_BSS_MAX_IDLE_OPTION(_dword, _val) \
  13077. WMI_SET_BITS(_dword, WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_BITPOS, 1, _val)
  13078. #define WMI_PEER_ASSOC_GET_BSS_MAX_IDLE_OPTION(_dword) \
  13079. WMI_GET_BITS(_dword, WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_BITPOS, 1)
  13080. #define WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_BITPOS (16)
  13081. #define WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_MASK (0xFFFF << WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_BITPOS)
  13082. #define WMI_PEER_ASSOC_SET_BSS_MAX_IDLE_PERIOD(_dword, _val) \
  13083. WMI_SET_BITS(_dword, WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_BITPOS, 16, _val)
  13084. #define WMI_PEER_ASSOC_GET_BSS_MAX_IDLE_PERIOD(_dword) \
  13085. WMI_GET_BITS(_dword, WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_BITPOS, 16)
  13086. typedef struct {
  13087. A_UINT32 tlv_header; /** TLV tag (MITLV_TAG_STRUC_wmi_peer_assoc_mlo_partner_link_params) and len */
  13088. A_UINT32 vdev_id; /** unique id identifying the VDEV, generated by the caller */
  13089. A_UINT32 hw_mld_link_id; /** Unique link id across SOCs, got as part of QMI handshake. */
  13090. } wmi_peer_assoc_mlo_partner_link_params;
  13091. /* This TLV structure used to pass mlo Parameters on peer assoc, only apply for mlo-peers */
  13092. typedef struct {
  13093. A_UINT32 tlv_header; /** TLV tag and len; */
  13094. /** MLO flags */
  13095. wmi_mlo_flags mlo_flags;
  13096. /** MLD MAC address */
  13097. wmi_mac_addr mld_macaddr;
  13098. /** Unique index for links of the mlo. Starts with Zero */
  13099. A_UINT32 logical_link_index;
  13100. /** ML Peer ID
  13101. * In WIN systems, mld_peer_id is generated by Host.
  13102. * In MCL systems, mld_peer_id will be set to invalid peer id.
  13103. */
  13104. A_UINT32 mld_peer_id;
  13105. } wmi_peer_assoc_mlo_params;
  13106. typedef struct {
  13107. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_complete_cmd_fixed_param */
  13108. /** peer MAC address */
  13109. wmi_mac_addr peer_macaddr;
  13110. /** VDEV id */
  13111. A_UINT32 vdev_id;
  13112. /** assoc = 1 reassoc = 0 */
  13113. A_UINT32 peer_new_assoc;
  13114. /** peer associd (16 bits) */
  13115. A_UINT32 peer_associd;
  13116. /** peer station flags: see definition above */
  13117. A_UINT32 peer_flags;
  13118. /** negotiated capabilities (lower 16 bits)*/
  13119. A_UINT32 peer_caps;
  13120. /** Listen interval */
  13121. A_UINT32 peer_listen_intval;
  13122. /** HT capabilties of the peer */
  13123. A_UINT32 peer_ht_caps;
  13124. /** maximum rx A-MPDU length */
  13125. A_UINT32 peer_max_mpdu;
  13126. /** mpdu density of the peer in usec(0 to 16) */
  13127. A_UINT32 peer_mpdu_density;
  13128. /** peer rate capabilties see flags above */
  13129. A_UINT32 peer_rate_caps;
  13130. /** num spatial streams */
  13131. A_UINT32 peer_nss;
  13132. /** VHT capabilties of the peer */
  13133. A_UINT32 peer_vht_caps;
  13134. /** phy mode */
  13135. A_UINT32 peer_phymode;
  13136. /** HT Operation Element of the peer. Five bytes packed in 2
  13137. * INT32 array and filled from lsb to msb.
  13138. * Note that the size of array peer_ht_info[] cannotbe changed
  13139. * without breaking WMI Compatibility. */
  13140. A_UINT32 peer_ht_info[2];
  13141. /** total number of negotiated legacy rate set. Also the sizeof
  13142. * peer_legacy_rates[] */
  13143. A_UINT32 num_peer_legacy_rates;
  13144. /** total number of negotiated ht rate set. Also the sizeof
  13145. * peer_ht_rates[] */
  13146. A_UINT32 num_peer_ht_rates;
  13147. /**
  13148. * Bitmap providing the mapping of bandwidths to max Rx NSS for this peer
  13149. * in VHT160 / VHT80+80 Mode.
  13150. * As per the New IEEE 802.11 Update, the AP & Peer could advertise and
  13151. * handshake with the Max Rx NSS differing for different bandwidths
  13152. * instead of a single max Rx NSS Value.
  13153. * Some QCA chipsets have to advertise a different max Rx NSS value for
  13154. * 160 MHz and 80MHz.
  13155. *
  13156. * bit[2:0] : Represents value of Rx NSS for VHT 160 MHz
  13157. * bit[5:3] : Represents value of Rx NSS for VHT 80_80 MHz -
  13158. * Extended NSS support
  13159. * bit[30:6]: Reserved
  13160. * bit[31] : MSB(0/1): 1 in case of valid data sent from Host
  13161. */
  13162. A_UINT32 peer_bw_rxnss_override;
  13163. /* 802.11ax capabilities */
  13164. wmi_ppe_threshold peer_ppet;
  13165. A_UINT32 peer_he_cap_info; /* protocol-defined HE / 11ax capability flags */
  13166. A_UINT32 peer_he_ops; /* HE operation contains BSS color */
  13167. A_UINT32 peer_he_cap_phy[WMI_MAX_HECAP_PHY_SIZE];
  13168. A_UINT32 peer_he_mcs; /* Indicates number of HE MCS TLV present */
  13169. /* 2nd DWORD of 11ax MAC Capabilities */
  13170. A_UINT32 peer_he_cap_info_ext;
  13171. /*
  13172. * bit 0 : Indicated support for RX 1xLTF + 0.4us
  13173. * bit 1 : Indicates support for RX 2xLTF + 0.4us
  13174. * bit 2 : Indicates support for 2xLTF in 160/80+80 MHz HE PPDU
  13175. * bit[4:3] : Indicates support for DL OFDMA
  13176. * Refer to enum WMI_HE_RX_DL_OFDMA_SUPPORT_x
  13177. * bit[6:5] : Indicates support for DL MU-MIMO
  13178. * Refer to enum WMI_HE_RX_DL_MUMIMO_SUPPORT_x
  13179. * bit[31:7] : Reserved
  13180. * Refer to WMI_HE_CAP_xx_LTF_xxx_SUPPORT_GET/SET macros
  13181. */
  13182. A_UINT32 peer_he_cap_info_internal;
  13183. /* min data rate to be used in Mbps */
  13184. A_UINT32 min_data_rate;
  13185. /** HE 6 GHz Band Capabilities of the peer.
  13186. * (Defined in 9.4.2.261 HE 6GHz Band Capabilities element in 802.11ax_D5.0)
  13187. * valid when WMI_PEER_HE is set and WMI_PEER_VHT/HT are not set.
  13188. */
  13189. A_UINT32 peer_he_caps_6ghz;
  13190. /* bit[0-7] : sta_type
  13191. * bit[8-31]: reserved
  13192. * Refer to enum WMI_PEER_STA_TYPE for sta_type values.
  13193. * Refer to WMI_PEER_STA_TYPE_GET/SET macros.
  13194. */
  13195. A_UINT32 sta_type;
  13196. /*
  13197. * @bss_max_idle_option - Parameters exchanged for BSS Max Idle capability.
  13198. * bit 0 : If set, only a protected frame indicates activity.
  13199. * If cleared, either an unprotected or a protected frame
  13200. * indicates activity.
  13201. * Refer to the WMI_PEER_ASSOC_[SET,GET]_BSS_MAX_IDLE_OPTION
  13202. * macros.
  13203. * bit [1:15] : Reserved
  13204. * bit [16:31] : Max idle period in units of 1000 TUs
  13205. * Refer to the WMI_PEER_ASSOC_[SET,GET]_BSS_MAX_IDLE_PERIOD
  13206. * macros.
  13207. */
  13208. A_UINT32 bss_max_idle_option;
  13209. /*
  13210. * Connected AP auth mode values are from WMI_AUTH_ enum.
  13211. * The target shall ignore an auth_mode value of 0 / WMI_AUTH_NONE,
  13212. * due to ambiguity whether a zero value was provided explicitly or
  13213. * simply as a default.
  13214. */
  13215. A_UINT32 auth_mode;
  13216. /* Refer to WMI_PEER_EXT_xxx defs */
  13217. A_UINT32 peer_flags_ext;
  13218. /* 802.11be capabilities and other params */
  13219. A_UINT32 puncture_20mhz_bitmap; /* each bit indicates one 20Mhz bw puntured */
  13220. /* EHT mac capabilites from BSS beacon EHT cap IE, total WMI_MAX_EHTCAP_MAC_SIZE*A_UINT32 bits */
  13221. A_UINT32 peer_eht_cap_mac[WMI_MAX_EHTCAP_MAC_SIZE];
  13222. /* EHT phy capabilites from BSS beacon EHT cap IE, total WMI_MAX_EHTCAP_PHY_SIZE*A_UINT32 bits */
  13223. A_UINT32 peer_eht_cap_phy[WMI_MAX_EHTCAP_PHY_SIZE];
  13224. A_UINT32 peer_eht_ops;
  13225. wmi_ppe_threshold peer_eht_ppet;
  13226. /* Following this struct are the TLV's:
  13227. * A_UINT8 peer_legacy_rates[];
  13228. * A_UINT8 peer_ht_rates[];
  13229. * wmi_vht_rate_set peer_vht_rates; <-- VHT capabilties of the peer
  13230. * WMI_he_rate_set_peer_he_rates; <-- HE capabilities of the peer
  13231. * wmi_peer_assoc_mlo_params mlo_params[0,1]; <-- MLO parameters opt. TLV
  13232. * Only present for MLO peers.
  13233. * For non-MLO peers the array length should be 0.
  13234. * wmi_eht_rate_set_peer_eht_rates; <-- EHT capabilities of the peer
  13235. * wmi_peer_assoc_mlo_partner_link_params link_info[] <-- partner link info
  13236. */
  13237. } wmi_peer_assoc_complete_cmd_fixed_param;
  13238. /* WDS Entry Flags */
  13239. #define WMI_WDS_FLAG_STATIC 0x1 /* Disable aging & learning */
  13240. typedef struct {
  13241. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_add_wds_entry_cmd_fixed_param */
  13242. /** peer MAC address */
  13243. wmi_mac_addr peer_macaddr;
  13244. /** wds MAC addr */
  13245. wmi_mac_addr wds_macaddr;
  13246. /* Flags associated with WDS entry - see WMI_WDS_FLAG defs */
  13247. A_UINT32 flags;
  13248. A_UINT32 vdev_id;
  13249. } wmi_peer_add_wds_entry_cmd_fixed_param;
  13250. #define WMI_CHAN_INFO_START_RESP 0
  13251. #define WMI_CHAN_INFO_END_RESP 1
  13252. /* deprecated but maintained as aliases: old names containing typo */
  13253. #define WMI_CHAN_InFO_START_RESP WMI_CHAN_INFO_START_RESP
  13254. #define WMI_CHAN_InFO_END_RESP WMI_CHAN_INFO_END_RESP
  13255. typedef struct {
  13256. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_remove_wds_entry_cmd_fixed_param */
  13257. /** wds MAC addr */
  13258. wmi_mac_addr wds_macaddr;
  13259. A_UINT32 vdev_id;
  13260. } wmi_peer_remove_wds_entry_cmd_fixed_param;
  13261. typedef struct {
  13262. /** peer MAC address */
  13263. wmi_mac_addr peer_macaddr;
  13264. } wmi_peer_q_empty_callback_event;
  13265. /*
  13266. * Command to update an already existing WDS entry. Different address setting
  13267. * combinations are possible.
  13268. *
  13269. * Valid wds and peer -> Associated WDS entry peer ptr & flags will be updated.
  13270. * Valid wds and null peer -> Associated WDS entry flags will be updated.
  13271. * Null wds and Valid peer -> Flags will be updated for all WDS entries behind the peer.
  13272. * Null wds and peer -> Flags will be updated for all WDS entries.
  13273. */
  13274. typedef struct {
  13275. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_update_wds_entry_cmd_fixed_param */
  13276. /** peer MAC address */
  13277. wmi_mac_addr peer_macaddr;
  13278. /** wds MAC addr */
  13279. wmi_mac_addr wds_macaddr;
  13280. /* Flags associated with WDS entry */
  13281. A_UINT32 flags;
  13282. A_UINT32 vdev_id;
  13283. } wmi_peer_update_wds_entry_cmd_fixed_param;
  13284. /**
  13285. * Channel info WMI event
  13286. */
  13287. typedef struct {
  13288. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param */
  13289. /** Error code */
  13290. A_UINT32 err_code;
  13291. /** Channel freq */
  13292. A_UINT32 freq;
  13293. /** Read flags */
  13294. A_UINT32 cmd_flags;
  13295. /** Noise Floor value */
  13296. A_UINT32 noise_floor;
  13297. /** rx clear count */
  13298. A_UINT32 rx_clear_count;
  13299. /** cycle count */
  13300. A_UINT32 cycle_count;
  13301. /** channel tx power per range in 0.5dBm steps */
  13302. A_UINT32 chan_tx_pwr_range;
  13303. /** channel tx power per throughput */
  13304. A_UINT32 chan_tx_pwr_tp;
  13305. /** rx frame count (cumulative) */
  13306. A_UINT32 rx_frame_count;
  13307. /** BSS rx cycle count */
  13308. A_UINT32 my_bss_rx_cycle_count;
  13309. /** b-mode data rx time (units are microseconds) */
  13310. A_UINT32 rx_11b_mode_data_duration;
  13311. /** tx frame count */
  13312. A_UINT32 tx_frame_cnt;
  13313. /** mac clock */
  13314. A_UINT32 mac_clk_mhz;
  13315. /** unique id identifying the VDEV */
  13316. A_UINT32 vdev_id;
  13317. /**
  13318. * Noise Floor value for all chain in dBm.
  13319. * If per_chain_noise_floor value is 0 then it should be ignored.
  13320. */
  13321. A_UINT32 per_chain_noise_floor[WMI_MAX_CHAINS];
  13322. } wmi_chan_info_event_fixed_param;
  13323. /**
  13324. * Non wlan interference event
  13325. */
  13326. typedef struct {
  13327. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_cw_int */
  13328. A_UINT32 channel; /* either number or freq in mhz*/
  13329. } wlan_dcs_cw_int;
  13330. #define ath_dcs_cw_int /* DEPRECATED */ wlan_dcs_cw_int /* alias */
  13331. /**
  13332. * wlan_dcs_im_tgt_stats
  13333. *
  13334. */
  13335. typedef struct _wlan_dcs_im_tgt_stats {
  13336. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_im_tgt_stats_t */
  13337. /** current running TSF from the TSF-1 */
  13338. A_UINT32 reg_tsf32;
  13339. /** Known last frame rssi, in case of multiple stations, if
  13340. * and at different ranges, this would not gaurantee that
  13341. * this is the least rssi.
  13342. */
  13343. A_UINT32 last_ack_rssi;
  13344. /** Sum of all the failed durations in the last one second interval.
  13345. */
  13346. A_UINT32 tx_waste_time;
  13347. /** count how many times the hal_rxerr_phy is marked, in this
  13348. * time period
  13349. */
  13350. A_UINT32 rx_time;
  13351. A_UINT32 phyerr_cnt;
  13352. /**
  13353. * WLAN IM stats from target to host
  13354. *
  13355. * Below statistics are sent from target to host periodically.
  13356. * These are collected at target as long as target is running
  13357. * and target chip is not in sleep.
  13358. *
  13359. */
  13360. /** listen time from ANI */
  13361. A_INT32 listen_time;
  13362. /** tx frame count, MAC_PCU_TX_FRAME_CNT_ADDRESS */
  13363. A_UINT32 reg_tx_frame_cnt;
  13364. /** rx frame count, MAC_PCU_RX_FRAME_CNT_ADDRESS */
  13365. A_UINT32 reg_rx_frame_cnt;
  13366. /** rx clear count, MAC_PCU_RX_CLEAR_CNT_ADDRESS */
  13367. A_UINT32 reg_rxclr_cnt;
  13368. /** total cycle counts MAC_PCU_CYCLE_CNT_ADDRESS */
  13369. A_UINT32 reg_cycle_cnt; /* delta cycle count */
  13370. /** extenstion channel rx clear count */
  13371. A_UINT32 reg_rxclr_ext_cnt;
  13372. /** OFDM phy error counts, MAC_PCU_PHY_ERR_CNT_1_ADDRESS */
  13373. A_UINT32 reg_ofdm_phyerr_cnt;
  13374. /** CCK phy error count, MAC_PCU_PHY_ERR_CNT_2_ADDRESS */
  13375. A_UINT32 reg_cck_phyerr_cnt; /* CCK err count since last reset, read from register */
  13376. /** Channel noise floor (units are dBm) */
  13377. A_INT32 chan_nf;
  13378. /** BSS rx cycle count */
  13379. A_UINT32 my_bss_rx_cycle_count;
  13380. } wlan_dcs_im_tgt_stats_t;
  13381. typedef struct wlan_dcs_awgn_info {
  13382. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_awgn_int_t */
  13383. A_UINT32 tlv_header;
  13384. /** Channel width (20, 40, 80, 80+80, 160, 320 ) enum wmi_channel_width */
  13385. A_UINT32 channel_width;
  13386. /** Primary channel frequency (MHz) */
  13387. A_UINT32 chan_freq;
  13388. /** center frequency (MHz) first segment */
  13389. A_UINT32 center_freq0;
  13390. /** center frequency (MHz) second segment */
  13391. A_UINT32 center_freq1;
  13392. /*
  13393. * Indicates which 20MHz segments contain interference
  13394. * 320 MHz: bits 0-15
  13395. * 160 MHz: bits 0-7
  13396. * 80 MHz: bits 0-3
  13397. * Bitmap - Each bit position will indicate 20MHz in which
  13398. * interference is seen. (Valid 16 bits out of 32 bit integer)
  13399. * Note: for 11be, the interference present 20MHz can be punctured
  13400. * for better channel utilization.
  13401. */
  13402. A_UINT32 chan_bw_interference_bitmap;
  13403. } wmi_dcs_awgn_int_t;
  13404. /**
  13405. * wmi_dcs_interference_event_t
  13406. *
  13407. * Right now this is event and stats together. Partly this is
  13408. * because cw interference is handled in target now. This
  13409. * can be done at host itself, if we can carry the NF alone
  13410. * as a stats event. In future this would be done and this
  13411. * event would carry only stats.
  13412. */
  13413. typedef struct {
  13414. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_interference_event_fixed_param */
  13415. /**
  13416. * Type of the event present, either the cw interference event, or the wlan_im stats, or AWGN int
  13417. * ATH_CAP_DCS_CWIM 0x01
  13418. * ATH_CAP_DCS_WLANIM 0x02
  13419. * ATH_CAP_DCS_AGWNIM 0x04
  13420. */
  13421. A_UINT32 interference_type; /* type of interference, wlan, cw, or AWGN */
  13422. /** pdev_id for identifying the MAC
  13423. * See macros starting with WMI_PDEV_ID_ for values.
  13424. */
  13425. A_UINT32 pdev_id;
  13426. /*
  13427. * Following this struct are these TLVs. Note that they are both array of structures
  13428. * but can have at most one element. Which TLV is empty or has one element depends
  13429. * on the field interference_type. This is to emulate an union with cw_int and wlan_stat
  13430. * elements (not arrays). union { wlan_dcs_cw_int cw_int; wlan_dcs_im_tgt_stats_t wlan_stat; } int_event;
  13431. *
  13432. * wlan_dcs_cw_int cw_int[]; <-- cw_interference event
  13433. * wlan_dcs_im_tgt_stats_t wlan_stat[]; <-- wlan im interfernce stats
  13434. * wmi_dcs_awgn_int_t awgn_int[]; <-- Additive white Gaussian noise (awgn) interference
  13435. */
  13436. } wmi_dcs_interference_event_fixed_param;
  13437. enum wmi_peer_mcast_group_action {
  13438. wmi_peer_mcast_group_action_add = 0,
  13439. wmi_peer_mcast_group_action_del = 1
  13440. };
  13441. #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_M 0x1
  13442. #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_S 0
  13443. #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_M 0x2
  13444. #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_S 1
  13445. #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_M 0x4 /* flag to exclude an ip while filtering. set to exclude */
  13446. #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_S 2
  13447. #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_M 0x8 /* flag to say ipv4/ipv6. Will be set for ipv6 */
  13448. #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_S 3
  13449. #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_M 0x10 /* delete all mcast table entries. */
  13450. #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_S 4
  13451. /* multicast group membership commands */
  13452. /* TODO: Converting this will be tricky since it uses an union.
  13453. Also, the mac_addr is not aligned. We will convert to the wmi_mac_addr */
  13454. typedef struct {
  13455. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcast_group_cmd_fixed_param */
  13456. A_UINT32 flags;
  13457. wmi_mac_addr ucast_mac_addr;
  13458. /* in network byte order */
  13459. /* for ipv4, bytes (12-15) should contain ip address and other lower bytes 0. ipv6 should have all bytes valid */
  13460. A_UINT8 mcast_ip_addr[16];
  13461. /* for ipv6, all 16 bytes has to be valid; for ipv4 last 4 bytes(12-15) has to be valid, rest all 0s */
  13462. A_UINT8 mcast_ip_mask[16];/* zero out lower bytes if ipv4*/
  13463. /* number of address filters - irrespective of ipv4/ipv6 addresses */
  13464. A_UINT32 num_filter_addr;
  13465. /* this array should contain the src IPs that are to be filtered during find
  13466. The array should be packed.
  13467. If there are 2 ipv4 addresses, there should be 8 bytes and rest all 0s */
  13468. A_UINT8 filter_addr[64]; /* 16 ipv4 addresses or 4 ipv6 addresses */
  13469. A_UINT8 vdev_id; /* vdev of this mcast group */
  13470. } wmi_peer_mcast_group_cmd_fixed_param;
  13471. /** Offload Scan and Roaming related commands */
  13472. /** The FW performs 2 different kinds of offload scans independent
  13473. * of host. One is Roam scan which is primarily performed on a
  13474. * station VDEV after association to look for a better AP that
  13475. * the station VDEV can roam to. The second scan is connect scan
  13476. * which is mainly performed when the station is not associated
  13477. * and to look for a matching AP profile from a list of
  13478. * configured profiles. */
  13479. /* flags for roam_scan_mode_cmd
  13480. * indicate the status (success/fail) of wmi_roam_scan_mode cmd through WMI_ROAM_EVENTID */
  13481. #define WMI_ROAM_SCAN_MODE_FLAG_REPORT_STATUS 0x1
  13482. /**
  13483. * WMI_ROAM_SCAN_MODE: Set Roam Scan mode
  13484. * the roam scan mode is one of the periodic, rssi change, both, none.
  13485. * None : Disable Roam scan. No Roam scan at all.
  13486. * Periodic : Scan periodically with a configurable period.
  13487. * Rssi change : Scan when ever rssi to current AP changes by the threshold value
  13488. * set by WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD command.
  13489. * Both : Both of the above (scan when either period expires or rss to current AP changes by X amount)
  13490. *
  13491. */
  13492. typedef struct {
  13493. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */
  13494. A_UINT32 roam_scan_mode;
  13495. A_UINT32 vdev_id;
  13496. A_UINT32 flags; /* see WMI_ROAM_SCAN_MODE_FLAG defs */
  13497. /*
  13498. * Minimum duration allowed between two consecutive roam scans.
  13499. * Roam scan is not allowed, if duration between two consecutive
  13500. * roam scans is less than this time.
  13501. */
  13502. A_UINT32 min_delay_btw_scans; /* In msec */
  13503. /*
  13504. * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
  13505. * positions) showing for which roam_trigger_reasons the
  13506. * min_delay_btw_scans constraint should be applied.
  13507. * 0x0 means there is no time restrictions between successive roam scans.
  13508. */
  13509. A_UINT32 min_delay_roam_trigger_reason_bitmask;
  13510. } wmi_roam_scan_mode_fixed_param;
  13511. #define WMI_ROAM_SCAN_MODE_NONE 0x0
  13512. #define WMI_ROAM_SCAN_MODE_PERIODIC 0x1
  13513. #define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2
  13514. #define WMI_ROAM_SCAN_MODE_BOTH 0x3
  13515. /* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */
  13516. #define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4
  13517. typedef struct {
  13518. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */
  13519. A_UINT32 vdev_id;
  13520. A_UINT32 command_arg;
  13521. } wmi_roam_scan_cmd_fixed_param;
  13522. #define WMI_ROAM_SCAN_STOP_CMD 0x1
  13523. /**
  13524. * WMI_ROAM_SCAN_RSSI_THRESHOLD : set scan rssi thresold
  13525. * scan rssi threshold is the rssi threshold below which the FW will start running Roam scans.
  13526. * Applicable when WMI_ROAM_SCAN_MODE is not set to none.
  13527. */
  13528. typedef struct {
  13529. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param */
  13530. /** unique id identifying the VDEV, generated by the caller */
  13531. A_UINT32 vdev_id;
  13532. /** roam scan rssi threshold */
  13533. A_UINT32 roam_scan_rssi_thresh;
  13534. /** When using Hw generated beacon RSSI interrupts */
  13535. A_UINT32 roam_rssi_thresh_diff;
  13536. /** 5G scan max count */
  13537. A_UINT32 hirssi_scan_max_count;
  13538. /** 5G scan rssi change threshold value */
  13539. A_UINT32 hirssi_scan_delta;
  13540. /** 5G scan upper bound */
  13541. A_UINT32 hirssi_upper_bound;
  13542. /** roam scan rssi threshold for 5G band.
  13543. * offset from roam_scan_rssi_thres, in dB units
  13544. */
  13545. A_INT32 rssi_thresh_offset_5g;
  13546. /* The TLVs will follow.
  13547. * wmi_roam_scan_extended_threshold_param extended_param;
  13548. * wmi_roam_earlystop_rssi_thres_param earlystop_param;
  13549. * wmi_roam_dense_thres_param dense_param;
  13550. * wmi_roam_bg_scan_roaming_param bg_scan_param;
  13551. * wmi_roam_data_rssi_roaming_param data_rssi_param;
  13552. */
  13553. } wmi_roam_scan_rssi_threshold_fixed_param;
  13554. /**
  13555. * WMI_ROAM_BTM_CONFIG_CMDID : set BTM (BSS Transition Management. 802.11v) offload config
  13556. * Applicable only when WMI_ROAM_SCAN_MODE is enabled with WMI_ROAM_SCAN_MODE_ROAMOFFLOAD
  13557. */
  13558. /**
  13559. * btm_config.flags
  13560. * BIT 0 : Enable/Disable the BTM offload.
  13561. * BIT 1-2 : Action on non matching candidate with cache. Used WMI_ROAM_BTM_OFLD_NON_MATCHING_CND_XXX
  13562. * BIT 3-5 : Roaming handoff decisions. Use WMI_ROAM_BTM_OFLD_CNDS_MATCH_XXX
  13563. * BIT 6 : Enable/Disable solicited BTM
  13564. * BIT 7 : Roam BTM candidates based on the roam score instead of BTM preferred value
  13565. * BIT 8 : BTM query preference over 11k neighbor report request
  13566. * BIT 9 : Send BTM query with preferred candidates list
  13567. * BIT 10 : Forward MBO BTM Request to Host if MBO ASSOC RETRY attribute is set
  13568. * BIT 11-31 : Reserved
  13569. */
  13570. #define WMI_ROAM_BTM_SET_ENABLE(flags, val) WMI_SET_BITS(flags, 0, 1, val)
  13571. #define WMI_ROAM_BTM_GET_ENABLE(flags) WMI_GET_BITS(flags, 0, 1)
  13572. #define WMI_ROAM_BTM_SET_NON_MATCHING_CND_ACTION(flags, val) WMI_SET_BITS(flags, 1, 2, val)
  13573. #define WMI_ROAM_BTM_GET_NON_MATCHING_CND_ACTION(flags) WMI_GET_BITS(flags, 1, 2)
  13574. #define WMI_ROAM_BTM_SET_CNDS_MATCH_CONDITION(flags, val) WMI_SET_BITS(flags, 3, 3, val)
  13575. #define WMI_ROAM_BTM_GET_CNDS_MATCH_CONDITION(flags) WMI_GET_BITS(flags, 3, 3)
  13576. #define WMI_ROAM_BTM_SET_SOLICITED_BTM_ENABLE(flags, val) WMI_SET_BITS(flags, 6, 1, val)
  13577. #define WMI_ROAM_BTM_GET_SOLICITED_BTM_ENABLE(flags) WMI_GET_BITS(flags, 6, 1)
  13578. #define WMI_ROAM_BTM_SET_CNDS_SELECT_BASED_ON_SCORE(flags, val) WMI_SET_BITS(flags, 7, 1, val)
  13579. #define WMI_ROAM_BTM_GET_CNDS_SELECT_BASED_ON_SCORE(flags) WMI_GET_BITS(flags, 7, 1)
  13580. #define WMI_ROAM_BTM_SET_BTM_QUERY_PREFERENCE_OVER_11K(flags, val) WMI_SET_BITS(flags, 8, 1, val)
  13581. #define WMI_ROAM_BTM_GET_BTM_QUERY_PREFERENCE_OVER_11K(flags) WMI_GET_BITS(flags, 8, 1)
  13582. #define WMI_ROAM_BTM_SET_BTM_QUERY_WITH_CANDIDATE_LIST(flags, val) WMI_SET_BITS(flags, 9, 1, val)
  13583. #define WMI_ROAM_BTM_GET_BTM_QUERY_WITH_CANDIDATE_LIST(flags) WMI_GET_BITS(flags, 9, 1)
  13584. #define WMI_ROAM_BTM_SET_FORWARD_MBO_ASSOC_RETRY_BTM_REQUEST_TO_HOST(flags, val) WMI_SET_BITS(flags, 10, 1, val)
  13585. #define WMI_ROAM_BTM_GET_FORWARD_MBO_ASSOC_RETRY_BTM_REQUEST_TO_HOST(flags) WMI_GET_BITS(flags, 10, 1)
  13586. /** 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 */
  13587. #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 */
  13588. #define WMI_ROAM_BTM_NON_MATCHING_CNDS_NO_SCAN_FORWARD 1 /** Does not allow roam scan and forward BTM frame to host */
  13589. /** reserved upto 3 */
  13590. /** 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 */
  13591. #define WMI_ROAM_BTM_CNDS_MATCH_EXACT 0 /** Exactly matched with roam candidate list to BTM candidates */
  13592. #define WMI_ROAM_BTM_CNDS_MATCH_AT_LEAST_TOP 1 /** At least one or more top priority bssid matched */
  13593. /** reserved upto 7 */
  13594. typedef struct {
  13595. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_btm_config_fixed_param */
  13596. A_UINT32 tlv_header;
  13597. /** unique id identifying the VDEV on which BTM is enabled/disabled */
  13598. A_UINT32 vdev_id;
  13599. /** BTM configuration control flags */
  13600. A_UINT32 flags;
  13601. /* BTM query timeout, unit: milliseconds
  13602. * valid value range: 1-10000,
  13603. * default value: 100 will be set if invalid value is given
  13604. */
  13605. A_UINT32 solicited_timeout_ms;
  13606. /* Maximum attempt of solicited BTM
  13607. * If continuous failure reach to this value, solicited BTM to current
  13608. * ESS will be disabled.
  13609. * valid value range: 1 - (2^32-1). (2^32)-1 means sending forever
  13610. * Default value: 3 will be set if invalid value is given
  13611. */
  13612. A_UINT32 max_attempt_cnt;
  13613. /* Time to stick to current AP after BTM, unit: seconds
  13614. * valid value range: 0 -(2^16-1).
  13615. * Either 0 or (2^16)-1 means stick to AP forever.
  13616. * Default value: 300 will be set if invalid value is given
  13617. */
  13618. A_UINT32 stick_time_seconds;
  13619. /* Disassoc time threshold in milliseconds
  13620. * This time threshold allows the target to judge whether the STA
  13621. * should can move to another AP immediately, or if the STA has time
  13622. * to calculate roaming candidates.
  13623. * If the disassoc_timer_threshold value is 0x0, the field should be
  13624. * disregarded.
  13625. */
  13626. A_UINT32 disassoc_timer_threshold;
  13627. /*
  13628. * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
  13629. * positions) showing for which roam_trigger_reasons the
  13630. * btm query needs to be sent.
  13631. * If roam trigger reasons are unspecified, btm_bitmap will be 0x0.
  13632. */
  13633. A_UINT32 btm_bitmap;
  13634. /*
  13635. * Consider AP as roam candidate only if AP score is better than
  13636. * btm_candidate_min_score for BTM roam trigger
  13637. */
  13638. A_UINT32 btm_candidate_min_score;
  13639. } wmi_btm_config_fixed_param;
  13640. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED 0x0
  13641. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LINEAR 0x1
  13642. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LOG 0x2
  13643. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_EXP 0x3
  13644. typedef struct {
  13645. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_extended_threshold_param */
  13646. A_UINT32 boost_threshold_5g; /** RSSI threshold above which 5GHz RSSI is favored */
  13647. A_UINT32 penalty_threshold_5g; /** RSSI threshold below which 5GHz RSSI is penalized */
  13648. A_UINT32 boost_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
  13649. A_UINT32 boost_factor_5g; /** factor by which 5GHz RSSI is boosted */
  13650. A_UINT32 penalty_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
  13651. A_UINT32 penalty_factor_5g; /** factor by which 5GHz RSSI is penalized */
  13652. A_UINT32 max_boost_5g; /** maximum boost that can be applied to a 5GHz RSSI */
  13653. A_UINT32 max_penalty_5g; /** maximum penality that can be applied to a 5GHz RSSI */
  13654. A_UINT32 good_rssi_threshold; /** RSSI below which roam is kicked in by background scan, although rssi is still good */
  13655. } wmi_roam_scan_extended_threshold_param;
  13656. /**
  13657. * WMI_ROAM_SCAN_PERIOD: period for roam scan.
  13658. * Applicable when the scan mode is Periodic or both.
  13659. */
  13660. typedef struct {
  13661. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param */
  13662. /** unique id identifying the VDEV, generated by the caller */
  13663. A_UINT32 vdev_id;
  13664. /** roam scan period value */
  13665. A_UINT32 roam_scan_period; /* units = milliseconds */
  13666. /** Aging for Roam scans */
  13667. A_UINT32 roam_scan_age;
  13668. /** Inactivity monitoring time to consider device is in inactive state with data count is less than roam_inactive_count */
  13669. A_UINT32 inactivity_time_period; /* units = milliseconds */
  13670. /** Maximum allowed data packets count during inactivity_time_period */
  13671. A_UINT32 roam_inactive_count;
  13672. /** New roam scan period after device is in inactivity state */
  13673. A_UINT32 roam_scan_period_after_inactivity; /* units = milliseconds */
  13674. /** roam full scan period value */
  13675. A_UINT32 roam_full_scan_period; /* units = milliseconds */
  13676. } wmi_roam_scan_period_fixed_param;
  13677. /**
  13678. * WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD : rssi delta to trigger the roam scan.
  13679. * Rssi change threshold used when mode is Rssi change (or) Both.
  13680. * The FW will run the roam scan when ever the rssi changes (up or down) by the value set by this parameter.
  13681. * Note scan is triggered based on the rssi threshold condition set by WMI_ROAM_SCAN_RSSI_THRESHOLD
  13682. */
  13683. typedef struct {
  13684. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param */
  13685. /** unique id identifying the VDEV, generated by the caller */
  13686. A_UINT32 vdev_id;
  13687. /** roam scan rssi change threshold value */
  13688. A_UINT32 roam_scan_rssi_change_thresh;
  13689. /** When using Hw generated beacon RSSI interrupts */
  13690. A_UINT32 bcn_rssi_weight;
  13691. /** Minimum delay between two 5G scans */
  13692. A_UINT32 hirssi_delay_btw_scans;
  13693. } wmi_roam_scan_rssi_change_threshold_fixed_param;
  13694. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1
  13695. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2
  13696. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3
  13697. #define WMI_ROAM_SCAN_LIST_FLAG_FLUSH_STATIC 0x1 /* Flush static roam scan channel list in FW */
  13698. #define WMI_ROAM_SCAN_LIST_FLAG_FLUSH_DYNAMIC 0x2 /* Flush dynamic roam scan channel list in FW */
  13699. /**
  13700. * TLV for roaming channel list
  13701. */
  13702. typedef struct {
  13703. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */
  13704. /** unique id identifying the VDEV, generated by the caller */
  13705. A_UINT32 vdev_id;
  13706. /** WMI_CHAN_LIST_TAG */
  13707. A_UINT32 chan_list_type;
  13708. /** # if channels to scan */
  13709. A_UINT32 num_chan;
  13710. A_UINT32 flags; /* refer to WMI_ROAM_SCAN_LIST_FLAG_xxx defs */
  13711. /**
  13712. * TLV (tag length value) parameters follow the wmi_roam_chan_list
  13713. * structure. The TLV's are:
  13714. * A_UINT32 channel_list[]; // in MHz
  13715. **/
  13716. } wmi_roam_chan_list_fixed_param;
  13717. /** Authentication modes */
  13718. enum {
  13719. WMI_AUTH_NONE, /* no upper level auth */
  13720. WMI_AUTH_OPEN, /* open */
  13721. WMI_AUTH_SHARED, /* shared-key */
  13722. WMI_AUTH_8021X, /* 802.1x */
  13723. WMI_AUTH_AUTO, /* Auto */
  13724. WMI_AUTH_WPA, /* WPA */
  13725. WMI_AUTH_RSNA, /* WPA2/RSNA */
  13726. WMI_AUTH_CCKM, /* CCKM */
  13727. WMI_AUTH_WAPI, /* WAPI */
  13728. WMI_AUTH_AUTO_PSK,
  13729. WMI_AUTH_WPA_PSK,
  13730. WMI_AUTH_RSNA_PSK,
  13731. WMI_AUTH_WAPI_PSK,
  13732. WMI_AUTH_FT_RSNA, /* 11r FT */
  13733. WMI_AUTH_FT_RSNA_PSK,
  13734. WMI_AUTH_RSNA_PSK_SHA256,
  13735. WMI_AUTH_RSNA_8021X_SHA256,
  13736. WMI_AUTH_CCKM_WPA,
  13737. WMI_AUTH_CCKM_RSNA,
  13738. WMI_AUTH_RSNA_FILS_SHA256,
  13739. WMI_AUTH_RSNA_FILS_SHA384,
  13740. WMI_AUTH_RSNA_SUITE_B_8021X_SHA256,
  13741. WMI_AUTH_RSNA_SUITE_B_8021X_SHA384,
  13742. WMI_AUTH_FT_RSNA_SAE,
  13743. WMI_AUTH_FT_RSNA_SUITE_B_8021X_SHA384,
  13744. WMI_AUTH_FT_RSNA_FILS_SHA256,
  13745. WMI_AUTH_FT_RSNA_FILS_SHA384,
  13746. WMI_AUTH_WPA3_SAE,
  13747. WMI_AUTH_WPA3_OWE,
  13748. };
  13749. typedef enum {
  13750. WMI_SCAN_CLIENT_NLO = 0x1, /* 1 */
  13751. WMI_SCAN_CLIENT_EXTSCAN, /* 2 */
  13752. WMI_SCAN_CLIENT_ROAM, /* 3 */
  13753. WMI_SCAN_CLIENT_P2P, /* 4 */
  13754. WMI_SCAN_CLIENT_LPI, /* 5 */
  13755. WMI_SCAN_CLIENT_NAN, /* 6 */
  13756. WMI_SCAN_CLIENT_ANQP, /* 7 */
  13757. WMI_SCAN_CLIENT_OBSS, /* 8 */
  13758. WMI_SCAN_CLIENT_PLM, /* 9 */
  13759. WMI_SCAN_CLIENT_HOST, /* 10 */
  13760. } WMI_SCAN_CLIENT_ID;
  13761. typedef struct {
  13762. /** authentication mode (defined above) */
  13763. A_UINT32 rsn_authmode;
  13764. /** unicast cipher set */
  13765. A_UINT32 rsn_ucastcipherset;
  13766. /** mcast/group cipher set */
  13767. A_UINT32 rsn_mcastcipherset;
  13768. /** mcast/group management frames cipher set */
  13769. A_UINT32 rsn_mcastmgmtcipherset;
  13770. } wmi_rsn_params;
  13771. /** looking for a wps enabled AP */
  13772. #define WMI_AP_PROFILE_FLAG_WPS 0x1
  13773. /** looking for a secure AP */
  13774. #define WMI_AP_PROFILE_FLAG_CRYPTO 0x2
  13775. /** looking for a PMF enabled AP */
  13776. #define WMI_AP_PROFILE_FLAG_PMF 0x4
  13777. /** If this flag is set roam to SAE_H2E (Hash to Element) enabled APs only */
  13778. #define WMI_AP_PROFILE_FLAG_SAE_H2E 0x8
  13779. /* the value used in wmi_roam_cnd_scoring_param->disable_bitmap */
  13780. #define WLAN_ROAM_SCORING_RSSI_DISABLE 0x00000001
  13781. #define WLAN_ROAM_SCORING_HT_DISABLE 0x00000002
  13782. #define WLAN_ROAM_SCORING_VHT_DISABLE 0x00000004
  13783. #define WLAN_ROAM_SCORING_BW_DISABLE 0x00000008
  13784. #define WLAN_ROAM_SCORING_BAND_DISABLE 0x00000010
  13785. #define WLAN_ROAM_SCORING_NSS_DISABLE 0x00000020
  13786. #define WLAN_ROAM_SCORING_CHAN_CONGESTION_DISABLE 0x00000040
  13787. #define WLAN_ROAM_SCORING_BEAMFORMING_DISABLE 0x00000080
  13788. #define WLAN_ROAM_SCORING_PCL_DISABLE 0x00000100
  13789. #define WLAN_ROAM_SCORING_HE_DISABLE 0x00000200
  13790. #define WLAN_ROAM_SCORING_OCE_WAN_DISABLE 0x00000400
  13791. #define WLAN_ROAM_SCORING_ETH_DISABLE 0x00000800
  13792. #define WLAN_ROAM_SCORING_MLO_DISABLE 0x00001000
  13793. #define WLAN_ROAM_SCORING_DISABLE_ALL 0xFFFFFFFF
  13794. #define WLAN_ROAM_SCORING_DEFAULT_PARAM_ALLOW 0x0
  13795. #define WLAN_ROAM_MAX_SELECTION_SCORE 10000
  13796. #define WLAN_ROAM_SCORE_20MHZ_BW_INDEX 0
  13797. #define WLAN_ROAM_SCORE_40MHZ_BW_INDEX 1
  13798. #define WLAN_ROAM_SCORE_80MHZ_BW_INDEX 2
  13799. #define WLAN_ROAM_SCORE_160MHZ_BW_INDEX 3
  13800. #define WLAN_ROAM_SCORE_MAX_BW_INDEX 4
  13801. #define WMI_ROAM_GET_BW_SCORE_PERCENTAGE(value32, bw_index) WMI_GET_BITS(value32, (8 * (bw_index)), 8)
  13802. #define WMI_ROAM_SET_BW_SCORE_PERCENTAGE(value32, score_pcnt, bw_index) WMI_SET_BITS(value32, (8 * (bw_index)), 8, score_pcnt)
  13803. #define WLAN_ROAM_SCORE_NSS_1x1_INDEX 0
  13804. #define WLAN_ROAM_SCORE_NSS_2x2_INDEX 1
  13805. #define WLAN_ROAM_SCORE_NSS_3x3_INDEX 2
  13806. #define WLAN_ROAM_SCORE_NSS_4x4_INDEX 3
  13807. #define WLAN_ROAM_SCORE_MAX_NSS_INDEX 4
  13808. #define WMI_ROAM_GET_NSS_SCORE_PERCENTAGE(value32, nss_index) WMI_GET_BITS(value32, (8 * (nss_index)), 8)
  13809. #define WMI_ROAM_SET_NSS_SCORE_PERCENTAGE(value32, score_pcnt, nss_index) WMI_SET_BITS(value32, (8 * (nss_index)), 8, score_pcnt)
  13810. #define WLAN_ROAM_SCORE_BAND_2G_INDEX 0
  13811. #define WLAN_ROAM_SCORE_BAND_5G_INDEX 1
  13812. #define WLAN_ROAM_SCORE_BAND_6G_INDEX 2
  13813. /* 3 is reserved */
  13814. #define WLAN_ROAM_SCORE_MAX_BAND_INDEX 4
  13815. #define WMI_ROAM_GET_BAND_SCORE_PERCENTAGE(value32, band_index) WMI_GET_BITS(value32, (8 * (band_index)), 8)
  13816. #define WMI_ROAM_SET_BAND_SCORE_PERCENTAGE(value32, score_pcnt, band_index) WMI_SET_BITS(value32, (8 * (band_index)), 8, score_pcnt)
  13817. #define WLAN_ROAM_SCORE_MAX_CHAN_CONGESTION_SLOT 16
  13818. #define WLAN_ROAM_SCORE_DEFAULT_CONGESTION_SLOT 0
  13819. #define WLAN_ROAM_SCORE_MAX_OCE_WAN_SLOT 16
  13820. #define WLAN_ROAM_SCORE_DEFAULT_OCE_WAN_SLOT 0
  13821. #define WLAN_ROAM_SCORE_320MHZ_BW_EXT_INDEX 0
  13822. #define WLAN_ROAM_SCORE_MAX_BW_EXT_INDEX 4
  13823. #define WLAN_ROAM_SCORE_MLSR_INDEX 0
  13824. #define WLAN_ROAM_SCORE_MLMR_INDEX 1
  13825. #define WLAN_ROAM_SCORE_EMLSR_INDEX 2
  13826. #define WLAN_ROAM_SCORE_EMLMR_INDEX 3
  13827. #define WLAN_ROAM_SCORE_MLO_INDEX 4
  13828. #define WMI_ROAM_GET_MLO_SCORE_PERCENTAGE(value32, mlo_index) WMI_GET_BITS(value32, (8 * (mlo_index)), 8)
  13829. #define WMI_ROAM_SET_MLO_SCORE_PERCENTAGE(value32, score_pcnt, mlo_index) WMI_SET_BITS(value32, (8 * (mlo_index)), 8, score_pcnt)
  13830. /**
  13831. best_rssi_threshold: Roamable AP RSSI equal or better than this threshold, full rssi score 100. Units in dBm.
  13832. good_rssi_threshold: Below this threshold, scoring linear percentage between rssi_good_pcnt and 100. Units in dBm.
  13833. bad_rssi_threshold: Between good and bad rssi threshold, scoring linear percentage between rssi_bad_pcnt and rssi_good_pcnt. Units in dBm.
  13834. good_rssi_pcnt: Used to assigned scoring percentage of each slot between best to good rssi threshold. Units in percentage.
  13835. bad_rssi_pcnt: Used to assigned scoring percentage of each slot between good to bad rssi threshold. Units in percentage.
  13836. good_bucket_size : bucket size of slot in good zone. Units in dB.
  13837. bad_bucket_size : bucket size of slot in bad zone. Units in dB.
  13838. rssi_pref_5g_rssi_thresh: Below rssi threshold, 5G AP have given preference of band percentage. Units in dBm.
  13839. */
  13840. /**
  13841. The graph below explains how RSSI scoring percentage is calculated
  13842. as the RSSI improves. In the graph, the derived parameters good_buckets
  13843. and bad_buckets are used. These derived parameters are related to the
  13844. specified parameters as follows:
  13845. good_buckets =
  13846. (best_rssi_threshold - good_rssi_threshold) / good_bucket_size
  13847. bad_buckets =
  13848. (good_rssi_threshold - bad_rssi_threshold) / bad_bucket_size
  13849. | (x0,y0) (x0 = best_rssi, y0 = 100)
  13850. p 100 |-------o
  13851. e | |<--------- (100 - good_rssi_pct)/good_buckets
  13852. r | |___ ,---- good_bucket_size
  13853. c | | |
  13854. e | |_V_
  13855. n | |
  13856. t | |___o (x1,y1) (x1 = good_rssi, y1 = good_rssi_pcnt)
  13857. 80 | |
  13858. % | |<------ (good_rssi_pcnt - bad_rssi_pcnt)/bad_buckets
  13859. | |_____
  13860. | | ,-- bad_bucket_size
  13861. | | |
  13862. | |__v__
  13863. | |
  13864. | |
  13865. 40 | o------------
  13866. | (x2,y2) (x2 = bad_rssi, y2 = bad_rssi_pcnt)
  13867. +------o------------o-----------o------------->
  13868. -50 -70 -80 rssi dBm
  13869. | excellent | good | bad | poor
  13870. | zone | zone | zone | zone
  13871. V V V
  13872. BEST_THRES GOOD_THRES BAD_THRES
  13873. */
  13874. typedef struct {
  13875. A_INT32 best_rssi_threshold;
  13876. A_INT32 good_rssi_threshold;
  13877. A_INT32 bad_rssi_threshold;
  13878. A_UINT32 good_rssi_pcnt;
  13879. A_UINT32 bad_rssi_pcnt;
  13880. A_UINT32 good_bucket_size;
  13881. A_UINT32 bad_bucket_size;
  13882. A_INT32 rssi_pref_5g_rssi_thresh;
  13883. } wmi_roam_cnd_rssi_scoring;
  13884. /**
  13885. Use macro WMI_ROAM_CND_GET/SET_BW_SCORE_PERCENTAGE to get and set the
  13886. value respectively of bw_scoring
  13887. BITS 0-7 :- It contains scoring percentage of 20MHz BW
  13888. BITS 8-15 :- It contains scoring percentage of 40MHz BW
  13889. BITS 16-23 :- It contains scoring percentage of 80MHz BW
  13890. BITS 24-31 :- It contains scoring percentage of 160MHz BW
  13891. Use macro WMI_ROAM_CND_GET/SET_BW_SCORE_PERCENTAGE to get and set the
  13892. value respectively of ext_bw_scoring:
  13893. BITS 0-7 :- It contains scoring percentage of 320MHz BW
  13894. BITS 8-15 :- reserved
  13895. BITS 16-23 :- reserved
  13896. BITS 24-31 :- reserved
  13897. The value of each index must be 0-100
  13898. */
  13899. typedef struct {
  13900. A_UINT32 score_pcnt;
  13901. } wmi_roam_cnd_bw_scoring;
  13902. /**
  13903. Use macro WMI_ROAM_CND_GET/SET_BAND_SCORE_PERCENTAGE to get and set the value respectively.
  13904. BITS 0-7 :- It contains scoring percentage of 2G
  13905. BITS 8-15 :- It contains scoring percentage of 5G
  13906. BITS 16-23 :- reserved
  13907. BITS 24-31 :- reserved
  13908. The value of each index must be 0-100
  13909. */
  13910. typedef struct {
  13911. A_UINT32 score_pcnt;
  13912. } wmi_roam_cnd_band_scoring;
  13913. /**
  13914. Use macro WMI_ROAM_CND_GET/SET_NSS_SCORE_PERCENTAGE to get and set the value respectively.
  13915. BITS 0-7 :- It contains scoring percentage of 1x1
  13916. BITS 8-15 :- It contains scoring percentage of 2x2
  13917. BITS 16-23 :- It contains scoring percentage of 3x3
  13918. BITS 24-31 :- It contains scoring percentage of 4x4
  13919. The value of each index must be 0-100
  13920. */
  13921. typedef struct {
  13922. A_UINT32 score_pcnt;
  13923. } wmi_roam_cnd_nss_scoring;
  13924. /**
  13925. score_pcnt: Contains roam score percentage of each slot of respective channel_congestion_pcnt.It is also used same BITS for slot(0-3)
  13926. BITS 0-7 :- the scoring pcnt when AP is not advertise QBSS/ESP info
  13927. BITS 8-15 :- SLOT_1
  13928. BITS 16-23 :- SLOT_2
  13929. BITS 24-31 :- SLOT_3
  13930. BITS 32- ...
  13931. num_slot will equally divide 100. e.g, if num_slot = 4
  13932. slot 0 = 0-25%, slot 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
  13933. */
  13934. typedef struct {
  13935. A_UINT32 num_slot; /* max 15 */
  13936. A_UINT32 score_pcnt3_to_0;
  13937. A_UINT32 score_pcnt7_to_4;
  13938. A_UINT32 score_pcnt11_to_8;
  13939. A_UINT32 score_pcnt15_to_12;
  13940. } wmi_roam_cnd_esp_qbss_scoring;
  13941. /**
  13942. score_pcnt: Contains roam score percentage of each slot of respective channel_congestion_pcnt.It is also used same BITS for slot(0-3)
  13943. BITS 0-7 :- the scoring pcnt when AP is not advertise QBSS/ESP info
  13944. BITS 8-15 :- SLOT_1
  13945. BITS 16-23 :- SLOT_2
  13946. BITS 24-31 :- SLOT_3
  13947. BITS 32- ...
  13948. num_slot will equally divide 100. e.g, if num_slot = 4
  13949. slot 0 = 0-25%, slot 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
  13950. */
  13951. typedef struct {
  13952. A_UINT32 num_slot; /* max 15 */
  13953. A_UINT32 score_pcnt3_to_0;
  13954. A_UINT32 score_pcnt7_to_4;
  13955. A_UINT32 score_pcnt11_to_8;
  13956. A_UINT32 score_pcnt15_to_12;
  13957. } wmi_roam_cnd_oce_wan_scoring;
  13958. typedef enum {
  13959. WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID_NONE = 0, /* Legacy roam score algorithm */
  13960. WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID_RSSI_CU_BASED = 1, /* Roam score algorithm based on RSSI and CU */
  13961. } WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID;
  13962. /**
  13963. disable_bitmap :- Each bit will be either allow(0)/disallow(1) to considered the roam score param.
  13964. rssi_weightage_pcnt :- RSSI weightage out of total score in percentage
  13965. ht_weightage_pcnt :- HT weightage out of total score in percentage.
  13966. vht_weightage_pcnt :- VHT weightage out of total score in percentage.
  13967. he_weightage_pcnt :- 11ax weightage out of total score in percentage.
  13968. bw_weightage_pcnt :- Bandwidth weightage out of total score in percentage.
  13969. band_weightage_pcnt :- Band(2G/5G) weightage out of total score in percentage.
  13970. nss_weightage_pcnt:- NSS(1x1 / 2x2) weightage out of total score in percentage.
  13971. esp_qbss_weightage_pcnt: ESP/QBSS weightage out of total score in percentage.
  13972. beamforming_weightage_pcnt :- Beamforming weightage out of total score in percentage.
  13973. pcl_weightage_pcnt :- PCL weightage out of total score in percentage.
  13974. oce_wan_weightage_pcnt :- OCE WAN metrics weightage out of total score in percentage.
  13975. rssi_scoring :- RSSI scoring information.
  13976. bw_scoring :- channel BW scoring percentage information.
  13977. band_scoring : - band scording percentage information.
  13978. nss_scoring :- NSS scoring percentage information.
  13979. esp_qbss_scoring :- ESP/QBSS scoring percentage information
  13980. oce_wan_scoring : OCE WAN metrics percentage information
  13981. 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
  13982. 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.
  13983. */
  13984. typedef struct {
  13985. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_scoring_param */
  13986. A_UINT32 disable_bitmap;
  13987. A_INT32 rssi_weightage_pcnt;
  13988. A_INT32 ht_weightage_pcnt;
  13989. A_INT32 vht_weightage_pcnt;
  13990. A_INT32 he_weightage_pcnt;
  13991. A_INT32 bw_weightage_pcnt;
  13992. A_INT32 band_weightage_pcnt;
  13993. A_INT32 nss_weightage_pcnt;
  13994. A_INT32 esp_qbss_weightage_pcnt;
  13995. A_INT32 beamforming_weightage_pcnt;
  13996. A_INT32 pcl_weightage_pcnt;
  13997. A_INT32 oce_wan_weightage_pcnt;
  13998. wmi_roam_cnd_rssi_scoring rssi_scoring;
  13999. wmi_roam_cnd_bw_scoring bw_scoring;
  14000. wmi_roam_cnd_band_scoring band_scoring;
  14001. wmi_roam_cnd_nss_scoring nss_scoring;
  14002. wmi_roam_cnd_esp_qbss_scoring esp_qbss_scoring;
  14003. wmi_roam_cnd_oce_wan_scoring oce_wan_scoring;
  14004. A_UINT32 roam_score_delta_pcnt;
  14005. A_UINT32 roam_score_delta_mask;
  14006. /* Vendor specific roam score algorithm ID from WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID enum */
  14007. A_UINT32 vendor_roam_score_algorithm_id;
  14008. /*
  14009. * During CU and low rssi based roam triggers, consider AP as
  14010. * roam candidate only if its roam score is better than connected AP score
  14011. * by at least candidate_min_roam_score_delta.
  14012. */
  14013. A_UINT32 candidate_min_roam_score_delta;
  14014. /*
  14015. * For OCE Release 2, give weightage to roam candidate tx power if
  14016. * oce_ap_tx_pwr_weightage_pcnt != 0.
  14017. */
  14018. A_UINT32 oce_ap_tx_pwr_weightage_pcnt;
  14019. /*
  14020. * For OCE Release 2, give weightage to roam candidate based on
  14021. * advertised subnet id.
  14022. * Only used if oce_ap_subnet_id_weightage_pcnt != 0.
  14023. */
  14024. A_UINT32 oce_ap_subnet_id_weightage_pcnt;
  14025. /*
  14026. * Give weightage to SAE-PK (Simulataneous Authentication of Equals -
  14027. * Public Key) enabled network APs.
  14028. * Only used if sae_pk_ap_weightage_pcnt != 0.
  14029. */
  14030. A_UINT32 sae_pk_ap_weightage_pcnt;
  14031. /*
  14032. * Give weightage to bandwidth which is greater than 160Mhz.
  14033. */
  14034. wmi_roam_cnd_bw_scoring ext_bw_scoring;
  14035. /*
  14036. * eht_weightage_pcnt :- 11be weightage out of total score in percentage.
  14037. */
  14038. A_UINT32 eht_weightage_pcnt;
  14039. /*
  14040. * mlo_weightage_pcnt :- give weightage to candidate based on MLO support.
  14041. */
  14042. A_UINT32 mlo_weightage_pcnt;
  14043. /*
  14044. * btc_score_factor :- Scale down 2.4GHz AP total score by btc_score_factor
  14045. * during BT coex.
  14046. * Value 0 should be ignored
  14047. */
  14048. A_UINT32 btc_score_factor;
  14049. /*
  14050. * btc_etp_factor :- Scale down 2.4GHz AP total etp value by btc_etp_factor
  14051. * during BT coex.
  14052. * Value 0 should be ignored
  14053. */
  14054. A_UINT32 btc_etp_factor;
  14055. } wmi_roam_cnd_scoring_param;
  14056. typedef struct {
  14057. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_score_delta_param */
  14058. /* Roam trigger reason ID from WMI_ROAM_TRIGGER_REASON_ID */
  14059. A_UINT32 roam_trigger_reason;
  14060. /* Roam score delta in %.
  14061. * Consider AP as roam candidate only if AP score is at least
  14062. * roam_score_delta % better than connected AP score.
  14063. * Ex: roam_score_delta = 20, and connected AP score is 4000,
  14064. * then consider candidate AP only if its score is at least
  14065. * 4800 (= 4000 * 120%)
  14066. */
  14067. A_UINT32 roam_score_delta;
  14068. } wmi_roam_score_delta_param;
  14069. typedef struct {
  14070. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_min_rssi_param */
  14071. /* Roam trigger reason ID from WMI_ROAM_TRIGGER_REASON_ID */
  14072. A_UINT32 roam_trigger_reason;
  14073. /*
  14074. * Consider AP as roam candidate only if AP rssi is better than
  14075. * candidate_min_rssi
  14076. */
  14077. A_UINT32 candidate_min_rssi; /* units = dbm */
  14078. } wmi_roam_cnd_min_rssi_param;
  14079. /** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE
  14080. * and WMI_AP_PROFILE_FLAG_CRYPTO should be clear.
  14081. * To match a WEP enabled AP, the rs_authmode should be set to WMI_AUTH_NONE
  14082. * and WMI_AP_PROFILE_FLAG_CRYPTO should be set .
  14083. */
  14084. typedef struct {
  14085. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_profile */
  14086. /** flags as defined above */
  14087. A_UINT32 flags;
  14088. /**
  14089. * rssi threshold value in dB: the value of the candidate AP should
  14090. * higher by this threshold than the rssi of the currrently associated AP.
  14091. */
  14092. A_UINT32 rssi_threshold;
  14093. /**
  14094. * ssid vlaue to be matched.
  14095. */
  14096. wmi_ssid ssid;
  14097. /**
  14098. * security params to be matched.
  14099. */
  14100. /** authentication mode (defined above) */
  14101. A_UINT32 rsn_authmode;
  14102. /** unicast cipher set */
  14103. A_UINT32 rsn_ucastcipherset;
  14104. /** mcast/group cipher set */
  14105. A_UINT32 rsn_mcastcipherset;
  14106. /** mcast/group management frames cipher set */
  14107. A_UINT32 rsn_mcastmgmtcipherset;
  14108. /**
  14109. * rssi_abs_threshold value: the value of the candidate AP should
  14110. * higher than this absolute RSSI threshold.
  14111. * Zero means no absolute minimum RSSI is required.
  14112. * units are the offset from the noise floor in dB.
  14113. */
  14114. A_UINT32 rssi_abs_thresh;
  14115. /**
  14116. * bg_rssi_threshold value in dB: For background scan the value of
  14117. * the candidate AP should be higher by this threshold than the rssi
  14118. * of the currrently associated AP.
  14119. */
  14120. A_UINT32 bg_rssi_threshold;
  14121. } wmi_ap_profile;
  14122. typedef struct {
  14123. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_owe_ap_profile */
  14124. /* OPEN SSID value when STA is connected to OWE transition AP in OWE security */
  14125. wmi_ssid open_ssid_for_owe_transition;
  14126. } wmi_owe_ap_profile;
  14127. typedef struct {
  14128. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_vendor_scoring_param */
  14129. A_UINT32 tlv_header;
  14130. /** Indicates the channel band for which these vendor scoring params needs to be applied.
  14131. * Refer WLAN_ROAM_SCORE_MAX_BAND_INDEX for possible band_idx values.
  14132. */
  14133. A_UINT32 band_idx;
  14134. /** Below rssi/cu factor_value & factor_score param values are configured by vendor */
  14135. A_UINT32 rssi_factor_value1;
  14136. A_UINT32 rssi_factor_value2;
  14137. A_UINT32 rssi_factor_value3;
  14138. A_UINT32 rssi_factor_value4;
  14139. A_UINT32 rssi_factor_value5;
  14140. A_UINT32 rssi_factor_score1;
  14141. A_UINT32 rssi_factor_score2;
  14142. A_UINT32 rssi_factor_score3;
  14143. A_UINT32 rssi_factor_score4;
  14144. A_UINT32 rssi_factor_score5;
  14145. A_UINT32 cu_factor_value1;
  14146. A_UINT32 cu_factor_value2;
  14147. A_UINT32 cu_factor_score1;
  14148. A_UINT32 cu_factor_score2;
  14149. } wmi_roam_cnd_vendor_scoring_param;
  14150. /** Support early stop roaming scanning when finding a strong candidate AP
  14151. * A 'strong' candidate is
  14152. * 1) Is eligible candidate
  14153. * (all conditions are met in existing candidate selection).
  14154. * 2) Its rssi is better than earlystop threshold.
  14155. * Earlystop threshold will be relaxed as each channel is scanned.
  14156. */
  14157. typedef struct {
  14158. A_UINT32 tlv_header;
  14159. /* Minimum RSSI threshold value for early stop, unit is dB above NF. */
  14160. A_UINT32 roam_earlystop_thres_min;
  14161. /* Maminum RSSI threshold value for early stop, unit is dB above NF. */
  14162. A_UINT32 roam_earlystop_thres_max;
  14163. } wmi_roam_earlystop_rssi_thres_param;
  14164. typedef struct {
  14165. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_dense_thres_param */
  14166. A_UINT32 tlv_header;
  14167. /** rssi threshold offset under trffic and dense env */
  14168. A_UINT32 roam_dense_rssi_thres_offset;
  14169. /** minimum number of APs to determine dense env */
  14170. A_UINT32 roam_dense_min_aps;
  14171. /** initial dense status detected by host at the time of initial connection */
  14172. A_UINT32 roam_dense_status;
  14173. /* traffic threshold to enable aggressive roaming in dense env; units are percent of medium occupancy, 0 - 100 */
  14174. A_UINT32 roam_dense_traffic_thres;
  14175. } wmi_roam_dense_thres_param;
  14176. /* Definition for flags in wmi_roam_bg_scan_roaming_param
  14177. * Bit 0: BG roaming enabled when we connect to 2G AP only and roaming to 5G AP only.
  14178. * Bit 1-31: Reserved
  14179. */
  14180. #define WMI_ROAM_BG_SCAN_FLAGS_2G_TO_5G_ONLY 1
  14181. typedef struct {
  14182. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bg_scan_roaming_param */
  14183. A_UINT32 tlv_header;
  14184. /** rssi threshold in dBm below which roaming will be triggered during background scan(non-roam scan). 0 will disable this threshold */
  14185. A_UINT32 roam_bg_scan_bad_rssi_thresh;
  14186. /** 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 */
  14187. A_UINT32 roam_bg_scan_client_bitmap;
  14188. /** roam scan rssi threshold for 2G band.
  14189. * offset from roam_bg_scan_bad_rssi_thresh, in dB units
  14190. */
  14191. A_INT32 bad_rssi_thresh_offset_2g;
  14192. /* flags for background roaming */
  14193. A_UINT32 flags;
  14194. } wmi_roam_bg_scan_roaming_param;
  14195. /*
  14196. * If there's rx activity during rx_inactivity_ms and avg of data_rssi
  14197. * is better than roam_data_rssi_thres, then suppress low rssi roaming.
  14198. */
  14199. #define WMI_ROAM_DATA_RSSI_FLAG_LOW_RSSI 0x00000001
  14200. /*
  14201. * If there's no rx activity during rx_inactivity_ms or avg of data_rssi
  14202. * is better than roam_data_rssi_thres, then suppress this background roaming.
  14203. */
  14204. #define WMI_ROAM_DATA_RSSI_FLAG_BACKGROUND 0x00000002
  14205. typedef struct {
  14206. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_data_rssi_roaming_param */
  14207. A_UINT32 tlv_header;
  14208. /* flags for when consider data_rssi,
  14209. * valid values are OR operation of WMI_ROAM_DATA_RSSI_FLAG_ .
  14210. * value 0 to disable the feature.
  14211. */
  14212. A_UINT32 flags;
  14213. /**
  14214. * RSSI threshold in dBm above which roaming scan will be supressed
  14215. * during some roaming trigger.
  14216. */
  14217. A_INT32 roam_data_rssi_thres;
  14218. /** rx inactivity time, in unit of milliseconds. */
  14219. A_UINT32 rx_inactivity_ms;
  14220. } wmi_roam_data_rssi_roaming_param;
  14221. /** Beacon filter wmi command info */
  14222. #define BCN_FLT_MAX_SUPPORTED_IES 256
  14223. #define BCN_FLT_MAX_ELEMS_IE_LIST (BCN_FLT_MAX_SUPPORTED_IES/32)
  14224. typedef struct bss_bcn_stats {
  14225. A_UINT32 vdev_id;
  14226. A_UINT32 bss_bcnsdropped;
  14227. A_UINT32 bss_bcnsdelivered;
  14228. } wmi_bss_bcn_stats_t;
  14229. typedef struct bcn_filter_stats {
  14230. A_UINT32 bcns_dropped;
  14231. A_UINT32 bcns_delivered;
  14232. A_UINT32 activefilters;
  14233. wmi_bss_bcn_stats_t bss_stats;
  14234. } wmi_bcnfilter_stats_t;
  14235. typedef struct wmi_add_bcn_filter_cmd {
  14236. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param */
  14237. A_UINT32 vdev_id;
  14238. /*
  14239. * Following this structure is the TLV:
  14240. * A_UINT32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
  14241. */
  14242. } wmi_add_bcn_filter_cmd_fixed_param;
  14243. typedef struct wmi_rmv_bcn_filter_cmd {
  14244. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rmv_bcn_filter_cmd_fixed_param */
  14245. A_UINT32 vdev_id;
  14246. } wmi_rmv_bcn_filter_cmd_fixed_param;
  14247. #define WMI_BCN_SEND_DTIM_ZERO 1
  14248. #define WMI_BCN_SEND_DTIM_BITCTL_SET 2
  14249. typedef struct wmi_bcn_send_from_host {
  14250. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_send_from_host_cmd_fixed_param */
  14251. A_UINT32 vdev_id;
  14252. A_UINT32 data_len;
  14253. union {
  14254. A_UINT32 frag_ptr; /* Physical address of the frame */
  14255. A_UINT32 frag_ptr_lo; /* LSBs of physical address of the frame */
  14256. };
  14257. A_UINT32 frame_ctrl; /* farme ctrl to setup PPDU desc */
  14258. A_UINT32 dtim_flag; /* to control CABQ traffic */
  14259. A_UINT32 bcn_antenna; /* Antenna for beacon transmission */
  14260. A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
  14261. } wmi_bcn_send_from_host_cmd_fixed_param;
  14262. /* cmd to support bcn snd for all vaps at once */
  14263. typedef struct wmi_pdev_send_bcn {
  14264. A_UINT32 num_vdevs;
  14265. wmi_bcn_send_from_host_cmd_fixed_param bcn_cmd[1];
  14266. } wmi_pdev_send_bcn_cmd_t;
  14267. typedef struct wmi_fd_send_from_host {
  14268. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fd_send_from_host_cmd_fixed_param */
  14269. A_UINT32 vdev_id;
  14270. A_UINT32 data_len;
  14271. union {
  14272. A_UINT32 frag_ptr; /* Physical address of the frame */
  14273. A_UINT32 frag_ptr_lo; /* LSBs of physical address of the frame */
  14274. };
  14275. A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
  14276. A_UINT32 frame_ctrl; /* frame ctrl to setup PPDU desc */
  14277. } wmi_fd_send_from_host_cmd_fixed_param;
  14278. /*
  14279. * Control to send broadcast probe response instead of FD frames.
  14280. * When this flag is not set then FD frame will be transmitted when
  14281. * fd_period is non-zero
  14282. */
  14283. #define WMI_FILS_FLAGS_BITMAP_BCAST_PROBE_RSP 0x1
  14284. /*
  14285. * WMI command structure for FILS feature enable/disable
  14286. */
  14287. typedef struct {
  14288. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enable_fils_cmd_fixed_param */
  14289. /* VDEV identifier */
  14290. A_UINT32 vdev_id;
  14291. A_UINT32 fd_period; /* non-zero - enable Fils Discovery frames or broadcast probe response with this period (in TU),
  14292. * 0 - disable FD and broadcast probe response frames */
  14293. A_UINT32 flags; /* WMI_FILS_FLAGS_BITMAP flags */
  14294. } wmi_enable_fils_cmd_fixed_param;
  14295. /*
  14296. * WMI_ROAM_AP_PROFILE: AP profile of connected AP for roaming.
  14297. */
  14298. typedef struct {
  14299. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param */
  14300. /** id of AP criteria */
  14301. A_UINT32 id;
  14302. /** unique id identifying the VDEV, generated by the caller */
  14303. A_UINT32 vdev_id;
  14304. /*
  14305. * Following this structure is the TLV:
  14306. * wmi_ap_profile ap_profile; <-- AP profile info
  14307. * wmi_roam_cnd_scoring_param roam_cnd_scoring_param
  14308. * wmi_roam_score_delta_param roam_score_delta_param_list[]
  14309. * wmi_roam_cnd_min_rssi_param roam_cnd_min_rssi_param_list[]
  14310. * wmi_roam_cnd_vendor_scoring_param roam_cnd_vendor_scoring_param[]
  14311. * wmi_owe_ap_profile owe_ap_profile[]
  14312. */
  14313. } wmi_roam_ap_profile_fixed_param;
  14314. /**
  14315. * WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile.
  14316. */
  14317. typedef struct {
  14318. /** id of AP criteria */
  14319. A_UINT32 id;
  14320. /** unique id identifying the VDEV, generated by the caller */
  14321. A_UINT32 vdev_id;
  14322. /** AP profile info */
  14323. wmi_ap_profile ap_profile;
  14324. } wmi_ofl_scan_add_ap_profile;
  14325. /**
  14326. * WMI_OFL_SCAN_REMOVE_AP_CRITERIA: remove an ap profile.
  14327. */
  14328. typedef struct {
  14329. /** id of AP criteria */
  14330. A_UINT32 id;
  14331. /** unique id identifying the VDEV, generated by the caller */
  14332. A_UINT32 vdev_id;
  14333. } wmi_ofl_scan_remove_ap_profile;
  14334. /**
  14335. * WMI_OFL_SCAN_PERIOD: period in msec for offload scan.
  14336. * 0 will disable ofload scan and a very low value will perform a continous
  14337. * scan.
  14338. */
  14339. typedef struct {
  14340. /** offload scan period value, used for scans used when not connected */
  14341. A_UINT32 ofl_scan_period;
  14342. } wmi_ofl_scan_period;
  14343. /* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */
  14344. #define ROAM_OFFLOAD_PMK_BYTES (32)
  14345. #define ROAM_OFFLOAD_PSK_MSK_BYTES (32)
  14346. #define ROAM_OFFLOAD_KRK_BYTES (16)
  14347. #define ROAM_OFFLOAD_BTK_BYTES (32)
  14348. #define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48)
  14349. #define ROAM_OFFLOAD_NUM_MCS_SET (16)
  14350. /* This TLV will be filled only in case roam offload for wpa2-psk/okc/ese/11r is enabled */
  14351. typedef struct {
  14352. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */
  14353. A_UINT32 rssi_cat_gap; /* gap for every category bucket */
  14354. A_UINT32 prefer_5g; /* prefer select 5G candidate */
  14355. A_UINT32 select_5g_margin;
  14356. A_UINT32 reassoc_failure_timeout; /* reassoc failure timeout */
  14357. A_UINT32 capability;
  14358. A_UINT32 ht_caps_info;
  14359. A_UINT32 ampdu_param;
  14360. A_UINT32 ht_ext_cap;
  14361. A_UINT32 ht_txbf;
  14362. A_UINT32 asel_cap;
  14363. A_UINT32 qos_enabled;
  14364. A_UINT32 qos_caps;
  14365. A_UINT32 wmm_caps;
  14366. A_UINT32 mcsset[ROAM_OFFLOAD_NUM_MCS_SET>>2]; /* since this 4 byte aligned, we don't declare it as tlv array */
  14367. A_UINT32 handoff_delay_for_rx; /* In msec. Delay Hand-Off by this duration to receive pending Rx frames from current BSS */
  14368. A_UINT32 max_mlme_sw_retries; /* maximum number of software retries for preauth and reassoc req */
  14369. A_UINT32 no_ack_timeout; /* In msec. duration to wait before another SW retry made if no ack seen for previous frame */
  14370. 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. */
  14371. A_UINT32 roam_to_current_bss_disable; /* Disable roaming to current bss */
  14372. } wmi_roam_offload_tlv_param;
  14373. /* flags for 11i offload */
  14374. #define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED 0 /* okc is enabled */
  14375. #define WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED 1 /* pmk caching is disabled */
  14376. #define WMI_ROAM_OFFLOAD_FLAG_SAE_SAME_PMKID 2 /* Use same PMKID for WPA3 SAE roaming */
  14377. /* from bit 3 to bit 31 are reserved */
  14378. #define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \
  14379. (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
  14380. } while (0)
  14381. #define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \
  14382. (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
  14383. } while (0)
  14384. #define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag) \
  14385. ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED))
  14386. #define WMI_SET_ROAM_OFFLOAD_PMK_CACHE_ENABLED(flag) \
  14387. do { \
  14388. (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED); \
  14389. } while (0)
  14390. #define WMI_SET_ROAM_OFFLOAD_PMK_CACHE_DISABLED(flag) \
  14391. do { \
  14392. (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED); \
  14393. } while (0)
  14394. #define WMI_GET_ROAM_OFFLOAD_PMK_CACHE_DISABLED(flag) \
  14395. ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED))
  14396. /* This TLV will be filled only in case of wpa-psk/wpa2-psk/wpa3 */
  14397. typedef struct {
  14398. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */
  14399. A_UINT32 flags; /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */
  14400. A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES>>2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */
  14401. A_UINT32 pmk_len; /**the length of pmk. in normal case it should be 32, but for LEAP, is should be 16*/
  14402. A_UINT32 pmk_ext_len; /** the length of extended pmk. in normal case it should be 0, but for suiteB, it should be 16*/
  14403. A_UINT32 pmk_ext[ROAM_OFFLOAD_PMK_BYTES>>2]; /* pmk ext offload. 16 bytes for suiteB */
  14404. } wmi_roam_11i_offload_tlv_param;
  14405. /* This TLV will be filled only in case of 11R*/
  14406. typedef struct {
  14407. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */
  14408. A_UINT32 mdie_present;
  14409. A_UINT32 mdid;
  14410. A_UINT32 r0kh_id[ROAM_OFFLOAD_R0KH_ID_MAX_LEN>>2];
  14411. A_UINT32 r0kh_id_len;
  14412. 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 */
  14413. A_UINT32 psk_msk_len; /**length of psk_msk*/
  14414. A_UINT32 psk_msk_ext_len; /**length of psk_msk_ext*/
  14415. A_UINT32 psk_msk_ext[ROAM_OFFLOAD_PSK_MSK_BYTES>>2];
  14416. A_UINT32 adaptive_11r; /* FW needs to perform adaptive 11r roaming */
  14417. /*
  14418. * FW needs to perform FT initial moiblity association instead of
  14419. * FT roaming for deauth roam trigger
  14420. * 0 - To disable FT-IM
  14421. * 1 - To enable FT-IM
  14422. */
  14423. A_UINT32 ft_im_for_deauth;
  14424. /*
  14425. * FW can prefer doing over-the-ds fast BSS transition instead of
  14426. * over-the-air if associated and target AP are both capable of FT over DS.
  14427. * 0 - To disable FT-over-DS
  14428. * 1 - To enable FT-over-DS
  14429. */
  14430. A_UINT32 ft_over_ds_enable;
  14431. } wmi_roam_11r_offload_tlv_param;
  14432. /* This TLV will be filled only in case of ESE */
  14433. typedef struct {
  14434. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */
  14435. A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES>>2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */
  14436. A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES>>2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */
  14437. } wmi_roam_ese_offload_tlv_param;
  14438. typedef struct {
  14439. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_sae_offload_tlv_param */
  14440. /* SAE SPMK timeout value in seconds after which FW need to perform SAE full authentication to derive new SPMK */
  14441. A_UINT32 spmk_timeout;
  14442. } wmi_roam_sae_offload_tlv_param;
  14443. typedef enum {
  14444. WMI_BL_REASON_NUD_FAILURE = 1,
  14445. WMI_BL_REASON_STA_KICKOUT,
  14446. WMI_BL_REASON_ROAM_HO_FAILURE,
  14447. /* Assoc resp with status code 71 - POOR RSSI CONDITIONS */
  14448. WMI_BL_REASON_ASSOC_REJECT_POOR_RSSI,
  14449. /* Assoc resp with status code 34 - DENIED_POOR_CHANNEL_CONDITIONS */
  14450. WMI_BL_REASON_ASSOC_REJECT_OCE,
  14451. WMI_BL_REASON_USERSPACE_BL,
  14452. WMI_BL_REASON_USERSPACE_AVOID_LIST,
  14453. WMI_BL_REASON_BTM_DIASSOC_IMMINENT,
  14454. WMI_BL_REASON_BTM_BSS_TERMINATION,
  14455. WMI_BL_REASON_BTM_MBO_RETRY,
  14456. /* Reassoc resp with status code 34 - DENIED_POOR_CHANNEL_CONDITIONS */
  14457. WMI_BL_REASON_REASSOC_RSSI_REJECT,
  14458. /* Reassoc resp with status code 17 - DENIED_NO_MORE_STAS */
  14459. WMI_BL_REASON_REASSOC_NO_MORE_STAS,
  14460. } WMI_BLACKLIST_REASON_ID;
  14461. typedef enum {
  14462. WMI_BL_SOURCE_HOST = 1,
  14463. WMI_BL_SOURCE_FW,
  14464. } WMI_BLACKLIST_SOURCE_ID;
  14465. typedef struct {
  14466. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_blacklist_with_timeout_tlv_param */
  14467. A_UINT32 tlv_header;
  14468. /** Blaclisted AP mac address */
  14469. wmi_mac_addr bssid;
  14470. /** How much time in milliseconds to keep AP in blacklist */
  14471. A_UINT32 timeout;
  14472. /** rssi (dBm units) when put in blacklist */
  14473. A_INT32 rssi;
  14474. /* Blacklist reason from WMI_BLACKLIST_REASON_ID */
  14475. A_UINT32 reason;
  14476. /* Source of adding AP to BL from WMI_BLACKLIST_SOURCE_ID */
  14477. A_UINT32 source;
  14478. /*
  14479. * timestamp is the absolute time w.r.t host timer which is synchronized
  14480. * between the host and target.
  14481. * This timestamp indicates the time when AP added to blacklist.
  14482. */
  14483. A_UINT32 timestamp;
  14484. /* Original timeout value in milli seconds when AP added to BL */
  14485. A_UINT32 original_timeout;
  14486. } wmi_roam_blacklist_with_timeout_tlv_param;
  14487. /** WMI_ROAM_BLACKLIST_EVENT: generated whenever STA needs to move AP to blacklist for a particluar time
  14488. * Ex: AP which sends BTM request with disassoc imminent is set should be
  14489. * moved to blacklist until disassociation timer expires
  14490. */
  14491. typedef struct {
  14492. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_blacklist_event_fixed_param */
  14493. A_UINT32 vdev_id;
  14494. /* This TLV is followed by further TLVs:
  14495. * wmi_roam_blacklist_with_timeout_tlv_param blacklist_with_timeout[]
  14496. */
  14497. } wmi_roam_blacklist_event_fixed_param;
  14498. typedef struct {
  14499. A_UINT32 tlv_header;
  14500. /** candidate AP mac address */
  14501. wmi_mac_addr bssid;
  14502. } wmi_roam_pmkid_request_tlv_param;
  14503. /** WMI_ROAM_PMKID_REQUEST_EVENT: generated whenever FW needs the PMKID while roaming **/
  14504. typedef struct {
  14505. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_pmkid_request_event_fixed_param */
  14506. A_UINT32 vdev_id;
  14507. /* This TLV is followed by further TLVs:
  14508. * wmi_roam_pmkid_request_tlv_param pmkid_request[]
  14509. */
  14510. } wmi_roam_pmkid_request_event_fixed_param;
  14511. /** WMI_ROAM_EVENT: roam event triggering the host roam logic.
  14512. * generated when ever a better AP is found in the recent roam scan (or)
  14513. * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received
  14514. * from the current AP.
  14515. */
  14516. typedef struct {
  14517. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_event_fixed_param */
  14518. /** unique id identifying the VDEV, generated by the caller */
  14519. A_UINT32 vdev_id;
  14520. /** reason for roam event */
  14521. A_UINT32 reason;
  14522. /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI*/
  14523. A_UINT32 rssi;
  14524. /** roam notification */
  14525. A_UINT32 notif;
  14526. /** roam notification param
  14527. * Refer to WMI_ROAM_NOTIF_ defs to interpret the notif_params value.
  14528. * notif_params contains roam invoke fail reason from
  14529. * wmi_roam_invoke_error_t if reason is WMI_ROAM_REASON_INVOKE_ROAM_FAIL.
  14530. */
  14531. A_UINT32 notif_params;
  14532. /** roam notification param1
  14533. * Refer to WMI_ROAM_NOTIF_ defs to interpret the notif_params1 value.
  14534. * notif_params1 is exact frame length of deauth or disassoc if reason
  14535. * is WMI_ROAM_REASON_DEAUTH.
  14536. */
  14537. A_UINT32 notif_params1;
  14538. } wmi_roam_event_fixed_param;
  14539. /* roam_reason: bits 0-3 */
  14540. #define WMI_ROAM_REASON_INVALID 0x0 /** invalid reason. Do not interpret reason field */
  14541. #define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */
  14542. #define WMI_ROAM_REASON_BMISS 0x2 /** beacon miss detected */
  14543. #define WMI_ROAM_REASON_LOW_RSSI 0x3 /** connected AP's low rssi condition detected */
  14544. #define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches
  14545. SSID and Security profile in
  14546. WMI_ROAM_AP_PROFILE, found during scan
  14547. triggered upon FINAL_BMISS **/
  14548. #define WMI_ROAM_REASON_HO_FAILED 0x5 /** LFR3.0 roaming failed, indicate the disconnection to host */
  14549. /** WMI_ROAM_REASON_INVOKE_ROAM_FAIL:
  14550. * Result code of WMI_ROAM_INVOKE_CMDID.
  14551. * Any roaming failure before reassociation will be indicated to host
  14552. * with this reason.
  14553. * Any roaming failure after reassociation will be indicated to host with
  14554. * WMI_ROAM_REASON_HO_FAILED no matter WMI_ROAM_INVOKE_CMDID is called or not.
  14555. */
  14556. #define WMI_ROAM_REASON_INVOKE_ROAM_FAIL 0x6
  14557. #define WMI_ROAM_REASON_RSO_STATUS 0x7
  14558. #define WMI_ROAM_REASON_BTM 0x8 /** Roaming because of BTM request received */
  14559. #define WMI_ROAM_REASON_DEAUTH 0x9 /** deauth/disassoc received */
  14560. /* reserved up through 0xF */
  14561. /* subnet status: bits 4-5 */
  14562. typedef enum
  14563. {
  14564. WMI_ROAM_SUBNET_CHANGE_STATUS_UNKNOWN = 0,
  14565. WMI_ROAM_SUBNET_CHANGE_STATUS_UNCHANGED,
  14566. WMI_ROAM_SUBNET_CHANGE_STATUS_CHANGED,
  14567. } wmi_roam_subnet_change_status;
  14568. #define WMI_ROAM_SUBNET_CHANGE_STATUS_MASK 0x30
  14569. #define WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT 4
  14570. #define WMI_SET_ROAM_SUBNET_CHANGE_STATUS(roam_reason, status) \
  14571. do { \
  14572. (roam_reason) |= \
  14573. (((status) << WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) & \
  14574. WMI_ROAM_SUBNET_CHANGE_STATUS_MASK); \
  14575. } while (0)
  14576. #define WMI_GET_ROAM_SUBNET_CHANGE_STATUS(roam_reason) \
  14577. (((roam_reason) & WMI_ROAM_SUBNET_CHANGE_STATUS_MASK) >> \
  14578. WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT)
  14579. #define WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK 0x40
  14580. #define WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT 6
  14581. #define WMI_SET_ROAM_REQUEST_HOST_HW_MODE_CHANGE(roam_reason, status) \
  14582. do { \
  14583. (roam_reason) |= \
  14584. (((status) << WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT) & \
  14585. WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK); \
  14586. } while (0)
  14587. #define WMI_GET_ROAM_REQUEST_HOST_HW_MODE_CHANGE(roam_reason) \
  14588. (((roam_reason) & WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK) >> \
  14589. WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT)
  14590. /* Bits 0-3: stores 4 LSbs of trigger reason.
  14591. * Old host will get trigger reasons <= 15 from this bitfield.
  14592. * Bit 7 will be 1 always to indicate that bits 8-15 are valid.
  14593. * Bits 8-15: full trigger_reason, including values > 15.
  14594. * New host will gett full trigger_reason from this bitfield.
  14595. * Bits 8-11 and bits 0-3 store matching values.
  14596. */
  14597. #define WMI_SET_ROAM_EXT_TRIGGER_REASON(roam_reason, trigger_reason) \
  14598. do { \
  14599. (roam_reason) |= (trigger_reason & 0xf); \
  14600. (roam_reason) |= 0x80; \
  14601. (roam_reason) |= ((trigger_reason & 0xff) << 8); \
  14602. } while (0)
  14603. /* roaming notification */
  14604. #define WMI_ROAM_NOTIF_INVALID 0x0 /** invalid notification. Do not interpret notif field */
  14605. #define WMI_ROAM_NOTIF_ROAM_START 0x1 /** indicate that roaming is started. sent only in non WOW state */
  14606. #define WMI_ROAM_NOTIF_ROAM_ABORT 0x2 /** indicate that roaming is aborted. sent only in non WOW state */
  14607. #define WMI_ROAM_NOTIF_ROAM_REASSOC 0x3 /** indicate that reassociation is done. sent only in non WOW state */
  14608. #define WMI_ROAM_NOTIF_SCAN_MODE_SUCCESS 0x4 /** indicate that roaming scan mode is successful */
  14609. #define WMI_ROAM_NOTIF_SCAN_MODE_FAIL 0x5 /** indicate that roaming scan mode is failed due to internal roaming state */
  14610. #define WMI_ROAM_NOTIF_DISCONNECT 0x6 /** indicate that roaming not allowed due BTM req */
  14611. #define WMI_ROAM_NOTIF_SUBNET_CHANGED 0x7 /** indicate that subnet has changed */
  14612. #define WMI_ROAM_NOTIF_SCAN_START 0x8 /** indicate roam scan start, notif_params to be sent as WMI_ROAM_TRIGGER_REASON_ID */
  14613. #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 */
  14614. #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 */
  14615. #define WMI_ROAM_NOTIF_SCAN_MODE_SUCCESS_WITH_HO_FAIL 0xb /** indicate that roaming scan mode is successful but cause disconnection and subsequent
  14616. ** WMI_ROAM_REASON_HO_FAILED is event expected */
  14617. /**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc)
  14618. * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on these informations
  14619. */
  14620. typedef struct
  14621. {
  14622. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ric_request_fixed_param */
  14623. A_UINT32 vdev_id; /**unique id identifying the VDEV, generated by the caller*/
  14624. A_UINT32 num_ric_request; /**number of ric request ie send to firmware.(max value is 2 now)*/
  14625. A_UINT32 is_add_ric; /**support add ric or delete ric*/
  14626. } wmi_ric_request_fixed_param;
  14627. /**tspec element: refer to 8.4.2.32 of 802.11 2012 spec
  14628. * these elements are used to construct tspec field in RIC request, which allow station to require specific TS when 11r roaming
  14629. */
  14630. typedef struct{
  14631. A_UINT32 tlv_header;
  14632. A_UINT32 ts_info; /** bits value of TS Info field.*/
  14633. A_UINT32 nominal_msdu_size; /**Nominal MSDU Size field*/
  14634. A_UINT32 maximum_msdu_size; /**The Maximum MSDU Size field*/
  14635. A_UINT32 min_service_interval; /**The Minimum Service Interval field*/
  14636. A_UINT32 max_service_interval; /**The Maximum Service Interval field*/
  14637. A_UINT32 inactivity_interval; /**The Inactivity Interval field*/
  14638. A_UINT32 suspension_interval; /**The Suspension Interval field*/
  14639. A_UINT32 svc_start_time; /**The Service Start Time field*/
  14640. A_UINT32 min_data_rate; /**The Minimum Data Rate field*/
  14641. A_UINT32 mean_data_rate; /**The Mean Data Rate field*/
  14642. A_UINT32 peak_data_rate; /**The Peak Data Rate field*/
  14643. A_UINT32 max_burst_size; /**The Burst Size field*/
  14644. A_UINT32 delay_bound; /**The Delay Bound field*/
  14645. A_UINT32 min_phy_rate; /**The Minimum PHY Rate field*/
  14646. A_UINT32 surplus_bw_allowance; /**The Surplus Bandwidth Allowance field*/
  14647. A_UINT32 medium_time; /**The Medium Time field,in units of 32 us/s.*/
  14648. } wmi_ric_tspec;
  14649. /* flags for roam_invoke_cmd */
  14650. /* add this channel into roam cache channel list after this command is finished */
  14651. #define WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE 0
  14652. /* indicate to host of failure if WMI_ROAM_INVOKE_CMDID. */
  14653. #define WMI_ROAM_INVOKE_FLAG_REPORT_FAILURE 1
  14654. /* during host-invoked roaming, don't send null data frame to AP */
  14655. #define WMI_ROAM_INVOKE_FLAG_NO_NULL_FRAME_TO_AP 2
  14656. /* start extra full scan if no candidate found in previous scan */
  14657. #define WMI_ROAM_INVOKE_FLAG_FULL_SCAN_IF_NO_CANDIDATE 3
  14658. /* from bit 4 to bit 31 are reserved */
  14659. #define WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
  14660. (flag) |= (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
  14661. } while (0)
  14662. #define WMI_CLEAR_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
  14663. (flag) &= ~(1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
  14664. } while (0)
  14665. #define WMI_GET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) \
  14666. ((flag) & (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE))
  14667. #define WMI_ROAM_INVOKE_SCAN_MODE_FIXED_CH 0 /* scan given channel only */
  14668. #define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_LIST 1 /* scan cached channel list */
  14669. #define WMI_ROAM_INVOKE_SCAN_MODE_FULL_CH 2 /* scan full channel */
  14670. #define WMI_ROAM_INVOKE_SCAN_MODE_SKIP 3 /* no scan is performed. use beacon/probe resp given by the host */
  14671. #define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_MAP 4 /* scan cached channel map */
  14672. #define WMI_ROAM_INVOKE_AP_SEL_FIXED_BSSID 0 /* roam to given BSSID only */
  14673. #define WMI_ROAM_INVOKE_AP_SEL_ANY_BSSID 1 /* roam to any BSSID */
  14674. enum wlan_roam_invoke_reason {
  14675. ROAM_INVOKE_REASON_UNDEFINED = 0,
  14676. /* FW will use default parameters to do roam scan, ignore other parameters like WLM, etc. */
  14677. ROAM_INVOKE_REASON_NUD_FAILURE, /* Neighbor Unreachable Detection */
  14678. ROAM_INVOKE_REASON_USER_SPACE,
  14679. };
  14680. /** WMI_ROAM_INVOKE_CMD: command to invoke roaming forcefully
  14681. *
  14682. if <roam_scan_ch_mode> is zero and <channel_no> is not given, roaming is not executed.
  14683. if <roam_ap_sel_mode> is zero and <BSSID) is not given, roaming is not executed
  14684. This command can be used to add specific channel into roam cached channel list by following
  14685. <roam_scan_ch_mode> = 0
  14686. <roam_ap_sel_mode> = 0
  14687. <roam_delay> = 0
  14688. <flag> |= WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE
  14689. <BSSID> = do not fill (there will be no actual roaming because of ap_sel_mode is zero, but no BSSID is given)
  14690. <channel_no> = channel list to be added
  14691. */
  14692. typedef struct {
  14693. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_invoke_fixed_param */
  14694. A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming is invoked */
  14695. A_UINT32 flags; /** flags. see WMI_ROAM_INVOKE_FLAG_ above */
  14696. A_UINT32 roam_scan_mode; /** see WMI_ROAM_INVOKE_SCAN_ above */
  14697. A_UINT32 roam_ap_sel_mode; /** see WMI_ROAM_INVOKE_AP_SEL_ above */
  14698. A_UINT32 roam_delay; /** 0 = immediate roam, 1-2^32 = roam after this delay (msec) */
  14699. A_UINT32 num_chan; /** # if channels to scan. In the TLV channel_list[] */
  14700. A_UINT32 num_bssid; /** number of bssids. In the TLV bssid_list[] */
  14701. A_UINT32 num_buf; /** number of buffers In the TLV bcn_prb_buf_list[] */
  14702. A_UINT32 reason; /** reason of invoke roam, see enum wlan_roam_invoke_reason */
  14703. /**
  14704. * TLV (tag length value) parameters follows roam_invoke_req
  14705. * The TLV's are:
  14706. * A_UINT32 channel_list[]; // in MHz
  14707. * wmi_mac_addr bssid_list[];
  14708. * wmi_tlv_buf_len_param bcn_prb_buf_list[];
  14709. * A_UINT8 bcn_prb_frm[];
  14710. */
  14711. } wmi_roam_invoke_cmd_fixed_param;
  14712. /* Definition for op_bitmap */
  14713. enum {
  14714. ROAM_FILTER_OP_BITMAP_BLACK_LIST = 0x1,
  14715. ROAM_FILTER_OP_BITMAP_WHITE_LIST = 0x2,
  14716. ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4,
  14717. ROAM_FILTER_OP_BITMAP_LCA_DISALLOW = 0x8,
  14718. ROAM_FILTER_OP_BITMAP_RSSI_REJECTION_OCE = 0x10,
  14719. };
  14720. /** lca_enable_source_bitmap */
  14721. #define WMI_ROAM_LCA_DISALLOW_SOURCE_PER 0x1
  14722. #define WMI_ROAM_LCA_DISALLOW_SOURCE_BMISS 0x2
  14723. #define WMI_ROAM_LCA_DISALLOW_SOURCE_LOW_RSSI 0x4
  14724. #define WMI_ROAM_LCA_DISALLOW_SOURCE_HIGH_RSSI 0x8
  14725. #define WMI_ROAM_LCA_DISALLOW_SOURCE_PERIODIC 0x10
  14726. #define WMI_ROAM_LCA_DISALLOW_SOURCE_MAWC 0x20 /* MAWC = Motion Aided Wifi connectivity */
  14727. #define WMI_ROAM_LCA_DISALLOW_SOURCE_DENSE 0x40
  14728. #define WMI_ROAM_LCA_DISALLOW_SOURCE_BACKGROUND 0x80
  14729. #define WMI_ROAM_LCA_DISALLOW_SOURCE_FORCED 0x100
  14730. typedef struct {
  14731. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_rejection_list_config_param */
  14732. A_UINT32 tlv_header;
  14733. /** BSSID of AP, who reject (re-)assoc due to low RSSI */
  14734. wmi_mac_addr bssid;
  14735. /** Disallowed AP for certain duration, in units of milliseconds */
  14736. A_UINT32 remaining_disallow_duration;
  14737. /** AP will be allowed for candidate, when AP RSSI better than expected RSSI units in dBm */
  14738. A_INT32 requested_rssi;
  14739. } wmi_roam_rejection_list_config_param;
  14740. 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 */
  14741. typedef struct {
  14742. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */
  14743. A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming filter is adopted */
  14744. A_UINT32 flags; /** flags for filter */
  14745. A_UINT32 op_bitmap; /** 32 bit bitmap to be set on. bit0 = first param, bit 1 = second param...etc. Can be or'ed */
  14746. A_UINT32 num_bssid_black_list; /* number of blacklist in the TLV variable bssid_black_list */
  14747. A_UINT32 num_ssid_white_list; /* number of whitelist in the TLV variable ssid_white_list */
  14748. A_UINT32 num_bssid_preferred_list; /* only for lfr 3.0. number of preferred list & factor in the TLV */
  14749. A_UINT32 num_rssi_rejection_ap; /** number of list of AP who rejected STA due to low RSSI */
  14750. A_UINT32 delta_rssi; /** (dB units) when AB in RSSI blacklist improved by at least delta_rssi, it will be removed from blacklist */
  14751. /**
  14752. * TLV (tag length value) parameters follows roam_filter_list_cmd
  14753. * The TLV's are:
  14754. * wmi_mac_addr bssid_black_list[];
  14755. * wmi_ssid ssid_white_list[];
  14756. * wmi_mac_addr bssid_preferred_list[];
  14757. * A_UINT32 bssid_preferred_factor[];
  14758. * wmi_roam_lca_disallow_config_tlv_param lca_disallow_param[0/1] (opt)
  14759. * wmi_roam_rejection_list_config_param rssi_rejection_list[]
  14760. */
  14761. } wmi_roam_filter_fixed_param;
  14762. typedef struct {
  14763. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_lca_disallow_config_tlv_param */
  14764. A_UINT32 disallow_duration; /** How long LCA AP will be disallowed before it can be a roaming candidate again, in units of seconds */
  14765. 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 */
  14766. A_UINT32 num_disallowed_aps; /** How many APs the target should maintain in its LCA (Last Connected AP) list */
  14767. 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) */
  14768. } wmi_roam_lca_disallow_config_tlv_param;
  14769. typedef struct {
  14770. A_UINT8 address[4]; /* IPV4 address in Network Byte Order */
  14771. } WMI_IPV4_ADDR;
  14772. typedef struct _WMI_IPV6_ADDR {
  14773. A_UINT8 address[16]; /* IPV6 in Network Byte Order */
  14774. } WMI_IPV6_ADDR;
  14775. /* flags for subnet change detection */
  14776. #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0
  14777. #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1
  14778. /* bit 2 to bit 31 are reserved */
  14779. /* set IPv4 enabled/disabled flag and get the flag */
  14780. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \
  14781. (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
  14782. } while (0)
  14783. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \
  14784. (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
  14785. } while (0)
  14786. #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \
  14787. ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED))
  14788. /* set IPv6 enabled flag, disabled and get the flag */
  14789. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \
  14790. (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
  14791. } while (0)
  14792. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \
  14793. (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
  14794. } while (0)
  14795. #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) \
  14796. ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED))
  14797. /**
  14798. * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses
  14799. * to FW. FW uses these parameters for subnet change detection.
  14800. */
  14801. typedef struct {
  14802. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param */
  14803. /** unique id identifying the VDEV, generated by the caller */
  14804. A_UINT32 vdev_id;
  14805. /** IPv4/IPv6 enabled/disabled */
  14806. /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/DISABLED */
  14807. A_UINT32 flag;
  14808. /** Gateway MAC address */
  14809. wmi_mac_addr inet_gw_mac_addr;
  14810. /** IP addresses */
  14811. WMI_IPV4_ADDR inet_gw_ip_v4_addr;
  14812. WMI_IPV6_ADDR inet_gw_ip_v6_addr;
  14813. /** Number of software retries for ARP/Neighbor solicitation request */
  14814. A_UINT32 max_retries;
  14815. /** timeout in milliseconds for each ARP request*/
  14816. A_UINT32 timeout;
  14817. /** number of skipped aps **/
  14818. A_UINT32 num_skip_subnet_change_detection_bssid_list;
  14819. /**
  14820. * TLV (tag length value) parameters follows roam_subnet_change_config_cmd
  14821. * structure. The TLV's are:
  14822. * wmi_mac_addr skip_subnet_change_detection_bssid_list [];
  14823. **/
  14824. } wmi_roam_subnet_change_config_fixed_param;
  14825. typedef enum {
  14826. /** No change in scan mode, use legacy modes */
  14827. ROAM_TRIGGER_SCAN_MODE_NONE = 0,
  14828. /** Trigger only partial roam scan */
  14829. ROAM_TRIGGER_SCAN_MODE_PARTIAL,
  14830. /** Trigger only FULL roam scan */
  14831. ROAM_TRIGGER_SCAN_MODE_FULL,
  14832. /** Don't trigger any roam scan and disconnect from AP */
  14833. ROAM_TRIGGER_SCAN_MODE_NO_SCAN_DISCONNECTION,
  14834. } WMI_ROAM_TRIGGER_SCAN_MODE;
  14835. typedef struct {
  14836. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_configure_roam_trigger_parameters */
  14837. A_UINT32 trigger_reason; /** Roam trigger reason from WMI_ROAM_TRIGGER_REASON_ID */
  14838. A_UINT32 enable; /** 0 - Disable, non-zero - enable */
  14839. A_UINT32 scan_mode; /** Scan mode from WMI_ROAM_TRIGGER_SCAN_MODE */
  14840. /** consider roam trigger if connected AP rssi is worse than trigger_rssi_threshold */
  14841. A_INT32 trigger_rssi_threshold; /* Units in dbm*/
  14842. /*
  14843. * Consider 2.4GHz AP as roam candidate only if AP rssi is better than
  14844. * cand_ap_min_rssi_threshold
  14845. * If valid (non-zero) cand_ap_min_rssi_threshold_5g and
  14846. * cand_ap_min_rssi_threshold_6g values are provided,
  14847. * then cand_ap_min_rssi_threshold should only be applied to 2.4 GHz APs.
  14848. * But if cand_ap_min_rssi_threshold_5g and cand_ap_min_rssi_threshold_6g
  14849. * are zeros, then cand_ap_min_rssi_threshold should be applied to all APs.
  14850. */
  14851. A_INT32 cand_ap_min_rssi_threshold; /* Units in dbm */
  14852. /* Roam score delta in %.
  14853. * Consider AP as roam candidate only if AP score is at least
  14854. * roam_score_delta % better than connected AP score.
  14855. * Ex: roam_score_delta = 20, and connected AP score is 4000,
  14856. * then consider candidate AP only if its score is at least
  14857. * 4800 (= 4000 * 120%)
  14858. */
  14859. A_UINT32 roam_score_delta_percentage;
  14860. /* Reason code to be filled in the response frame from STA.
  14861. Ex: Reason code in the BTM response frame
  14862. Valid values are 0 - 255 */
  14863. A_UINT32 reason_code;
  14864. /*
  14865. * Consider 5GHz AP as roam candidate only if AP rssi is better than
  14866. * cand_ap_min_rssi_threshold_5g
  14867. */
  14868. A_INT32 cand_ap_min_rssi_threshold_5g; /* Units in dbm */
  14869. /*
  14870. * Consider 6GHz AP as roam candidate only if AP rssi is better than
  14871. * cand_ap_min_rssi_threshold_6g
  14872. */
  14873. A_INT32 cand_ap_min_rssi_threshold_6g; /* Units in dbm */
  14874. } wmi_configure_roam_trigger_parameters;
  14875. /**
  14876. * WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON:
  14877. * Enable or disable roaming triggers in FW.
  14878. */
  14879. typedef struct {
  14880. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_enable_disable_trigger_reason_fixed_param */
  14881. /** unique id identifying the VDEV, generated by the caller */
  14882. A_UINT32 vdev_id;
  14883. /**
  14884. * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
  14885. * positions) showing for which roam_trigger_reasons are enabled by
  14886. * bit value equal 0x1, and which roam_trigger_reasons are disabled by
  14887. * bit value equal 0x0.
  14888. */
  14889. A_UINT32 trigger_reason_bitmask;
  14890. /**
  14891. * The following TLVs will follow this fixed_param TLV:
  14892. *
  14893. * wmi_configure_roam_trigger_parameters config_roam_trigger_param[]
  14894. * Roam trigger configuration per roam trigger.
  14895. * The number of elements in this TLV array is limited to
  14896. * WMI_ROAM_TRIGGER_EXT_REASON_MAX
  14897. */
  14898. } wmi_roam_enable_disable_trigger_reason_fixed_param;
  14899. /** WMI_PROFILE_MATCH_EVENT: offload scan
  14900. * generated when ever atleast one of the matching profiles is found
  14901. * in recent NLO scan. no data is carried with the event.
  14902. */
  14903. /** P2P specific commands */
  14904. /**
  14905. * WMI_P2P_DEV_SET_DEVICE_INFO : p2p device info, which will be used by
  14906. * FW to generate P2P IE tobe carried in probe response frames.
  14907. * FW will respond to probe requests while in listen state.
  14908. */
  14909. typedef struct {
  14910. /* number of secondary device types,supported */
  14911. A_UINT32 num_secondary_dev_types;
  14912. /**
  14913. * followed by 8 bytes of primary device id and
  14914. * num_secondary_dev_types * 8 bytes of secondary device
  14915. * id.
  14916. */
  14917. } wmi_p2p_dev_set_device_info;
  14918. /** WMI_P2P_DEV_SET_DISCOVERABILITY: enable/disable discoverability
  14919. * state. if enabled, an active STA/AP will respond to P2P probe requests on
  14920. * the operating channel of the VDEV.
  14921. */
  14922. typedef struct {
  14923. /* 1:enable disoverability, 0:disable discoverability */
  14924. A_UINT32 enable_discoverability;
  14925. } wmi_p2p_set_discoverability;
  14926. /** WMI_P2P_GO_SET_BEACON_IE: P2P IE to be added to
  14927. * beacons generated by FW. used in FW beacon mode.
  14928. * the FW will add this IE to beacon in addition to the beacon
  14929. * template set by WMI_BCN_TMPL_CMDID command.
  14930. */
  14931. typedef struct {
  14932. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_set_beacon_ie_fixed_param */
  14933. /** unique id identifying the VDEV, generated by the caller */
  14934. A_UINT32 vdev_id;
  14935. /* ie length */
  14936. A_UINT32 ie_buf_len;
  14937. /* Following this structure is the TLV byte stream of ie data of length ie_buf_len:
  14938. * A_UINT8 ie_data[]; <-- length in byte given by field num_data.
  14939. */
  14940. } wmi_p2p_go_set_beacon_ie_fixed_param;
  14941. /** WMI_P2P_GO_PROBE_RESP_IE: P2P IE to be added to
  14942. * probe response generated by FW. used in FW beacon mode.
  14943. * the FW will add this IE to probe response in addition to the probe response
  14944. * template set by WMI_PRB_TMPL_CMDID command.
  14945. */
  14946. typedef struct {
  14947. /** unique id identifying the VDEV, generated by the caller */
  14948. A_UINT32 vdev_id;
  14949. /* ie length */
  14950. A_UINT32 ie_buf_len;
  14951. /*followed by byte stream of ie data of length ie_buf_len */
  14952. } wmi_p2p_go_set_probe_resp_ie;
  14953. /** WMI_P2P_SET_VENDOR_IE_DATA_CMDID: Vendor specific P2P IE data, which will
  14954. * be used by the FW to parse the P2P NoA attribute in beacons, probe resposes
  14955. * and action frames received by the P2P Client.
  14956. * Note: This command is currently used only for Apple P2P implementation.
  14957. */
  14958. typedef struct {
  14959. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param */
  14960. /** OS specific P2P IE OUI (3 bytes) + OUI type (1 byte) */
  14961. A_UINT32 p2p_ie_oui_type;
  14962. /** OS specific NoA Attribute ID */
  14963. A_UINT32 p2p_noa_attribute;
  14964. } wmi_p2p_set_vendor_ie_data_cmd_fixed_param;
  14965. /*----P2P disc offload definition ----*/
  14966. typedef struct {
  14967. A_UINT32 pattern_type;
  14968. /**
  14969. * TLV (tag length value) paramerters follow the pattern structure.
  14970. * TLV can contain bssid list, ssid list and
  14971. * ie. the TLV tags are defined above;
  14972. */
  14973. } wmi_p2p_disc_offload_pattern_cmd;
  14974. typedef struct {
  14975. /* unique id identifying the VDEV, generated by the caller */
  14976. A_UINT32 vdev_id;
  14977. /* mgmt type of the ie*/
  14978. A_UINT32 mgmt_type;
  14979. /* ie length */
  14980. A_UINT32 ie_buf_len;
  14981. /*followed by byte stream of ie data of length ie_buf_len */
  14982. } wmi_p2p_disc_offload_appie_cmd;
  14983. typedef struct {
  14984. /* enable/disable p2p find offload*/
  14985. A_UINT32 enable;
  14986. /* unique id identifying the VDEV, generated by the caller */
  14987. A_UINT32 vdev_id;
  14988. /* p2p find type */
  14989. A_UINT32 disc_type;
  14990. /* p2p find perodic */
  14991. A_UINT32 perodic;
  14992. /* p2p find listen channel in MHz */
  14993. A_UINT32 listen_channel;
  14994. /* p2p find full channel number */
  14995. A_UINT32 num_scan_chans;
  14996. /**
  14997. * TLV (tag length value) paramerters follow the pattern structure.
  14998. * TLV contain channel list in MHz
  14999. */
  15000. } wmi_p2p_disc_offload_config_cmd;
  15001. /*----P2P OppPS definition ----*/
  15002. typedef struct {
  15003. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param */
  15004. A_UINT32 tlv_header;
  15005. /* unique id identifying the VDEV, generated by the caller */
  15006. A_UINT32 vdev_id;
  15007. /* OppPS attributes */
  15008. /** Bit 0: Indicate enable/disable of OppPS
  15009. * Bits 7-1: Ctwindow in TUs
  15010. * Bits 31-8: Reserved
  15011. */
  15012. A_UINT32 oppps_attr;
  15013. } wmi_p2p_set_oppps_cmd_fixed_param;
  15014. #define WMI_UNIFIED_OPPPS_ATTR_ENALBED 0x1
  15015. #define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S 0
  15016. #define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr) \
  15017. WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED)
  15018. #define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr) \
  15019. WMI_F_RMW((hdr)->oppps_attr, 0x1, \
  15020. WMI_UNIFIED_OPPPS_ATTR_ENALBED);
  15021. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN 0xfe
  15022. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S 1
  15023. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr) \
  15024. WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN)
  15025. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v) \
  15026. WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f, \
  15027. WMI_UNIFIED_OPPPS_ATTR_CTWIN);
  15028. typedef enum p2p_lo_start_ctrl_flags_e {
  15029. P2P_LO_START_CTRL_FLAG_FLUSH_LISTEN_RESULT = 1 << 0, /* flush prob. req when host is awake */
  15030. } p2p_lo_start_ctrl_flags;
  15031. #define P2P_LO_PER_DEV_TYPE_LEN 8
  15032. #define P2P_LO_DEV_TYPES_COUNT_MAX 10
  15033. #define P2P_LO_DEV_TYPES_LEN_MAX (P2P_LO_PER_DEV_TYPE_LEN * P2P_LO_DEV_TYPES_COUNT_MAX)
  15034. #define P2P_LO_PROB_RESP_MAX_LEN 512
  15035. typedef struct {
  15036. A_UINT32 tlv_header;
  15037. A_UINT32 vdev_id;
  15038. A_UINT32 ctl_flags; /* refer to enum_p2p_lo_start_ctrl_flags_e */
  15039. A_UINT32 channel; /* MHz */
  15040. A_UINT32 period; /* ms */
  15041. A_UINT32 interval; /* ms, interval should be larger than period */
  15042. A_UINT32 count; /* 0 means forever */
  15043. /*
  15044. * device_types_len specifies the number of bytes in the
  15045. * device_types_data[] byte-array TLV that follows this TLV.
  15046. * The data in device_types_data[] is in 8-byte elements, so
  15047. * device_types_len will be a multiple of 8.
  15048. * Refer to P2P_LO_DEV_TYPES_LEN_MAX
  15049. */
  15050. A_UINT32 device_types_len;
  15051. /*
  15052. * prob_resp_len specifies the number of bytes in the
  15053. * prob_resp_data[] byte-array TLV that follows this TLV.
  15054. * Refer to P2P_LO_PROB_RESP_MAX_LEN
  15055. */
  15056. A_UINT32 prob_resp_len;
  15057. /*
  15058. * Two other TLVs follow this TLV:
  15059. * A_UINT8 device_types_data[device_types_len];
  15060. * A_UINT8 prob_resp_data[prob_resp_len];
  15061. * The information in device_types_data[] and prob_resp_data[]
  15062. * needs to be provided to the target in over-the-air byte order.
  15063. * On a big-endian host, if device_types_data and prob_resp_data
  15064. * are initially in the correct over-the-air byte order,
  15065. * the automatic byteswap for endianness-correction during WMI
  15066. * message download will mess up the byte order.
  15067. * Thus, a big-endian host needs to explicitly byte-swap the bytes
  15068. * within each quad-byte segment of device_types_data[] and
  15069. * prob_resp_data[], so that the automatic byte-swap applied during
  15070. * WMI download from a big-endian host to the little-endian target
  15071. * will restore device_types_data and prob_resp_data into the
  15072. * correct byte ordering.
  15073. */
  15074. } wmi_p2p_lo_start_cmd_fixed_param;
  15075. typedef struct {
  15076. A_UINT32 tlv_header;
  15077. A_UINT32 vdev_id;
  15078. } wmi_p2p_lo_stop_cmd_fixed_param;
  15079. typedef enum p2p_lo_stopped_reason_e {
  15080. P2P_LO_STOPPED_REASON_COMPLETE = 0, /* finished as scheduled */
  15081. P2P_LO_STOPPED_REASON_RECV_STOP_CMD, /* host stops it */
  15082. P2P_LO_STOPPED_REASON_INVALID_LO_PAR, /* invalid listen offload par */
  15083. P2P_LO_STOPPED_REASON_FW_NOT_SUPPORT, /* vdev cannot support it right now */
  15084. } p2p_lo_stopped_reason;
  15085. typedef struct {
  15086. A_UINT32 tlv_header;
  15087. A_UINT32 vdev_id;
  15088. A_UINT32 reason;/* refer to p2p_lo_stopped_reason_e */
  15089. } wmi_p2p_lo_stopped_event_fixed_param;
  15090. typedef enum {
  15091. WMI_MNT_FILTER_CONFIG_MANAGER,
  15092. WMI_MNT_FILTER_CONFIG_CONTROL,
  15093. WMI_MNT_FILTER_CONFIG_DATA,
  15094. WMI_MNT_FILTER_CONFIG_ALL,
  15095. WMI_MNT_FILTER_CONFIG_UNKNOWN,
  15096. } WMI_MNT_FILTER_CONFIG_TYPE;
  15097. typedef struct {
  15098. A_UINT32 tlv_header;
  15099. A_UINT32 vdev_id;
  15100. A_UINT32 clear_or_set;
  15101. A_UINT32 configure_type; /* see WMI_MNT_FILTER_CONFIG_TYPE */
  15102. } wmi_mnt_filter_cmd_fixed_param;
  15103. typedef struct {
  15104. A_UINT32 time32; /* upper 32 bits of time stamp */
  15105. A_UINT32 time0; /* lower 32 bits of time stamp */
  15106. } A_TIME64;
  15107. typedef enum wmi_peer_sta_kickout_reason {
  15108. WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0, /* default value to preserve legacy behavior */
  15109. WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1,
  15110. WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2,
  15111. WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3,
  15112. WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4, /* TDLS peer has disappeared. All tx is failing */
  15113. WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5,
  15114. } PEER_KICKOUT_REASON;
  15115. typedef struct {
  15116. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_kickout_event_fixed_param */
  15117. /** peer mac address */
  15118. wmi_mac_addr peer_macaddr;
  15119. /** Reason code, defined as above */
  15120. A_UINT32 reason;
  15121. /** RSSI of the last bcn (averaged) in dB. 0 means Noise Floor value */
  15122. A_UINT32 rssi;
  15123. } wmi_peer_sta_kickout_event_fixed_param;
  15124. #define WMI_WLAN_PROFILE_MAX_HIST 3
  15125. #define WMI_WLAN_PROFILE_MAX_BIN_CNT 32
  15126. typedef struct _wmi_wlan_profile_t {
  15127. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_t */
  15128. A_UINT32 id;
  15129. A_UINT32 cnt;
  15130. A_UINT32 tot;
  15131. A_UINT32 min;
  15132. A_UINT32 max;
  15133. A_UINT32 hist_intvl;
  15134. A_UINT32 hist[WMI_WLAN_PROFILE_MAX_HIST];
  15135. } wmi_wlan_profile_t;
  15136. typedef struct _wmi_wlan_profile_ctx_t {
  15137. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_ctx_t */
  15138. A_UINT32 tot; /* time in us */
  15139. A_UINT32 tx_msdu_cnt;
  15140. A_UINT32 tx_mpdu_cnt;
  15141. A_UINT32 tx_ppdu_cnt;
  15142. A_UINT32 rx_msdu_cnt;
  15143. A_UINT32 rx_mpdu_cnt;
  15144. A_UINT32 bin_count;
  15145. } wmi_wlan_profile_ctx_t;
  15146. typedef struct {
  15147. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_trigger_cmd_fixed_param */
  15148. A_UINT32 enable;
  15149. } wmi_wlan_profile_trigger_cmd_fixed_param;
  15150. typedef struct {
  15151. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_get_prof_data_cmd_fixed_param */
  15152. A_UINT32 value;
  15153. } wmi_wlan_profile_get_prof_data_cmd_fixed_param;
  15154. typedef struct {
  15155. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_set_hist_intvl_cmd_fixed_param */
  15156. A_UINT32 profile_id;
  15157. A_UINT32 value;
  15158. } wmi_wlan_profile_set_hist_intvl_cmd_fixed_param;
  15159. typedef struct {
  15160. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_enable_profile_id_cmd_fixed_param */
  15161. A_UINT32 profile_id;
  15162. A_UINT32 enable;
  15163. } wmi_wlan_profile_enable_profile_id_cmd_fixed_param;
  15164. /*Wifi header is upto 26, LLC is 8, with 14 byte duplicate in 802.3 header, that's 26+8-14=20.
  15165. 146-128=18. So this means it is converted to non-QoS header. Riva FW take care of the QOS/non-QOS
  15166. when comparing wifi header.*/
  15167. /* NOTE: WOW_DEFAULT_BITMAP_PATTERN_SIZE(_DWORD) and WOW_DEFAULT_BITMASK_SIZE(_DWORD) can't be changed without breaking the compatibility */
  15168. #define WOW_DEFAULT_BITMAP_PATTERN_SIZE 146
  15169. #define WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD 37 /* Convert WOW_DEFAULT_EVT_BUF_SIZE into Int32 size */
  15170. #define WOW_DEFAULT_BITMASK_SIZE 146
  15171. #define WOW_DEFAULT_BITMASK_SIZE_DWORD 37
  15172. #define WOW_MAX_BITMAP_FILTERS 32
  15173. #define WOW_DEFAULT_MAGIG_PATTERN_MATCH_CNT 16
  15174. #define WOW_EXTEND_PATTERN_MATCH_CNT 16
  15175. #define WOW_SHORT_PATTERN_MATCH_CNT 8
  15176. #define WOW_DEFAULT_EVT_BUF_SIZE 148 /* Maximum 148 bytes of the data is copied starting from header incase if the match is found.
  15177. The 148 comes from (128 - 14) payload size + 8bytes LLC + 26bytes MAC header*/
  15178. #define WOW_DEFAULT_IOAC_PATTERN_SIZE 6
  15179. #define WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD 2
  15180. #define WOW_DEFAULT_IOAC_RANDOM_SIZE 6
  15181. #define WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD 2
  15182. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE 120
  15183. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD 30
  15184. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE 32
  15185. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD 8
  15186. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE 32
  15187. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD 8
  15188. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE 128
  15189. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD 32
  15190. typedef enum pattern_type_e {
  15191. WOW_PATTERN_MIN = 0,
  15192. WOW_BITMAP_PATTERN = WOW_PATTERN_MIN,
  15193. WOW_IPV4_SYNC_PATTERN,
  15194. WOW_IPV6_SYNC_PATTERN,
  15195. WOW_WILD_CARD_PATTERN,
  15196. WOW_TIMER_PATTERN,
  15197. WOW_MAGIC_PATTERN,
  15198. WOW_IPV6_RA_PATTERN,
  15199. WOW_IOAC_PKT_PATTERN,
  15200. WOW_IOAC_TMR_PATTERN,
  15201. WOW_IOAC_SOCK_PATTERN,
  15202. WOW_PATTERN_MAX
  15203. } WOW_PATTERN_TYPE;
  15204. typedef enum event_type_e {
  15205. WOW_BMISS_EVENT = 0, /* 0 */
  15206. WOW_BETTER_AP_EVENT, /* 1 */
  15207. WOW_DEAUTH_RECVD_EVENT, /* 2 */
  15208. WOW_MAGIC_PKT_RECVD_EVENT, /* 3 */
  15209. WOW_GTK_ERR_EVENT, /* 4 */
  15210. WOW_FOURWAY_HSHAKE_EVENT, /* 5 */
  15211. WOW_EAPOL_RECVD_EVENT, /* 6 */
  15212. WOW_NLO_DETECTED_EVENT, /* 7 */
  15213. WOW_DISASSOC_RECVD_EVENT, /* 8 */
  15214. WOW_PATTERN_MATCH_EVENT, /* 9 */
  15215. WOW_CSA_IE_EVENT, /* 10 */
  15216. WOW_PROBE_REQ_WPS_IE_EVENT, /* 11 */
  15217. WOW_AUTH_REQ_EVENT, /* 12 */
  15218. WOW_ASSOC_REQ_EVENT, /* 13 */
  15219. WOW_HTT_EVENT, /* 14 */
  15220. WOW_RA_MATCH_EVENT, /* 15 */
  15221. WOW_HOST_AUTO_SHUTDOWN_EVENT, /* 16 */
  15222. WOW_IOAC_MAGIC_EVENT, /* 17 */
  15223. WOW_IOAC_SHORT_EVENT, /* 18 */
  15224. WOW_IOAC_EXTEND_EVENT, /* 19 */
  15225. WOW_IOAC_TIMER_EVENT, /* 20 */
  15226. WOW_DFS_PHYERR_RADAR_EVENT, /* 21 */
  15227. WOW_BEACON_EVENT, /* 22 */
  15228. WOW_CLIENT_KICKOUT_EVENT, /* 23 */
  15229. WOW_NAN_EVENT, /* 24 */
  15230. WOW_EXTSCAN_EVENT, /* 25 */
  15231. WOW_IOAC_REV_KA_FAIL_EVENT, /* 26 */
  15232. WOW_IOAC_SOCK_EVENT, /* 27 */
  15233. WOW_NLO_SCAN_COMPLETE_EVENT, /* 28 */
  15234. WOW_NAN_DATA_EVENT, /* 29 */
  15235. WOW_NAN_RTT_EVENT, /* DEPRECATED, UNUSED; 30 */
  15236. WOW_OEM_RESPONSE_EVENT = WOW_NAN_RTT_EVENT, /* reuse deprecated event value; 30 */
  15237. WOW_TDLS_CONN_TRACKER_EVENT, /* 31 */
  15238. WOW_CRITICAL_LOG_EVENT, /* 32 + 0 */
  15239. WOW_CHIP_POWER_FAILURE_DETECT_EVENT, /* 32 + 1 */
  15240. WOW_11D_SCAN_EVENT, /* 32 + 2 */
  15241. WOW_SAP_OBSS_DETECTION_EVENT, /* 32 + 3 */
  15242. WOW_BSS_COLOR_COLLISION_DETECT_EVENT, /* 32 + 4 */
  15243. WOW_TKIP_MIC_ERR_FRAME_RECVD_EVENT, /* 32 + 5 */
  15244. WOW_ROAM_PREAUTH_START_EVENT, /* 32 + 6 */
  15245. WOW_ROAM_PMKID_REQUEST_EVENT, /* 32 + 7 */
  15246. WOW_DFS_CAC_COMPLETE_EVENT, /* 32 + 8 */
  15247. WOW_VDEV_DISCONNECT_EVENT, /* 32 + 9 */
  15248. WOW_TWT_EVENT, /* 32 + 10 */
  15249. WOW_DCS_INTERFERENCE_DET, /* 32 + 11 */
  15250. } WOW_WAKE_EVENT_TYPE;
  15251. typedef enum wake_reason_e {
  15252. WOW_REASON_UNSPECIFIED = -1,
  15253. WOW_REASON_NLOD = 0,
  15254. WOW_REASON_AP_ASSOC_LOST,
  15255. WOW_REASON_LOW_RSSI,
  15256. WOW_REASON_DEAUTH_RECVD,
  15257. WOW_REASON_DISASSOC_RECVD,
  15258. WOW_REASON_GTK_HS_ERR,
  15259. WOW_REASON_EAP_REQ,
  15260. WOW_REASON_FOURWAY_HS_RECV,
  15261. WOW_REASON_TIMER_INTR_RECV,
  15262. WOW_REASON_PATTERN_MATCH_FOUND,
  15263. WOW_REASON_RECV_MAGIC_PATTERN,
  15264. WOW_REASON_P2P_DISC,
  15265. WOW_REASON_WLAN_HB,
  15266. WOW_REASON_CSA_EVENT,
  15267. WOW_REASON_PROBE_REQ_WPS_IE_RECV,
  15268. WOW_REASON_AUTH_REQ_RECV,
  15269. WOW_REASON_ASSOC_REQ_RECV,
  15270. WOW_REASON_HTT_EVENT,
  15271. WOW_REASON_RA_MATCH,
  15272. WOW_REASON_HOST_AUTO_SHUTDOWN,
  15273. WOW_REASON_IOAC_MAGIC_EVENT,
  15274. WOW_REASON_IOAC_SHORT_EVENT,
  15275. WOW_REASON_IOAC_EXTEND_EVENT,
  15276. WOW_REASON_IOAC_TIMER_EVENT,
  15277. WOW_REASON_ROAM_HO,
  15278. WOW_REASON_DFS_PHYERR_RADADR_EVENT,
  15279. WOW_REASON_BEACON_RECV,
  15280. WOW_REASON_CLIENT_KICKOUT_EVENT,
  15281. WOW_REASON_NAN_EVENT,
  15282. WOW_REASON_EXTSCAN,
  15283. WOW_REASON_RSSI_BREACH_EVENT,
  15284. WOW_REASON_IOAC_REV_KA_FAIL_EVENT,
  15285. WOW_REASON_IOAC_SOCK_EVENT,
  15286. WOW_REASON_NLO_SCAN_COMPLETE,
  15287. WOW_REASON_PACKET_FILTER_MATCH,
  15288. WOW_REASON_ASSOC_RES_RECV,
  15289. WOW_REASON_REASSOC_REQ_RECV,
  15290. WOW_REASON_REASSOC_RES_RECV,
  15291. WOW_REASON_ACTION_FRAME_RECV,
  15292. WOW_REASON_BPF_ALLOW,
  15293. WOW_REASON_NAN_DATA,
  15294. WOW_REASON_NAN_RTT, /* DEPRECATED, UNUSED */
  15295. WOW_REASON_OEM_RESPONSE_EVENT = WOW_REASON_NAN_RTT, /* reuse deprecated reason value */
  15296. WOW_REASON_TDLS_CONN_TRACKER_EVENT,
  15297. WOW_REASON_CRITICAL_LOG,
  15298. WOW_REASON_P2P_LISTEN_OFFLOAD,
  15299. WOW_REASON_NAN_EVENT_WAKE_HOST,
  15300. WOW_REASON_CHIP_POWER_FAILURE_DETECT,
  15301. WOW_REASON_11D_SCAN,
  15302. WOW_REASON_THERMAL_CHANGE,
  15303. WOW_REASON_OIC_PING_OFFLOAD,
  15304. WOW_REASON_WLAN_DHCP_RENEW,
  15305. WOW_REASON_SAP_OBSS_DETECTION,
  15306. WOW_REASON_BSS_COLOR_COLLISION_DETECT,
  15307. WOW_REASON_TKIP_MIC_ERR_FRAME_RECVD_DETECT,
  15308. WOW_REASON_WLAN_MD, /* motion detected */
  15309. WOW_REASON_WLAN_BL, /* baselining done */
  15310. WOW_REASON_NTH_BCN_OFLD, /* nth beacon forward to host */
  15311. WOW_REASON_PKT_CAPTURE_MODE_WAKE,
  15312. WOW_REASON_PAGE_FAULT, /* Host wake up due to page fault */
  15313. WOW_REASON_ROAM_PREAUTH_START,
  15314. WOW_REASON_ROAM_PMKID_REQUEST,
  15315. WOW_REASON_RFKILL,
  15316. WOW_REASON_DFS_CAC,
  15317. WOW_REASON_VDEV_DISCONNECT,
  15318. WOW_REASON_LOCAL_DATA_UC_DROP,
  15319. WOW_REASON_GENERIC_WAKE, /* A generic reason that host should be woken up */
  15320. WOW_REASON_ERR_PKT_TRIGGERED_WAKEUP,
  15321. WOW_REASON_TWT,
  15322. WOW_REASON_FATAL_EVENT_WAKE,
  15323. WOW_REASON_DCS_INT_DET,
  15324. /* add new WOW_REASON_ defs before this line */
  15325. WOW_REASON_MAX,
  15326. WOW_REASON_DEBUG_TEST = 0xFF,
  15327. } WOW_WAKE_REASON_TYPE;
  15328. typedef enum {
  15329. WOW_IFACE_PAUSE_ENABLED,
  15330. WOW_IFACE_PAUSE_DISABLED
  15331. } WOW_IFACE_STATUS;
  15332. enum {
  15333. WMI_WOW_FLAG_IGNORE_PCIE_RESET = 0x00000001, /* some win10 platfrom will not assert pcie_reset for wow.*/
  15334. /* WMI_WOW_FLAG_SEND_PM_PME
  15335. * Some platforms have issues if the PM_PME message is sent after WoW,
  15336. * so don't send PM_PME after WoW unless the host uses this flag
  15337. * to request it.
  15338. */
  15339. WMI_WOW_FLAG_SEND_PM_PME = 0x00000002,
  15340. /* Flag to indicate unit test */
  15341. WMI_WOW_FLAG_UNIT_TEST_ENABLE = 0x00000004,
  15342. /* Force HTC wakeup */
  15343. WMI_WOW_FLAG_DO_HTC_WAKEUP = 0x00000008,
  15344. /* Enable L1SS sleep for PCIE DRV case */
  15345. WMI_WOW_FLAG_ENABLE_DRV_PCIE_L1SS_SLEEP = 0x00000010,
  15346. /*
  15347. * To differentiate system suspend Vs RTPM BIT set -
  15348. * Sytem Suspend WOW, BIT Reset- RTPM (DRV)
  15349. */
  15350. WMI_WOW_FLAG_SYSTEM_SUSPEND_WOW = 0x00000020,
  15351. /*
  15352. * Feature flag for INI enable_mod_dtim_on_system_suspend
  15353. * This flag/bit will be set if INI settings enable mod_dtim_on_sys_suspend.
  15354. */
  15355. WMI_WOW_FLAG_MOD_DTIM_ON_SYS_SUSPEND = 0x00000040,
  15356. /*
  15357. * Forced dtim in suspend mode enable Flag.
  15358. * setDtimInSuspendMode
  15359. */
  15360. WMI_WOW_FLAG_FORCED_DTIM_ON_SYS_SUSPEND = 0x00000080,
  15361. };
  15362. typedef struct {
  15363. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param */
  15364. A_UINT32 enable;
  15365. A_UINT32 pause_iface_config;
  15366. A_UINT32 flags; /* WMI_WOW_FLAG enums */
  15367. } wmi_wow_enable_cmd_fixed_param;
  15368. typedef struct {
  15369. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_hostwakeup_from_sleep_cmd_fixed_param */
  15370. /** Reserved for future use */
  15371. A_UINT32 reserved0;
  15372. } wmi_wow_hostwakeup_from_sleep_cmd_fixed_param;
  15373. #define WOW_ICMPV6_NA_FILTER_DISABLE 0
  15374. #define WOW_ICMPV6_NA_FILTER_ENABLE 1
  15375. typedef struct {
  15376. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param */
  15377. A_UINT32 vdev_id;
  15378. A_UINT32 enable; /* WOW_ICMPV6_NA_FILTER_ENABLE/DISABLE */
  15379. } wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param;
  15380. typedef struct bitmap_pattern_s {
  15381. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T */
  15382. A_UINT32 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD];
  15383. A_UINT32 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE_DWORD];
  15384. A_UINT32 pattern_offset;
  15385. A_UINT32 pattern_len;
  15386. A_UINT32 bitmask_len;
  15387. A_UINT32 pattern_id; /* must be less than max_bitmap_filters */
  15388. } WOW_BITMAP_PATTERN_T;
  15389. typedef struct ipv4_sync_s {
  15390. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV4_SYNC_PATTERN_T */
  15391. A_UINT32 ipv4_src_addr;
  15392. A_UINT32 ipv4_dst_addr;
  15393. A_UINT32 tcp_src_prt;
  15394. A_UINT32 tcp_dst_prt;
  15395. } WOW_IPV4_SYNC_PATTERN_T;
  15396. typedef struct ipv6_sync_s {
  15397. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV6_SYNC_PATTERN_T */
  15398. A_UINT32 ipv6_src_addr[4];
  15399. A_UINT32 ipv6_dst_addr[4];
  15400. A_UINT32 tcp_src_prt;
  15401. A_UINT32 tcp_dst_prt;
  15402. } WOW_IPV6_SYNC_PATTERN_T;
  15403. typedef struct WOW_MAGIC_PATTERN_CMD
  15404. {
  15405. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_MAGIC_PATTERN_CMD */
  15406. wmi_mac_addr macaddr;
  15407. } WOW_MAGIC_PATTERN_CMD;
  15408. typedef enum wow_ioac_pattern_type {
  15409. WOW_IOAC_MAGIC_PATTERN = 1,
  15410. WOW_IOAC_SHORT_PATTERN,
  15411. WOW_IOAC_EXTEND_PATTERN,
  15412. } WOW_IOAC_PATTERN_TYPE;
  15413. typedef struct ioac_sock_pattern_s {
  15414. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_SOCK_PATTERN_T */
  15415. A_UINT32 id;
  15416. A_UINT32 local_ipv4;
  15417. A_UINT32 remote_ipv4;
  15418. A_UINT32 local_port;
  15419. A_UINT32 remote_port;
  15420. A_UINT32 pattern_len; /* units = bytes */
  15421. A_UINT32 pattern[WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD];
  15422. WMI_IPV6_ADDR local_ipv6;
  15423. WMI_IPV6_ADDR remote_ipv6;
  15424. A_UINT32 ack_nak_len;
  15425. A_UINT32 ackpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
  15426. A_UINT32 nakpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
  15427. } WOW_IOAC_SOCK_PATTERN_T;
  15428. typedef struct ioac_pkt_pattern_s {
  15429. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_PKT_PATTERN_T */
  15430. A_UINT32 pattern_type;
  15431. A_UINT32 pattern[WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD];
  15432. A_UINT32 random[WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD];
  15433. A_UINT32 pattern_len;
  15434. A_UINT32 random_len;
  15435. } WOW_IOAC_PKT_PATTERN_T;
  15436. typedef struct ioac_tmr_pattern_s {
  15437. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_TMR_PATTERN_T */
  15438. A_UINT32 wake_in_s;
  15439. A_UINT32 vdev_id;
  15440. } WOW_IOAC_TMR_PATTERN_T;
  15441. typedef struct {
  15442. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param */
  15443. A_UINT32 nID;
  15444. } WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param;
  15445. typedef struct {
  15446. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param */
  15447. A_UINT32 nID;
  15448. } WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param;
  15449. typedef struct ioac_keepalive_s {
  15450. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_KEEPALIVE_T */
  15451. A_UINT32 keepalive_pkt_buf[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD];
  15452. A_UINT32 keepalive_pkt_len;
  15453. A_UINT32 period_in_ms;
  15454. A_UINT32 vdev_id;
  15455. A_UINT32 max_loss_cnt;
  15456. A_UINT32 local_ipv4;
  15457. A_UINT32 remote_ipv4;
  15458. A_UINT32 local_port;
  15459. A_UINT32 remote_port;
  15460. A_UINT32 recv_period_in_ms;
  15461. A_UINT32 rev_ka_size;
  15462. A_UINT32 rev_ka_data[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD];
  15463. WMI_IPV6_ADDR local_ipv6;
  15464. WMI_IPV6_ADDR remote_ipv6;
  15465. } WMI_WOW_IOAC_KEEPALIVE_T;
  15466. typedef struct {
  15467. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param */
  15468. A_UINT32 vdev_id;
  15469. A_UINT32 pattern_type;
  15470. /*
  15471. * Following this struct are these TLVs. Note that they are all array of structures
  15472. * but can have at most one element. Which TLV is empty or has one element depends
  15473. * on the field pattern_type. This is to emulate an union.
  15474. * WOW_IOAC_PKT_PATTERN_T pattern_info_pkt[];
  15475. * WOW_IOAC_TMR_PATTERN_T pattern_info_tmr[];
  15476. */
  15477. } WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param;
  15478. typedef struct {
  15479. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param */
  15480. A_UINT32 vdev_id;
  15481. A_UINT32 pattern_type;
  15482. A_UINT32 pattern_id;
  15483. } WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param;
  15484. typedef struct {
  15485. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_PATTERN_CMD_fixed_param */
  15486. A_UINT32 vdev_id;
  15487. A_UINT32 pattern_id;
  15488. A_UINT32 pattern_type;
  15489. /*
  15490. * Following this struct are these TLVs. Note that they are all array of structures
  15491. * but can have at most one element. Which TLV is empty or has one element depends
  15492. * on the field pattern_type. This is to emulate an union.
  15493. * WOW_BITMAP_PATTERN_T pattern_info_bitmap[];
  15494. * WOW_IPV4_SYNC_PATTERN_T pattern_info_ipv4[];
  15495. * WOW_IPV6_SYNC_PATTERN_T pattern_info_ipv6[];
  15496. * WOW_MAGIC_PATTERN_CMD pattern_info_magic_pattern[];
  15497. * A_UINT32 pattern_info_timeout[];
  15498. * A_UINT32 ra_ratelimit_interval;
  15499. */
  15500. } WMI_WOW_ADD_PATTERN_CMD_fixed_param;
  15501. typedef struct {
  15502. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_DEL_PATTERN_CMD_fixed_param */
  15503. A_UINT32 vdev_id;
  15504. A_UINT32 pattern_id;
  15505. A_UINT32 pattern_type;
  15506. } WMI_WOW_DEL_PATTERN_CMD_fixed_param;
  15507. #define WMI_WOW_MAX_EVENT_BM_LEN 4
  15508. typedef struct {
  15509. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_DEL_EVT_CMD_fixed_param */
  15510. A_UINT32 vdev_id;
  15511. A_UINT32 is_add;
  15512. union {
  15513. A_UINT32 event_bitmap;
  15514. A_UINT32 event_bitmaps[WMI_WOW_MAX_EVENT_BM_LEN];
  15515. };
  15516. } WMI_WOW_ADD_DEL_EVT_CMD_fixed_param;
  15517. /*
  15518. * This structure is used to set the pattern to check UDP packet in WOW mode.
  15519. * If match, construct a tx frame in a local buffer to send through the peer
  15520. * AP to the entity in the IP network that sent the UDP packet to this STA.
  15521. */
  15522. typedef struct {
  15523. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param */
  15524. A_UINT32 vdev_id;
  15525. A_UINT32 enable; /* 1: enable, 0: disable*/
  15526. /* dest_port -
  15527. * bits 7:0 contain the LSB of the UDP dest port,
  15528. * bits 15:8 contain the MSB of the UDP dest port
  15529. */
  15530. A_UINT32 dest_port;
  15531. A_UINT32 pattern_len; /* length in byte of pattern[] */
  15532. A_UINT32 response_len; /* length in byte of response[] */
  15533. /* Following this struct are the TLV's:
  15534. * A_UINT8 pattern[]; <-- payload of UDP packet to be checked, network byte order
  15535. * A_UINT8 response[]; <-- payload of UDP packet to be response, network byte order
  15536. */
  15537. } WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param;
  15538. /*
  15539. * This structure is used to set the pattern for WOW host wakeup pin pulse pattern confirguration.
  15540. */
  15541. typedef struct {
  15542. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param */
  15543. A_UINT32 enable; /* 1: enable, 0: disable */
  15544. A_UINT32 pin; /* pin for host wakeup */
  15545. A_UINT32 interval_low; /* interval for keeping low voltage, unit: ms */
  15546. A_UINT32 interval_high; /* interval for keeping high voltage, unit: ms */
  15547. A_UINT32 repeat_cnt; /* repeat times for pulse (0xffffffff means forever) */
  15548. A_UINT32 init_state; /* Sense of the GPIO pin used for host wakeups.
  15549. * If init_state is 0, a low --> high transition
  15550. * causes a host wakeup interrupt.
  15551. * If init_state is 1, a high --> low transition
  15552. * causes a host wakeup interrrupt.
  15553. */
  15554. } WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param;
  15555. #define MAX_SUPPORTED_ACTION_CATEGORY 256
  15556. #define MAX_SUPPORTED_ACTION_SUBCATEGORY 32
  15557. #define MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST (MAX_SUPPORTED_ACTION_CATEGORY/32)
  15558. typedef enum {
  15559. WOW_ACTION_WAKEUP_OPERATION_RESET = 0,
  15560. WOW_ACTION_WAKEUP_OPERATION_SET,
  15561. WOW_ACTION_WAKEUP_OPERATION_ADD_SET,
  15562. WOW_ACTION_WAKEUP_OPERATION_DELETE_SET,
  15563. } WOW_ACTION_WAKEUP_OPERATION;
  15564. typedef struct {
  15565. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param */
  15566. A_UINT32 vdev_id;
  15567. A_UINT32 operation; /* 0 reset to fw default, 1 set the bits, 2 add the setting bits, 3 delete the setting bits */
  15568. A_UINT32 action_category_map[MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST];
  15569. /* This fixed_param TLV is followed by these additional TLV's
  15570. * action_bitmaps_per_category -
  15571. * Each element is a 32-bit bitmap indicating which subcategories
  15572. * for that particular action category are considered for WoW wakeup
  15573. * (if the subcategory's bit is 0) or ignored for WoW wakeup (if the
  15574. * subcategory's bit is 1).
  15575. *
  15576. * A_UINT32 action_bitmaps_per_category[]; <-- variable length array
  15577. */
  15578. } WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param;
  15579. typedef struct wow_event_info_s {
  15580. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param */
  15581. A_UINT32 vdev_id;
  15582. A_UINT32 flag; /*This is current reserved.*/
  15583. A_INT32 wake_reason;
  15584. A_UINT32 data_len;
  15585. } WOW_EVENT_INFO_fixed_param;
  15586. typedef struct wow_initial_wakeup_event_s {
  15587. A_UINT32 tlv_header; /* TLV tag and len; tag equals WOW_INITIAL_WAKEUP_EVENT_fixed_param */
  15588. A_UINT32 vdev_id;
  15589. } WOW_INITIAL_WAKEUP_EVENT_fixed_param;
  15590. typedef enum {
  15591. WOW_EVENT_INFO_TYPE_PACKET = 0x0001,
  15592. WOW_EVENT_INFO_TYPE_BITMAP,
  15593. WOW_EVENT_INFO_TYPE_GTKIGTK,
  15594. } WOW_EVENT_INFO_TYPE;
  15595. typedef struct wow_event_info_section_s {
  15596. A_UINT32 data_type;
  15597. A_UINT32 data_len;
  15598. } WOW_EVENT_INFO_SECTION;
  15599. typedef struct wow_event_info_section_packet_s {
  15600. A_UINT8 packet[WOW_DEFAULT_EVT_BUF_SIZE];
  15601. } WOW_EVENT_INFO_SECTION_PACKET;
  15602. typedef struct wow_event_info_section_bitmap_s {
  15603. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_SECTION_BITMAP */
  15604. A_UINT32 flag; /*This is current reserved.*/
  15605. A_UINT32 value; /*This could be the pattern id for bitmap pattern.*/
  15606. A_UINT32 org_len; /*The length of the orginal packet.*/
  15607. } WOW_EVENT_INFO_SECTION_BITMAP;
  15608. /**
  15609. * This command is sent from WLAN host driver to firmware to
  15610. * enable or disable D0-WOW. D0-WOW means APSS suspend with
  15611. * PCIe link and DDR being active.
  15612. *
  15613. *
  15614. * Entering D0-WOW Mode (based on kernel suspend request):
  15615. * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 1)
  15616. * target: Take action (e.g. dbglog suspend)
  15617. * target->host: HTC_ACK (HTC_MSG_SEND_SUSPEND_COMPLETE message)
  15618. *
  15619. * Exiting D0-WOW mode (based on kernel resume OR target->host message received)
  15620. * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 0)
  15621. * target: Take action (e.g. dbglog resume)
  15622. * target->host: WMI_D0_WOW_DISABLE_ACK_EVENTID
  15623. *
  15624. * This command is applicable only on the PCIE LL systems
  15625. * Host can enter either D0-WOW or WOW mode, but NOT both at same time
  15626. * Decision to enter D0-WOW or WOW is based on active interfaces
  15627. *
  15628. */
  15629. typedef struct {
  15630. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param */
  15631. A_UINT32 enable; /* 1 = enable, 0 = disable */
  15632. } wmi_d0_wow_enable_disable_cmd_fixed_param;
  15633. typedef enum extend_wow_type_e {
  15634. EXTWOW_TYPE_APP_TYPE1, /* extend wow type: only enable wakeup for app type1 */
  15635. EXTWOW_TYPE_APP_TYPE2, /* extend wow type: only enable wakeup for app type2 */
  15636. EXTWOW_TYPE_APP_TYPE1_2, /* extend wow type: enable wakeup for app type1&2 */
  15637. EXTWOW_TYPE_APP_PULSETEST,
  15638. EXTWOW_DISABLED = 255,
  15639. } EXTWOW_TYPE;
  15640. typedef struct {
  15641. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param */
  15642. A_UINT32 vdev_id;
  15643. A_UINT32 type;
  15644. A_UINT32 wakeup_pin_num;
  15645. A_UINT32 swol_pulsetest_type;
  15646. A_UINT32 swol_pulsetest_application;
  15647. } wmi_extwow_enable_cmd_fixed_param;
  15648. #define SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX 8
  15649. #define SWOL_INDOOR_KEY_LEN 16
  15650. typedef struct {
  15651. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param */
  15652. A_UINT32 vdev_id;
  15653. wmi_mac_addr wakee_mac;
  15654. A_UINT8 ident[8];
  15655. A_UINT8 passwd[16];
  15656. A_UINT32 ident_len;
  15657. A_UINT32 passwd_len;
  15658. /* indoor check parameters */
  15659. /* key for mac addresses specified in swol_indoor_key_mac
  15660. * Big-endian hosts need to byte-swap the bytes within each 4-byte
  15661. * segment of this array, so the bytes will return to their original
  15662. * order when the entire WMI message contents are byte-swapped to
  15663. * convert from big-endian to little-endian format.
  15664. */
  15665. A_UINT8 swol_indoor_key[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX][SWOL_INDOOR_KEY_LEN];
  15666. /* key length for specified mac address index
  15667. * Big-endian hosts need to byte-swap the bytes within each 4-byte
  15668. * segment of this array, so the bytes will return to their original
  15669. * order when the entire WMI message contents are byte-swapped to
  15670. * convert from big-endian to little-endian format.
  15671. */
  15672. A_UINT8 swol_indoor_key_len[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  15673. /* mac address array allowed to wakeup host*/
  15674. wmi_mac_addr swol_indoor_key_mac[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  15675. /* app mask for the mac addresses specified in swol_indoor_key_mac */
  15676. A_UINT32 swol_indoor_app_mask[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  15677. A_UINT32 swol_indoor_waker_check; /* whether to do indoor waker check */
  15678. A_UINT32 swol_indoor_pw_check; /* whether to check password */
  15679. A_UINT32 swol_indoor_pattern; /* wakeup pattern */
  15680. A_UINT32 swol_indoor_exception; /* wakeup when exception happens */
  15681. A_UINT32 swol_indoor_exception_app;
  15682. A_UINT32 swol_assist_enable; /* whether to enable IoT mode */
  15683. } wmi_extwow_set_app_type1_params_cmd_fixed_param;
  15684. typedef struct {
  15685. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param */
  15686. A_UINT32 vdev_id;
  15687. A_UINT8 rc4_key[16];
  15688. A_UINT32 rc4_key_len;
  15689. /** ip header parameter */
  15690. A_UINT32 ip_id; /* NC id */
  15691. A_UINT32 ip_device_ip; /* NC IP address */
  15692. A_UINT32 ip_server_ip; /* Push server IP address */
  15693. /** tcp header parameter */
  15694. A_UINT16 tcp_src_port; /* NC TCP port */
  15695. A_UINT16 tcp_dst_port; /* Push server TCP port */
  15696. A_UINT32 tcp_seq;
  15697. A_UINT32 tcp_ack_seq;
  15698. A_UINT32 keepalive_init; /* Initial ping interval */
  15699. A_UINT32 keepalive_min; /* Minimum ping interval */
  15700. A_UINT32 keepalive_max; /* Maximum ping interval */
  15701. A_UINT32 keepalive_inc; /* Increment of ping interval */
  15702. wmi_mac_addr gateway_mac;
  15703. A_UINT32 tcp_tx_timeout_val;
  15704. A_UINT32 tcp_rx_timeout_val;
  15705. /** add extra parameter for backward-compatible */
  15706. /*
  15707. * For all byte arrays, natural order is used. E.g.
  15708. * rc4_write_sandbox[0] holds the 1st RC4 S-box byte,
  15709. * rc4_write_sandbox[1] holds the 2nd RC4 S-box byte, etc.
  15710. */
  15711. /* used to encrypt transmit packet such as keep-alive */
  15712. A_UINT8 rc4_write_sandbox[256];
  15713. A_UINT32 rc4_write_x;
  15714. A_UINT32 rc4_write_y;
  15715. /* used to decrypt received packet such as wow data */
  15716. A_UINT8 rc4_read_sandbox[256];
  15717. A_UINT32 rc4_read_x;
  15718. A_UINT32 rc4_read_y;
  15719. /* used to caculate HMAC hash for transmit packet such as keep-alive */
  15720. A_UINT8 ssl_write_seq[8];
  15721. A_UINT8 ssl_sha1_write_key[64];
  15722. A_UINT32 ssl_sha1_write_key_len;
  15723. /* used to calculate HAMC hash for receive packet such as wow data */
  15724. A_UINT8 ssl_read_seq[8];
  15725. A_UINT8 ssl_sha1_read_key[64];
  15726. A_UINT32 ssl_sha1_read_key_len;
  15727. /* optional element for specifying TCP options data to include in
  15728. * transmit packets such as keep-alive
  15729. */
  15730. A_UINT32 tcp_options_len;
  15731. A_UINT8 tcp_options[40];
  15732. A_UINT32 async_id; /* keep-alive request id */
  15733. } wmi_extwow_set_app_type2_params_cmd_fixed_param;
  15734. #define WMI_RXERR_CRC 0x01 /* CRC error on frame */
  15735. #define WMI_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
  15736. #define WMI_RXERR_MIC 0x10 /* Michael MIC decrypt error */
  15737. #define WMI_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
  15738. #define WMI_RX_OFFLOAD_MON_MODE 0x40 /* Offload dropped mgmt pkt's for only in capture mode*/
  15739. typedef enum {
  15740. PKT_PWR_SAVE_PAID_MATCH = 0x00000001,
  15741. PKT_PWR_SAVE_GID_MATCH = 0x00000002,
  15742. PKT_PWR_SAVE_EARLY_TIM_CLEAR = 0x00000004,
  15743. PKT_PWR_SAVE_EARLY_DTIM_CLEAR = 0x00000008,
  15744. PKT_PWR_SAVE_EOF_PAD_DELIM = 0x00000010,
  15745. PKT_PWR_SAVE_MACADDR_MISMATCH = 0x00000020,
  15746. PKT_PWR_SAVE_DELIM_CRC_FAIL = 0x00000040,
  15747. PKT_PWR_SAVE_GID_NSTS_ZERO = 0x00000080,
  15748. PKT_PWR_SAVE_RSSI_CHECK = 0x00000100,
  15749. PKT_PWR_SAVE_5G_EBT = 0x00000200,
  15750. PKT_PWR_SAVE_2G_EBT = 0x00000400,
  15751. PKT_PWR_SAVE_BSS_COLOR_MISMATCH = 0x00000800,
  15752. PKT_PWR_SAVE_UL_FLAG = 0x00001000,
  15753. PKT_PWR_SAVE_STA_ID_MISMATCH = 0x00002000,
  15754. PKT_PWR_SAVE_MACADDR_MISMATCH_FCS = 0x00004000,
  15755. PKT_PWR_SAVE_ENABLE = 0x80000000,
  15756. } WMI_PKT_PWR_SAVE_TYPE;
  15757. typedef struct {
  15758. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_cmd_fixed_param */
  15759. A_UINT32 num_data; /** length in byte of data[]. */
  15760. /** pdev_id for identifying the MAC
  15761. * See macros starting with WMI_PDEV_ID_ for values.
  15762. */
  15763. A_UINT32 pdev_id;
  15764. /* This structure is used to send Factory Test Mode [FTM] command
  15765. * from host to firmware for integrated chips which are binary blobs.
  15766. * Following this structure is the TLV:
  15767. * A_UINT8 data[]; <-- length in byte given by field num_data.
  15768. */
  15769. } wmi_ftm_intg_cmd_fixed_param;
  15770. typedef struct {
  15771. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_event_fixed_param */
  15772. A_UINT32 num_data; /** length in byte of data[]. */
  15773. /* This structure is used to receive Factory Test Mode [FTM] event
  15774. * from firmware to host for integrated chips which are binary blobs.
  15775. * Following this structure is the TLV:
  15776. * A_UINT8 data[]; <-- length in byte given by field num_data.
  15777. */
  15778. } wmi_ftm_intg_event_fixed_param;
  15779. #define WMI_MAX_NS_OFFLOADS 2
  15780. #define WMI_MAX_ARP_OFFLOADS 2
  15781. #define WMI_ARPOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
  15782. #define WMI_ARPOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
  15783. #define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
  15784. typedef struct {
  15785. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */
  15786. A_UINT32 flags; /* flags */
  15787. A_UINT8 target_ipaddr[4]; /* IPV4 addresses of the local node*/
  15788. A_UINT8 remote_ipaddr[4]; /* source address of the remote node requesting the ARP (qualifier) */
  15789. wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
  15790. } WMI_ARP_OFFLOAD_TUPLE;
  15791. #define WMI_NSOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
  15792. #define WMI_NSOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
  15793. #define WMI_NSOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
  15794. #define WMI_NSOFF_FLAGS_IS_IPV6_ANYCAST (1 << 3) /* whether the configured IPv6 address is anycast */
  15795. #define WMI_NSOFF_MAX_TARGET_IPS 2
  15796. typedef struct {
  15797. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE */
  15798. A_UINT32 flags; /* flags */
  15799. /* NOTE: This size of array target_ipaddr[] cannot be changed without breaking WMI compatibility. */
  15800. WMI_IPV6_ADDR target_ipaddr[WMI_NSOFF_MAX_TARGET_IPS]; /* IPV6 target addresses of the local node */
  15801. WMI_IPV6_ADDR solicitation_ipaddr; /* multi-cast source IP addresses for receiving solicitations */
  15802. WMI_IPV6_ADDR remote_ipaddr; /* address of remote node requesting the solicitation (qualifier) */
  15803. wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
  15804. } WMI_NS_OFFLOAD_TUPLE;
  15805. typedef struct {
  15806. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param */
  15807. A_UINT32 flags;
  15808. A_UINT32 vdev_id;
  15809. A_UINT32 num_ns_ext_tuples;
  15810. /* Following this structure are the TLVs:
  15811. * WMI_NS_OFFLOAD_TUPLE ns_tuples[WMI_MAX_NS_OFFLOADS];
  15812. * WMI_ARP_OFFLOAD_TUPLE arp_tuples[WMI_MAX_ARP_OFFLOADS];
  15813. * WMI_NS_OFFLOAD_TUPLE ns_ext_tuples[]; <-- size based on num_ns_ext_tuples
  15814. */
  15815. } WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param;
  15816. typedef struct {
  15817. A_UINT32 tlv_header;
  15818. A_UINT32 vdev_id;
  15819. A_UINT32 pattern_id;
  15820. A_UINT32 timeout;
  15821. A_UINT32 length;
  15822. /*Following this would be the pattern
  15823. A_UINT8 pattern[] of length specifed by length
  15824. field in the structure.*/
  15825. } WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
  15826. typedef struct {
  15827. A_UINT32 tlv_header;
  15828. A_UINT32 vdev_id;
  15829. A_UINT32 pattern_id;
  15830. } WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
  15831. typedef struct {
  15832. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_addba_cmd_fixed_param */
  15833. /** unique id identifying the VDEV, generated by the caller */
  15834. A_UINT32 vdev_id;
  15835. /** peer MAC address */
  15836. wmi_mac_addr peer_macaddr;
  15837. /** Tid number */
  15838. A_UINT32 tid;
  15839. /** Initiator (1) or Responder (0) for this aggregation */
  15840. A_UINT32 initiator;
  15841. /** size of the negotiated window */
  15842. A_UINT32 window_size;
  15843. /** starting sequence number (only valid for initiator) */
  15844. A_UINT32 ssn;
  15845. /** timeout field represents the time to wait for Block Ack in
  15846. * initiator case and the time to wait for BAR in responder
  15847. * case. 0 represents no timeout. */
  15848. A_UINT32 timeout;
  15849. /* BA policy: immediate ACK (0) or delayed ACK (1) */
  15850. A_UINT32 policy;
  15851. } wmi_peer_tid_addba_cmd_fixed_param;
  15852. typedef struct {
  15853. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd */
  15854. /** unique id identifying the VDEV, generated by the caller */
  15855. A_UINT32 vdev_id;
  15856. /** peer MAC address */
  15857. wmi_mac_addr peer_macaddr;
  15858. /** Tid number */
  15859. A_UINT32 tid;
  15860. /** Initiator (1) or Responder (0) for this aggregation */
  15861. A_UINT32 initiator;
  15862. } wmi_peer_tid_delba_cmd_fixed_param;
  15863. typedef struct {
  15864. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param */
  15865. /** unique id identifying the VDEV, generated by the caller */
  15866. A_UINT32 vdev_id;
  15867. /** peer MAC address */
  15868. wmi_mac_addr peer_macaddr;
  15869. /** Tid number */
  15870. A_UINT32 tid;
  15871. /** Event status */
  15872. A_UINT32 status;
  15873. } wmi_tx_addba_complete_event_fixed_param;
  15874. typedef struct {
  15875. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_delba_complete_event_fixed_param */
  15876. /** unique id identifying the VDEV, generated by the caller */
  15877. A_UINT32 vdev_id;
  15878. /** peer MAC address */
  15879. wmi_mac_addr peer_macaddr;
  15880. /** Tid number */
  15881. A_UINT32 tid;
  15882. /** Event status */
  15883. A_UINT32 status;
  15884. } wmi_tx_delba_complete_event_fixed_param;
  15885. /*
  15886. * Structure to request sequence numbers for a given
  15887. * peer station on different TIDs. The TIDs are
  15888. * indicated in the tidBitMap, tid 0 would
  15889. * be represented by LSB bit 0. tid 1 would be
  15890. * represented by LSB bit 1 etc.
  15891. * The target will retrieve the current sequence
  15892. * numbers for the peer on all the TIDs requested
  15893. * and send back a response in a WMI event.
  15894. */
  15895. typedef struct
  15896. {
  15897. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  15898. WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */
  15899. wmi_mac_addr peer_macaddr;
  15900. A_UINT32 tidBitmap;
  15901. } wmi_ba_req_ssn;
  15902. typedef struct {
  15903. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  15904. WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */
  15905. /** unique id identifying the VDEV, generated by the caller */
  15906. A_UINT32 vdev_id;
  15907. /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
  15908. A_UINT32 num_ba_req_ssn;
  15909. /* Following this struc are the TLV's:
  15910. * wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested
  15911. */
  15912. } wmi_ba_req_ssn_cmd_fixed_param;
  15913. /*
  15914. * Max transmit categories
  15915. *
  15916. * Note: In future if we need to increase WMI_MAX_TC definition
  15917. * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID.
  15918. */
  15919. #define WMI_MAX_TC 8
  15920. /*
  15921. * Structure to send response sequence numbers
  15922. * for a give peer and tidmap.
  15923. */
  15924. typedef struct
  15925. {
  15926. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  15927. WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */
  15928. wmi_mac_addr peer_macaddr;
  15929. /* A boolean to indicate if ssn is present */
  15930. A_UINT32 ssn_present_for_tid[WMI_MAX_TC];
  15931. /* The ssn from target, valid only if
  15932. * ssn_present_for_tid[tidn] equals 1
  15933. */
  15934. A_UINT32 ssn_for_tid[WMI_MAX_TC];
  15935. } wmi_ba_event_ssn;
  15936. typedef struct {
  15937. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  15938. WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */
  15939. /** unique id identifying the VDEV, generated by the caller */
  15940. A_UINT32 vdev_id;
  15941. /** Event status, success or failure of the overall operation */
  15942. A_UINT32 status;
  15943. /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
  15944. A_UINT32 num_ba_event_ssn;
  15945. /* Following this struc are the TLV's:
  15946. * wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested
  15947. */
  15948. } wmi_ba_rsp_ssn_event_fixed_param;
  15949. enum wmi_aggr_state_req_type {
  15950. WMI_DISABLE_AGGREGATION,
  15951. WMI_ENABLE_AGGREGATION
  15952. };
  15953. /*
  15954. * This event is generated by the COEX module
  15955. * when esco call is begins the coex module in fw genrated this event to host to
  15956. * disable the RX aggregation and after completion of the esco call fw will indicate to
  15957. * enable back the Rx aggregation .
  15958. */
  15959. typedef struct {
  15960. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_aggr_state_trig_event_fixed_param */
  15961. /** unique id identifying the VDEV, generated by the caller */
  15962. A_UINT32 vdev_id;
  15963. /** req_type contains values from enum
  15964. * wmi_aggr_state_req_type; 0 (disable) 1(enable) */
  15965. A_UINT32 req_type;
  15966. } wmi_aggr_state_trig_event_fixed_param;
  15967. typedef struct {
  15968. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */
  15969. /** unique id identifying the VDEV, generated by the caller */
  15970. A_UINT32 vdev_id;
  15971. /** MAC address used for installing */
  15972. wmi_mac_addr peer_macaddr;
  15973. /** key index */
  15974. A_UINT32 key_ix;
  15975. /** key flags */
  15976. A_UINT32 key_flags;
  15977. /** Event status */
  15978. A_UINT32 status;
  15979. } wmi_vdev_install_key_complete_event_fixed_param;
  15980. typedef enum {
  15981. /* CSA_SA_QUERY_TIMEOUT:
  15982. * Disconnect due to SA query timeout after moving to new channel
  15983. * due to CSA in OCV enabled case.
  15984. */
  15985. WLAN_DISCONNECT_REASON_CSA_SA_QUERY_TIMEOUT = 1,
  15986. /* MOVE_TO_CELLULAR:
  15987. * Disconnect from WiFi to move to cellular
  15988. */
  15989. WLAN_DISCONNECT_REASON_MOVE_TO_CELLULAR,
  15990. } WMI_VDEV_DISCONNECT_REASON_ID;
  15991. typedef struct {
  15992. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_disconnect_event_fixed_param */
  15993. /** unique id identifying the VDEV, generated by the caller */
  15994. A_UINT32 vdev_id;
  15995. /* Disconnect reason from WMI_VDEV_DISCONNECT_REASON_ID */
  15996. A_UINT32 reason;
  15997. } wmi_vdev_disconnect_event_fixed_param;
  15998. typedef enum _WMI_NLO_AUTH_ALGORITHM {
  15999. WMI_NLO_AUTH_ALGO_80211_OPEN = 1,
  16000. WMI_NLO_AUTH_ALGO_80211_SHARED_KEY = 2,
  16001. WMI_NLO_AUTH_ALGO_WPA = 3,
  16002. WMI_NLO_AUTH_ALGO_WPA_PSK = 4,
  16003. WMI_NLO_AUTH_ALGO_WPA_NONE = 5,
  16004. WMI_NLO_AUTH_ALGO_RSNA = 6,
  16005. WMI_NLO_AUTH_ALGO_RSNA_PSK = 7,
  16006. } WMI_NLO_AUTH_ALGORITHM;
  16007. typedef enum _WMI_NLO_CIPHER_ALGORITHM {
  16008. WMI_NLO_CIPHER_ALGO_NONE = 0x00,
  16009. WMI_NLO_CIPHER_ALGO_WEP40 = 0x01,
  16010. WMI_NLO_CIPHER_ALGO_TKIP = 0x02,
  16011. WMI_NLO_CIPHER_ALGO_CCMP = 0x04,
  16012. WMI_NLO_CIPHER_ALGO_WEP104 = 0x05,
  16013. WMI_NLO_CIPHER_ALGO_BIP = 0x06,
  16014. WMI_NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
  16015. WMI_NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
  16016. WMI_NLO_CIPHER_ALGO_WEP = 0x101,
  16017. } WMI_NLO_CIPHER_ALGORITHM;
  16018. /* SSID broadcast type passed in NLO params */
  16019. typedef enum _WMI_NLO_SSID_BcastNwType
  16020. {
  16021. WMI_NLO_BCAST_UNKNOWN = 0,
  16022. WMI_NLO_BCAST_NORMAL = 1,
  16023. WMI_NLO_BCAST_HIDDEN = 2,
  16024. } WMI_NLO_SSID_BcastNwType;
  16025. #define WMI_NLO_MAX_SSIDS 16
  16026. #define WMI_NLO_MAX_CHAN 48
  16027. #define WMI_NLO_CONFIG_STOP (0x1 << 0)
  16028. #define WMI_NLO_CONFIG_START (0x1 << 1)
  16029. #define WMI_NLO_CONFIG_RESET (0x1 << 2)
  16030. #define WMI_NLO_CONFIG_SLOW_SCAN (0x1 << 4)
  16031. #define WMI_NLO_CONFIG_FAST_SCAN (0x1 << 5)
  16032. #define WMI_NLO_CONFIG_SSID_HIDE_EN (0x1 << 6)
  16033. /* This bit is used to indicate if EPNO Profile is enabled */
  16034. #define WMI_NLO_CONFIG_ENLO (0x1 << 7)
  16035. #define WMI_NLO_CONFIG_SCAN_PASSIVE (0x1 << 8)
  16036. #define WMI_NLO_CONFIG_ENLO_RESET (0x1 << 9)
  16037. #define WMI_NLO_CONFIG_SPOOFED_MAC_IN_PROBE_REQ (0x1 << 10)
  16038. #define WMI_NLO_CONFIG_RANDOM_SEQ_NO_IN_PROBE_REQ (0x1 << 11)
  16039. #define WMI_NLO_CONFIG_ENABLE_IE_WHITELIST_IN_PROBE_REQ (0x1 << 12)
  16040. #define WMI_NLO_CONFIG_ENABLE_CNLO_RSSI_CONFIG (0x1 << 13)
  16041. /* Whether directed scan needs to be performed (for hidden SSIDs) */
  16042. #define WMI_ENLO_FLAG_DIRECTED_SCAN 1
  16043. /* Whether PNO event shall be triggered if the network is found on A band */
  16044. #define WMI_ENLO_FLAG_A_BAND 2
  16045. /* Whether PNO event shall be triggered if the network is found on G band */
  16046. #define WMI_ENLO_FLAG_G_BAND 4
  16047. /* Whether strict matching is required (i.e. firmware shall not match on the entire SSID) */
  16048. #define WMI_ENLO_FLAG_STRICT_MATCH 8
  16049. /* Code for matching the beacon AUTH IE - additional codes TBD */
  16050. /* open */
  16051. #define WMI_ENLO_AUTH_CODE_OPEN 1
  16052. /* WPA_PSK or WPA2PSK */
  16053. #define WMI_ENLO_AUTH_CODE_PSK 2
  16054. /* any EAPOL */
  16055. #define WMI_ENLO_AUTH_CODE_EAPOL 4
  16056. /* NOTE: wmi_nlo_ssid_param structure can't be changed without breaking the compatibility */
  16057. typedef struct wmi_nlo_ssid_param
  16058. {
  16059. A_UINT32 valid;
  16060. wmi_ssid ssid;
  16061. } wmi_nlo_ssid_param;
  16062. /* NOTE: wmi_nlo_enc_param structure can't be changed without breaking the compatibility */
  16063. typedef struct wmi_nlo_enc_param
  16064. {
  16065. A_UINT32 valid;
  16066. A_UINT32 enc_type;
  16067. } wmi_nlo_enc_param;
  16068. /* NOTE: wmi_nlo_auth_param structure can't be changed without breaking the compatibility */
  16069. typedef struct wmi_nlo_auth_param
  16070. {
  16071. A_UINT32 valid;
  16072. A_UINT32 auth_type;
  16073. } wmi_nlo_auth_param;
  16074. /* NOTE: wmi_nlo_bcast_nw_param structure can't be changed without breaking the compatibility */
  16075. typedef struct wmi_nlo_bcast_nw_param
  16076. {
  16077. A_UINT32 valid;
  16078. /* If WMI_NLO_CONFIG_EPNO is not set. Supplicant PNO is enabled. The value should be true/false
  16079. Otherwise EPNO is enabled. bcast_nw_type would be used as a bit flag contains WMI_ENLO_FLAG_XXX */
  16080. A_UINT32 bcast_nw_type;
  16081. } wmi_nlo_bcast_nw_param;
  16082. /* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */
  16083. typedef struct wmi_nlo_rssi_param
  16084. {
  16085. A_UINT32 valid;
  16086. A_INT32 rssi;
  16087. } wmi_nlo_rssi_param;
  16088. typedef struct nlo_configured_parameters {
  16089. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */
  16090. wmi_nlo_ssid_param ssid;
  16091. wmi_nlo_enc_param enc_type;
  16092. wmi_nlo_auth_param auth_type;
  16093. wmi_nlo_rssi_param rssi_cond;
  16094. wmi_nlo_bcast_nw_param bcast_nw_type; /* indicates if the SSID is hidden or not */
  16095. } nlo_configured_parameters;
  16096. /* Support channel prediction for PNO scan after scanning top_k_num channels
  16097. * if stationary_threshold is met.
  16098. */
  16099. typedef struct nlo_channel_prediction_cfg {
  16100. A_UINT32 tlv_header;
  16101. /* Enable or disable this feature. */
  16102. A_UINT32 enable;
  16103. /* Top K channels will be scanned before deciding whether to further scan
  16104. * or stop. Minimum value is 3 and maximum is 5. */
  16105. A_UINT32 top_k_num;
  16106. /* Preconfigured stationary threshold.
  16107. * Lesser value means more conservative. Bigger value means more aggressive.
  16108. * Maximum is 100 and mininum is 0. */
  16109. A_UINT32 stationary_threshold;
  16110. /* Periodic full channel scan in milliseconds unit.
  16111. * After full_scan_period_ms since last full scan, channel prediction
  16112. * scan is suppressed and will do full scan.
  16113. * This is to help detecting sudden AP power-on or -off. Value 0 means no
  16114. * full scan at all (not recommended).
  16115. */
  16116. A_UINT32 full_scan_period_ms;
  16117. } nlo_channel_prediction_cfg;
  16118. typedef struct enlo_candidate_score_params_t {
  16119. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enlo_candidate_score_param */
  16120. A_INT32 min5GHz_rssi; /* minimum 5GHz RSSI for a BSSID to be considered (units = dBm) */
  16121. A_INT32 min24GHz_rssi; /* minimum 2.4GHz RSSI for a BSSID to be considered (units = dBm) */
  16122. A_UINT32 initial_score_max; /* the maximum score that a network can have before bonuses */
  16123. /* current_connection_bonus:
  16124. * only report when there is a network's score this much higher
  16125. * than the current connection
  16126. */
  16127. A_UINT32 current_connection_bonus;
  16128. A_UINT32 same_network_bonus; /* score bonus for all networks with the same network flag */
  16129. A_UINT32 secure_bonus; /* score bonus for networks that are not open */
  16130. A_UINT32 band5GHz_bonus; /* 5GHz RSSI score bonus (applied to all 5GHz networks) */
  16131. } enlo_candidate_score_params;
  16132. typedef struct connected_nlo_bss_band_rssi_pref_t {
  16133. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_connected_nlo_bss_band_rssi_pref */
  16134. /** band which needs to get preference over other band - see wmi_set_vdev_ie_band enum */
  16135. A_UINT32 band;
  16136. /* Amount of RSSI preference (in dB) that can be given to band (mentioned above) over other band */
  16137. A_INT32 rssi_pref;
  16138. } connected_nlo_bss_band_rssi_pref;
  16139. typedef struct connected_nlo_rssi_params_t {
  16140. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_connected_nlo_rssi_params */
  16141. /* Relative rssi threshold (in dB) by which new BSS should have better rssi than
  16142. * the current connected BSS.
  16143. */
  16144. A_INT32 relative_rssi;
  16145. /* The amount of rssi preference (in dB) that can be given to a 5G BSS over 2.4G BSS. */
  16146. A_INT32 relative_rssi_5g_pref;
  16147. } connected_nlo_rssi_params;
  16148. typedef struct wmi_nlo_config {
  16149. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param */
  16150. A_UINT32 flags;
  16151. A_UINT32 vdev_id;
  16152. A_UINT32 fast_scan_max_cycles;
  16153. A_UINT32 active_dwell_time;
  16154. A_UINT32 passive_dwell_time; /* PDT in msecs */
  16155. A_UINT32 probe_bundle_size;
  16156. A_UINT32 rest_time; /* ART = IRT */
  16157. A_UINT32 max_rest_time; /* Max value that can be reached after SBM */
  16158. A_UINT32 scan_backoff_multiplier; /* SBM */
  16159. A_UINT32 fast_scan_period; /* SCBM */
  16160. A_UINT32 slow_scan_period; /* specific to windows */
  16161. A_UINT32 no_of_ssids;
  16162. A_UINT32 num_of_channels;
  16163. A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */
  16164. /** MAC Address to use in Probe Req as SA **/
  16165. wmi_mac_addr mac_addr;
  16166. /** Mask on which MAC has to be randomized **/
  16167. wmi_mac_addr mac_mask;
  16168. /** IE bitmap to use in Probe Req **/
  16169. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  16170. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  16171. A_UINT32 num_vendor_oui;
  16172. /** Number of connected NLO band preferences **/
  16173. A_UINT32 num_cnlo_band_pref;
  16174. /** dwell time in msec on active 2GHz channels */
  16175. A_UINT32 active_dwell_time_2ghz;
  16176. /** dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked as an active channel */
  16177. A_UINT32 active_dwell_time_6ghz;
  16178. /** dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked as a passive channel */
  16179. A_UINT32 passive_dwell_time_6ghz;
  16180. /* The TLVs will follow.
  16181. * nlo_configured_parameters nlo_list[];
  16182. * A_UINT32 channel_list[num_of_channels]; // in MHz
  16183. * nlo_channel_prediction_cfg ch_prediction_cfg;
  16184. * enlo_candidate_score_params candidate_score_params;
  16185. * wmi_vendor_oui vendor_oui[num_vendor_oui];
  16186. * connected_nlo_rssi_params cnlo_rssi_params;
  16187. * connected_nlo_bss_band_rssi_pref cnlo_bss_band_rssi_pref[num_cnlo_band_pref];
  16188. * A_UINT32 preferred_chan_list[]; // in MHz
  16189. */
  16190. } wmi_nlo_config_cmd_fixed_param;
  16191. typedef struct wmi_nlo_event
  16192. {
  16193. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_event */
  16194. A_UINT32 vdev_id;
  16195. } wmi_nlo_event;
  16196. /* WMI_PASSPOINT_CONFIG_SET
  16197. * Sets a list for passpoint networks for PNO purposes;
  16198. * it should be matched against any passpoint networks found
  16199. * during regular PNO scan.
  16200. */
  16201. #define WMI_PASSPOINT_CONFIG_SET (0x1 << 0)
  16202. /* WMI_PASSPOINT_CONFIG_RESET
  16203. * Reset passpoint network list -
  16204. * no Passpoint networks should be matched after this.
  16205. */
  16206. #define WMI_PASSPOINT_CONFIG_RESET (0x1 << 1)
  16207. #define PASSPOINT_REALM_LEN 256
  16208. #define PASSPOINT_ROAMING_CONSORTIUM_ID_LEN 5
  16209. #define PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
  16210. #define PASSPOINT_PLMN_ID_LEN 3
  16211. #define PASSPOINT_PLMN_ID_ALLOC_LEN /* round up to A_UINT32 boundary */ \
  16212. (((PASSPOINT_PLMN_ID_LEN + 3) >> 2) << 2)
  16213. /*
  16214. * Confirm PASSPOINT_REALM_LEN is a multiple of 4, so the
  16215. * A_UINT8 realm[PASSPOINT_REALM_LEN]
  16216. * array will end on a 4-byte boundary.
  16217. * (This 4-byte alignment simplifies endianness-correction byte swapping.)
  16218. */
  16219. A_COMPILE_TIME_ASSERT(
  16220. check_passpoint_realm_size,
  16221. (PASSPOINT_REALM_LEN % sizeof(A_UINT32)) == 0);
  16222. /*
  16223. * Confirm the product of PASSPOINT_ROAMING_CONSORTIUM_ID_NUM and
  16224. * PASSPOINT_ROAMING_CONSORTIUM_ID_LEN is a multiple of 4, so the
  16225. * roaming_consortium_ids array below will end on a 4-byte boundary.
  16226. * (This 4-byte alignment simplifies endianness-correction byte swapping.)
  16227. */
  16228. A_COMPILE_TIME_ASSERT(
  16229. check_passpoint_roaming_consortium_ids_size,
  16230. ((PASSPOINT_ROAMING_CONSORTIUM_ID_NUM*PASSPOINT_ROAMING_CONSORTIUM_ID_LEN) % sizeof(A_UINT32)) == 0);
  16231. /* wildcard ID to allow an action (reset) to apply to all networks */
  16232. #define WMI_PASSPOINT_NETWORK_ID_WILDCARD 0xFFFFFFFF
  16233. typedef struct wmi_passpoint_config {
  16234. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_passpoint_config_cmd_fixed_param */
  16235. /* (network) id
  16236. * identifier of the matched network, report this in event
  16237. * This id can be a wildcard (WMI_PASSPOINT_NETWORK_ID_WILDCARD)
  16238. * that indicates the action should be applied to all networks.
  16239. * Currently, the only action that is applied to all networks is "reset".
  16240. * If a non-wildcard ID is specified, that particular network is configured.
  16241. * If a wildcard ID is specified, all networks are reset.
  16242. */
  16243. A_UINT32 id;
  16244. A_UINT32 req_id;
  16245. A_UINT8 realm[PASSPOINT_REALM_LEN]; /*null terminated UTF8 encoded realm, 0 if unspecified*/
  16246. A_UINT8 roaming_consortium_ids[PASSPOINT_ROAMING_CONSORTIUM_ID_NUM][PASSPOINT_ROAMING_CONSORTIUM_ID_LEN]; /*roaming consortium ids to match, 0s if unspecified*/
  16247. /*This would be bytes-stream as same as defition of realm id in 802.11 standard*/
  16248. A_UINT8 plmn[PASSPOINT_PLMN_ID_ALLOC_LEN]; /*PLMN id mcc/mnc combination as per rules, 0s if unspecified */
  16249. } wmi_passpoint_config_cmd_fixed_param;
  16250. typedef struct {
  16251. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_passpoint_event_hdr */
  16252. A_UINT32 id; /* identifier of the matched network */
  16253. A_UINT32 vdev_id;
  16254. A_UINT32 timestamp; /* time since boot (in microsecond) when the result was retrieved*/
  16255. wmi_ssid ssid;
  16256. wmi_mac_addr bssid; /* bssid of the network */
  16257. A_UINT32 channel_mhz; /* channel frequency in MHz */
  16258. A_UINT32 rssi; /* rssi value */
  16259. A_UINT32 rtt; /* timestamp in nanoseconds*/
  16260. A_UINT32 rtt_sd; /* standard deviation in rtt */
  16261. A_UINT32 beacon_period; /* beacon advertised in the beacon */
  16262. A_UINT32 capability; /* capabilities advertised in the beacon */
  16263. A_UINT32 ie_length; /* size of the ie_data blob */
  16264. A_UINT32 anqp_length; /* length of ANQP blob */
  16265. /* Following this structure is the byte stream of ie data of length ie_buf_len:
  16266. * A_UINT8 ie_data[]; <-- length in byte given by field ie_length, blob of ie data in beacon
  16267. * A_UINT8 anqp_ie[]; <-- length in byte given by field anqp_len, blob of anqp data of IE
  16268. * 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.
  16269. */
  16270. } wmi_passpoint_event_hdr;
  16271. #define GTK_OFFLOAD_OPCODE_MASK 0xFF000000
  16272. /** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */
  16273. #define GTK_OFFLOAD_ENABLE_OPCODE 0x01000000
  16274. /** Disable GTK offload */
  16275. #define GTK_OFFLOAD_DISABLE_OPCODE 0x02000000
  16276. /** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */
  16277. #define GTK_OFFLOAD_REQUEST_STATUS_OPCODE 0x04000000
  16278. enum wmi_chatter_mode {
  16279. /* Chatter enter/exit happens
  16280. * automatically based on preset
  16281. * params
  16282. */
  16283. WMI_CHATTER_MODE_AUTO,
  16284. /* Chatter enter is triggered
  16285. * manually by the user
  16286. */
  16287. WMI_CHATTER_MODE_MANUAL_ENTER,
  16288. /* Chatter exit is triggered
  16289. * manually by the user
  16290. */
  16291. WMI_CHATTER_MODE_MANUAL_EXIT,
  16292. /* Placeholder max value, always last*/
  16293. WMI_CHATTER_MODE_MAX
  16294. };
  16295. enum wmi_chatter_query_type {
  16296. /*query coalescing filter match counter*/
  16297. WMI_CHATTER_QUERY_FILTER_MATCH_CNT,
  16298. WMI_CHATTER_QUERY_MAX
  16299. };
  16300. typedef struct {
  16301. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_set_mode_cmd_fixed_param */
  16302. A_UINT32 chatter_mode;
  16303. } wmi_chatter_set_mode_cmd_fixed_param;
  16304. /** maximum number of filter supported*/
  16305. #define CHATTER_MAX_COALESCING_RULES 11
  16306. /** maximum number of field tests per filter*/
  16307. #define CHATTER_MAX_FIELD_TEST 5
  16308. /** maximum field length in number of DWORDS*/
  16309. #define CHATTER_MAX_TEST_FIELD_LEN32 2
  16310. /** field test kinds*/
  16311. #define CHATTER_COALESCING_TEST_EQUAL 1
  16312. #define CHATTER_COALESCING_TEST_MASKED_EQUAL 2
  16313. #define CHATTER_COALESCING_TEST_NOT_EQUAL 3
  16314. /** packet type*/
  16315. #define CHATTER_COALESCING_PKT_TYPE_UNICAST (1 << 0)
  16316. #define CHATTER_COALESCING_PKT_TYPE_MULTICAST (1 << 1)
  16317. #define CHATTER_COALESCING_PKT_TYPE_BROADCAST (1 << 2)
  16318. /** coalescing field test*/
  16319. typedef struct _chatter_pkt_coalescing_hdr_test {
  16320. /** offset from start of mac header, for windows native wifi host driver
  16321. * should assume standard 802.11 frame format without QoS info and address4
  16322. * FW would account for any non-stand fields for final offset value.
  16323. */
  16324. A_UINT32 offset;
  16325. A_UINT32 length; /* length of test field*/
  16326. A_UINT32 test; /*equal, not equal or masked equal*/
  16327. A_UINT32 mask[CHATTER_MAX_TEST_FIELD_LEN32]; /*mask byte stream*/
  16328. A_UINT32 value[CHATTER_MAX_TEST_FIELD_LEN32]; /*value byte stream*/
  16329. } chatter_pkt_coalescing_hdr_test;
  16330. /** packet coalescing filter*/
  16331. typedef struct _chatter_pkt_coalescing_filter {
  16332. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter */
  16333. A_UINT32 filter_id; /*unique id assigned by OS*/
  16334. A_UINT32 max_coalescing_delay; /*max miliseconds 1st pkt can be hold*/
  16335. A_UINT32 pkt_type; /*unicast/multicast/broadcast*/
  16336. A_UINT32 num_of_test_field; /*number of field test in table*/
  16337. chatter_pkt_coalescing_hdr_test test_fields[CHATTER_MAX_FIELD_TEST]; /*field test tbl*/
  16338. } chatter_pkt_coalescing_filter;
  16339. /** packet coalescing filter add command*/
  16340. typedef struct {
  16341. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param */
  16342. A_UINT32 num_of_filters;
  16343. /* Following this tlv, there comes an array of structure of type chatter_pkt_coalescing_filter
  16344. chatter_pkt_coalescing_filter rx_filter[1];*/
  16345. } wmi_chatter_coalescing_add_filter_cmd_fixed_param;
  16346. /** packet coalescing filter delete command*/
  16347. typedef struct {
  16348. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param */
  16349. A_UINT32 filter_id; /*filter id which will be deleted*/
  16350. } wmi_chatter_coalescing_delete_filter_cmd_fixed_param;
  16351. /** packet coalescing query command*/
  16352. typedef struct {
  16353. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_query_cmd_fixed_param */
  16354. A_UINT32 type; /*type of query*/
  16355. } wmi_chatter_coalescing_query_cmd_fixed_param;
  16356. /** chatter query reply event*/
  16357. typedef struct {
  16358. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param */
  16359. A_UINT32 type; /*query type*/
  16360. A_UINT32 filter_match_cnt; /*coalescing filter match counter*/
  16361. } wmi_chatter_query_reply_event_fixed_param;
  16362. /* NOTE: This constants GTK_OFFLOAD_KEK_BYTES, GTK_OFFLOAD_KCK_BYTES, and GTK_REPLAY_COUNTER_BYTES
  16363. * cannot be changed without breaking WMI compatibility. */
  16364. #define GTK_OFFLOAD_KEK_BYTES 16
  16365. #define GTK_OFFLOAD_KCK_BYTES 16
  16366. /* NOTE: GTK_REPLAY_COUNTER_BYTES, WMI_MAX_KEY_LEN, IGTK_PN_SIZE cannot be changed in the future without breaking WMI compatibility */
  16367. #define GTK_REPLAY_COUNTER_BYTES 8
  16368. #define WMI_MAX_KEY_LEN 32
  16369. #define IGTK_PN_SIZE 6
  16370. #define WMI_MAX_PN_LEN 8
  16371. typedef struct {
  16372. /**
  16373. * WMITLV_TAG_STRUC_wmi_roam_ml_key_material_param will exist when link is not created by fw.
  16374. */
  16375. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ml_link_key_material_param */
  16376. 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 */
  16377. /** key index */
  16378. A_UINT32 key_ix;
  16379. /** key cipher, defined as WMI_CIPHER_ */
  16380. A_UINT32 key_cipher;
  16381. A_UINT8 pn[WMI_MAX_PN_LEN];
  16382. A_UINT8 key_buff[WMI_MAX_KEY_LEN];
  16383. } wmi_roam_ml_key_material_param;
  16384. typedef struct {
  16385. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param */
  16386. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  16387. A_UINT32 flags; /* status flags */
  16388. A_UINT32 refresh_cnt; /* number of successful GTK refresh exchanges since last SET operation */
  16389. /*
  16390. * As with all WMI messages, this message uses little-endian byte
  16391. * ordering within each A_UINT32 field.
  16392. * If a big-endian host is using automatic swapping of the bytes within
  16393. * each 4-byte A_UINT32 to automatically correct the endianness of the
  16394. * A_UINT32 fields as the message is uploaded from target --> host, the
  16395. * big-endian host will have to undo the automatic byte swapping for the
  16396. * below A_UINT8 fields, to restore them to their original order.
  16397. */
  16398. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* current replay counter */
  16399. A_UINT8 igtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
  16400. A_UINT8 igtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
  16401. A_UINT8 igtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
  16402. A_UINT8 igtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
  16403. A_UINT8 gtk_keyIndex; /* GTK key index */
  16404. A_UINT8 gtk_keyLength; /* GTK key length */
  16405. A_UINT8 gtk_keyRSC[GTK_REPLAY_COUNTER_BYTES]; /* GTK key replay sequence counter */
  16406. A_UINT8 gtk_key[WMI_MAX_KEY_LEN]; /* GTK key data */
  16407. A_UINT8 bigtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
  16408. A_UINT8 bigtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
  16409. A_UINT8 bigtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
  16410. A_UINT8 bigtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
  16411. } WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param;
  16412. typedef struct {
  16413. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param */
  16414. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  16415. A_UINT32 flags; /* control flags, GTK offload command use high byte */
  16416. /* The size of following 3 arrays cannot be changed without breaking WMI compatibility. */
  16417. A_UINT8 KEK[GTK_OFFLOAD_KEK_BYTES]; /* key encryption key */
  16418. A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
  16419. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
  16420. } WMI_GTK_OFFLOAD_CMD_fixed_param;
  16421. typedef struct {
  16422. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_offload_extended_tlv_param */
  16423. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  16424. A_UINT32 flags; /* control flags, GTK offload command use high byte */
  16425. A_UINT32 kek_len;
  16426. A_UINT8 KEK[GTK_OFFLOAD_KEK_EXTENDED_BYTES]; /* key encryption key */
  16427. A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
  16428. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
  16429. } wmi_gtk_offload_fils_tlv_param;
  16430. typedef struct {
  16431. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param */
  16432. A_UINT32 vdev_id;
  16433. A_UINT32 sa_query_retry_interval; /* in msec */
  16434. A_UINT32 sa_query_max_retry_count;
  16435. } WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param;
  16436. typedef enum {
  16437. WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */
  16438. WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */
  16439. WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK*/
  16440. WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4, /* gratuitous ARP req*/
  16441. WMI_STA_KEEPALIVE_METHOD_MGMT_VENDOR_ACTION = 5, /* vendor action frame */
  16442. } WMI_STA_KEEPALIVE_METHOD;
  16443. typedef struct {
  16444. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE */
  16445. WMI_IPV4_ADDR sender_prot_addr; /* Sender protocol address */
  16446. WMI_IPV4_ADDR target_prot_addr; /* Target protocol address */
  16447. wmi_mac_addr dest_mac_addr; /* destination MAC address */
  16448. } WMI_STA_KEEPALVE_ARP_RESPONSE;
  16449. typedef struct {
  16450. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param */
  16451. A_UINT32 vdev_id;
  16452. A_UINT32 enable; /* 1 - Enable, 0 - disable */
  16453. A_UINT32 method; /* keep alive method */
  16454. A_UINT32 interval; /* time interval in seconds */
  16455. /*
  16456. * NOTE: following this structure is the TLV for ARP Resonse:
  16457. * WMI_STA_KEEPALVE_ARP_RESPONSE arp_resp; <-- ARP response
  16458. */
  16459. } WMI_STA_KEEPALIVE_CMD_fixed_param;
  16460. typedef struct {
  16461. A_UINT32 tlv_header;
  16462. A_UINT32 vdev_id;
  16463. A_UINT32 action;
  16464. } WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param;
  16465. typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD;
  16466. typedef struct {
  16467. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */
  16468. A_UINT32 vdev_id;
  16469. A_UINT32 keepaliveInterval; /* seconds */
  16470. A_UINT32 keepaliveMethod;
  16471. } wmi_vdev_set_keepalive_cmd_fixed_param;
  16472. typedef struct {
  16473. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param */
  16474. A_UINT32 vdev_id;
  16475. } wmi_vdev_get_keepalive_cmd_fixed_param;
  16476. typedef struct {
  16477. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_event_fixed_param */
  16478. A_UINT32 vdev_id;
  16479. A_UINT32 keepaliveInterval; /* seconds */
  16480. A_UINT32 keepaliveMethod; /* seconds */
  16481. } wmi_vdev_get_keepalive_event_fixed_param;
  16482. typedef enum {
  16483. WMI_CLEAR_ARP_STATS_COLLECTED = 0x0,
  16484. WMI_START_ARP_STATS_COLLECTION,
  16485. } WMI_ARP_STATS_ACTION;
  16486. typedef enum {
  16487. WMI_ARP_STATS_RX_PKT_TYPE_ARP = 0x1,
  16488. } WMI_ARP_STATS_RX_PKT_TYPE;
  16489. typedef enum {
  16490. WMI_BA_SESSION_ESTABLISHMENT_STATUS_SUCCESS = 0x0,
  16491. WMI_BA_SESSION_ESTABLISHMENT_STATUS_FAILURE,
  16492. } WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS;
  16493. typedef enum {
  16494. WMI_CONNECTION_STATUS_FAILURE = 0x0,
  16495. WMI_CONNECTION_STATUS_SUCCESS,
  16496. } WMI_ARP_STATS_CONNECTION_STATUS;
  16497. /* ARP stats set (configure) req */
  16498. typedef struct {
  16499. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_arp_stats_cmd_fixed_param */
  16500. A_UINT32 vdev_id;
  16501. A_UINT32 set_clr; /* WMI_ARP_STATS_ACTION */
  16502. A_UINT32 pkt_type; /* WMI_ARP_STATS_RX_PKT_TYPE */
  16503. A_UINT32 ipv4; /* target will maintain ARP stats (only) for frames containing this IP address */
  16504. } wmi_vdev_set_arp_stats_cmd_fixed_param;
  16505. /* ARP stats get req */
  16506. typedef struct {
  16507. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_cmd_fixed_param */
  16508. A_UINT32 vdev_id;
  16509. } wmi_vdev_get_arp_stats_cmd_fixed_param;
  16510. /* per vdev based ARP stats */
  16511. typedef struct {
  16512. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_event_fixed_param */
  16513. A_UINT32 vdev_id;
  16514. A_UINT32 arp_req_enqueue;
  16515. A_UINT32 arp_req_tx_success;
  16516. A_UINT32 arp_req_tx_failure; /* number of times a tx MPDU containing a unicast ARP request went unacked */
  16517. A_UINT32 arp_rsp_recvd;
  16518. A_UINT32 out_of_order_arp_rsp_drop_cnt;
  16519. A_UINT32 dad_detected; /* duplicate address detection */
  16520. A_UINT32 connect_status; /* WMI_ARP_STATS_CONNECTION_STATUS */
  16521. A_UINT32 ba_session_establishment_status; /* WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS */
  16522. } wmi_vdev_get_arp_stats_event_fixed_param;
  16523. typedef struct {
  16524. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_connectivity_check_stats */
  16525. A_UINT32 pkt_type_bitmap; /* WMI_IP_CONNECTIVITY_STATS_RX_PKT_TYPE_BITMAP - only for DNS, TCP and ICMP */
  16526. A_UINT32 tcp_src_port; /* target will maintain TCP stats (only) for frames with this src port */
  16527. A_UINT32 tcp_dst_port; /* target will maintain TCP stats (only) for frames with this dst port */
  16528. A_UINT32 icmp_ipv4; /* target will maintain ICMPv4 stats (only) for frames containing this IP address */
  16529. } wmi_vdev_set_connectivity_check_stats;
  16530. /* per vdev dns/icmp/tcp based stats*/
  16531. typedef struct {
  16532. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_connectivity_check_stats */
  16533. A_UINT32 tcp_ack_recvd; /* number of tcp syn ack's received by FW */
  16534. A_UINT32 icmpv4_rsp_recvd; /* number of icmpv4 responses received by FW */
  16535. } wmi_vdev_get_connectivity_check_stats;
  16536. typedef struct {
  16537. A_UINT32 tlv_header;
  16538. A_UINT32 vdev_id;
  16539. #define IPSEC_NATKEEPALIVE_FILTER_DISABLE 0
  16540. #define IPSEC_NATKEEPALIVE_FILTER_ENABLE 1
  16541. A_UINT32 action;
  16542. } WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param;
  16543. typedef WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD;
  16544. typedef struct {
  16545. A_UINT32 tlv_header;
  16546. A_UINT32 vdev_id;
  16547. A_UINT32 mcc_tbttmode;
  16548. wmi_mac_addr mcc_bssid;
  16549. } wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param;
  16550. #define WMI_MAX_VENDOR_OUI_ACTION_SUPPORTED_PER_ACTION 10
  16551. #define WMI_MAX_VENDOR_OUI_DATA_LENGTH 20
  16552. typedef enum
  16553. {
  16554. WMI_VENDOR_OUI_ACTION_CONNECTION_1X1 = 0, /* Connect in 1X1 only */
  16555. 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 */
  16556. WMI_VENDOR_OUI_ACTION_CCKM_1X1 = 2, /* TX (only) CCKM rates with 1 chain only */
  16557. WMI_VENDOR_OUI_ACTION_ALT_ITO = 3, /* inactivity time-out */
  16558. WMI_VENDOR_OUI_ACTION_SWITCH_TO_11N_MODE = 4, /* Switch from 11ac to 11n mode to avoid IOT issues with ONM frame */
  16559. /* WMI_VENDOR_OUI_ACTION_CONNECTION_1X1_NUM_TX_RX_CHAINS_1
  16560. * Connect in 1x1 only and Use only one chain for both Tx and Rx
  16561. * to avoid IOT issues due to change in number of Tx and Rx chains
  16562. */
  16563. WMI_VENDOR_OUI_ACTION_CONNECTION_1X1_NUM_TX_RX_CHAINS_1 = 5,
  16564. /* Disable burst and assist, and restrict A-MPDU size to 32 */
  16565. WMI_VENDOR_OUI_ACTION_DISABLE_AGGRESSIVE_TX = 6,
  16566. /* Disable FW triggered TWT if vendor OUI is received in beacon */
  16567. WMI_VENDOR_OUI_ACTION_DISABLE_FW_TRIGGERED_TWT = 7,
  16568. /* Add any action before this line */
  16569. WMI_VENDOR_OUI_ACTION_MAX_ACTION_ID
  16570. } wmi_vendor_oui_action_id;
  16571. typedef struct {
  16572. A_UINT32 tlv_header;
  16573. /** vendor OUI actions */
  16574. A_UINT32 action_id; /* enum wmi_vendor_oui_action_id */
  16575. A_UINT32 total_num_vendor_oui; /* total number of OUI present in ini for all actions.
  16576. ** For first command, this value will be used for allocating memory in FW accordingly */
  16577. A_UINT32 num_vendor_oui_ext; /* the number of wmi_vendor_oui_ext for action_id */
  16578. /* followed by TLVs, an array of structure of type wmi_vendor_oui_ext
  16579. ** wmi_vendor_oui_ext vendor_oui_ext[num_vendor_oui_ext];
  16580. */
  16581. /* followed by A_UINT8 data[] of concatenated data for each vendor_oui_ext[] element
  16582. ** first byte contains the index i of structure vendor_oui_ext[]
  16583. ** for which data is coming and length of the data is extracted as
  16584. ** wmi_vendor_oui_ext[i].buf_data_length. No padding between data of
  16585. ** N th OUI and (N+1) th OUI.
  16586. ** For example, if vendor_oui_ext[0].buf_data_length is 18, then
  16587. ** data[0] will hold the index value 0, data[1] through data[17]
  16588. ** will hold the OUI data for this first OUI, data[18] will hold
  16589. ** the index value 1, and the OUI data for the second OUI will
  16590. ** begin at data[19].
  16591. */
  16592. } wmi_pdev_config_vendor_oui_action_fixed_param;
  16593. typedef struct {
  16594. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ac_tx_queue_optimized_cmd_fixed_param */
  16595. /** pdev_id for identifying the MAC
  16596. * See macros starting with WMI_PDEV_ID_ for values.
  16597. */
  16598. A_UINT32 pdev_id;
  16599. /** AC number */
  16600. A_UINT32 ac; /* refer to wmi_traffic_ac */
  16601. /**
  16602. * Enable/disable tx queue optimizations (such as dropping stale tx frms)
  16603. * for the specified AC.
  16604. */
  16605. A_UINT32 ac_tx_queue_optimize_enable;
  16606. } wmi_pdev_set_ac_tx_queue_optimized_cmd_fixed_param;
  16607. typedef struct {
  16608. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rx_filter_promiscuous_cmd_fixed_param */
  16609. /** pdev_id for identifying the MAC
  16610. * See macros starting with WMI_PDEV_ID_ for values.
  16611. */
  16612. A_UINT32 pdev_id;
  16613. /** Enable/disable rx filter promiscuous */
  16614. A_UINT32 rx_filter_promiscuous_enable;
  16615. } wmi_pdev_set_rx_filter_promiscuous_cmd_fixed_param;
  16616. typedef enum {
  16617. WMI_BEACON_INFO_PRESENCE_OUI_EXT = 1 << 0,
  16618. WMI_BEACON_INFO_PRESENCE_MAC_ADDRESS = 1 << 1,
  16619. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_NSS = 1 << 2,
  16620. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_HT = 1 << 3,
  16621. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_VHT = 1 << 4,
  16622. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_BAND = 1 << 5,
  16623. } wmi_beacon_info_presence_items;
  16624. typedef struct _wmi_vendor_oui_ext {
  16625. A_UINT32 tlv_header;
  16626. A_UINT32 buf_data_length; /* length of data in bytes for this OUI including index byte */
  16627. A_UINT32 info_presence_bit_mask; /* see enum wmi_beacon_info_presence_items */
  16628. A_UINT32 oui_header_length; /* either 3 or 5 bytes */
  16629. 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 */
  16630. A_UINT32 mac_address_length; /* MAC address length in bytes
  16631. ** (This value will always be 6,
  16632. ** but is explicitly specified for sake
  16633. ** of uniformity and completeness).
  16634. */
  16635. A_UINT32 capability_data_length; /* length of capability in bytes */
  16636. } wmi_vendor_oui_ext;
  16637. #define WMI_INFO_CAPABILITY_NSS_MASK 0x0f
  16638. #define WMI_INFO_CAPABILITY_NSS_OFFSET 0
  16639. #define WMI_INFO_CAPABILITY_HT_ENABLE_MASK 0x10
  16640. #define WMI_INFO_CAPABILITY_HT_ENABLE_OFFSET 4
  16641. #define WMI_INFO_CAPABILITY_VHT_ENABLE_MASK 0x20
  16642. #define WMI_INFO_CAPABILITY_VHT_ENABLE_OFFSET 5
  16643. #define WMI_INFO_CAPABILITY_BAND_MASK 0xc0
  16644. #define WMI_INFO_CAPABILITY_BAND_OFFSET 6
  16645. /* definition of WMI_INFO_CAPABILITY_NSS_MASK */
  16646. #define WMI_INFO_CAPABILITY_NSS_1X1 1
  16647. #define WMI_INFO_CAPABILITY_NSS_2X2 2
  16648. #define WMI_INFO_CAPABILITY_NSS_3X3 3
  16649. #define WMI_INFO_CAPABILITY_NSS_4X4 4
  16650. /* definition of WMI_INFO_CAPABILITY_BAND_MASK */
  16651. #define WMI_INFO_CAPABILITY_2G_BAND_MASK (1 << 0)
  16652. #define WMI_INFO_CAPABILITY_5G_BAND_MASK (1 << 1)
  16653. typedef struct {
  16654. A_UINT32 tlv_header;
  16655. A_UINT32 vdev_id; /* home vdev id */
  16656. A_UINT32 meas_token; /* from measure request frame */
  16657. A_UINT32 dialog_token;
  16658. A_UINT32 number_bursts; /* zero keep sending until cancel, bigger than 0 means times e.g. 1,2 */
  16659. A_UINT32 burst_interval; /* unit in mill seconds, interval between consecutive burst*/
  16660. A_UINT32 burst_cycle; /* times cycle through within one burst */
  16661. A_UINT32 tx_power; /* for path frame */
  16662. A_UINT32 off_duration; /* uint in mill seconds, channel off duraiton for path loss frame sending */
  16663. wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */
  16664. A_UINT32 num_chans;
  16665. /*
  16666. * This fixed_param TLV is followed by other TLVs:
  16667. * A_UINT32 channel_list[num_chans]; // in MHz
  16668. */
  16669. } wmi_vdev_plmreq_start_cmd_fixed_param;
  16670. typedef struct {
  16671. A_UINT32 tlv_header;
  16672. A_UINT32 vdev_id;
  16673. A_UINT32 meas_token; /* same value from req*/
  16674. } wmi_vdev_plmreq_stop_cmd_fixed_param;
  16675. typedef struct {
  16676. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param */
  16677. A_UINT32 tlv_header;
  16678. /* unique id identifying the VDEV, generated by the caller */
  16679. A_UINT32 vdev_id;
  16680. /* enable/disable NoA */
  16681. A_UINT32 enable;
  16682. /** number of NoA desc. In the TLV noa_descriptor[] */
  16683. A_UINT32 num_noa;
  16684. /**
  16685. * TLV (tag length value) paramerters follow the pattern structure.
  16686. * TLV contain NoA desc with num of num_noa
  16687. */
  16688. } wmi_p2p_set_noa_cmd_fixed_param;
  16689. typedef struct {
  16690. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param */
  16691. A_UINT32 tlv_header;
  16692. /* unique id identifying the VDEV, generated by the caller */
  16693. A_UINT32 vdev_id;
  16694. /* Identify the wlan module */
  16695. A_UINT32 module_id;
  16696. /* Num of test arguments passed */
  16697. A_UINT32 num_args;
  16698. /* unique id identifying the unit test cmd, generated by the caller */
  16699. A_UINT32 diag_token;
  16700. /**
  16701. * TLV (tag length value) parameters follow the wmi_unit_test_cmd_fixed_param
  16702. * structure. The TLV's are:
  16703. * A_UINT32 args[];
  16704. **/
  16705. } wmi_unit_test_cmd_fixed_param;
  16706. /** Roaming offload SYNCH_COMPLETE from host when host finished sync logic
  16707. * after it received WMI_ROAM_SYNCH_EVENTID.
  16708. */
  16709. typedef struct {
  16710. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */
  16711. /** unique id identifying the VDEV, generated by the caller */
  16712. A_UINT32 vdev_id;
  16713. } wmi_roam_synch_complete_fixed_param;
  16714. typedef enum {
  16715. RECOVERY_SIM_ASSERT = 0x01,
  16716. RECOVERY_SIM_NO_DETECT = 0x02,
  16717. RECOVERY_SIM_CTR_EP_FULL = 0x03,
  16718. RECOVERY_SIM_EMPTY_POINT = 0x04,
  16719. RECOVERY_SIM_STACK_OV = 0x05,
  16720. RECOVERY_SIM_INFINITE_LOOP = 0x06,
  16721. RECOVERY_SIM_PCIE_LINKDOWN = 0x07,
  16722. RECOVERY_SIM_SELF_RECOVERY = 0x08,
  16723. RECOVERY_SIM_BT_RECOVERY = 0x09,
  16724. } RECOVERY_SIM_TYPE;
  16725. /* WMI_FORCE_FW_HANG_CMDID */
  16726. typedef struct {
  16727. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param */
  16728. A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3: simulate ep-full(),4:...*/
  16729. A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms)*/
  16730. } WMI_FORCE_FW_HANG_CMD_fixed_param;
  16731. typedef enum {
  16732. WMI_MCAST_FILTER_SET = 1,
  16733. WMI_MCAST_FILTER_DELETE
  16734. } WMI_SET_SINGLE_MCAST_FILTER_OP;
  16735. typedef struct {
  16736. A_UINT32 tlv_header;
  16737. A_UINT32 vdev_id;
  16738. A_UINT32 index;
  16739. A_UINT32 action;
  16740. wmi_mac_addr mcastbdcastaddr;
  16741. } WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param;
  16742. typedef enum {
  16743. WMI_MULTIPLE_MCAST_FILTER_CLEAR = 1, /* clear all previous mc list */
  16744. WMI_MULTIPLE_MCAST_FILTER_SET, /* clear all previous mc list, and set new list */
  16745. WMI_MULTIPLE_MCAST_FILTER_DELETE, /* delete one/multiple mc list */
  16746. WMI_MULTIPLE_MCAST_FILTER_ADD /* add one/multiple mc list */
  16747. } WMI_MULTIPLE_MCAST_FILTER_OP;
  16748. typedef struct {
  16749. A_UINT32 tlv_header;
  16750. A_UINT32 vdev_id;
  16751. A_UINT32 operation; /* refer WMI_MULTIPLE_MCAST_FILTER_OP */
  16752. A_UINT32 num_mcastaddrs; /* number of elements in the subsequent mcast addr list */
  16753. /**
  16754. * TLV (tag length value) parameters follow the
  16755. * structure. The TLV's are:
  16756. * wmi_mac_addr mcastaddr_list[num_mcastaddrs];
  16757. */
  16758. } WMI_SET_MULTIPLE_MCAST_FILTER_CMD_fixed_param;
  16759. /* WMI_DBGLOG_TIME_STAMP_SYNC_CMDID */
  16760. typedef enum {
  16761. WMI_TIME_STAMP_SYNC_MODE_MS, /* millisecond units */
  16762. WMI_TIME_STAMP_SYNC_MODE_US, /* microsecond units */
  16763. } WMI_TIME_STAMP_SYNC_MODE;
  16764. typedef struct {
  16765. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dbglog_time_stamp_sync_cmd_fixed_param */
  16766. A_UINT32 mode; /* 0: millisec, 1: microsec (see WMI_TIME_STAMP_SYNC_MODE) */
  16767. A_UINT32 time_stamp_low; /* lower 32 bits of remote time stamp */
  16768. A_UINT32 time_stamp_high; /* higher 32 bits of remote time stamp */
  16769. } WMI_DBGLOG_TIME_STAMP_SYNC_CMD_fixed_param;
  16770. /* GPIO Command and Event data structures */
  16771. /* WMI_GPIO_CONFIG_CMDID */
  16772. enum {
  16773. WMI_GPIO_PULL_NONE, /** Do not specify a pull. */
  16774. WMI_GPIO_PULL_UP, /** Pull the GPIO up. */
  16775. WMI_GPIO_PULL_DOWN, /** Pull the GPIO down. */
  16776. WMI_GPIO_PULL_KEEPER, /** Designate as a keeper. */
  16777. };
  16778. enum wmi_gpio_drive_strength {
  16779. WMI_GPIO_2MA, /** Specify a 2 mA drive. */
  16780. WMI_GPIO_4MA, /** Specify a 4 mA drive. */
  16781. WMI_GPIO_6MA, /** Specify a 6 mA drive. */
  16782. WMI_GPIO_8MA, /** Specify an 8 mA drive. */
  16783. WMI_GPIO_10MA, /** Specify a 10 mA drive. */
  16784. WMI_GPIO_12MA, /** Specify a 12 mA drive. */
  16785. WMI_GPIO_14MA, /** Specify a 14 mA drive. */
  16786. WMI_GPIO_16MA, /** Specify a 16 mA drive. */
  16787. };
  16788. enum wmi_tlmm_gpio_config {
  16789. WMI_TLMM_GPIO_DISABLE, /** Use the internal inactive configuration. */
  16790. WMI_TLMM_GPIO_ENABLE, /** Use the configuration passed as parameter. */
  16791. };
  16792. enum {
  16793. WMI_GPIO_INTTYPE_DISABLE,
  16794. WMI_GPIO_INTTYPE_RISING_EDGE,
  16795. WMI_GPIO_INTTYPE_FALLING_EDGE,
  16796. WMI_GPIO_INTTYPE_BOTH_EDGE,
  16797. WMI_GPIO_INTTYPE_LEVEL_LOW,
  16798. WMI_GPIO_INTTYPE_LEVEL_HIGH
  16799. };
  16800. typedef struct {
  16801. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_config_cmd_fixed_param */
  16802. A_UINT32 gpio_num; /* GPIO number to be setup */
  16803. A_UINT32 input; /* 0 - Output/ 1 - Input */
  16804. A_UINT32 pull_type; /* Pull type defined above */
  16805. A_UINT32 intr_mode; /* Interrupt mode defined above (Input) */
  16806. /* mux_config_val - configure pin MUX
  16807. * A value of 0x0 for this field means to use the default MUX configuration.
  16808. * Valid non-zero values are as follows:
  16809. * Rome:
  16810. * 0x4 - use the pin as GPIO (rather than UART)
  16811. */
  16812. A_UINT32 mux_config_val;
  16813. /*
  16814. * The drive strength to use in the configuration of a GPIO.
  16815. * Refer to the wmi_gpio_drive_strength enum.
  16816. */
  16817. A_UINT32 drive;
  16818. /*
  16819. * Use the internal inactive configuration or configuration passed
  16820. * as parameter.
  16821. * Refer to the wmi_tlmm_gpio_config enum.
  16822. */
  16823. A_UINT32 init_enable;
  16824. } wmi_gpio_config_cmd_fixed_param;
  16825. /* WMI_GPIO_OUTPUT_CMDID */
  16826. typedef struct {
  16827. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_output_cmd_fixed_param */
  16828. A_UINT32 gpio_num; /* GPIO number to be setup */
  16829. A_UINT32 set; /* Set the GPIO pin*/
  16830. } wmi_gpio_output_cmd_fixed_param;
  16831. /* WMI_GPIO_INPUT_EVENTID */
  16832. typedef struct {
  16833. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param */
  16834. A_UINT32 gpio_num; /* GPIO number which changed state */
  16835. } wmi_gpio_input_event_fixed_param;
  16836. /* WMI_ANT_CONTROLLER_CMDID */
  16837. typedef struct {
  16838. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ant_controller_cmd_fixed_param */
  16839. A_UINT32 ant_controller_enable;
  16840. } wmi_ant_controller_cmd_fixed_param;
  16841. /* WMI_P2P_DISC_EVENTID */
  16842. enum {
  16843. P2P_DISC_SEARCH_PROB_REQ_HIT = 0, /* prob req hit the p2p find pattern */
  16844. P2P_DISC_SEARCH_PROB_RESP_HIT, /* prob resp hit the p2p find pattern */
  16845. };
  16846. enum {
  16847. P2P_DISC_MODE_SEARCH = 0, /* do search when p2p find offload*/
  16848. P2P_DISC_MODE_LISTEN, /* do listen when p2p find offload*/
  16849. P2P_DISC_MODE_AUTO, /* do listen and search when p2p find offload*/
  16850. };
  16851. enum {
  16852. P2P_DISC_PATTERN_TYPE_BSSID = 0, /* BSSID pattern */
  16853. P2P_DISC_PATTERN_TYPE_DEV_NAME, /* device name pattern */
  16854. };
  16855. typedef struct {
  16856. A_UINT32 vdev_id;
  16857. A_UINT32 reason; /* P2P DISC wake up reason*/
  16858. } wmi_p2p_disc_event;
  16859. typedef WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param WOW_EVENT_INFO_SECTION_GTKIGTK;
  16860. typedef enum {
  16861. WMI_FAKE_TXBFER_SEND_NDPA,
  16862. WMI_FAKE_TXBFER_SEND_MU,
  16863. WMI_FAKE_TXBFER_NDPA_FBTYPE,
  16864. WMI_FAKE_TXBFER_NDPA_NCIDX,
  16865. WMI_FAKE_TXBFER_NDPA_POLL,
  16866. WMI_FAKE_TXBFER_NDPA_BW,
  16867. WMI_FAKE_TXBFER_NDPA_PREAMBLE,
  16868. WMI_FAKE_TXBFER_NDPA_RATE,
  16869. WMI_FAKE_TXBFER_NDP_BW,
  16870. WMI_FAKE_TXBFER_NDP_NSS,
  16871. WMI_TXBFEE_ENABLE_UPLOAD_H,
  16872. WMI_TXBFEE_ENABLE_CAPTURE_H,
  16873. WMI_TXBFEE_SET_CBF_TBL,
  16874. WMI_TXBFEE_CBF_TBL_LSIG,
  16875. WMI_TXBFEE_CBF_TBL_SIGA1,
  16876. WMI_TXBFEE_CBF_TBL_SIGA2,
  16877. WMI_TXBFEE_CBF_TBL_SIGB,
  16878. WMI_TXBFEE_CBF_TBL_PAD,
  16879. WMI_TXBFEE_CBF_TBL_DUR,
  16880. WMI_TXBFEE_SU_NCIDX,
  16881. WMI_TXBFEE_CBIDX,
  16882. WMI_TXBFEE_NGIDX,
  16883. } WMI_TXBF_PARAM_ID;
  16884. typedef struct {
  16885. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_txbf_cmd_fixed_param */
  16886. /** parameter id */
  16887. A_UINT32 param_id;
  16888. /** parameter value */
  16889. A_UINT32 param_value;
  16890. } wmi_txbf_cmd_fixed_param;
  16891. typedef struct {
  16892. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_upload_h_hdr */
  16893. A_UINT32 h_length;
  16894. A_UINT32 cv_length;
  16895. /* This TLV is followed by array of bytes:
  16896. * A_UINT8 bufp[]; <-- h_cv info buffer
  16897. */
  16898. } wmi_upload_h_hdr;
  16899. typedef struct {
  16900. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_capture_h_event_hdr */
  16901. A_UINT32 svd_num;
  16902. A_UINT32 tone_num;
  16903. A_UINT32 reserved;
  16904. } wmi_capture_h_event_hdr;
  16905. typedef struct {
  16906. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_range_desc */
  16907. A_UINT32 start_freq; /* start frequency, not channel center freq */
  16908. A_UINT32 end_freq; /* end frequency */
  16909. } wmi_avoid_freq_range_desc;
  16910. typedef struct {
  16911. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_ranges_event_fixed_param */
  16912. /* bad channel range count, multi range is allowed, 0 means all channel clear */
  16913. A_UINT32 num_freq_ranges;
  16914. /* The TLVs will follow.
  16915. * multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc
  16916. * wmi_avoid_freq_range_desc avd_freq_range[]; <-- message buffer, NULL terminated
  16917. */
  16918. } wmi_avoid_freq_ranges_event_fixed_param;
  16919. enum {
  16920. WMI_SAR2_SUCCESS = 0,
  16921. WMI_SAR2_INVALID_ANTENNA_INDEX = 1,
  16922. WMI_SAR2_INVALID_TABLE_INDEX = 2,
  16923. WMI_SAR2_STATE_ERROR = 4,
  16924. WMI_SAR2_BDF_NO_TABLE = 8,
  16925. };
  16926. typedef struct {
  16927. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar2_result_event_fixed_param */
  16928. A_UINT32 result; /* refer to the above WMI_SAR2_ result definitions */
  16929. } wmi_sar2_result_event_fixed_param;
  16930. typedef struct {
  16931. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param */
  16932. /** Reserved for future use */
  16933. A_UINT32 reserved0;
  16934. A_UINT32 vdev_id;
  16935. } wmi_gtk_rekey_fail_event_fixed_param;
  16936. typedef enum WLAN_COEX_EVENT {
  16937. WLAN_COEX_EVENT_BT_NONE = 0,
  16938. WLAN_COEX_EVENT_BT_A2DP_PROFILE_ADD = 1,
  16939. WLAN_COEX_EVENT_BT_A2DP_PROFILE_REMOVE = 2,
  16940. WLAN_COEX_EVENT_BT_VOICE_PROFILE_ADD = 3,
  16941. WLAN_COEX_EVENT_BT_VOICE_PROFILE_REMOVE = 4,
  16942. WLAN_COEX_EVENT_BT_SCAN_START = 5,
  16943. WLAN_COEX_EVENT_BT_SCAN_STOP = 6,
  16944. WLAN_COEX_EVENT_BT_PROFILE_CONNECTED = 7,
  16945. WLAN_COEX_EVENT_BT_PROFILE_DISCONNECTED = 8,
  16946. } WLAN_COEX_EVENT;
  16947. typedef struct {
  16948. A_UINT32 tlv_header;
  16949. A_UINT32 coex_profile_evt; //uses the enum values from WLAN_COEX_EVENT
  16950. } wmi_coex_bt_activity_event_fixed_param;
  16951. enum wmm_ac_downgrade_policy {
  16952. WMM_AC_DOWNGRADE_DEPRIO,
  16953. WMM_AC_DOWNGRADE_DROP,
  16954. WMM_AC_DOWNGRADE_INVALID,
  16955. };
  16956. /* WMM EDCA Params type */
  16957. #define WMM_PARAM_TYPE_LEGACY 0
  16958. /* Relaxed EDCA parameters for 11ax to be used in case of triggered access */
  16959. #define WMM_PARAM_TYPE_11AX_EDCA 1
  16960. typedef struct {
  16961. A_UINT32 tlv_header;
  16962. A_UINT32 cwmin;
  16963. A_UINT32 cwmax;
  16964. A_UINT32 aifs;
  16965. union {
  16966. A_UINT32 txoplimit;
  16967. A_UINT32 mu_edca_timer;
  16968. };
  16969. A_UINT32 acm;
  16970. A_UINT32 no_ack;
  16971. } wmi_wmm_vparams;
  16972. typedef struct {
  16973. A_UINT32 tlv_header;
  16974. A_UINT32 vdev_id;
  16975. wmi_wmm_vparams wmm_params[4]; /* 0 be, 1 bk, 2 vi, 3 vo */
  16976. A_UINT32 wmm_param_type; /* see WMM_PARAM_TYPE_xxx defs */
  16977. } wmi_vdev_set_wmm_params_cmd_fixed_param;
  16978. typedef struct {
  16979. A_UINT32 tlv_header;
  16980. A_UINT32 vdev_id;
  16981. A_UINT32 gtxRTMask[2]; /* for HT and VHT rate masks */
  16982. A_UINT32 userGtxMask; /* host request for GTX mask */
  16983. A_UINT32 gtxPERThreshold; /* default: 10% */
  16984. A_UINT32 gtxPERMargin; /* default: 2% */
  16985. A_UINT32 gtxTPCstep; /* default: 1 */
  16986. A_UINT32 gtxTPCMin; /* default: 5 */
  16987. A_UINT32 gtxBWMask; /* 20/40/80/160 Mhz */
  16988. } wmi_vdev_set_gtx_params_cmd_fixed_param;
  16989. typedef struct
  16990. {
  16991. A_UINT32 tlv_header;
  16992. A_UINT32 vdev_id;
  16993. A_UINT32 ac;
  16994. A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */
  16995. A_UINT32 downgrade_type;
  16996. } wmi_vdev_wmm_addts_cmd_fixed_param;
  16997. typedef struct
  16998. {
  16999. A_UINT32 tlv_header;
  17000. A_UINT32 vdev_id;
  17001. A_UINT32 ac;
  17002. } wmi_vdev_wmm_delts_cmd_fixed_param;
  17003. /* DEPRECATED */
  17004. typedef struct {
  17005. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param */
  17006. /** Reserved for future use */
  17007. A_UINT32 reserved0;
  17008. } wmi_pdev_dfs_enable_cmd_fixed_param;
  17009. /* DEPRECATED */
  17010. typedef struct {
  17011. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_disable_cmd_fixed_param */
  17012. /** pdev_id for identifying the MAC
  17013. * See macros starting with WMI_PDEV_ID_ for values.
  17014. */
  17015. A_UINT32 pdev_id;
  17016. } wmi_pdev_dfs_disable_cmd_fixed_param;
  17017. typedef struct {
  17018. /** TLV tag and len; tag equals
  17019. * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param
  17020. */
  17021. A_UINT32 tlv_header;
  17022. /** pdev_id for identifying the MAC
  17023. * See macros starting with WMI_PDEV_ID_ for values.
  17024. */
  17025. A_UINT32 pdev_id;
  17026. } wmi_dfs_phyerr_filter_ena_cmd_fixed_param;
  17027. typedef struct {
  17028. /** TLV tag and len; tag equals
  17029. * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param
  17030. */
  17031. A_UINT32 tlv_header;
  17032. /** pdev_id for identifying the MAC
  17033. * See macros starting with WMI_PDEV_ID_ for values.
  17034. */
  17035. A_UINT32 pdev_id;
  17036. } wmi_dfs_phyerr_filter_dis_cmd_fixed_param;
  17037. typedef struct {
  17038. A_UINT32 tlv_header;
  17039. A_UINT32 pdev_id;
  17040. } wmi_pdev_dfs_phyerr_offload_enable_cmd_fixed_param;
  17041. typedef struct {
  17042. A_UINT32 tlv_header;
  17043. A_UINT32 pdev_id;
  17044. } wmi_pdev_dfs_phyerr_offload_disable_cmd_fixed_param;
  17045. typedef enum {
  17046. QUICK_OCAC = 0,
  17047. EXTENSIVE_OCAC,
  17048. QUICK_RCAC,
  17049. } WMI_ADFS_OCAC_MODE;
  17050. typedef struct {
  17051. A_UINT32 tlv_header;
  17052. A_UINT32 vdev_id;
  17053. A_UINT32 ocac_mode; /* WMI_ADFS_OCAC_MODE */
  17054. A_UINT32 min_duration_ms; /* in milliseconds */
  17055. A_UINT32 max_duration_ms; /* in milliseconds */
  17056. A_UINT32 chan_freq; /* in MHz */
  17057. A_UINT32 chan_width; /* in MHz */
  17058. /*
  17059. * Two center frequencies are required since agile channel switch
  17060. * has to support 160/165 MHz for products like Pine.
  17061. * For agile which supports only up to 80MHz (HK),
  17062. * freq2 will be 0 and ignored.
  17063. */
  17064. union {
  17065. A_UINT32 center_freq; /* in MHz */ /* old name */
  17066. A_UINT32 center_freq1; /* in MHz */ /* new name */
  17067. };
  17068. A_UINT32 center_freq2; /* in MHz */
  17069. } wmi_vdev_adfs_ch_cfg_cmd_fixed_param;
  17070. typedef struct {
  17071. A_UINT32 tlv_header;
  17072. A_UINT32 vdev_id;
  17073. } wmi_vdev_adfs_ocac_abort_cmd_fixed_param;
  17074. typedef enum {
  17075. IN_SERVICE_MODE = 0,
  17076. OCAC_MODE,
  17077. } WMI_DFS_RADAR_DETECTION_MODE;
  17078. typedef struct {
  17079. A_UINT32 tlv_header;
  17080. A_UINT32 pdev_id;
  17081. /* In-service mode or O-CAC mode */
  17082. A_UINT32 detection_mode; /* WMI_DFS_RADAR_DETECTION_MODE */
  17083. A_UINT32 chan_freq; /* in MHz */
  17084. A_UINT32 chan_width; /* in MHz */
  17085. A_UINT32 detector_id;
  17086. A_UINT32 segment_id;
  17087. A_UINT32 timestamp;
  17088. A_UINT32 is_chirp;
  17089. A_INT32 freq_offset; /* in MHz */
  17090. A_INT32 sidx; /* segment index (where was the radar within the channel) */
  17091. } wmi_pdev_dfs_radar_detection_event_fixed_param;
  17092. typedef enum {
  17093. OCAC_COMPLETE = 0,
  17094. OCAC_ABORT,
  17095. } WMI_VDEV_OCAC_COMPLETE_STATUS;
  17096. typedef struct {
  17097. A_UINT32 tlv_header;
  17098. A_UINT32 vdev_id;
  17099. A_UINT32 chan_freq; /* in MHz */
  17100. A_UINT32 chan_width; /* in MHz */
  17101. /*
  17102. * Two center frequencies are required since agile channel switch
  17103. * has to support 160/165 MHz for products like Pine.
  17104. * For agile which supports only up to 80MHz (HK),
  17105. * freq2 will be 0 and ignored.
  17106. */
  17107. union {
  17108. A_UINT32 center_freq; /* in MHz */ /* old name */
  17109. A_UINT32 center_freq1; /* in MHz */ /* new name */
  17110. };
  17111. A_UINT32 status; /* WMI_VDEV_OCAC_COMPLETE_STATUS */
  17112. A_UINT32 center_freq2; /* in MHz */
  17113. } wmi_vdev_adfs_ocac_complete_event_fixed_param;
  17114. typedef struct {
  17115. A_UINT32 tlv_header;
  17116. A_UINT32 vdev_id;
  17117. } wmi_vdev_dfs_cac_complete_event_fixed_param;
  17118. /** TDLS COMMANDS */
  17119. /* WMI_TDLS_SET_STATE_CMDID */
  17120. /* TDLS State */
  17121. enum wmi_tdls_state {
  17122. /** TDLS disable */
  17123. WMI_TDLS_DISABLE,
  17124. /** TDLS enabled - no firmware connection tracking/notifications */
  17125. WMI_TDLS_ENABLE_PASSIVE,
  17126. /** TDLS enabled - with firmware connection tracking/notifications */
  17127. WMI_TDLS_ENABLE_ACTIVE,
  17128. /** TDLS enabled - firmware waits for peer mac for connection tracking */
  17129. WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL,
  17130. /** TDLS enabled - TDLS connection tracking is done in host */
  17131. WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST,
  17132. };
  17133. /* TDLS Options */
  17134. #define WMI_TDLS_OFFCHAN_EN (1 << 0) /** TDLS Off Channel support */
  17135. #define WMI_TDLS_BUFFER_STA_EN (1 << 1) /** TDLS Buffer STA support */
  17136. #define WMI_TDLS_SLEEP_STA_EN (1 << 2) /** TDLS Sleep STA support (not currently supported) */
  17137. typedef struct {
  17138. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param */
  17139. A_UINT32 tlv_header;
  17140. /** unique id identifying the VDEV */
  17141. A_UINT32 vdev_id;
  17142. /** Enable/Disable TDLS (wmi_tdls_state) */
  17143. A_UINT32 state;
  17144. /** Duration (in ms) over which to calculate tx/rx threshold to trigger TDLS Discovery */
  17145. A_UINT32 notification_interval_ms;
  17146. /** number of packets OVER which notify/suggest TDLS Discovery:
  17147. * if current tx pps counter / notification interval >= threshold
  17148. * then a notification will be sent to host to advise TDLS Discovery */
  17149. A_UINT32 tx_discovery_threshold;
  17150. /** number of packets UNDER which notify/suggest TDLS Teardown:
  17151. * if current tx pps counter / notification interval < threshold
  17152. * then a notification will be sent to host to advise TDLS Tear down */
  17153. A_UINT32 tx_teardown_threshold;
  17154. /** Absolute RSSI value under which notify/suggest TDLS Teardown */
  17155. A_INT32 rssi_teardown_threshold;
  17156. /** Peer RSSI < (AP RSSI + delta) will trigger a teardown */
  17157. A_INT32 rssi_delta;
  17158. /** TDLS Option Control
  17159. * Off-Channel, Buffer STA, (later)Sleep STA support */
  17160. A_UINT32 tdls_options;
  17161. /* Buffering time in number of beacon intervals */
  17162. A_UINT32 tdls_peer_traffic_ind_window;
  17163. /* Wait time for PTR frame */
  17164. A_UINT32 tdls_peer_traffic_response_timeout_ms;
  17165. /* Self PUAPSD mask */
  17166. A_UINT32 tdls_puapsd_mask;
  17167. /* Inactivity timeout */
  17168. A_UINT32 tdls_puapsd_inactivity_time_ms;
  17169. /* Max of rx frame during SP */
  17170. A_UINT32 tdls_puapsd_rx_frame_threshold;
  17171. /**Duration (in ms) over which to check whether TDLS link needs to be torn down */
  17172. A_UINT32 teardown_notification_ms;
  17173. /** STA kickout threshold for TDLS peer */
  17174. A_UINT32 tdls_peer_kickout_threshold;
  17175. /* TDLS discovery WAKE timeout in ms.
  17176. * DUT will wake until this timeout to receive TDLS discovery response
  17177. * from peer.
  17178. * If tdls_discovery_wake_timeout is 0x0, the DUT will choose autonomously
  17179. * what wake timeout value to use.
  17180. */
  17181. A_UINT32 tdls_discovery_wake_timeout;
  17182. } wmi_tdls_set_state_cmd_fixed_param;
  17183. /* WMI_TDLS_PEER_UPDATE_CMDID */
  17184. enum wmi_tdls_peer_state {
  17185. /** tx peer TDLS link setup now starting, traffic to DA should be
  17186. * paused (except TDLS frames) until state is moved to CONNECTED (or
  17187. * TEARDOWN on setup failure) */
  17188. WMI_TDLS_PEER_STATE_PEERING,
  17189. /** tx peer TDLS link established, running (all traffic to DA unpaused) */
  17190. WMI_TDLS_PEER_STATE_CONNECTED,
  17191. /** tx peer TDLS link tear down started (link paused, any frames
  17192. * queued for DA will be requeued back through the AP)*/
  17193. WMI_TDLS_PEER_STATE_TEARDOWN,
  17194. /** Add peer mac into connection table */
  17195. WMI_TDLS_PEER_ADD_MAC_ADDR,
  17196. /** Remove peer mac from connection table */
  17197. WMI_TDLS_PEER_REMOVE_MAC_ADDR,
  17198. };
  17199. /* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */
  17200. #define WMI_TDLS_MAX_SUPP_CHANNELS 128
  17201. #define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
  17202. typedef struct {
  17203. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities */
  17204. A_UINT32 tlv_header;
  17205. /* Peer's QoS Info - for U-APSD */
  17206. /* AC FLAGS - accessed through macros below */
  17207. /* Ack, SP, More Data Ack - accessed through macros below */
  17208. A_UINT32 peer_qos;
  17209. /*TDLS Peer's U-APSD Buffer STA Support*/
  17210. A_UINT32 buff_sta_support;
  17211. /*TDLS off channel related params */
  17212. A_UINT32 off_chan_support;
  17213. A_UINT32 peer_curr_operclass;
  17214. A_UINT32 self_curr_operclass;
  17215. /* Number of channels available for off channel operation */
  17216. A_UINT32 peer_chan_len;
  17217. A_UINT32 peer_operclass_len;
  17218. A_UINT8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
  17219. /* Is peer initiator or responder of TDLS setup request */
  17220. A_UINT32 is_peer_responder;
  17221. /* Preferred off channel number as configured by user */
  17222. A_UINT32 pref_offchan_num;
  17223. /* Preferred off channel bandwidth as configured by user */
  17224. A_UINT32 pref_offchan_bw;
  17225. /* Preferred off channel frequency in MHz as configured by user */
  17226. A_UINT32 pref_offchan_freq;
  17227. /** Followed by the variable length TLV peer_chan_list:
  17228. * wmi_channel peer_chan_list[].
  17229. * Array size would be peer_chan_len.
  17230. * This array is intersected channels which is supported by both peer
  17231. * and DUT. freq1 in chan_info shall be same as mhz, freq2 shall be 0.
  17232. * FW shall compute BW for an offchan based on peer's ht/vht cap
  17233. * received in peer_assoc cmd during change STA operation
  17234. */
  17235. } wmi_tdls_peer_capabilities;
  17236. #define WMI_TDLS_QOS_VO_FLAG 0
  17237. #define WMI_TDLS_QOS_VI_FLAG 1
  17238. #define WMI_TDLS_QOS_BK_FLAG 2
  17239. #define WMI_TDLS_QOS_BE_FLAG 3
  17240. #define WMI_TDLS_QOS_ACK_FLAG 4
  17241. #define WMI_TDLS_QOS_SP_FLAG 5
  17242. #define WMI_TDLS_QOS_MOREDATA_FLAG 7
  17243. #define WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps,flag) do { \
  17244. (ppeer_caps)->peer_qos |= (1 << flag); \
  17245. } while (0)
  17246. #define WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps,flag) \
  17247. (((ppeer_caps)->peer_qos & (1 << flag)) >> flag)
  17248. #define WMI_SET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
  17249. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
  17250. #define WMI_GET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
  17251. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
  17252. #define WMI_SET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
  17253. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
  17254. #define WMI_GET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
  17255. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
  17256. #define WMI_SET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
  17257. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
  17258. #define WMI_GET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
  17259. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
  17260. #define WMI_SET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
  17261. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
  17262. #define WMI_GET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
  17263. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
  17264. #define WMI_SET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
  17265. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
  17266. #define WMI_GET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
  17267. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
  17268. /* SP has 2 bits */
  17269. #define WMI_SET_TDLS_PEER_SP_UAPSD(ppeer_caps,val) do { \
  17270. (ppeer_caps)->peer_qos |= (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
  17271. } while (0)
  17272. #define WMI_GET_TDLS_PEER_SP_UAPSD(ppeer_caps) \
  17273. (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
  17274. #define WMI_SET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
  17275. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
  17276. #define WMI_GET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
  17277. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
  17278. #define WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd,flag) do { \
  17279. (pset_cmd)->tdls_puapsd_mask |= (1 << flag); \
  17280. } while (0)
  17281. #define WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd,flag) \
  17282. (((pset_cmd)->tdls_puapsd_mask & (1 << flag)) >> flag)
  17283. #define WMI_SET_TDLS_SELF_VO_UAPSD(pset_cmd) \
  17284. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
  17285. #define WMI_GET_TDLS_SELF_VO_UAPSD(pset_cmd) \
  17286. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
  17287. #define WMI_SET_TDLS_SELF_VI_UAPSD(pset_cmd) \
  17288. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
  17289. #define WMI_GET_TDLS_SELF_VI_UAPSD(pset_cmd) \
  17290. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
  17291. #define WMI_SET_TDLS_SELF_BK_UAPSD(pset_cmd) \
  17292. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
  17293. #define WMI_GET_TDLS_SELF__BK_UAPSD(pset_cmd) \
  17294. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
  17295. #define WMI_SET_TDLS_SELF_BE_UAPSD(pset_cmd) \
  17296. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
  17297. #define WMI_GET_TDLS_SELF_BE_UAPSD(pset_cmd) \
  17298. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
  17299. #define WMI_SET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
  17300. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
  17301. #define WMI_GET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
  17302. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
  17303. /* SP has 2 bits */
  17304. #define WMI_SET_TDLS_SELF_SP_UAPSD(pset_cmd,val) do { \
  17305. (pset_cmd)->tdls_puapsd_mask |= (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
  17306. } while (0)
  17307. #define WMI_GET_TDLS_SELF_SP_UAPSD(pset_cmd) \
  17308. (((pset_cmd)->tdls_puapsd_mask & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
  17309. #define WMI_SET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
  17310. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
  17311. #define WMI_GET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
  17312. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
  17313. typedef struct {
  17314. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param */
  17315. A_UINT32 tlv_header;
  17316. /** unique id identifying the VDEV */
  17317. A_UINT32 vdev_id;
  17318. /** peer MAC address */
  17319. wmi_mac_addr peer_macaddr;
  17320. /** new TDLS state for peer (wmi_tdls_peer_state) */
  17321. A_UINT32 peer_state;
  17322. /* The TLV for wmi_tdls_peer_capabilities will follow.
  17323. * wmi_tdls_peer_capabilities peer_caps;
  17324. */
  17325. /** Followed by the variable length TLV chan_info:
  17326. * wmi_channel chan_info[] */
  17327. } wmi_tdls_peer_update_cmd_fixed_param;
  17328. /* WMI_TDLS_SET_OFFCHAN_MODE_CMDID */
  17329. /* bitmap 20, 40, 80 or 160 MHz wide channel */
  17330. #define WMI_TDLS_OFFCHAN_20MHZ 0x1 /* 20 MHz wide channel */
  17331. #define WMI_TDLS_OFFCHAN_40MHZ 0x2 /* 40 MHz wide channel */
  17332. #define WMI_TDLS_OFFCHAN_80MHZ 0x4 /* 80 MHz wide channel */
  17333. #define WMI_TDLS_OFFCHAN_160MHZ 0x8 /* 160 MHz wide channel */
  17334. enum wmi_tdls_offchan_mode {
  17335. WMI_TDLS_ENABLE_OFFCHANNEL,
  17336. WMI_TDLS_DISABLE_OFFCHANNEL
  17337. };
  17338. typedef struct {
  17339. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_offchan_mode_cmd_fixed_param */
  17340. A_UINT32 tlv_header;
  17341. /** unique id identifying the VDEV */
  17342. A_UINT32 vdev_id;
  17343. /** Enable/Disable TDLS offchannel */
  17344. A_UINT32 offchan_mode;
  17345. /** peer MAC address */
  17346. wmi_mac_addr peer_macaddr;
  17347. /* Is peer initiator or responder of TDLS setup request */
  17348. A_UINT32 is_peer_responder;
  17349. /* off channel number*/
  17350. A_UINT32 offchan_num;
  17351. /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */
  17352. A_UINT32 offchan_bw_bitmap;
  17353. /* operating class for offchan */
  17354. A_UINT32 offchan_oper_class;
  17355. /* off channel frequency in MHz */
  17356. A_UINT32 offchan_freq;
  17357. } wmi_tdls_set_offchan_mode_cmd_fixed_param;
  17358. /** TDLS EVENTS */
  17359. enum wmi_tdls_peer_notification {
  17360. /** tdls discovery recommended for peer (based
  17361. * on tx bytes per second > tx_discover threshold) */
  17362. WMI_TDLS_SHOULD_DISCOVER,
  17363. /** tdls link tear down recommended for peer
  17364. * due to tx bytes per second below tx_teardown_threshold
  17365. * NB: this notification sent once */
  17366. WMI_TDLS_SHOULD_TEARDOWN,
  17367. /** tx peer TDLS link tear down complete */
  17368. WMI_TDLS_PEER_DISCONNECTED,
  17369. /** TDLS/BT role change notification for connection tracker */
  17370. WMI_TDLS_CONNECTION_TRACKER_NOTIFICATION,
  17371. };
  17372. enum wmi_tdls_peer_reason {
  17373. /** tdls teardown recommended due to low transmits */
  17374. WMI_TDLS_TEARDOWN_REASON_TX,
  17375. /** tdls link tear down recommended due to poor RSSI */
  17376. WMI_TDLS_TEARDOWN_REASON_RSSI,
  17377. /** tdls link tear down recommended due to offchannel scan */
  17378. WMI_TDLS_TEARDOWN_REASON_SCAN,
  17379. /** tdls peer disconnected due to peer deletion */
  17380. WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE,
  17381. /** tdls peer disconnected due to PTR timeout */
  17382. WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT,
  17383. /** tdls peer disconnected due wrong PTR format */
  17384. WMI_TDLS_TEARDOWN_REASON_BAD_PTR,
  17385. /** tdls peer not responding */
  17386. WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE,
  17387. /** tdls entered buffer STA role, TDLS connection tracker needs to handle this */
  17388. WMI_TDLS_ENTER_BUF_STA,
  17389. /** tdls exited buffer STA role, TDLS connection tracker needs to handle this */
  17390. WMI_TDLS_EXIT_BUF_STA,
  17391. /** BT entered busy mode, TDLS connection tracker needs to handle this */
  17392. WMI_TDLS_ENTER_BT_BUSY_MODE,
  17393. /** BT exited busy mode, TDLS connection tracker needs to handle this */
  17394. WMI_TDLS_EXIT_BT_BUSY_MODE,
  17395. /** TDLS module received a scan start event, TDLS connection tracker needs to handle this */
  17396. WMI_TDLS_SCAN_STARTED_EVENT,
  17397. /** TDLS module received a scan complete event, TDLS connection tracker needs to handle this */
  17398. WMI_TDLS_SCAN_COMPLETED_EVENT,
  17399. };
  17400. /* WMI_TDLS_PEER_EVENTID */
  17401. typedef struct {
  17402. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param */
  17403. A_UINT32 tlv_header;
  17404. /** peer MAC address */
  17405. wmi_mac_addr peer_macaddr;
  17406. /** TDLS peer status (wmi_tdls_peer_notification)*/
  17407. A_UINT32 peer_status;
  17408. /** TDLS peer reason (wmi_tdls_peer_reason) */
  17409. A_UINT32 peer_reason;
  17410. /** unique id identifying the VDEV */
  17411. A_UINT32 vdev_id;
  17412. } wmi_tdls_peer_event_fixed_param;
  17413. /* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please
  17414. don't use this for any new implementations */
  17415. typedef struct {
  17416. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param */
  17417. /** unique id identifying the VDEV, generated by the caller */
  17418. A_UINT32 vdev_id;
  17419. /* New beacon interval to be used for the specified VDEV suggested by firmware */
  17420. A_UINT32 new_bcn_intvl;
  17421. } wmi_vdev_mcc_bcn_intvl_change_event_fixed_param;
  17422. /* WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID */
  17423. typedef struct {
  17424. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param */
  17425. A_UINT32 tlv_header;
  17426. /** 1: enable fw based adaptive ocs,
  17427. * 0: disable fw based adaptive ocs
  17428. */
  17429. A_UINT32 enable;
  17430. /** This field contains the MAC identifier in order to lookup the appropriate OCS instance. */
  17431. union {
  17432. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  17433. /** pdev_id for identifying the MAC
  17434. * See macros starting with WMI_PDEV_ID_ for values.
  17435. */
  17436. A_UINT32 pdev_id;
  17437. };
  17438. } wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param;
  17439. /* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */
  17440. typedef struct {
  17441. /* Frequency of the channel for which the quota is set */
  17442. A_UINT32 chan_mhz;
  17443. /* Requested channel time quota expressed as percentage */
  17444. A_UINT32 channel_time_quota;
  17445. } wmi_resmgr_chan_time_quota;
  17446. typedef struct {
  17447. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */
  17448. A_UINT32 tlv_header;
  17449. /** number of channel time quota command structures
  17450. * (wmi_resmgr_chan_time_quota) 1 or 2
  17451. */
  17452. A_UINT32 num_chans;
  17453. /* This TLV is followed by another TLV of array of bytes
  17454. * A_UINT8 data[];
  17455. * This data array contains
  17456. * num_chans * size of(struct wmi_resmgr_chan_time_quota)
  17457. */
  17458. } wmi_resmgr_set_chan_time_quota_cmd_fixed_param;
  17459. /* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */
  17460. typedef struct {
  17461. /* Frequency of the channel for which the latency is set */
  17462. A_UINT32 chan_mhz;
  17463. /* Requested channel latency in milliseconds */
  17464. A_UINT32 latency;
  17465. } wmi_resmgr_chan_latency;
  17466. typedef struct {
  17467. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */
  17468. A_UINT32 tlv_header;
  17469. /** number of channel latency command structures
  17470. * (wmi_resmgr_chan_latency) 1 or 2
  17471. */
  17472. A_UINT32 num_chans;
  17473. /* This TLV is followed by another TLV of array of bytes
  17474. * A_UINT8 data[];
  17475. * This data array contains
  17476. * num_chans * size of(struct wmi_resmgr_chan_latency)
  17477. */
  17478. } wmi_resmgr_set_chan_latency_cmd_fixed_param;
  17479. /* WMI_STA_SMPS_FORCE_MODE_CMDID */
  17480. /** STA SMPS Forced Mode */
  17481. typedef enum {
  17482. WMI_SMPS_FORCED_MODE_NONE = 0,
  17483. WMI_SMPS_FORCED_MODE_DISABLED,
  17484. WMI_SMPS_FORCED_MODE_STATIC,
  17485. WMI_SMPS_FORCED_MODE_DYNAMIC
  17486. } wmi_sta_smps_forced_mode;
  17487. typedef struct {
  17488. /** TLV tag and len; tag equals
  17489. * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */
  17490. A_UINT32 tlv_header;
  17491. /** Unique id identifying the VDEV */
  17492. A_UINT32 vdev_id;
  17493. /** The mode of SMPS that is to be forced in the FW. */
  17494. A_UINT32 forced_mode;
  17495. } wmi_sta_smps_force_mode_cmd_fixed_param;
  17496. /** wlan HB commands */
  17497. #define WMI_WLAN_HB_ITEM_UDP 0x1
  17498. #define WMI_WLAN_HB_ITEM_TCP 0x2
  17499. #define WMI_WLAN_HB_MAX_FILTER_SIZE 32 /* should be equal to WLAN_HB_MAX_FILTER_SIZE,
  17500. must be a multiple of 4 bytes */
  17501. typedef struct {
  17502. /** TLV tag and len; tag equals
  17503. * WMITLV_TAG_STRUC_wmi_hb_set_enable_cmd_fixed_param */
  17504. A_UINT32 tlv_header; /** TLV header*/
  17505. A_UINT32 vdev_id; /** Vdev ID */
  17506. A_UINT32 enable; /** 1: Enable, 0: Disable`*/
  17507. A_UINT32 item; /** 1: UDP, 2: TCP */
  17508. A_UINT32 session; /** Session ID from HOST */
  17509. } wmi_hb_set_enable_cmd_fixed_param;
  17510. typedef struct {
  17511. /** TLV tag and len; tag equals
  17512. * WMITLV_TAG_STRUC_wmi_hb_set_tcp_params_cmd_fixed_param */
  17513. A_UINT32 tlv_header; /** TLV header*/
  17514. A_UINT32 vdev_id; /** Vdev ID */
  17515. A_UINT32 srv_ip; /** Server IP address (IPv4) */
  17516. A_UINT32 dev_ip; /** Device IP address (IPv4) */
  17517. A_UINT32 seq; /** TCP Sequence no */
  17518. A_UINT32 src_port; /** Source port */
  17519. A_UINT32 dst_port; /** Destination port */
  17520. A_UINT32 interval; /** Keep alive interval */
  17521. A_UINT32 timeout; /** Timeout if keep alive fails */
  17522. A_UINT32 session; /** Session ID from HOST */
  17523. wmi_mac_addr gateway_mac; /** Server Mac Address */
  17524. } wmi_hb_set_tcp_params_cmd_fixed_param;
  17525. typedef struct {
  17526. /** TLV tag and len; tag equals
  17527. * WMITLV_TAG_STRUC_wmi_hb_set_tcp_pkt_filter_cmd_fixed_param */
  17528. A_UINT32 tlv_header;
  17529. A_UINT32 vdev_id;
  17530. A_UINT32 length;
  17531. A_UINT32 offset;
  17532. A_UINT32 session;
  17533. A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
  17534. } wmi_hb_set_tcp_pkt_filter_cmd_fixed_param;
  17535. typedef struct {
  17536. /** TLV tag and len; tag equals
  17537. * WMITLV_TAG_STRUC_wmi_hb_set_udp_params_cmd_fixed_param */
  17538. A_UINT32 tlv_header;
  17539. A_UINT32 vdev_id;
  17540. A_UINT32 srv_ip;
  17541. A_UINT32 dev_ip;
  17542. A_UINT32 src_port;
  17543. A_UINT32 dst_port;
  17544. A_UINT32 interval;
  17545. A_UINT32 timeout;
  17546. A_UINT32 session;
  17547. wmi_mac_addr gateway_mac;
  17548. } wmi_hb_set_udp_params_cmd_fixed_param;
  17549. typedef struct {
  17550. /** TLV tag and len; tag equals
  17551. * WMITLV_TAG_STRUC_wmi_hb_set_udp_pkt_filter_cmd_fixed_param */
  17552. A_UINT32 tlv_header;
  17553. A_UINT32 vdev_id;
  17554. A_UINT32 length;
  17555. A_UINT32 offset;
  17556. A_UINT32 session;
  17557. A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
  17558. } wmi_hb_set_udp_pkt_filter_cmd_fixed_param;
  17559. /** wlan HB events */
  17560. typedef enum {
  17561. WMI_WLAN_HB_REASON_UNKNOWN = 0,
  17562. WMI_WLAN_HB_REASON_TCP_TIMEOUT = 1,
  17563. WMI_WLAN_HB_REASON_UDP_TIMEOUT = 2,
  17564. } WMI_HB_WAKEUP_REASON;
  17565. typedef struct {
  17566. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hb_ind_event_fixed_param */
  17567. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  17568. A_UINT32 session; /** Session ID from HOST */
  17569. A_UINT32 reason; /** wakeup reason */
  17570. } wmi_hb_ind_event_fixed_param;
  17571. typedef struct {
  17572. /** TLV tag and len; tag equals
  17573. * WMITLV_TAG_STRUC_wmi_oic_set_enable_cmd_fixed_param */
  17574. A_UINT32 tlv_header; /** TLV Header */
  17575. A_UINT32 vdev_id; /** Vdev ID */
  17576. A_UINT32 session; /** Session number from the HOST */
  17577. A_UINT32 srv_ip; /** IPv4 address of the OCF server */
  17578. A_UINT32 dev_ip; /** IPv4 address of the device */
  17579. A_UINT32 tcp_tx_seq; /** TCP sequence number */
  17580. A_UINT32 src_port; /** Source port */
  17581. A_UINT32 dst_port; /** Destination port */
  17582. A_UINT32 protocol; /** Protocol used: TCP:0, UDP:1 */
  17583. 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 */
  17584. A_UINT32 timeout_retries; /** timeout[31:16]: TCP ACK timeout, time to wait for a TCP ACK in ms
  17585. retries[15:0]: Number of TCP level retries of OIC ping request */
  17586. wmi_mac_addr peer_macaddr; /** MAC address of the OCF server */
  17587. A_UINT32 oic_ping_pkt0; /** OIC ping packet content [Byte03:Byte00] */
  17588. A_UINT32 oic_ping_pkt1; /** OIC ping packet content [Byte07:Byte04] */
  17589. A_UINT32 oic_ping_pkt2; /** OIC ping packet content [Byte11:Byte08] */
  17590. A_UINT32 oic_ping_pkt3; /** OIC ping packet content [Byte15:Byte12] */
  17591. A_UINT32 tls_cipher_suite_version; /** Cipher suite [31:16] as defined in https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml
  17592. TLS version [15:00] */
  17593. A_UINT32 tls_tx_seq0; /** Tx sequence number [31:00], incremented after every TLS packet transmission */
  17594. A_UINT32 tls_tx_seq1; /** Tx sequence number [63:32] */
  17595. A_UINT32 tls_rx_seq0; /** Rx sequence number [31:00], incremented after every TLS packet reception */
  17596. A_UINT32 tls_rx_seq1; /** Rx sequence number [63:32] */
  17597. A_UINT32 tls_tx_key0; /** client_write_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  17598. A_UINT32 tls_tx_key1; /** client_write_key[Byte07:Byte04] */
  17599. A_UINT32 tls_tx_key2; /** client_write_key[Byte11:Byte08] */
  17600. A_UINT32 tls_tx_key3; /** client_write_key[Byte15:Byte12] */
  17601. A_UINT32 tls_rx_key0; /** server_write_key[Byte03:Byte00] */
  17602. A_UINT32 tls_rx_key1; /** server_write_key[Byte07:Byte04] */
  17603. A_UINT32 tls_rx_key2; /** server_write_key[Byte11:Byte08] */
  17604. A_UINT32 tls_rx_key3; /** server_write_key[Byte15:Byte12] */
  17605. A_UINT32 tls_MAC_write_key0; /** client_write_MAC_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  17606. A_UINT32 tls_MAC_write_key1; /** client_write_MAC_key[Byte07:Byte04] */
  17607. A_UINT32 tls_MAC_write_key2; /** client_write_MAC_key[Byte11:Byte08] */
  17608. A_UINT32 tls_MAC_write_key3; /** client_write_MAC_key[Byte15:Byte12] */
  17609. A_UINT32 tls_MAC_write_key4; /** client_write_MAC_key[Byte19:Byte16] */
  17610. A_UINT32 tls_MAC_write_key5; /** client_write_MAC_key[Byte23:Byte20] */
  17611. A_UINT32 tls_MAC_write_key6; /** client_write_MAC_key[Byte27:Byte24] */
  17612. A_UINT32 tls_MAC_write_key7; /** client_write_MAC_key[Byte31:Byte28] */
  17613. A_UINT32 tls_MAC_read_key0; /** server_write_MAC_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  17614. A_UINT32 tls_MAC_read_key1; /** server_write_MAC_key[Byte07:Byte04] */
  17615. A_UINT32 tls_MAC_read_key2; /** server_write_MAC_key[Byte11:Byte08] */
  17616. A_UINT32 tls_MAC_read_key3; /** server_write_MAC_key[Byte15:Byte12] */
  17617. A_UINT32 tls_MAC_read_key4; /** server_write_MAC_key[Byte19:Byte16] */
  17618. A_UINT32 tls_MAC_read_key5; /** server_write_MAC_key[Byte23:Byte20] */
  17619. A_UINT32 tls_MAC_read_key6; /** server_write_MAC_key[Byte27:Byte24] */
  17620. A_UINT32 tls_MAC_read_key7; /** server_write_MAC_key[Byte31:Byte28] */
  17621. A_UINT32 tls_client_IV0; /** CBC Mode: CBC_residue [Byte03:Byte00] refer section 6.2.3.2. CBC Block Cipher in RFC 5246
  17622. GCM Mode: GCMNonce.salt [Byte03:Byte00] refer Section 3 of RFC 5288 */
  17623. A_UINT32 tls_client_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  17624. A_UINT32 tls_client_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  17625. A_UINT32 tls_client_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  17626. A_UINT32 tls_server_IV0; /** CBC Mode: CBC_residue [Byte3:Byte0] refer section 6.2.3.2. CBC Block Cipher in RFC 5246
  17627. GCM Mode: GCMNonce.salt [Byte4: Byte0] refer Section 3 of RFC 5288 */
  17628. A_UINT32 tls_server_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  17629. A_UINT32 tls_server_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  17630. A_UINT32 tls_server_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  17631. } wmi_oic_ping_offload_params_cmd_fixed_param;
  17632. typedef struct {
  17633. /** TLV tag and len; tag equals
  17634. * WMITLV_TAG_STRUC_wmi_oic_set_enable_cmd_fixed_param */
  17635. A_UINT32 tlv_header; /** TLV Header*/
  17636. A_UINT32 vdev_id; /** Interface number */
  17637. A_UINT32 session; /** Session ID*/
  17638. A_UINT32 enable; /** 1: Enable , 0: Disable */
  17639. } wmi_oic_ping_offload_set_enable_cmd_fixed_param;
  17640. /** wlan OIC events */
  17641. typedef enum {
  17642. WMI_WLAN_OIC_REASON_UNKNOWN = 0, /** Unknown */
  17643. WMI_WLAN_OIC_REASON_HOST_WAKE = 1, /** No error , but host is woken up due to other reasons */
  17644. WMI_WLAN_OIC_REASON_TCP_TIMEOUT = 2, /** TCP Timeout */
  17645. WMI_WLAN_OIC_REASON_PING_TIMEOUT = 3, /** OIC Ping resposnse timeout */
  17646. WMI_WLAN_OIC_REASON_TLS_ERROR = 4, /** TLS decryption error */
  17647. } WMI_OIC_WAKEUP_REASON;
  17648. typedef struct {
  17649. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oic_ind_event_fixed_param */
  17650. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  17651. A_UINT32 session; /** Session ID from driver */
  17652. A_UINT32 reason; /** wakeup reason as per WMI_OIC_WAKEUP_REASON */
  17653. A_UINT32 tcp_tx_seq; /** Current TCP sequence number */
  17654. A_UINT32 tcp_ack_num; /** Current TCP Acknowledgement number */
  17655. A_UINT32 tls_tx_seq0; /** Tx sequence number [31:00], incremented after every TLS packet transmission */
  17656. A_UINT32 tls_tx_seq1; /** Tx sequence number [63:32] */
  17657. A_UINT32 tls_rx_seq0; /** Rx sequence number [31:00], incremented after every TLS packet reception */
  17658. A_UINT32 tls_rx_seq1; /** Rx sequence number [63:32] */
  17659. A_UINT32 tls_client_IV0; /** CBC Mode: CBC_residue [Byte03:Byte00] refer section 6.2.3.2. CBC Block Cipher in RFC 5246 */
  17660. A_UINT32 tls_client_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  17661. A_UINT32 tls_client_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  17662. A_UINT32 tls_client_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  17663. A_UINT32 tls_server_IV0; /** CBC Mode: CBC_residue [Byte3:Byte0] refer section 6.2.3.2. CBC Block Cipher in RFC 5246 */
  17664. A_UINT32 tls_server_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  17665. A_UINT32 tls_server_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  17666. A_UINT32 tls_server_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  17667. } wmi_oic_ping_handoff_event;
  17668. typedef struct {
  17669. /** TLV tag and len; tag equals
  17670. * WMITLV_TAG_STRUC_wmi_dhcp_lease_renew_offload_fixed_param */
  17671. A_UINT32 tlv_header; /** TLV Header*/
  17672. A_UINT32 vdev_id; /** Vdev ID */
  17673. A_UINT32 enable; /** 1: Enable 0: Disable*/
  17674. A_UINT32 srv_ip; /** DHCP Server IP address (IPv4) */
  17675. A_UINT32 client_ip; /** Device IP address (IPv4) */
  17676. wmi_mac_addr srv_mac; /** DHCP Server MAC address */
  17677. A_UINT32 parameter_list; /** Optional Parameter list. RFC 1533 gives the complete set of options defined for use with DHCP */
  17678. } wmi_dhcp_lease_renew_offload_cmd_fixed_param;
  17679. /** WLAN DHCP Lease Renew Events */
  17680. typedef enum {
  17681. WMI_WLAN_DHCP_RENEW_REASON_UNKNOWN = 0, /** Unknown */
  17682. WMI_WLAN_DHCP_RENEW_REASON_ACK_TIMEOUT = 1, /** DHCP ACK Timeout */
  17683. WMI_WLAN_DHCP_RENEW_REASON_NACK = 2, /** DHCP error */
  17684. } WMI_DHCP_RENEW_WAKEUP_REASON;
  17685. typedef struct {
  17686. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dhcp_renew_ind_event_fixed_param */
  17687. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  17688. A_UINT32 reason; /** wakeup reason as per enum WMI_DHCP_RENEW_WAKEUP_REASON*/
  17689. } wmi_dhcp_lease_renew_event;
  17690. /** WMI_STA_SMPS_PARAM_CMDID */
  17691. typedef enum {
  17692. /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */
  17693. WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0,
  17694. /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or
  17695. * to enter D-SMPS mode from Stalled-D-SMPS mode */
  17696. WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1,
  17697. /** RSSI threshold to disable SMPS modes */
  17698. WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2,
  17699. /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */
  17700. WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3,
  17701. /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */
  17702. WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4,
  17703. /** Enable/Disable DTIM 1chRx feature */
  17704. WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5
  17705. } wmi_sta_smps_param;
  17706. typedef struct {
  17707. /** TLV tag and len; tag equals
  17708. * WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */
  17709. A_UINT32 tlv_header;
  17710. /** Unique id identifying the VDEV */
  17711. A_UINT32 vdev_id;
  17712. /** SMPS parameter (see wmi_sta_smps_param) */
  17713. A_UINT32 param;
  17714. /** Value of SMPS parameter */
  17715. A_UINT32 value;
  17716. } wmi_sta_smps_param_cmd_fixed_param;
  17717. typedef struct {
  17718. /** TLV tag and len; tag equals
  17719. * WMITLV_TAG_STRUC_wmi_mcc_sched_sta_traffic_stats */
  17720. A_UINT32 tlv_header;
  17721. /* TX stats */
  17722. A_UINT32 txBytesPushed;
  17723. A_UINT32 txPacketsPushed;
  17724. /* RX stats */
  17725. A_UINT32 rxBytesRcvd;
  17726. A_UINT32 rxPacketsRcvd;
  17727. A_UINT32 rxTimeTotal;
  17728. /** peer MAC address */
  17729. wmi_mac_addr peer_macaddr;
  17730. } wmi_mcc_sched_sta_traffic_stats;
  17731. typedef struct {
  17732. /** TLV tag and len; tag equals
  17733. * WMITLV_TAG_STRUC_wmi_mcc_sched_traffic_stats_cmd_fixed_param */
  17734. A_UINT32 tlv_header;
  17735. /** Duration over which the host stats were collected */
  17736. A_UINT32 duration;
  17737. /** Number of stations filled in following stats array */
  17738. A_UINT32 num_sta;
  17739. /* Following this struct are the TLVs:
  17740. * wmi_mcc_sched_sta_traffic_stats mcc_sched_sta_traffic_stats_list;
  17741. */
  17742. } wmi_mcc_sched_traffic_stats_cmd_fixed_param;
  17743. typedef struct
  17744. {
  17745. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */
  17746. /* unique id identifying the VDEV, generated by the caller */
  17747. A_UINT32 vdev_id;
  17748. /*Batch scan enable command parameters*/
  17749. A_UINT32 scanInterval;
  17750. A_UINT32 numScan2Batch;
  17751. A_UINT32 bestNetworks;
  17752. A_UINT32 rfBand;
  17753. A_UINT32 rtt;
  17754. } wmi_batch_scan_enable_cmd_fixed_param;
  17755. typedef struct
  17756. {
  17757. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param */
  17758. A_UINT32 supportedMscan;
  17759. } wmi_batch_scan_enabled_event_fixed_param;
  17760. typedef struct
  17761. {
  17762. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */
  17763. /* unique id identifying the VDEV, generated by the caller */
  17764. A_UINT32 vdev_id;
  17765. A_UINT32 param;
  17766. } wmi_batch_scan_disable_cmd_fixed_param;
  17767. typedef struct
  17768. {
  17769. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */
  17770. /** unique id identifying the VDEV, generated by the caller */
  17771. A_UINT32 vdev_id;
  17772. A_UINT32 param;
  17773. } wmi_batch_scan_trigger_result_cmd_fixed_param;
  17774. typedef struct
  17775. {
  17776. A_UINT32 tlv_header;
  17777. wmi_mac_addr bssid; /* BSSID */
  17778. wmi_ssid ssid; /* SSID */
  17779. A_UINT32 ch; /* Channel number */
  17780. A_UINT32 rssi; /* RSSI or Level */
  17781. /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */
  17782. A_UINT32 timestamp;
  17783. A_UINT32 ch_freq; /* Channel frequency in MHz */
  17784. } wmi_batch_scan_result_network_info;
  17785. typedef struct
  17786. {
  17787. A_UINT32 tlv_header;
  17788. A_UINT32 scanId; /* Scan List ID. */
  17789. /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */
  17790. A_UINT32 numNetworksInScanList;
  17791. A_UINT32 netWorkStartIndex; /* indicate the start index of network info*/
  17792. } wmi_batch_scan_result_scan_list;
  17793. #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. */
  17794. #define LPI_IE_BITMAP_IS_PROBE 0x00000002 /* send true or false based on scan response frame being a Probe Rsp or not */
  17795. #define LPI_IE_BITMAP_SSID 0x00000004 /* send ssid from received scan response frame */
  17796. #define LPI_IE_BITMAP_RSSI 0x00000008 /* send RSSI value reported by HW for the received scan response after adjusting with noise floor */
  17797. #define LPI_IE_BITMAP_CHAN 0x00000010 /* send channel number from the received scan response */
  17798. #define LPI_IE_BITMAP_AP_TX_PWR 0x00000020 /* send Tx power from TPC IE of scan rsp */
  17799. #define LPI_IE_BITMAP_TX_RATE 0x00000040 /* send rate of the received frame as reported by HW. */
  17800. #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. */
  17801. #define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100 /* send timestamp reported in the received scan rsp frame. */
  17802. #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. */
  17803. /*
  17804. * TEMPORARY alias of incorrect old name the correct name.
  17805. * This alias will be removed once all references to the old name have been fixed.
  17806. */
  17807. #define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT
  17808. #define LPI_IE_BITMAP_CONN_STATUS 0x00000400 /* If an infra STA is active and connected to an AP, true value is sent else false. */
  17809. #define LPI_IE_BITMAP_MSAP_IE 0x00000800 /* info on the vendor specific proprietary IE MSAP */
  17810. #define LPI_IE_BITMAP_SEC_STATUS 0x00001000 /* we indicate true or false based on if the AP has WPA or RSN security enabled */
  17811. #define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000 /* info about the beacons coming from an AP or P2P or NAN device. */
  17812. #define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000 /* info on whether the scan rsp was received from a passive channel */
  17813. #define LPI_IE_BITMAP_DWELL_TIME 0x00008000 /* send the scan dwell time of the channel on which the current scan rsp frame was received. */
  17814. #define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000 /* the center frequencies in case AP is supporting wider channels than 20 MHz */
  17815. #define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000 /* same as above */
  17816. #define LPI_IE_BITMAP_PHY_MODE 0x00040000 /* PHY mode indicates a, b, ,g, ac and other combinations */
  17817. #define LPI_IE_BITMAP_SCAN_MODULE_ID 0x00080000 /* scan module id indicates the scan client who originated the scan */
  17818. #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. */
  17819. #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 */
  17820. #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 */
  17821. #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. */
  17822. #define LPI_IE_BITMAP_CHRE_RADIO_CHAIN 0x01000000 /* include radio chain and rssi per chain information if this bit is set - for CHRE */
  17823. /* 0x02000000, 0x04000000, and 0x08000000 are unused / available */
  17824. #define LPI_IE_BITMAP_CHRE_ESS 0x10000000 /* ESS capability info for CHRE */
  17825. #define LPI_IE_BITMAP_CHRE_SEC_MODE 0x20000000 /* Security capability info for CHRE */
  17826. #define LPI_IE_BITMAP_CHRE_SUPPORTED_RATE 0x40000000 /* Highest MCS corresponding NCC for TX and RX */
  17827. #define LPI_IE_BITMAP_ALL 0xFFFFFFFF
  17828. typedef struct {
  17829. A_UINT32 tlv_header;
  17830. /**A_BOOL indicates LPI mgmt snooping enable/disable*/
  17831. A_UINT32 enable;
  17832. /**LPI snooping mode*/
  17833. A_UINT32 snooping_mode;
  17834. /** LPI interested IEs in snooping context */
  17835. A_UINT32 ie_bitmap;
  17836. } wmi_lpi_mgmt_snooping_config_cmd_fixed_param;
  17837. typedef struct {
  17838. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
  17839. /** Scan ID */
  17840. A_UINT32 scan_id;
  17841. /** Scan requestor ID */
  17842. A_UINT32 scan_req_id;
  17843. /** VDEV id(interface) that is requesting scan */
  17844. A_UINT32 vdev_id;
  17845. /** LPI interested IEs in scan context */
  17846. A_UINT32 ie_bitmap;
  17847. /** Scan Priority, input to scan scheduler */
  17848. A_UINT32 scan_priority;
  17849. /** dwell time in msec on active channels */
  17850. A_UINT32 dwell_time_active;
  17851. /** dwell time in msec on passive channels */
  17852. A_UINT32 dwell_time_passive;
  17853. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  17854. A_UINT32 min_rest_time;
  17855. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  17856. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  17857. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  17858. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  17859. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  17860. * irrespective of activity. activity is determined by the idle_time parameter.
  17861. */
  17862. A_UINT32 max_rest_time;
  17863. /** time before sending next set of probe requests.
  17864. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  17865. * The number of probe requests specified depends on the ssid_list and bssid_list
  17866. */
  17867. A_UINT32 repeat_probe_time;
  17868. /** time in msec between 2 consequetive probe requests with in a set. */
  17869. A_UINT32 probe_spacing_time;
  17870. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  17871. A_UINT32 idle_time;
  17872. /** maximum time in msec allowed for scan */
  17873. A_UINT32 max_scan_time;
  17874. /** delay in msec before sending first probe request after switching to a channel */
  17875. A_UINT32 probe_delay;
  17876. /** Scan control flags */
  17877. A_UINT32 scan_ctrl_flags;
  17878. /** Burst duration time in msec*/
  17879. A_UINT32 burst_duration;
  17880. /** # if channels to scan. In the TLV channel_list[] */
  17881. A_UINT32 num_chan;
  17882. /** number of bssids. In the TLV bssid_list[] */
  17883. A_UINT32 num_bssid;
  17884. /** number of ssid. In the TLV ssid_list[] */
  17885. A_UINT32 num_ssids;
  17886. /** number of bytes in ie data. In the TLV ie_data[] */
  17887. A_UINT32 ie_len;
  17888. /** Scan control flags extended (see WMI_SCAN_FLAG_EXT_xxx) */
  17889. A_UINT32 scan_ctrl_flags_ext;
  17890. /**
  17891. * TLV (tag length value) parameters follow the scan_cmd
  17892. * structure. The TLV's are:
  17893. * A_UINT32 channel_list[]; // in MHz
  17894. * wmi_ssid ssid_list[];
  17895. * wmi_mac_addr bssid_list[];
  17896. * A_UINT8 ie_data[];
  17897. */
  17898. } wmi_lpi_start_scan_cmd_fixed_param;
  17899. typedef struct {
  17900. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
  17901. /** Scan requestor ID */
  17902. A_UINT32 scan_req_id;
  17903. /** Scan ID */
  17904. A_UINT32 scan_id;
  17905. /**
  17906. * Req Type
  17907. * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
  17908. * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
  17909. * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
  17910. * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
  17911. */
  17912. A_UINT32 req_type;
  17913. /**
  17914. * vDev ID
  17915. * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
  17916. */
  17917. A_UINT32 vdev_id;
  17918. } wmi_lpi_stop_scan_cmd_fixed_param;
  17919. typedef enum {
  17920. WMI_LPI_DEVICE_TYPE_AP = 1,
  17921. WMI_LPI_DEVICE_TYPE_P2P = 2,
  17922. WMI_LPI_DEVICE_TYPE_NAN = 3,
  17923. } wmi_lpi_device_type;
  17924. typedef struct
  17925. {
  17926. A_UINT32 tlv_header;
  17927. /** Scan requestor ID */
  17928. A_UINT32 scan_req_id;
  17929. A_UINT32 ie_bitmap;
  17930. A_UINT32 data_len;
  17931. } wmi_lpi_result_event_fixed_param;
  17932. typedef enum {
  17933. /** User scan Request completed */
  17934. WMI_LPI_STATUS_SCAN_REQ_COMPLED = 0,
  17935. /** User Request was never serviced */
  17936. WMI_LPI_STATUS_DROPPED_REQ = 1,
  17937. /** Illegal channel Req */
  17938. WMI_LPI_STATUS_ILLEGAL_CHAN_REQ = 2,
  17939. /** Illegal Operation Req */
  17940. WMI_LPI_STATUS_ILLEGAL_OPER_REQ = 3,
  17941. /** Request Aborted */
  17942. WMI_LPI_STATUS_REQ_ABORTED = 4,
  17943. /** Request Timed Out */
  17944. WMI_LPI_STATUS_REQ_TIME_OUT = 5,
  17945. /** Medium Busy, already there
  17946. * is a scan is going on */
  17947. WMI_LPI_STATUS_MEDIUM_BUSY = 6,
  17948. /** Extscan is the scan client whose scan complete event is triggered */
  17949. WMI_LPI_STATUS_EXTSCAN_CYCLE_AND_SCAN_REQ_COMPLETED = 7,
  17950. } wmi_lpi_staus;
  17951. typedef struct
  17952. {
  17953. A_UINT32 tlv_header;
  17954. wmi_lpi_staus status;
  17955. /** Scan requestor ID */
  17956. A_UINT32 scan_req_id;
  17957. } wmi_lpi_status_event_fixed_param;
  17958. typedef struct
  17959. {
  17960. A_UINT32 tlv_header;
  17961. wmi_mac_addr bssid;
  17962. wmi_ssid ssid;
  17963. A_UINT32 freq;
  17964. A_UINT32 rssi;
  17965. A_UINT32 vdev_id;
  17966. } wmi_lpi_handoff_event_fixed_param;
  17967. typedef struct
  17968. {
  17969. A_UINT32 tlv_header;
  17970. A_UINT32 timestamp; /*timestamp of batch scan event*/
  17971. A_UINT32 numScanLists; /*number of scan in this event*/
  17972. A_UINT32 isLastResult; /*is this event a last event of the whole batch scan*/
  17973. } wmi_batch_scan_result_event_fixed_param;
  17974. typedef struct {
  17975. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param */
  17976. A_UINT32 vdev_id;
  17977. /* This TLV is followed by p2p_noa_info for vdev :
  17978. * wmi_p2p_noa_info p2p_noa_info;
  17979. */
  17980. } wmi_p2p_noa_event_fixed_param;
  17981. #define WMI_RFKILL_CFG_RADIO_LEVEL_OFFSET 6
  17982. #define WMI_RFKILL_CFG_RADIO_LEVEL_MASK 0x1
  17983. #define WMI_RFKILL_CFG_GPIO_PIN_NUM_OFFSET 0
  17984. #define WMI_RFKILL_CFG_GPIO_PIN_NUM_MASK 0x3f
  17985. #define WMI_RFKILL_CFG_PIN_AS_GPIO_OFFSET 7
  17986. #define WMI_RFKILL_CFG_PIN_AS_GPIO_MASK 0xf
  17987. typedef struct {
  17988. /** TLV tag and len; tag equals
  17989. * */
  17990. A_UINT32 tlv_header;
  17991. /** gpip pin number */
  17992. A_UINT32 gpio_pin_num;
  17993. /** gpio interupt type */
  17994. A_UINT32 int_type;
  17995. /** RF radio status */
  17996. A_UINT32 radio_state;
  17997. } wmi_rfkill_mode_param;
  17998. typedef enum {
  17999. WMI_SET_LED_SYS_POWEROFF,
  18000. WMI_SET_LED_SYS_S3_SUSPEND,
  18001. WMI_SET_LED_SYS_S4_S5,
  18002. WMI_SET_LED_SYS_DRIVER_DISABLE,
  18003. WMI_SET_LED_SYS_WAKEUP,
  18004. WMI_SET_LED_SYS_ALWAYS_ON, /* just for test! */
  18005. WMI_SET_LED_SYS_POWERON,
  18006. } wmi_led_sys_state_param;
  18007. typedef enum {
  18008. WMI_CONFIG_LED_TO_VDD = 0,
  18009. WMI_CONFIG_LED_TO_GND = 1,
  18010. } wmi_config_led_connect_type;
  18011. typedef enum {
  18012. WMI_CONFIG_LED_NOT_WITH_BT = 0,
  18013. WMI_CONFIG_LED_WITH_BT = 1,
  18014. } wmi_config_led_with_bt_flag;
  18015. typedef enum {
  18016. WMI_CONFIG_LED_DISABLE = 0,
  18017. WMI_CONFIG_LED_ENABLE = 1,
  18018. } wmi_config_led_enable_flag;
  18019. typedef enum {
  18020. WMI_CONFIG_LED_HIGH_UNSPECIFIED = 0,
  18021. WMI_CONFIG_LED_HIGH_OFF = 1,
  18022. WMI_CONFIG_LED_HIGH_ON = 2,
  18023. } wmi_config_led_on_flag;
  18024. typedef enum {
  18025. WMI_CONFIG_LED_UNSPECIFIED = 0,
  18026. WMI_CONFIG_LED_ON = 1,
  18027. WMI_CONFIG_LED_OFF = 2,
  18028. WMI_CONFIG_LED_DIM = 3,
  18029. WMI_CONFIG_LED_BLINK = 4,
  18030. WMI_CONFIG_LED_TXRX = 5,
  18031. } wmi_config_led_operation_type;
  18032. typedef struct {
  18033. /** TLV tag and len; tag equals
  18034. * WMITLV_TAG_STRUC_wmi_pdev_set_led_config_cmd_fixed_param */
  18035. A_UINT32 tlv_header;
  18036. /* Set GPIO pin */
  18037. A_UINT32 led_gpio_pin;
  18038. /* Set connect type defined in wmi_config_led_connect_type */
  18039. A_UINT32 connect_type;
  18040. /* Set flag defined in wmi_config_led_with_bt_flag*/
  18041. A_UINT32 with_bt;
  18042. /* Set LED enablement defined in wmi_config_led_enable_flag */
  18043. A_UINT32 led_enable;
  18044. /** pdev_id for identifying the MAC
  18045. * See macros starting with WMI_PDEV_ID_ for values.
  18046. */
  18047. A_UINT32 pdev_id;
  18048. /* see wmi_config_led_operation_type enum */
  18049. A_UINT32 led_operation_type;
  18050. /* see wmi_config_led_on_flag enum */
  18051. A_UINT32 led_on_flag; /* configure high/low on/off sense */
  18052. A_UINT32 led_on_interval; /* for blink function; unit: ms */
  18053. A_UINT32 led_off_interval; /* for blink function; unit: ms */
  18054. A_UINT32 led_repeat_cnt; /* for blink function: how many blinks */
  18055. } wmi_pdev_set_led_config_cmd_fixed_param;
  18056. #define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0
  18057. #define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK 0xff
  18058. /** WMI_SMARTANT_STATE_CHANGE_EVENTIDWMI_SMARTANT_STATE_CHANGE_EVENTID
  18059. * report Smart Antenna status to host */
  18060. typedef struct {
  18061. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_smartant_event_fixed_param */
  18062. A_UINT32 tlv_header;
  18063. /** whether Antenna Controller is still alive or offline. */
  18064. A_UINT32 smart_ant_AC_alive;
  18065. } wmi_smartant_state_param;
  18066. /** WMI_PEER_INFO_REQ_CMDID
  18067. * Request FW to provide peer info */
  18068. typedef struct {
  18069. /** TLV tag and len; tag equals
  18070. * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */
  18071. A_UINT32 tlv_header;
  18072. /** In order to get the peer info for a single peer, host shall
  18073. * issue the peer_mac_address of that peer. For getting the
  18074. * info all peers, the host shall issue 0xFFFFFFFF as the mac
  18075. * address. The firmware will return the peer info for all the
  18076. * peers on the specified vdev_id */
  18077. wmi_mac_addr peer_mac_address;
  18078. /** vdev id */
  18079. A_UINT32 vdev_id;
  18080. } wmi_peer_info_req_cmd_fixed_param;
  18081. typedef struct {
  18082. /** TLV tag and len; tag equals
  18083. * WMITLV_TAG_STRUC_wmi_peer_info */
  18084. A_UINT32 tlv_header;
  18085. /** mac addr of the peer */
  18086. wmi_mac_addr peer_mac_address;
  18087. /** data_rate of the peer */
  18088. A_UINT32 data_rate;
  18089. /** rssi of the peer */
  18090. A_UINT32 rssi;
  18091. /** tx fail count */
  18092. A_UINT32 tx_fail_cnt;
  18093. } wmi_peer_info;
  18094. /** FW response with the peer info */
  18095. typedef struct {
  18096. /** TLV tag and len; tag equals
  18097. * WMITLV_TAG_STRUC_wmi_peer_info_event_fixed_param */
  18098. A_UINT32 tlv_header;
  18099. /** number of peers in peer_info */
  18100. A_UINT32 num_peers;
  18101. /* Set to 1 only if vdev_id field is valid */
  18102. A_UINT32 valid_vdev_id;
  18103. /* VDEV to which the peer belongs to */
  18104. A_UINT32 vdev_id;
  18105. /* This TLV is followed by another TLV of array of structs
  18106. * wmi_peer_info peer_info[];
  18107. */
  18108. } wmi_peer_info_event_fixed_param;
  18109. /** WMI_PEER_ANTDIV_INFO_REQ_CMDID
  18110. * Request FW to provide peer info */
  18111. typedef struct {
  18112. /** TLV tag and len; tag equals
  18113. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_req_cmd_fixed_param */
  18114. A_UINT32 tlv_header;
  18115. /** In order to get the peer antdiv info for a single peer, host shall
  18116. * issue the peer_mac_address of that peer. For getting the
  18117. * info all peers, the host shall issue 0xFFFFFFFF as the mac
  18118. * address. The firmware will return the peer info for all the
  18119. * peers on the specified vdev_id */
  18120. wmi_mac_addr peer_mac_address;
  18121. /** vdev id */
  18122. A_UINT32 vdev_id;
  18123. } wmi_peer_antdiv_info_req_cmd_fixed_param;
  18124. /** FW response with the peer antdiv info */
  18125. typedef struct {
  18126. /** TLV tag and len; tag equals
  18127. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_event_fixed_param */
  18128. A_UINT32 tlv_header;
  18129. /** number of peers in peer_info */
  18130. A_UINT32 num_peers;
  18131. /* VDEV to which the peer belongs to */
  18132. A_UINT32 vdev_id;
  18133. /* This TLV is followed by another TLV of array of structs
  18134. * wmi_peer_antdiv_info peer_antdiv_info[];
  18135. */
  18136. } wmi_peer_antdiv_info_event_fixed_param;
  18137. typedef struct {
  18138. /** TLV tag and len; tag equals
  18139. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info */
  18140. A_UINT32 tlv_header;
  18141. /** mac addr of the peer */
  18142. wmi_mac_addr peer_mac_address;
  18143. /** per chain rssi of the peer, for up to 8 chains.
  18144. * Each chain's entry reports the RSSI for different bandwidths:
  18145. * bits 7:0 -> primary 20 MHz
  18146. * bits 15:8 -> secondary 20 MHz of 40 MHz channel (if applicable)
  18147. * bits 23:16 -> secondary 40 MHz of 80 MHz channel (if applicable)
  18148. * bits 31:24 -> secondary 80 MHz of 160 MHz channel (if applicable)
  18149. * Each of these 8-bit RSSI reports is in dB units, with respect to
  18150. * the noise floor.
  18151. * 0x80 means invalid.
  18152. * All unused bytes within used chain_rssi indices shall be set to 0x80.
  18153. * All unused chain_rssi indices shall be set to 0x80808080.
  18154. */
  18155. A_INT32 chain_rssi[8];
  18156. } wmi_peer_antdiv_info;
  18157. typedef struct {
  18158. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_msduq_qdepth_thresh_update */
  18159. /** tid_number */
  18160. A_UINT32 tid_num;
  18161. /** msduq_mask to set the value
  18162. * bit 0 - HI-PRI msdu flowq qdepth threshold need to update if set
  18163. * bit 1 - LOW-PRI msdu flowq qdepth threshold need to update if set
  18164. * bit 2 - UDP msdu flowq qdepth threshold need to update if set
  18165. * bit 3 - NON-UDP msdu flowq qdepth threshold need to update if set
  18166. * rest of bits are reserved and set to 0.
  18167. */
  18168. A_UINT32 msduq_update_mask;
  18169. /** Qdepth threshold value
  18170. * If number of msdus in a queue excess over qdepth_thresh_value value
  18171. * while queuing msdu's then we drop new msdus.
  18172. * (Though dropping older (stale) data rather than newer data might be
  18173. * preferable, the dropping is performed by MAC HW, and theres no option
  18174. * to configure the HW to do head dropping rather than tail dropping.)
  18175. */
  18176. A_UINT32 qdepth_thresh_value;
  18177. } wmi_msduq_qdepth_thresh_update;
  18178. /** WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID
  18179. * Request FW to update msduq qdepth threshold per TID per peer */
  18180. typedef struct {
  18181. /** TLV tag and len; tag equals
  18182. * WMITLV_TAG_STRUC_wmi_peer_tid_msduq_qdepth_thresh_update_cmd_fixed_param
  18183. */
  18184. A_UINT32 tlv_header;
  18185. /** pdev id
  18186. * The pdev_id can be determined from the vdev_id, but the pdev_id
  18187. * is explicitly provided so it can be used for sanity checking.
  18188. */
  18189. A_UINT32 pdev_id;
  18190. /** vdev id */
  18191. A_UINT32 vdev_id;
  18192. /**
  18193. * To set the peer msduq qdepth threshold update for a single peer,
  18194. * the host shall send mac address for which peer need to be updated.
  18195. */
  18196. wmi_mac_addr peer_mac_address;
  18197. /** number of payload update tlvs */
  18198. A_UINT32 num_of_msduq_updates;
  18199. /** Followed by the variable length TLV msduq_qdepth_updates:
  18200. * wmi_msduq_qdepth_th_update msduq_qdepth_thshd_update_list[]
  18201. */
  18202. } wmi_peer_tid_msduq_qdepth_thresh_update_cmd_fixed_param;
  18203. /**
  18204. * ACK policy to be followed for the TID
  18205. */
  18206. typedef enum {
  18207. /** Used when the host does not want to configure the ACK policy */
  18208. WMI_PEER_TID_CONFIG_ACK_POLICY_IGNORE,
  18209. /** Allow ACK for the TID */
  18210. WMI_PEER_TID_CONFIG_ACK,
  18211. /** Do not expect ACK for the TID */
  18212. WMI_PEER_TID_CONFIG_NOACK,
  18213. } WMI_PEER_TID_CONFIG_ACK_POLICY;
  18214. /**
  18215. * Aggregation control policy for the TID
  18216. */
  18217. typedef enum {
  18218. /** Used when the host does not want to configure the aggregation policy */
  18219. WMI_PEER_TID_CONFIG_AGGR_CONTROL_IGNORE,
  18220. /** Enable aggregation for the TID */
  18221. WMI_PEER_TID_CONFIG_AGGR_CONTROL_ENABLE,
  18222. /** Disable aggregation for the TID */
  18223. WMI_PEER_TID_CONFIG_AGGR_CONTROL_DISABLE,
  18224. } WMI_PEER_TID_CONFIG_AGGR_CONTROL;
  18225. /**
  18226. * Rate control policy for the TID
  18227. */
  18228. typedef enum {
  18229. /** Used when the host does not want to configure the rate control policy */
  18230. WMI_PEER_TID_CONFIG_RATE_CONTROL_IGNORE,
  18231. /** Auto rate control */
  18232. WMI_PEER_TID_CONFIG_RATE_CONTROL_AUTO,
  18233. /** Fixed rate control */
  18234. WMI_PEER_TID_CONFIG_RATE_CONTROL_FIXED_RATE,
  18235. /** Set the Default lowest rate (6Mbps in 5GHZ and 1Mbps in 2GHZ) */
  18236. WMI_PEER_TID_CONFIG_RATE_CONTROL_DEFAULT_LOWEST_RATE,
  18237. /**
  18238. * Set the highest rate cap allowed for this TID.
  18239. * Rate cap is specified in rate code format,
  18240. * i.e. NSS and MCS combined as shown below:
  18241. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3, 3 - 4x4)
  18242. * b'3-b'0 indicate the MCS
  18243. */
  18244. WMI_PEER_TID_CONFIG_RATE_UPPER_CAP,
  18245. } WMI_PEER_TID_CONFIG_RATE_CONTROL;
  18246. /**
  18247. * SW retry threshold for the TID
  18248. */
  18249. typedef enum {
  18250. /** Used when the host does not want to configure the SW retry threshold */
  18251. WMI_PEER_TID_SW_RETRY_IGNORE = 0,
  18252. WMI_PEER_TID_SW_RETRY_MIN = 1,
  18253. WMI_PEER_TID_SW_RETRY_MAX = 30,
  18254. /** No SW retry for the TID */
  18255. WMI_PEER_TID_SW_RETRY_NO_RETRY = 0xFFFFFFFF,
  18256. } WMI_PEER_TID_CONFIG_SW_RETRY_THRESHOLD;
  18257. /*
  18258. * values for tid_config_supported_bitmap field,
  18259. * in wmi_peer_tid_configurations_cmd structure.
  18260. */
  18261. typedef enum {
  18262. /* Used to indicate that disable_rts_cts field is valid */
  18263. WMI_PEER_TID_DISABLE_RTS_CTS_VALID = 0x00000001,
  18264. WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_VALID = 0x00000002,
  18265. WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_VALID = 0x00000004,
  18266. } WMI_PEER_TID_EXT_CONFIG_VALID_BITMAP;
  18267. /**
  18268. * MPDU Aggregate value for the TID
  18269. */
  18270. typedef enum {
  18271. /** Set the default Aggregation value configured in FW */
  18272. WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_DEFAULT,
  18273. WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_MIN = 1,
  18274. WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_MAX = 1024,
  18275. } WMI_PEER_TID_CONFIG_MAX_NUM_MPDU_IN_PPDU;
  18276. /**
  18277. * MSDU Aggregate value for the TID
  18278. */
  18279. typedef enum {
  18280. /** Set the default Aggregation value configured in FW */
  18281. WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_DEFAULT,
  18282. WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_MIN = 1,
  18283. WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_MAX = 7,
  18284. } WMI_PEER_TID_CONFIG_MAX_NUM_MSDU_IN_MPDU;
  18285. /**
  18286. * Command format for the TID configuration
  18287. */
  18288. typedef struct {
  18289. /** TLV tag and len; tag equals
  18290. * WMITLV_TAG_STRUC_wmi_peer_tid_configurations_cmd_fixed_param
  18291. */
  18292. A_UINT32 tlv_header;
  18293. /** vdev id */
  18294. A_UINT32 vdev_id;
  18295. /** peer MAC address */
  18296. wmi_mac_addr peer_mac_address;
  18297. /** TID number, generated by the caller.
  18298. * Valid range for QoS TID : 0-15
  18299. * Valid range for non QOS/Mgmt TID: 16-19
  18300. * Any other TID number is invalid.
  18301. */
  18302. A_UINT32 tid_num;
  18303. /** ACK policy - of type WMI_PEER_TID_CONFIG_ACK_POLICY */
  18304. A_UINT32 ack_policy;
  18305. /** Aggregation control - of type WMI_PEER_TID_CONFIG_AGGR_CONTROL */
  18306. A_UINT32 aggr_control;
  18307. /** Rate control - of type WMI_PEER_TID_CONFIG_RATE_CONTROL */
  18308. A_UINT32 rate_control;
  18309. /** Fixed rate control parameters - of type WMI_PEER_PARAM_FIXED_RATE.
  18310. * This is applicable only when rate_control is
  18311. * WMI_PEER_TID_CONFIG_RATE_CONTROL_FIXED_RATE
  18312. */
  18313. A_UINT32 rcode_rcflags;
  18314. /** MPDU SW retry threshold - of type WMI_PEER_TID_CONFIG_SW_RETRY_THRESHOLD
  18315. * This SW retry threshold limits the total number of retransmits of
  18316. * nacked or unacked MPDUs, but it is up to the FW to decide what
  18317. * tx rate to use during each retransmission.
  18318. */
  18319. A_UINT32 sw_retry_threshold;
  18320. /*--- Start of extended structure ---*/
  18321. /* Bitmap to indicate which fields in the extended structure are valid.
  18322. * Bitmap values correspond to enum WMI_PEER_TID_EXT_CONFIG_VALID_BITMAP
  18323. */
  18324. A_UINT32 tid_config_supported_bitmap;
  18325. /* Knob to enable/disable RTS/CTS per TID */
  18326. A_UINT32 disable_rts_cts;
  18327. /** Size for mpdu aggregation
  18328. * (max MPDUs per PPDU)
  18329. * Valid range : 1-1024 (refer to WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_MIN,MAX)
  18330. * When this field is set to 0, default aggregation value configured
  18331. * in the fw will be used.
  18332. * This is applicable only when aggr_control is
  18333. * WMI_PEER_TID_CONFIG_AGGR_CONTROL_ENABLE
  18334. */
  18335. A_UINT32 max_num_mpdu_in_ppdu;
  18336. /** Size for msdu aggregation
  18337. * (max MSDUs per MPDU)
  18338. * Valid range : 1-7 (refer to WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_MIN,MAX)
  18339. * When this field is set to 0, default aggregation value configured
  18340. * in the fw will be used.
  18341. * This is applicable only when aggr_control is
  18342. * WMI_PEER_TID_CONFIG_AGGR_CONTROL_ENABLE
  18343. */
  18344. A_UINT32 max_num_msdu_in_mpdu;
  18345. } wmi_peer_tid_configurations_cmd_fixed_param;
  18346. /* The below enable/disable macros are used for both per peer CFR capture
  18347. * control (as in wmi_peer_cfr_capture_cmd) and control of the entire periodic
  18348. * CFR capture feature (as in WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE)
  18349. */
  18350. #define WMI_PEER_CFR_CAPTURE_ENABLE 1
  18351. #define WMI_PEER_CFR_CAPTURE_DISABLE 0
  18352. #define WMI_PEER_CFR_ONE_SHOT_REQUEST 0
  18353. #define WMI_PEER_CFR_PERIODICITY_MIN 10 /* 10ms */
  18354. #define WMI_PEER_CFR_PERIODICITY_MAX 10*60*1000 /* 10 minutes */
  18355. /* Bandwidth of peer CFR captures */
  18356. typedef enum {
  18357. WMI_PEER_CFR_CAPTURE_BW_20MHZ = 0,
  18358. WMI_PEER_CFR_CAPTURE_BW_40MHZ = 1,
  18359. WMI_PEER_CFR_CAPTURE_BW_80MHZ = 2,
  18360. WMI_PEER_CFR_CAPTURE_BW_160MHZ = 3,
  18361. WMI_PEER_CFR_CAPTURE_BW_80_80MHZ = 4,
  18362. WMI_PEER_CFR_CAPTURE_BW_MAX,
  18363. } WMI_PEER_CFR_CAPTURE_BW;
  18364. /* Peer CFR capture method */
  18365. typedef enum {
  18366. /* Send null frame on the requested bw and capture CFR on ACK */
  18367. WMI_PEER_CFR_CAPTURE_METHOD_NULL_FRAME = 0,
  18368. WMI_PEER_CFR_CAPTURE_METHOD_NULL_FRAME_WITH_PHASE = 1,
  18369. WMI_PEER_CFR_CAPTURE_METHOD_PROBE_RESP = 2,
  18370. /* New methods to be added here */
  18371. WMI_PEER_CFR_CAPTURE_METHOD_MAX,
  18372. } WMI_PEER_CFR_CAPTURE_METHOD;
  18373. /*
  18374. * Peer command structure to configure the CFR capture
  18375. */
  18376. typedef struct {
  18377. /** TLV tag and len; tag equals
  18378. * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_cmd_fixed_param
  18379. */
  18380. A_UINT32 tlv_header;
  18381. /* WMI_PEER_CFR_CAPTURE_ENABLE: Enable CFR capture for the peer
  18382. * WMI_PEER_CFR_CAPTURE_DISABLE: Disable CFR capture for the peer
  18383. */
  18384. A_UINT32 request;
  18385. /* Peer MAC address. In AP mode, this is the address of the connected peer
  18386. * for which CFR capture is needed. In case of STA mode, this is the address
  18387. * of the AP to which the STA is connected
  18388. */
  18389. wmi_mac_addr mac_addr;
  18390. /* vdev id */
  18391. A_UINT32 vdev_id;
  18392. /* Periodicity of measurement in ms.
  18393. * WMI_PEER_CFR_ONE_SHOT_REQUEST: One-shot request i.e., Only one CFR
  18394. * capture for the request and no periodic CFR captures.
  18395. * The min value is WMI_PEER_CFR_PERIODICITY_MIN
  18396. * The max value is WMI_PEER_CFR_PERIODICITY_MAX
  18397. */
  18398. A_UINT32 periodicity;
  18399. /* BW of measurement - of type WMI_PEER_CFR_CAPTURE_BW */
  18400. A_UINT32 bandwidth;
  18401. /* Method used to capture CFR - of type WMI_PEER_CFR_CAPTURE_METHOD */
  18402. A_UINT32 capture_method;
  18403. } wmi_peer_cfr_capture_cmd_fixed_param;
  18404. typedef enum {
  18405. WMI_PEER_IND_SMPS = 0x0, /* spatial multiplexing power save */
  18406. WMI_PEER_IND_OMN, /* operating mode notification */
  18407. WMI_PEER_IND_OMI, /* operating mode indication */
  18408. } WMI_PEER_OPER_MODE_IND;
  18409. typedef struct {
  18410. /** TLV tag and len; tag equals
  18411. * WMITLV_TAG_STRUC_wmi_peer_oper_mode_change */
  18412. A_UINT32 tlv_header;
  18413. /** mac addr of the peer */
  18414. wmi_mac_addr peer_mac_address;
  18415. /** Peer type indication WMI_PEER_OPER_MODE_IND. */
  18416. A_UINT32 ind_type;
  18417. /** new_rxnss valid for all peer_operating mode ind. */
  18418. A_UINT32 new_rxnss;
  18419. /** new_bw valid for peer_operating mode ind. OMN/OMI
  18420. * value of this bw is as per 11ax/ac standard:
  18421. * 0 = 20MHz,1 = 40MHz, 2= 80MHz, 3 = 160MHz
  18422. */
  18423. A_UINT32 new_bw;
  18424. /** new_txnss valid for peer_operating mode ind. OMI */
  18425. A_UINT32 new_txnss;
  18426. /** new_disablemu: disable mu mode
  18427. * valid for peer_operating mode ind. OMI
  18428. */
  18429. A_UINT32 new_disablemu;
  18430. } wmi_peer_oper_mode_change_event_fixed_param;
  18431. /** FW response when tx failure count has reached threshold
  18432. * for a peer */
  18433. typedef struct {
  18434. /** TLV tag and len; tag equals
  18435. * WMITLV_TAG_STRUC_wmi_peer_tx_fail_cnt_thr_event_fixed_param */
  18436. A_UINT32 tlv_header;
  18437. /** vdev id*/
  18438. A_UINT32 vdev_id;
  18439. /** mac address */
  18440. wmi_mac_addr peer_mac_address;
  18441. /** tx failure count - will eventually be removed and not used */
  18442. A_UINT32 tx_fail_cnt;
  18443. /** seq number of the nth tx_fail_event */
  18444. A_UINT32 seq_no;
  18445. } wmi_peer_tx_fail_cnt_thr_event_fixed_param;
  18446. enum wmi_rmc_mode {
  18447. /** Disable RMC */
  18448. WMI_RMC_MODE_DISABLED = 0,
  18449. /** Enable RMC */
  18450. WMI_RMC_MODE_ENABLED = 1,
  18451. };
  18452. /** Enable RMC transmitter functionality. Upon
  18453. * receiving this, the FW shall mutlicast frames with
  18454. * reliablity. This is a vendor
  18455. * proprietary feature. */
  18456. typedef struct {
  18457. /** TLV tag and len; tag equals
  18458. * WMITLV_TAG_STRUC_wmi_rmc_set_mode_cmd_fixed_param */
  18459. A_UINT32 tlv_header;
  18460. /** vdev id*/
  18461. A_UINT32 vdev_id;
  18462. /** enable_rmc contains values from enum wmi_rmc_mode;
  18463. * Default value: 0 (disabled) */
  18464. A_UINT32 enable_rmc;
  18465. } wmi_rmc_set_mode_cmd_fixed_param;
  18466. /** Configure transmission periodicity of action frames in a
  18467. * RMC network for the multicast transmitter */
  18468. typedef struct {
  18469. /** TLV tag and len; tag equals
  18470. * WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */
  18471. A_UINT32 tlv_header;
  18472. /** vdev id */
  18473. A_UINT32 vdev_id;
  18474. /** time period in milliseconds. Default: 300 ms.
  18475. An action frame indicating the current leader is transmitted by the
  18476. RMC transmitter once every 'periodity_msec' */
  18477. A_UINT32 periodicity_msec;
  18478. } wmi_rmc_set_action_period_cmd_fixed_param;
  18479. /** Optimise Leader selection process in RMC functionality. For
  18480. * Enhancement/Debug purposes only */
  18481. typedef struct {
  18482. /** TLV tag and len; tag equals
  18483. * WMITLV_TAG_STRUC_wmi_rmc_config_cmd_fixed_param */
  18484. A_UINT32 tlv_header;
  18485. /** vdev id */
  18486. A_UINT32 vdev_id;
  18487. /** flags ::
  18488. * 0x0001 - Enable beacon averaging
  18489. * 0x0002 - Force leader selection
  18490. * 0x0004 - Enable Timer based leader switch
  18491. * 0x0008 - Use qos/NULL based for multicast reliability */
  18492. A_UINT32 flags;
  18493. /** control leader change timeperiod (in seconds) */
  18494. A_UINT32 peridocity_leader_switch;
  18495. /** control activity timeout value for data rx (in seconds) */
  18496. A_UINT32 data_activity_timeout;
  18497. /** mac address of leader */
  18498. wmi_mac_addr forced_leader_mac_addr;
  18499. } wmi_rmc_config_cmd_fixed_param;
  18500. /** MHF is generally implemented in
  18501. * the kernel. To decrease system power consumption, the
  18502. * driver can enable offloading this to the chipset. In
  18503. * order for the offload, the firmware needs the routing table.
  18504. * The host shall plumb the routing table into FW. The firmware
  18505. * shall perform an IP address lookup and forward the packet to
  18506. * the next hop using next hop's mac address. This is a vendor
  18507. * proprietary feature. */
  18508. enum wmi_mhf_ofl_mode {
  18509. /** Disable MHF offload */
  18510. WMI_MHF_OFL_MODE_DISABLED = 0,
  18511. /** Enable MHF offload */
  18512. WMI_MHF_OFL_MODE_ENABLED = 1,
  18513. };
  18514. typedef struct {
  18515. /** TLV tag and len; tag equals
  18516. * WMITLV_TAG_STRUC_wmi_mhf_offload_set_mode_cmd_fixed_param */
  18517. A_UINT32 tlv_header;
  18518. /** vdev id*/
  18519. A_UINT32 vdev_id;
  18520. /** enable_mhf_ofl contains values from enum
  18521. * wmi_mhf_ofl_mode; Default value: 0 (disabled) */
  18522. A_UINT32 enable_mhf_ofl;
  18523. } wmi_mhf_offload_set_mode_cmd_fixed_param;
  18524. enum wmi_mhf_ofl_table_action {
  18525. /** Create MHF offload table in FW */
  18526. WMI_MHF_OFL_TBL_CREATE = 0,
  18527. /** Append to existing MHF offload table */
  18528. WMI_MHF_OFL_TBL_APPEND = 1,
  18529. /** Flush entire MHF offload table in FW */
  18530. WMI_MHF_OFL_TBL_FLUSH = 2,
  18531. };
  18532. typedef struct {
  18533. /** TLV tag and len; tag equals
  18534. * WMITLV_TAG_STRUC_wmi_mhf_offload_plumb_routing_table_cmd_fixed_param */
  18535. A_UINT32 tlv_header;
  18536. /** vdev id*/
  18537. A_UINT32 vdev_id;
  18538. /** action corresponds to values from enum
  18539. * wmi_mhf_ofl_table_action */
  18540. A_UINT32 action;
  18541. /** number of entries in the table */
  18542. A_UINT32 num_entries;
  18543. /** Followed by the variable length TLV
  18544. * wmi_mhf_offload_routing_table_entry entries[] */
  18545. } wmi_mhf_offload_plumb_routing_table_cmd;
  18546. typedef struct {
  18547. /** TLV tag and len; tag equals
  18548. * WMITLV_TAG_STRUC_wmi_mhf_offload_routing_table_entry */
  18549. A_UINT32 tlv_header;
  18550. /** Destination node's IP address */
  18551. WMI_IPV4_ADDR dest_ipv4_addr;
  18552. /** Next hop node's MAC address */
  18553. wmi_mac_addr next_hop_mac_addr;
  18554. } wmi_mhf_offload_routing_table_entry;
  18555. enum {
  18556. WMI_DFS_RADAR_PULSE_FLAG_MASK_PSIDX_DIFF_VALID = 0x00000001,
  18557. };
  18558. typedef struct {
  18559. /** tlv tag and len, tag equals
  18560. * WMITLV_TAG_STRUC_wmi_dfs_radar_event */
  18561. A_UINT32 tlv_header;
  18562. /** full 64 tsf timestamp get from MAC tsf timer indicates
  18563. * the time that the radar event uploading to host, split
  18564. * it to high 32 bit and lower 32 bit in fulltsf_high and
  18565. * full_tsf_low
  18566. */
  18567. A_UINT32 upload_fullts_low;
  18568. A_UINT32 upload_fullts_high;
  18569. /** timestamp indicates the time when DFS pulse is detected
  18570. * equal to ppdu_end_ts - radar_pusle_summary_ts_offset
  18571. */
  18572. A_UINT32 pulse_detect_ts;
  18573. /** the duaration of the pulse in us */
  18574. A_UINT32 pulse_duration;
  18575. /** the center frequency of the radar pulse detected, KHz */
  18576. A_UINT32 pulse_center_freq;
  18577. /** bandwidth of current DFS channel, MHz */
  18578. A_UINT32 ch_bandwidth;
  18579. /** center channel frequency1 of current DFS channel, MHz */
  18580. A_UINT16 ch_center_freq1;
  18581. /** center channel frequency2 of current DFS channel, MHz,
  18582. * reserved for 160 BW mode
  18583. */
  18584. A_UINT16 ch_center_freq2;
  18585. /** flag to indicate if this pulse is chirp */
  18586. A_UINT8 pulse_is_chirp;
  18587. /** RSSI recorded in the ppdu */
  18588. A_UINT8 rssi;
  18589. /** extened RSSI info */
  18590. A_UINT8 rssi_ext;
  18591. union {
  18592. A_UINT8 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
  18593. /** pdev_id for identifying the MAC
  18594. * See macros starting with WMI_PDEV_ID_ for values.
  18595. */
  18596. A_UINT8 pdev_id;
  18597. };
  18598. /** index of peak magnitude bin (signed) */
  18599. A_INT32 peak_sidx;
  18600. /** Max pulse chirp velocity in delta bins over chirp FFT interval */
  18601. A_INT32 pulse_delta_peak;
  18602. /** Max pulse chirp velocity variance in delta bins */
  18603. A_INT32 pulse_delta_diff;
  18604. /** the difference in the FFT peak index between short FFT and the first long FFT
  18605. * psidx_diff = (first_long_fft_psidx - 4*first_short_fft_psidx),
  18606. */
  18607. A_INT32 psidx_diff;
  18608. /** pulse_flags: see WMI_DFS_RADAR_PULSE_FLAG_MASK enum values
  18609. * 0x0001 - set if psidx_diff is valid
  18610. */
  18611. A_UINT32 pulse_flags;
  18612. } wmi_dfs_radar_event_fixed_param;
  18613. enum {
  18614. /* DEFAULT - target chooses what action to take, based on its thermal
  18615. * management policy
  18616. * Targets which throttle tx (and potentially rx) based on thermal
  18617. * management thresholds specified by the host will shut down tx
  18618. * if the temperature exceeds upper_thresh_degreeC.
  18619. * Targets which simply inform the host about threshold breaches will
  18620. * send a notification message to the host if the temperature exceeds
  18621. * upper_thresh_degreeC.
  18622. * Conversely, if the temperature was above upper_thresh_degreeC but
  18623. * then drops to below lower_threshold_degreeC, the target will either
  18624. * resume tx, or notify the host.
  18625. */
  18626. WMI_THERMAL_MGMT_ACTION_DEFAULT = 0,
  18627. /* HALT_TRAFFIC -
  18628. * If the temperature rises above upper_thresh_degreeC, the target will
  18629. * halt tx.
  18630. * If the temperature falls back below lower_thresh_degreeC, the target
  18631. * will resume tx.
  18632. */
  18633. WMI_THERMAL_MGMT_ACTION_HALT_TRAFFIC = 1,
  18634. /* NOTIFY_HOST - the target will notify the host if the temperature
  18635. * either rises above upper_thresh_degreeC or falls below
  18636. * lower_thresh_degreeC.
  18637. */
  18638. WMI_THERMAL_MGMT_ACTION_NOTIFY_HOST = 2,
  18639. /* CHAIN SCALING -
  18640. * The target will switch tx chain mask from multi chains to single chain
  18641. * if the temperature rises above upper_thresh_degreeC.
  18642. * The target will switch tx chainmask back to multi chains if the
  18643. * temperature drops below upper_thresh_degreeC.
  18644. */
  18645. WMI_THERMAL_MGMT_ACTION_CHAINSCALING = 3,
  18646. };
  18647. typedef struct {
  18648. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_cmd_fixed_param */
  18649. /*Thermal thresholds*/
  18650. A_UINT32 lower_thresh_degreeC; /* in degree C*/
  18651. A_UINT32 upper_thresh_degreeC; /* in degree C*/
  18652. /*Enable/Disable Thermal Monitoring for Mitigation*/
  18653. A_UINT32 enable;
  18654. /* action: what the target should do when a thermal upper/lower threshold
  18655. * is crossed.
  18656. * Refer to the WMI_THERMAL_MGMT_ACTION enum.
  18657. */
  18658. A_UINT32 action;
  18659. A_UINT32 threshold_warning_degreeC;
  18660. A_UINT32 sample_rate_ms;
  18661. } wmi_thermal_mgmt_cmd_fixed_param;
  18662. typedef struct {
  18663. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param */
  18664. A_UINT32 temperature_degreeC;/* temperature in degree C*/
  18665. } wmi_thermal_mgmt_event_fixed_param;
  18666. /**
  18667. * This command is sent from WLAN host driver to firmware to
  18668. * request firmware to configure auto shutdown timer in fw
  18669. * 0 - Disable <1-19600>-Enabled and timer value is seconds (86400 seconds = 1 day maximum>
  18670. */
  18671. typedef struct {
  18672. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_cfg_cmd_param */
  18673. A_UINT32 timer_value; /** timer value; 0=disable */
  18674. } wmi_host_auto_shutdown_cfg_cmd_fixed_param;
  18675. enum wmi_host_auto_shutdown_reason {
  18676. WMI_HOST_AUTO_SHUTDOWN_REASON_UNKNOWN = 0,
  18677. WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY = 1,
  18678. WMI_HOST_AUTO_SHUTDOWN_REASON_MAX,
  18679. };
  18680. /* WMI_HOST_AUTO_SHUTDOWN_EVENTID */
  18681. typedef struct{
  18682. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_event_fixed_param */
  18683. A_UINT32 shutdown_reason; /* value: wmi_host_auto_shutdown_reason */
  18684. } wmi_host_auto_shutdown_event_fixed_param;
  18685. /** New WMI command to support TPC CHAINMASK ADJUSTMENT ACCORDING TO a set of conditions specified in the command.
  18686. * fw will save c tpc offset/chainmask along with conditions and adjust tpc/chainmask when condition meet.
  18687. * This command is only used by some customer for verification test. It is not for end-user.
  18688. *
  18689. * array of wmi_tpc_chainmask_config structures are passed with the command to specify multiple conditions.
  18690. *
  18691. * The set of conditions include bt status, stbc status, band, phy_mode, 1stream/2streams, channel, rate. when all these conditions meet,
  18692. * the output(tpc_offset,chainmask) will be applied on per packet basis. ack_offset is applied based on channel condtion only. When multiple
  18693. * conditions has the same channel ,then the first ack_offset will be applied. It is better for host driver to make sure the
  18694. * <channel, ack_offset> pair is unique.
  18695. *
  18696. * the conditions (bt status, stbc status, band, phy_mode, 1steam/2streams, tpc_offset, ack_offset, chainmask) are combinedi into a single word
  18697. * called basic_config_info by bitmap
  18698. * to save memory. And channel & rate info will be tracked by 'channel' field and 'rate0', 'rate1' field because of its large combination.
  18699. *
  18700. * '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
  18701. * is ignored.
  18702. * disable will remove preious conditions from FW.
  18703. * conditions from the later command will over write conditions stored from a previous command.
  18704. *
  18705. */
  18706. #define WMI_TPC_CHAINMASK_CONFIG_BT_ON_OFF 0 /** dont' care the bt status */
  18707. #define WMI_TPC_CHAINMASK_CONFIG_BT_ON 1 /** apply only when bt on */
  18708. #define WMI_TPC_CHAINMASK_CONFIG_BT_OFF 2 /** apply only when bt off */
  18709. #define WMI_TPC_CHAINMASK_CONFIG_BT_RESV1 3 /** reserved */
  18710. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_DONT_CARE 0 /** don't care the chainmask */
  18711. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0 1 /** force to use Chain0 to send */
  18712. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN1 2 /** force to use Chain1 to send */
  18713. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0_CHAIN1 3 /** force to use Chain0 & Chain1 to send */
  18714. #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON_OFF 0 /** don't care about stbc */
  18715. #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON 1 /** apply only when stbc on */
  18716. #define WMI_TPC_CHAINMASK_CONFIG_STBC_OFF 2 /** apply only when stbc off */
  18717. #define WMI_TPC_CHAINMASK_CONFIG_STBC_RESV1 3 /** reserved */
  18718. #define WMI_TPC_CHAINMASK_CONFIG_BAND_2G 0 /** 2G */
  18719. #define WMI_TPC_CHAINMASK_CONFIG_BAND_5G 1 /** 5G */
  18720. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11B_2G 0 /** 11b 2G */
  18721. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11G_2G 1 /** 11g 2G */
  18722. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_2G 2 /** 11n 2G */
  18723. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G 3 /** 11n + 11ac 2G */
  18724. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11A_5G 4 /** 11a 5G */
  18725. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_5G 5 /** 11n 5G */
  18726. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11AC_5G 6 /** 11ac 5G */
  18727. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G 7 /** 11n + 11ac 5G */
  18728. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_1 0 /** 1 stream */
  18729. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_2 1 /** 2 streams */
  18730. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_OFF 0 /** channel field is ignored */
  18731. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_ON 1 /** channel field needs to be checked */
  18732. #define WMI_TPC_CHAINMASK_CONFIG_RATE_OFF 0 /** rate field is ignored */
  18733. #define WMI_TPC_CHAINMASK_CONFIG_RATE_ON 1 /** rate field needs to be checked */
  18734. /** Bit map definition for basic_config_info starts */
  18735. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S 0
  18736. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S)
  18737. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
  18738. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_SET(x,z) WMI_F_RMW(x,(z) & 0x1f,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
  18739. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S 5
  18740. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S)
  18741. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
  18742. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_SET(x,z) WMI_F_RMW(x, (z) & 0x1f, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
  18743. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S 10
  18744. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK (0x3 << WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S)
  18745. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
  18746. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
  18747. #define WMI_TPC_CHAINMASK_CONFIG_BT_S 12
  18748. #define WMI_TPC_CHAINMASK_CONFIG_BT (0x3 << WMI_TPC_CHAINMASK_CONFIG_BT_S)
  18749. #define WMI_TPC_CHAINMASK_CONFIG_BT_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BT)
  18750. #define WMI_TPC_CHAINMASK_CONFIG_BT_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_BT)
  18751. #define WMI_TPC_CHAINMASK_CONFIG_STBC_S 14
  18752. #define WMI_TPC_CHAINMASK_CONFIG_STBC (0x3 << WMI_TPC_CHAINMASK_CONFIG_STBC_S)
  18753. #define WMI_TPC_CHAINMASK_CONFIG_STBC_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STBC)
  18754. #define WMI_TPC_CHAINMASK_CONFIG_STBC_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_STBC)
  18755. #define WMI_TPC_CHAINMASK_CONFIG_BAND_S 16
  18756. #define WMI_TPC_CHAINMASK_CONFIG_BAND (0x1 << WMI_TPC_CHAINMASK_CONFIG_BAND_S)
  18757. #define WMI_TPC_CHAINMASK_CONFIG_BAND_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BAND)
  18758. #define WMI_TPC_CHAINMASK_CONFIG_BAND_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_BAND)
  18759. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_S 17
  18760. #define WMI_TPC_CHAINMASK_CONFIG_STREAM (0x1 << WMI_TPC_CHAINMASK_CONFIG_STREAM_S)
  18761. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STREAM)
  18762. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_STREAM)
  18763. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S 18
  18764. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE (0x7 << WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S)
  18765. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
  18766. #define WMI_TPC_CHAINAMSK_CONFIG_PHY_MODE_SET(x,z) WMI_F_RMW(x, (z) & 0x7, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
  18767. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S 21
  18768. /*
  18769. * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST)
  18770. * is temporarily maintained as an alias for the correct name
  18771. * (WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  18772. */
  18773. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST WMI_TPC_CHAINMASK_CONFIG_CHANNEL
  18774. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL (0x1 << WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S)
  18775. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  18776. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  18777. #define WMI_TPC_CHAINMASK_CONFIG_RATE_S 22
  18778. /*
  18779. * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST)
  18780. * is temporarily maintained as an alias for the correct name
  18781. * (WMI_TPC_CHAINMASK_CONFIG_RATE)
  18782. */
  18783. #define WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST WMI_TPC_CHAINMASK_CONFIG_RATE
  18784. #define WMI_TPC_CHAINMASK_CONFIG_RATE (0x1 << WMI_TPC_CHAINMASK_CONFIG_RATE_S)
  18785. #define WMI_TPC_CHAINMASK_CONFIG_RATE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_RATE)
  18786. #define WMI_TPC_CHAINMASK_CONFIG_RATE_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_RATE)
  18787. /** Bit map definition for basic_config_info ends */
  18788. typedef struct{
  18789. A_UINT32 tlv_header;
  18790. /** Basic condition defined as bit map above, bitmap is chosen to save memory.
  18791. * Bit0 ~ Bit4: tpc offset which will be adjusted if condtion matches, the unit is 0.5dB. bit4 indicates signed
  18792. * Bit5 ~ Bit9: ack offset which will be adjusted if condtion matches, the unit is 0.5dB. bit9 indicates signed
  18793. * 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
  18794. * 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
  18795. * 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
  18796. * Bit16 : band condition b'0: 2G, b'1: 5G
  18797. * Bit17 : stream condition: b'0: 1 stream, b'1: 2 streams
  18798. * 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
  18799. * Bit21 : channel bit, if this bit is 0, then the following channel field is ignored
  18800. * Bit22 : rate bit, if this bit is 0, then the following rate0&rate1 is ignored.
  18801. * Bit23 ~ Bit31: reserved
  18802. */
  18803. A_UINT32 basic_config_info;
  18804. /** channel mapping bit rule: The lower bit corresponds with smaller channel.
  18805. * it depends on Bit14 of basic_config_info
  18806. * Total 24 channels for 5G
  18807. * 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165
  18808. * Total 14 channels for 2G
  18809. * 1 ~ 14
  18810. */
  18811. A_UINT32 channel;
  18812. /** rate mapping bit rule: The lower bit corresponds with lower rate.
  18813. * it depends on Bit16 ~ Bit18 of basic_config_info, "phy mode condition"
  18814. * Legacy rates , 11b, 11g, 11A
  18815. * 11n one stream (ht20, ht40) 8+8
  18816. * 11n two streams (ht20, ht40) 8+8
  18817. * 11ac one stream (vht20, vht40, vht80) 10+10+10
  18818. * 11ac two streams (vht20, vht40, vht80) 10+10+10
  18819. */
  18820. A_UINT32 rate0;
  18821. /** For example, for 11b, when rate0 equals 0x3, it means if actual_rate in [ "1Mbps", "2Mbps"] connection, the rate condition is true.
  18822. * 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
  18823. */
  18824. /** 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
  18825. */
  18826. A_UINT32 rate1;
  18827. } wmi_tpc_chainmask_config;
  18828. #define WMI_TPC_CHAINMASK_CONFIG_DISABLE 0 /** control the off for the tpc & chainmask*/
  18829. #define WMI_TPC_CHAINMASK_CONFIG_ENABLE 1 /** control the on for the tpc & chainmask*/
  18830. typedef struct{
  18831. A_UINT32 tlv_header;
  18832. A_UINT32 enable; /** enable to set tpc & chainmask when condtions meet, 0: disabled, 1: enabled. */
  18833. A_UINT32 num_tpc_chainmask_configs;
  18834. /** following this structure is num_tpc_chainmask_configs number of wmi_tpc_chainmask_config */
  18835. } wmi_tpc_chainmask_config_cmd_fixed_param;
  18836. typedef struct {
  18837. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_ring_cfg_req_fixed_param */
  18838. A_UINT32 pdev_id;
  18839. /**
  18840. * Bits 31:0: base address of ring [31:0]
  18841. */
  18842. A_UINT32 base_addr_lo;
  18843. /**
  18844. * Bits 3:0: base address of ring [35:32]
  18845. * Bits 31:4: reserved
  18846. */
  18847. A_UINT32 base_addr_hi;
  18848. /**
  18849. * Bits 31:0: address of head index [31:0]
  18850. */
  18851. A_UINT32 head_idx_addr_lo;
  18852. /**
  18853. * Bits 3:0: address of head index [35:32]
  18854. * Bits 31:4: reserved
  18855. */
  18856. A_UINT32 head_idx_addr_hi;
  18857. /**
  18858. * Bits 31:0: address of tail index [31:0]
  18859. */
  18860. A_UINT32 tail_idx_addr_lo;
  18861. /**
  18862. * Bits 3:0: address of tail index [35:32]
  18863. * Bits 31:4: reserved
  18864. */
  18865. A_UINT32 tail_idx_addr_hi;
  18866. A_UINT32 num_ptr; /** Number of pointers in the ring */
  18867. } wmi_oem_dma_ring_cfg_req_fixed_param;
  18868. #define WMI_OEM_DMA_RING_ADDR_LO_S 0
  18869. #define WMI_OEM_DMA_RING_ADDR_LO 0xffffffff
  18870. #define WMI_OEM_DMA_RING_ADDR_LO_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_RING_ADDR_LO)
  18871. #define WMI_OEM_DMA_RING_ADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_RING_ADDR_LO)
  18872. #define WMI_OEM_DMA_RING_ADDR_HI_S 0
  18873. #define WMI_OEM_DMA_RING_ADDR_HI 0xf
  18874. #define WMI_OEM_DMA_RING_ADDR_HI_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_RING_ADDR_HI)
  18875. #define WMI_OEM_DMA_RING_ADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_RING_ADDR_HI)
  18876. typedef struct {
  18877. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_ring_cfg_rsp_fixed_param */
  18878. A_UINT32 pdev_id;
  18879. A_UINT32 cfg_status; /** Configuration status; see A_STATUS */
  18880. } wmi_oem_dma_ring_cfg_rsp_fixed_param;
  18881. typedef struct {
  18882. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_indirect_data */
  18883. A_UINT32 pdev_id; /** ID of pdev whose OEM DMA ring produced the data */
  18884. /**
  18885. * Bits 31:0: address of data [31:0]
  18886. */
  18887. A_UINT32 addr_lo;
  18888. /**
  18889. * Bits 3:0: address of data [35:32]
  18890. * Bits 11:4: reserved
  18891. * Bits 31:12: opaque host context data [19:0]
  18892. */
  18893. A_UINT32 addr_hi;
  18894. A_UINT32 len; /** Length of data in bytes */
  18895. } wmi_oem_indirect_data;
  18896. #define WMI_OEM_DMA_DATA_ADDR_LO_S 0
  18897. #define WMI_OEM_DMA_DATA_ADDR_LO 0xffffffff
  18898. #define WMI_OEM_DMA_DATA_ADDR_LO_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_LO)
  18899. #define WMI_OEM_DMA_DATA_ADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_LO)
  18900. #define WMI_OEM_DMA_DATA_ADDR_HI_S 0
  18901. #define WMI_OEM_DMA_DATA_ADDR_HI 0xf
  18902. #define WMI_OEM_DMA_DATA_ADDR_HI_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_HI)
  18903. #define WMI_OEM_DMA_DATA_ADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_HI)
  18904. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_S 12
  18905. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA 0xfffff
  18906. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA)
  18907. #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)
  18908. typedef struct {
  18909. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_buf_release_hdr */
  18910. A_UINT32 pdev_id; /** ID of pdev whose OEM DMA ring produced the data */
  18911. } wmi_oem_dma_buf_release_fixed_param;
  18912. typedef struct {
  18913. /**
  18914. * Bits 31:0: address of data [31:0]
  18915. */
  18916. A_UINT32 addr_lo;
  18917. /**
  18918. * Bits 3:0: address of data [35:32]
  18919. * Bits 11:4: reserved
  18920. * Bits 31:12: host context data [19:0]
  18921. */
  18922. A_UINT32 addr_hi;
  18923. } wmi_oem_dma_buf_release_entry;
  18924. typedef struct {
  18925. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_data_cmd_fixed_param */
  18926. A_UINT32 tlv_header;
  18927. /** Unique id identifying the VDEV */
  18928. A_UINT32 vdev_id;
  18929. /** Actual length in byte of data[]. */
  18930. A_UINT32 data_len;
  18931. /**
  18932. * pdev_vdev_flag - 0 follow old method (vdev_id is valid, ignore pdev_id)
  18933. * pdev_vdev_flag - 1 pdev_id is valid
  18934. */
  18935. A_UINT32 pdev_vdev_flag;
  18936. /** Unique id identifying the PDEV */
  18937. A_UINT32 pdev_id;
  18938. /** This structure is used to send OEM DATA binary blobs from
  18939. * application/service to firmware where Host driver is pass through.
  18940. * The OEM-specific commands from OEM-specific userspace applications
  18941. * are passed to OEM-specific feature handlers in firmware as OEM DATA
  18942. * binary blobs. The format of the data is per agreement between FW and
  18943. * userspace applications, with the binary blob beginning with a header
  18944. * that identifies to the FW the nature of the remaining data within the
  18945. * blob.
  18946. *
  18947. * Following this structure is the TLV:
  18948. * A_UINT8 data[]; <-- actual length in byte given by field data_len.
  18949. */
  18950. } wmi_oem_data_cmd_fixed_param;
  18951. typedef struct {
  18952. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */
  18953. A_UINT32 data_len; /** length in byte of data[]. */
  18954. /* This structure is used to send REQ binary blobs
  18955. * from application/service to firmware where Host drv is pass through .
  18956. * Following this structure is the TLV:
  18957. * A_UINT8 data[]; <-- length in byte given by field data_len.
  18958. */
  18959. } wmi_nan_cmd_param;
  18960. #define WMI_NAN_GET_RANGING_INITIATOR_ROLE(flag) WMI_GET_BITS(flag, 0, 1)
  18961. #define WMI_NAN_SET_RANGING_INITIATOR_ROLE(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  18962. #define WMI_NAN_GET_RANGING_RESPONDER_ROLE(flag) WMI_GET_BITS(flag, 1, 1)
  18963. #define WMI_NAN_SET_RANGING_RESPONDER_ROLE(flag, val) WMI_SET_BITS(flag, 1, 1, val)
  18964. #define WMI_NAN_GET_NAN_6G_DISABLE(flag) WMI_GET_BITS(flag, 2, 1)
  18965. #define WMI_NAN_SET_NAN_6G_DISABLE(flag, val) WMI_SET_BITS(flag, 2, 1, val)
  18966. typedef struct {
  18967. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_host_config_param */
  18968. A_UINT32 nan_2g_disc_disable:1; /** This bit when set to 1 indicate NAN 2G discovery should be disabled */
  18969. A_UINT32 nan_5g_disc_disable:1; /** This bit when set to 1 indicate NAN 5G discovery should be disabled */
  18970. A_UINT32 reserved:30;
  18971. /** Flags: refer to WMI_NAN_GET/SET macros
  18972. * Bit 0 -> Nan ranging initiator role (0 - Disable, 1 - Enable)
  18973. * Bit 1 -> Nan ranging responder role (0 - Disable, 1 - Enable)
  18974. * Bit 2 -> Nan 6 GHz support (1 - Disable, 0 - Enable)
  18975. * Bits 3-31 -> Reserved
  18976. */
  18977. A_UINT32 flags;
  18978. } wmi_nan_host_config_param_PROTOTYPE;
  18979. #define wmi_nan_host_config_param wmi_nan_host_config_param_PROTOTYPE
  18980. typedef struct {
  18981. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */
  18982. A_UINT32 data_len; /** length in byte of data[]. */
  18983. /* This structure is used to send REQ binary blobs
  18984. * from firmware to application/service where Host drv is pass through .
  18985. * Following this structure is the TLV:
  18986. * A_UINT8 data[]; <-- length in byte given by field data_len.
  18987. */
  18988. } wmi_nan_event_hdr;
  18989. typedef struct {
  18990. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_info */
  18991. 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 */
  18992. 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 */
  18993. A_UINT32 reserved:31;
  18994. 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 */
  18995. } wmi_nan_event_info_PROTOTYPE;
  18996. #define wmi_nan_event_info wmi_nan_event_info_PROTOTYPE
  18997. /**
  18998. * Event to indicate NAN discovery interface created
  18999. */
  19000. typedef struct {
  19001. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param */
  19002. A_UINT32 tlv_header;
  19003. /** Unique id identifying the VDEV */
  19004. A_UINT32 vdev_id;
  19005. /** NAN interface MAC address */
  19006. wmi_mac_addr nan_interface_macaddr;
  19007. } wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE;
  19008. #define wmi_nan_disc_iface_created_event_fixed_param wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE
  19009. /**
  19010. * Event to indicate NAN discovery interface deleted
  19011. */
  19012. typedef struct {
  19013. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_deleted_event_fixed_param */
  19014. A_UINT32 tlv_header;
  19015. /** Unique id identifying the VDEV */
  19016. A_UINT32 vdev_id;
  19017. } wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE;
  19018. #define wmi_nan_disc_iface_deleted_event_fixed_param wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE
  19019. /**
  19020. * Event to indicate NAN device started new cluster
  19021. */
  19022. typedef struct {
  19023. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_started_cluster_event_fixed_param */
  19024. A_UINT32 tlv_header;
  19025. /** Unique id identifying the VDEV */
  19026. A_UINT32 vdev_id;
  19027. /** NAN Cluster ID */
  19028. A_UINT32 nan_cluster_id;
  19029. } wmi_nan_started_cluster_event_fixed_param_PROTOTYPE;
  19030. #define wmi_nan_started_cluster_event_fixed_param wmi_nan_started_cluster_event_fixed_param_PROTOTYPE
  19031. /**
  19032. * Event to indicate NAN device joined to cluster
  19033. */
  19034. typedef struct {
  19035. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_joined_cluster_event_fixed_param */
  19036. A_UINT32 tlv_header;
  19037. /** Unique id identifying the VDEV */
  19038. A_UINT32 vdev_id;
  19039. /** NAN Cluster ID */
  19040. A_UINT32 nan_cluster_id;
  19041. } wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE;
  19042. #define wmi_nan_joined_cluster_event_fixed_param wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE
  19043. typedef struct {
  19044. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_dmesg_event_fixed_param */
  19045. A_UINT32 tlv_header;
  19046. /** length in byte of msg[]. */
  19047. A_UINT32 msg_len;
  19048. /* Following this structure is the TLV:
  19049. * A_UINT8 msg[]; <-- length in byte given by field data_len.
  19050. * This data contains the string message which will be given to Host to dump it to kernel logs.
  19051. */
  19052. } wmi_nan_dmesg_event_fixed_param;
  19053. typedef struct {
  19054. /** TLV tag and len; tag equals WMITLV_TAG_STRUCT_wmi_nan_capabilities */
  19055. A_UINT32 tlv_header;
  19056. /** Maximum number of ndp sessions supported by the Firmware */
  19057. A_UINT32 max_ndp_sessions;
  19058. } wmi_nan_capabilities;
  19059. /** NAN DATA CMD's */
  19060. /**
  19061. * NAN Data get capabilities req
  19062. */
  19063. typedef struct {
  19064. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param */
  19065. A_UINT32 tlv_header;
  19066. /** unique id generated in upper layer for the transaction */
  19067. A_UINT32 transaction_id;
  19068. } wmi_ndi_get_cap_req_fixed_param_PROTOTYPE;
  19069. #define wmi_ndi_get_cap_req_fixed_param wmi_ndi_get_cap_req_fixed_param_PROTOTYPE
  19070. /**
  19071. * NDP Response code
  19072. */
  19073. typedef enum {
  19074. NDP_RSP_CODE_REQUEST_ACCEPT = 0x00,
  19075. NDP_RSP_CODE_REQUEST_REJECT = 0x01,
  19076. NDP_RSP_CODE_REQUEST_DEFER = 0x02,
  19077. } wmi_ndp_rsp_code_PROTOTYPE;
  19078. #define wmi_ndp_rsp_code wmi_ndp_rsp_code_PROTOTYPE
  19079. /**
  19080. * NDP Channel configuration type
  19081. */
  19082. typedef enum {
  19083. WMI_NDP_CHANNEL_NOT_REQUESTED = 0, /* Channel will not configured */
  19084. WMI_NDP_REQUEST_CHANNEL_SETUP = 1, /* Channel will be provided and is optional/hint */
  19085. WMI_NDP_FORCE_CHANNEL_SETUP = 2/* NDP must start on the provided channel */
  19086. } wmi_ndp_channel_cfg_PROTOTYPE;
  19087. /*
  19088. * The WMI_NDP_IPV6_INTF_ADDR_LEN macro cannot be changed without breaking
  19089. * WMI compatibility.
  19090. */
  19091. #define WMI_NDP_IPV6_INTF_ADDR_LEN 16
  19092. typedef struct {
  19093. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_transport_ip_param */
  19094. /* Presence of ipv6_intf_addr */
  19095. A_UINT32 ipv6_addr_present;
  19096. /* Presence of transport Port */
  19097. A_UINT32 trans_port_present;
  19098. /* Presence of transport Protocol */
  19099. A_UINT32 trans_proto_present;
  19100. /* ipv6 Interface address */
  19101. A_UINT8 ipv6_intf_addr[WMI_NDP_IPV6_INTF_ADDR_LEN];
  19102. /* Transport Port */
  19103. A_UINT32 transport_port;
  19104. /* Transport Protocol */
  19105. A_UINT32 transport_protocol;
  19106. } wmi_ndp_transport_ip_param;
  19107. #define wmi_ndp_channel_cfg wmi_ndp_channel_cfg_PROTOTYPE
  19108. typedef struct {
  19109. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_channel_info */
  19110. A_UINT32 mac_id; /* mac_id associated with ndp channel at same index */
  19111. } wmi_ndp_channel_info_PROTOTYPE;
  19112. #define wmi_ndp_channel_info wmi_ndp_channel_info_PROTOTYPE
  19113. typedef struct {
  19114. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_event_param */
  19115. A_UINT32 vdev_id; /* NDI VDEV ID */
  19116. 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 */
  19117. A_UINT32 reserved:31;
  19118. } wmi_ndp_event_param_PROTOTYPE;
  19119. #define wmi_ndp_event_param wmi_ndp_event_param_PROTOTYPE
  19120. /**
  19121. * NDP Initiator requesting a data session
  19122. */
  19123. typedef struct {
  19124. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_req_fixed_param */
  19125. A_UINT32 tlv_header;
  19126. /** Unique id identifying the VDEV */
  19127. A_UINT32 vdev_id;
  19128. /** unique id generated in upper layer for the transaction */
  19129. A_UINT32 transaction_id;
  19130. /** Unique Instance Id identifying the Responder's service */
  19131. A_UINT32 service_instance_id;
  19132. /** Discovery MAC addr of the publisher/peer */
  19133. wmi_mac_addr peer_discovery_mac_addr;
  19134. /** Actual number of bytes in TLV ndp_cfg */
  19135. A_UINT32 ndp_cfg_len;
  19136. /** Actual number of bytes in TLV ndp_app_info */
  19137. A_UINT32 ndp_app_info_len;
  19138. /** NDP channel configuration type defined in wmi_ndp_channel_cfg */
  19139. A_UINT32 ndp_channel_cfg;
  19140. /** NAN Cipher Suite Shared Key */
  19141. A_UINT32 nan_csid;
  19142. /** Actual number of bytes in TLV ndp_pmk */
  19143. A_UINT32 nan_pmk_len;
  19144. /** Actual number of bytes in TLV ndp_passphrase */
  19145. A_UINT32 nan_passphrase_len;
  19146. /** Actual number of bytes in TLV nan_servicename */
  19147. A_UINT32 nan_servicename_len;
  19148. /**
  19149. * TLV (tag length value) parameters follow the ndp_initiator_req
  19150. * structure. The TLV's are:
  19151. * wmi_channel channel;
  19152. * A_UINT8 ndp_cfg[];
  19153. * A_UINT8 ndp_app_info[];
  19154. * A_UINT8 ndp_pmk[];
  19155. * A_INT8 ndp_passphrase[];
  19156. * A_INT8 nan_servicename[];
  19157. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  19158. */
  19159. } wmi_ndp_initiator_req_fixed_param_PROTOTYPE;
  19160. #define wmi_ndp_initiator_req_fixed_param wmi_ndp_initiator_req_fixed_param_PROTOTYPE
  19161. /**
  19162. * Initiate a data response on the responder side
  19163. * for data request indication from the peer
  19164. */
  19165. typedef struct {
  19166. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_req_fixed_param */
  19167. A_UINT32 tlv_header;
  19168. /** Unique id identifying the VDEV */
  19169. A_UINT32 vdev_id;
  19170. /** unique id generated in upper layer for the transaction */
  19171. A_UINT32 transaction_id;
  19172. /**
  19173. * Unique token Id generated on the initiator/responder
  19174. * side used for a NDP session between two NAN devices
  19175. */
  19176. A_UINT32 ndp_instance_id;
  19177. /** Response Code defined in wmi_ndp_rsp_code */
  19178. A_UINT32 rsp_code;
  19179. /** Number of bytes in TLV ndp_cfg */
  19180. A_UINT32 ndp_cfg_len;
  19181. /** Number of bytes in TLV ndp_app_info */
  19182. A_UINT32 ndp_app_info_len;
  19183. /** NAN Cipher Suite Shared Key */
  19184. A_UINT32 nan_csid;
  19185. /** Actual number of bytes in TLV ndp_pmk */
  19186. A_UINT32 nan_pmk_len;
  19187. /** Actual number of bytes in TLV ndp_passphrase */
  19188. A_UINT32 nan_passphrase_len;
  19189. /** Actual number of bytes in TLV nan_servicename */
  19190. A_UINT32 nan_servicename_len;
  19191. /**
  19192. * TLV (tag length value) parameters follow the ndp_responder_req
  19193. * structure. The TLV's are:
  19194. * A_UINT8 ndp_cfg[];
  19195. * A_UINT8 ndp_app_info[];
  19196. * A_UINT8 ndp_pmk[];
  19197. * A_INT8 ndp_passphrase[];
  19198. * A_INT8 nan_servicename[];
  19199. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  19200. */
  19201. } wmi_ndp_responder_req_fixed_param_PROTOTYPE;
  19202. #define wmi_ndp_responder_req_fixed_param wmi_ndp_responder_req_fixed_param_PROTOTYPE
  19203. /**
  19204. * NDP end type
  19205. */
  19206. typedef enum {
  19207. WMI_NDP_END_TYPE_UNSPECIFIED = 0x00,
  19208. WMI_NDP_END_TYPE_PEER_UNAVAILABLE = 0x01,
  19209. WMI_NDP_END_TYPE_OTA_FRAME = 0x02,
  19210. WMI_NDP_END_TYPE_DATA_INACTIVITY = 0x03,
  19211. } wmi_ndp_end_type_PROTOTYPE;
  19212. #define wmi_ndp_end_type wmi_ndp_end_type_PROTOTYPE
  19213. /**
  19214. * NDP end reason code
  19215. */
  19216. typedef enum {
  19217. WMI_NDP_END_REASON_UNSPECIFIED = 0x00,
  19218. WMI_NDP_END_REASON_INACTIVITY = 0x01,
  19219. WMI_NDP_END_REASON_PEER_DATA_END = 0x02,
  19220. WMI_NDP_END_REASON_DATA_INACTIVITY = 0x03,
  19221. } wmi_ndp_end_reason_code_PROTOTYPE;
  19222. #define wmi_ndp_end_reason_code wmi_ndp_end_reason_code_PROTOTYPE
  19223. /**
  19224. * NDP end request
  19225. */
  19226. typedef struct {
  19227. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req */
  19228. A_UINT32 tlv_header;
  19229. /** NDP instance id */
  19230. A_UINT32 ndp_instance_id;
  19231. } wmi_ndp_end_req_PROTOTYPE;
  19232. #define wmi_ndp_end_req wmi_ndp_end_req_PROTOTYPE
  19233. typedef struct {
  19234. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_cmd_param */
  19235. A_UINT32 vdev_id; /* NDI VDEV ID */
  19236. A_UINT32 ndp_disable:1; /** This bit when set to 1 indicates to terminate all NDPs associated with NDI vdev ID */
  19237. A_UINT32 reserved:31;
  19238. } wmi_ndp_cmd_param_PROTOTYPE;
  19239. #define wmi_ndp_cmd_param wmi_ndp_cmd_param_PROTOTYPE
  19240. /**
  19241. * NDP End request
  19242. */
  19243. typedef struct {
  19244. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req_fixed_param */
  19245. A_UINT32 tlv_header;
  19246. /** unique id generated in upper layer for the transaction */
  19247. A_UINT32 transaction_id;
  19248. /**
  19249. * TLV (tag length value) parameters follow the ndp_end_req
  19250. * structure. The TLV's are:
  19251. * wmi_ndp_end_req ndp_end_req_list[];
  19252. */
  19253. } wmi_ndp_end_req_fixed_param_PROTOTYPE;
  19254. #define wmi_ndp_end_req_fixed_param wmi_ndp_end_req_fixed_param_PROTOTYPE
  19255. /* NAN DATA RSP EVENTS */
  19256. /**
  19257. * Event to indicate NAN Data Interface capabilities cmd
  19258. */
  19259. typedef struct {
  19260. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_cap_rsp_event_fixed_param */
  19261. A_UINT32 tlv_header;
  19262. /** Copy of transaction_id received in wmi_ndi_get_cap_req */
  19263. A_UINT32 transaction_id;
  19264. /** Max ndi interface support */
  19265. A_UINT32 max_ndi_interfaces;
  19266. /** Max ndp sessions can support */
  19267. A_UINT32 max_ndp_sessions;
  19268. /** Max number of peer's per ndi */
  19269. A_UINT32 max_peers_per_ndi;
  19270. /** which combination of bands is supported - see NAN_DATA_SUPPORTED_BAND enums */
  19271. A_UINT32 nan_data_supported_bands;
  19272. } wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE;
  19273. #define wmi_ndi_cap_rsp_event_fixed_param wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE
  19274. /**
  19275. * NDP command response code
  19276. */
  19277. typedef enum {
  19278. NDP_CMD_RSP_STATUS_SUCCESS = 0x00,
  19279. NDP_CMD_RSP_STATUS_ERROR = 0x01,
  19280. } wmi_ndp_cmd_rsp_status_PROTOTYPE;
  19281. #define wmi_ndp_cmd_rsp_status wmi_ndp_cmd_rsp_status_PROTOTYPE
  19282. /**
  19283. * Event response for wmi_ndp_initiator_req
  19284. */
  19285. typedef struct {
  19286. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_rsp_event_fixed_param */
  19287. A_UINT32 tlv_header;
  19288. /** Unique id identifying the VDEV */
  19289. A_UINT32 vdev_id;
  19290. /** Copy of transaction_id received in wmi_ndp_initiator_req */
  19291. A_UINT32 transaction_id;
  19292. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  19293. A_UINT32 rsp_status;
  19294. A_UINT32 reason_code;
  19295. /**
  19296. * Unique token Id generated on the initiator/responder
  19297. * side used for a NDP session between two NAN devices
  19298. */
  19299. A_UINT32 ndp_instance_id;
  19300. } wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE;
  19301. #define wmi_ndp_initiator_rsp_event_fixed_param wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE
  19302. /**
  19303. * Event response for wmi_ndp_responder_req cmd
  19304. */
  19305. typedef struct {
  19306. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param */
  19307. A_UINT32 tlv_header;
  19308. /** Unique id identifying the VDEV */
  19309. A_UINT32 vdev_id;
  19310. /** Copy of transaction_id received in wmi_ndp_responder_req */
  19311. A_UINT32 transaction_id;
  19312. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  19313. A_UINT32 rsp_status;
  19314. A_UINT32 reason_code;
  19315. /**
  19316. * Unique token Id generated on the initiator/responder
  19317. * side used for a NDP session between two NAN devices
  19318. */
  19319. A_UINT32 ndp_instance_id;
  19320. /** NDI mac address of the peer */
  19321. wmi_mac_addr peer_ndi_mac_addr;
  19322. /** Host can create peer if this entry is TRUE */
  19323. A_UINT32 create_peer;
  19324. } wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE;
  19325. #define wmi_ndp_responder_rsp_event_fixed_param wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE
  19326. /**
  19327. * Active ndp instance id
  19328. */
  19329. typedef struct {
  19330. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_active_ndp_instance_id */
  19331. A_UINT32 tlv_header;
  19332. /** NDP instance id */
  19333. A_UINT32 ndp_instance_id;
  19334. } wmi_active_ndp_instance_id_PROTOTYPE;
  19335. #define wmi_active_ndp_instance_id wmi_active_ndp_instance_id_PROTOTYPE
  19336. /**
  19337. * NDP end response per ndi
  19338. */
  19339. typedef struct {
  19340. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_per_ndi */
  19341. A_UINT32 tlv_header;
  19342. /** Unique id identifying the VDEV */
  19343. A_UINT32 vdev_id;
  19344. /** Peer MAC addr */
  19345. wmi_mac_addr peer_mac_addr;
  19346. /** Number of active ndps on this ndi */
  19347. A_UINT32 num_active_ndps_on_ndi;
  19348. } wmi_ndp_end_rsp_per_ndi_PROTOTYPE;
  19349. #define wmi_ndp_end_rsp_per_ndi wmi_ndp_end_rsp_per_ndi_PROTOTYPE
  19350. /**
  19351. * Event response for wmi_ndp_end_req cmd
  19352. */
  19353. typedef struct {
  19354. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_event_fixed_param */
  19355. A_UINT32 tlv_header;
  19356. /** Copy of transaction_id received in wmi_ndp_end_req */
  19357. A_UINT32 transaction_id;
  19358. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  19359. A_UINT32 rsp_status;
  19360. A_UINT32 reason_code;
  19361. /**
  19362. * TLV (tag length value) parameters follow the ndp_end_rsp
  19363. * structure. The TLV's are:
  19364. * wmi_ndp_end_rsp_per_ndi ndp_end_rsp_per_ndis[];
  19365. * wmi_active_ndp_instance_id active_ndp_instances_id[];
  19366. */
  19367. } wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE;
  19368. #define wmi_ndp_end_rsp_event_fixed_param wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE
  19369. /** NAN DATA EVENTS */
  19370. /**
  19371. * NDP self role
  19372. */
  19373. typedef enum {
  19374. WMI_NDP_INITIATOR_ROLE,
  19375. WMI_NDP_RESPONDER_ROLE,
  19376. } wmi_ndp_self_role_PROTOTYPE;
  19377. #define wmi_ndp_self_role wmi_ndp_self_role_PROTOTYPE
  19378. /**
  19379. * NDP accept policy
  19380. */
  19381. typedef enum {
  19382. WMI_NDP_ACCEPT_POLICY_NONE,
  19383. WMI_NDP_ACCEPT_POLICY_ALL,
  19384. } wmi_ndp_accept_policy_PROTOTYPE;
  19385. #define wmi_ndp_accept_policy wmi_ndp_accept_policy_PROTOTYPE
  19386. /**
  19387. * Event indication received on the responder side when a NDP Initiator request/
  19388. * NDP session is initiated on the Initiator side (self role will be NDP_RESPONDER_ROLE)
  19389. *
  19390. * Event indication received on the initiator side when a
  19391. * NDP responder request on the Initiator side (self role will be NDP_INITIATOR_ROLE)
  19392. */
  19393. typedef struct {
  19394. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_indication_event_fixed_param */
  19395. A_UINT32 tlv_header;
  19396. /** Unique id identifying the VDEV */
  19397. A_UINT32 vdev_id;
  19398. /** Self NDP Role defined in wmi_ndp_self_role */
  19399. A_UINT32 self_ndp_role;
  19400. /** Accept policy defined in wmi_ndp_accept_policy */
  19401. A_UINT32 accept_policy;
  19402. /** Unique Instance Id corresponding to a service/session. */
  19403. A_UINT32 service_instance_id;
  19404. /** Discovery MAC addr of the peer/initiator */
  19405. wmi_mac_addr peer_discovery_mac_addr;
  19406. /** NDI mac address of the peer */
  19407. wmi_mac_addr peer_ndi_mac_addr;
  19408. /**
  19409. * Unique token Id generated on the initiator/responder
  19410. * side used for a NDP session between two NAN devices
  19411. */
  19412. A_UINT32 ndp_instance_id;
  19413. /** Number of bytes in TLV wmi_ndp_cfg */
  19414. A_UINT32 ndp_cfg_len;
  19415. /** Number of bytes in TLV wmi_ndp_app_info */
  19416. A_UINT32 ndp_app_info_len;
  19417. /** Peer NAN Cipher Suite Shared Key */
  19418. A_UINT32 nan_csid;
  19419. /** Actual number of bytes in TLV nan_scid */
  19420. A_UINT32 nan_scid_len;
  19421. /** Self NDI mac address */
  19422. wmi_mac_addr self_ndi_mac_addr;
  19423. /**
  19424. * TLV (tag length value) parameters follow the ndp_indication
  19425. * structure. The TLV's are:
  19426. * A_UINT8 ndp_cfg[];
  19427. * A_UINT8 ndp_app_info[];
  19428. * A_UINT8 nan_scid[];
  19429. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  19430. */
  19431. } wmi_ndp_indication_event_fixed_param_PROTOTYPE;
  19432. #define wmi_ndp_indication_event_fixed_param wmi_ndp_indication_event_fixed_param_PROTOTYPE
  19433. /**
  19434. * Event indication of data confirm is received on both
  19435. * initiator and responder side confirming a NDP session
  19436. */
  19437. typedef struct {
  19438. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_confirm_event_fixed_param */
  19439. A_UINT32 tlv_header;
  19440. /** Unique id identifying the VDEV */
  19441. A_UINT32 vdev_id;
  19442. /**
  19443. * Unique token Id generated on the initiator/responder
  19444. * side used for a NDP session between two NAN devices
  19445. */
  19446. A_UINT32 ndp_instance_id;
  19447. /** NDI mac address of the peer (required to derive target ipv6 address) */
  19448. wmi_mac_addr peer_ndi_mac_addr;
  19449. /** Response Code defined in wmi_ndp_rsp_code */
  19450. A_UINT32 rsp_code;
  19451. /** Number of bytes in TLV wmi_ndp_cfg */
  19452. A_UINT32 ndp_cfg_len;
  19453. /** Number of bytes in TLV wmi_ndp_app_info */
  19454. A_UINT32 ndp_app_info_len;
  19455. /** Reason Code */
  19456. A_UINT32 reason_code;
  19457. /** Number of active ndps on this peer */
  19458. A_UINT32 num_active_ndps_on_peer;
  19459. /** Number of channels on this peer */
  19460. A_UINT32 num_ndp_channels;
  19461. /**
  19462. * TLV (tag length value) parameters follow the ndp_confirm
  19463. * structure. The TLV's are:
  19464. * A_UINT8 ndp_cfg[];
  19465. * A_UINT8 ndp_app_info[];
  19466. * wmi_channel ndp_channel_list[];
  19467. * A_UINT32 nss_list[]; // Nss indexing should match with channel indexing,
  19468. * // since Nss is associated with the channel
  19469. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  19470. */
  19471. } wmi_ndp_confirm_event_fixed_param_PROTOTYPE;
  19472. #define wmi_ndp_confirm_event_fixed_param wmi_ndp_confirm_event_fixed_param_PROTOTYPE
  19473. /**
  19474. * Event indication received on the initiator/responder side terminating a NDP session
  19475. */
  19476. typedef struct {
  19477. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_indication */
  19478. A_UINT32 tlv_header;
  19479. /** type defined in wmi_ndp_end_type */
  19480. A_UINT32 type;
  19481. /** Unique id identifying the VDEV */
  19482. A_UINT32 vdev_id;
  19483. /** reason_code defined in wmi_ndp_end_reason_code */
  19484. A_UINT32 reason_code;
  19485. /** NDP instance id */
  19486. A_UINT32 ndp_instance_id;
  19487. /** NDI MAC addr of the peer */
  19488. wmi_mac_addr peer_ndi_mac_addr;
  19489. /** Number of active ndps on this peer */
  19490. A_UINT32 num_active_ndps_on_peer;
  19491. } wmi_ndp_end_indication_PROTOTYPE;
  19492. #define wmi_ndp_end_indication wmi_ndp_end_indication_PROTOTYPE
  19493. typedef struct
  19494. {
  19495. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndl_schedule_update_fixed_param */
  19496. /** Unique id identifying the VDEV */
  19497. A_UINT32 vdev_id;
  19498. /** peer MAC address */
  19499. wmi_mac_addr peer_macaddr;
  19500. /** Flags:
  19501. * Bit 0 -> Nss updated
  19502. * Bit 1 -> channel list updated
  19503. * Bits 2-31 -> Reserved
  19504. */
  19505. A_UINT32 flags;
  19506. /** num of channels */
  19507. A_UINT32 num_channels;
  19508. /** num of ndp instances */
  19509. A_UINT32 num_ndp_instances;
  19510. /**
  19511. * TLV (tag length value) parameters follow the ndl_schedule_update
  19512. * structure. The TLV's are:
  19513. * A_UINT32 ndp_instance_list[];
  19514. * wmi_channel ndl_channel_list[];
  19515. * A_UINT32 nss_list[]; // Nss indexing should match with channel indexing,
  19516. * // since Nss is associate with a channel
  19517. */
  19518. } wmi_ndl_schedule_update_fixed_param_PROTOTYPE;
  19519. #define wmi_ndl_schedule_update_fixed_param wmi_ndl_schedule_update_fixed_param_PROTOTYPE
  19520. typedef struct {
  19521. A_UINT32 tlv_header;
  19522. A_UINT32 num_data;
  19523. /* followed by WMITLV_TAG_ARRAY_BYTE */
  19524. } wmi_diag_data_container_event_fixed_param;
  19525. enum {
  19526. WMI_PDEV_PARAM_TXPOWER_REASON_NONE = 0,
  19527. WMI_PDEV_PARAM_TXPOWER_REASON_SAR,
  19528. WMI_PDEV_PARAM_TXPOWER_REASON_MAX
  19529. };
  19530. #define PDEV_PARAM_TXPOWER_VALUE_MASK 0x000000FF
  19531. #define PDEV_PARAM_TXPOWER_VALUE_SHIFT 0
  19532. #define PDEV_PARAM_TXPOWER_REASON_MASK 0x0000FF00
  19533. #define PDEV_PARAM_TXPOWER_REASON_SHIFT 8
  19534. #define SET_PDEV_PARAM_TXPOWER_VALUE(txpower_param, value) \
  19535. ((txpower_param) &= ~PDEV_PARAM_TXPOWER_VALUE_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_VALUE_SHIFT))
  19536. #define SET_PDEV_PARAM_TXPOWER_REASON(txpower_param, value) \
  19537. ((txpower_param) &= ~PDEV_PARAM_TXPOWER_REASON_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_REASON_SHIFT))
  19538. #define GET_PDEV_PARAM_TXPOWER_VALUE(txpower_param) \
  19539. (((txpower_param) & PDEV_PARAM_TXPOWER_VALUE_MASK) >> PDEV_PARAM_TXPOWER_VALUE_SHIFT)
  19540. #define GET_PDEV_PARAM_TXPOWER_REASON(txpower_param) \
  19541. (((txpower_param) & PDEV_PARAM_TXPOWER_REASON_MASK) >> PDEV_PARAM_TXPOWER_REASON_SHIFT)
  19542. #define PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK 0x00000001
  19543. #define PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT 0
  19544. #define SET_PDEV_SMART_CHAINMASK_SCHEME_DECISION(param, value) \
  19545. do { \
  19546. (param) &= ~PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK; \
  19547. (param) |= (value) << PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT; \
  19548. } while (0)
  19549. #define GET_PDEV_SMART_CHAINMASK_SCHEME_DECISION(param) \
  19550. (((param) & PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK) >> PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT)
  19551. /**
  19552. * This command is sent from WLAN host driver to firmware to
  19553. * notify the current modem power state. Host would receive a
  19554. * message from modem when modem is powered on. Host driver
  19555. * would then send this command to firmware. Firmware would then
  19556. * power on WCI-2 (UART) interface for LTE/MWS Coex.
  19557. *
  19558. * This command is only applicable for APQ platform which has
  19559. * modem on the platform. If firmware doesn't support MWS Coex,
  19560. * this command can be dropped by firmware.
  19561. *
  19562. * This is a requirement from modem team that WCN can't toggle
  19563. * UART before modem is powered on.
  19564. */
  19565. typedef struct {
  19566. /** TLV tag and len; tag equals
  19567. * WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param */
  19568. A_UINT32 tlv_header;
  19569. /** Modem power state parameter */
  19570. A_UINT32 modem_power_state;
  19571. } wmi_modem_power_state_cmd_param;
  19572. enum {
  19573. WMI_MODEM_STATE_OFF = 0,
  19574. WMI_MODEM_STATE_ON
  19575. };
  19576. /**
  19577. * This command is sent from WLAN host driver to firmware to
  19578. * notify the updated Specific Absorption Rate (SAR) limits.
  19579. * A critical regulation for FCC compliance, OEMs require methods to set
  19580. * limits on TX power of WLAN/WWAN.
  19581. * Host would receive instructions on what to set the limits per
  19582. * band/chain/modulation to, it would then interpret and send the limits
  19583. * to FW using this WMI message.
  19584. * Since it is possible to have too many commands to fit into one message,
  19585. * FW will keep receiving the messages, until it finds one with
  19586. * commit_limits = 1, at which point it will apply all the received
  19587. * specifications.
  19588. */
  19589. typedef struct {
  19590. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limits_cmd_param */
  19591. A_UINT32 tlv_header;
  19592. /** when set to WMI_SAR_FEATURE_ON_*, enable SAR feature
  19593. * with BDF (SET_0 to 4) or WMI
  19594. * if set to WMI_SAR_FEATURE_OFF, disable feature;
  19595. * if set to WMI_SAR_FEATURE_NO_CHANGE, do not alter state of feature;
  19596. */
  19597. A_UINT32 sar_enable;
  19598. /** number of items in sar_limits[] */
  19599. A_UINT32 num_limit_rows;
  19600. /** once received and is set to 1, FW will calculate the power limits
  19601. * and send set_power command to apply them.
  19602. * Otherwise just update local values stored in FW until a future msg
  19603. * with commit_limits=1 arrives.
  19604. */
  19605. A_UINT32 commit_limits;
  19606. /**
  19607. * TLV (tag length value) parameters follow the sar_limit_cmd_row
  19608. * structure. The TLV's are:
  19609. * wmi_sar_limit_cmd_row sar_limits[];
  19610. */
  19611. } wmi_sar_limits_cmd_fixed_param;
  19612. enum wmi_sar_feature_state_flags {
  19613. WMI_SAR_FEATURE_OFF = 0,
  19614. WMI_SAR_FEATURE_ON_SET_0,
  19615. WMI_SAR_FEATURE_ON_SET_1,
  19616. WMI_SAR_FEATURE_ON_SET_2,
  19617. WMI_SAR_FEATURE_ON_SET_3,
  19618. WMI_SAR_FEATURE_ON_SET_4,
  19619. WMI_SAR_FEATURE_NO_CHANGE,
  19620. WMI_SAR_FEATURE_ON_USER_DEFINED,
  19621. WMI_SAR_FEATURE_ON_SAR_V2_0,
  19622. WMI_SAR_FEATURE_ON_SAR_V3,
  19623. };
  19624. typedef struct {
  19625. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limit_cmd_row */
  19626. /** Current values: WMI_SAR_2G_ID, WMI_SAR_5G_ID. Can be extended by adding
  19627. * new band_id values .
  19628. */
  19629. A_UINT32 band_id;
  19630. A_UINT32 chain_id;
  19631. /** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */
  19632. A_UINT32 mod_id;
  19633. /**
  19634. * To be backwards-compatible with older code use a union with
  19635. * limit_value & limit_index as alternate names / interpretations
  19636. * of the same message information element.
  19637. * The older code still uses limit_value, while the new code will
  19638. * use limit_index.
  19639. * The interpretation of the field as value or index depends on
  19640. * WMI_SAR_FEATURE_ON_*
  19641. * WMI_SAR_FEATURE_ON_SAR_V2_0 will use it as index, other case
  19642. * still use it as value.
  19643. */
  19644. union {
  19645. /** actual power limit value, in steps of 0.5 dBm */
  19646. A_UINT32 limit_value;
  19647. A_UINT32 limit_index;
  19648. };
  19649. /** in case the OEM doesn't care about one of the qualifiers from above,
  19650. * the bit for that qualifier within the validity_bitmap can be set to 0
  19651. * so that limit is applied to all possible cases of this qualifier
  19652. * (i.e. if a qualifier's validity_bitmap flag is 0, the qualifier is
  19653. * treated as a wildcard).
  19654. * Current masks:
  19655. * WMI_SAR_BAND_ID_VALID_MASK
  19656. * WMI_SAR_CHAIN_ID_VALID_MASK
  19657. * WMI_SAR_MOD_ID_VALID_MASK
  19658. * Example: if !WMI_IS_SAR_MOD_ID_VALID(bitmap),
  19659. * it means apply same limit_value to both WMI_SAR_MOD_CCK and
  19660. * WMI_SAR_MOD_OFDM cases.
  19661. */
  19662. A_UINT32 validity_bitmap;
  19663. } wmi_sar_limit_cmd_row;
  19664. enum wmi_sar_band_id_flags {
  19665. WMI_SAR_2G_ID = 0,
  19666. WMI_SAR_5G_ID
  19667. };
  19668. enum wmi_sar_mod_id_flags {
  19669. WMI_SAR_MOD_CCK = 0,
  19670. WMI_SAR_MOD_OFDM
  19671. };
  19672. /**
  19673. * This message is sent from FW to WLAN host to inform the host of the
  19674. * updated Specific Absorption Rate (SAR) limits currently in use.
  19675. */
  19676. typedef struct {
  19677. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limits_event_param */
  19678. A_UINT32 tlv_header;
  19679. /** when set to WMI_SAR_FEATURE_ON_*, SAR feature is enabled
  19680. * with BDF (SET_0 to 4) or WMI
  19681. * if set to WMI_SAR_FEATURE_OFF, feature is disabled;
  19682. */
  19683. A_UINT32 sar_enable;
  19684. /**
  19685. * number of items in sar_limits[].
  19686. * used when sar_enable == WMI_SAR_FEATURE_ON_USER_DEFINED.
  19687. * Should be zero if any of the BDF sets is activated.
  19688. */
  19689. A_UINT32 num_limit_rows;
  19690. /**
  19691. * TLV (tag length value) parameters follow the sar_get_limit_event_row
  19692. * structure. The TLV's are:
  19693. * wmi_sar_get_limit_event_row sar_limits[num_limit_rows];
  19694. */
  19695. } wmi_sar_get_limits_event_fixed_param;
  19696. typedef struct {
  19697. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limit_event_row */
  19698. /** Current values: WMI_SAR_2G_ID, WMI_SAR_5G_ID. Can be extended by adding
  19699. * new band_id values .
  19700. */
  19701. A_UINT32 band_id;
  19702. A_UINT32 chain_id;
  19703. /** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */
  19704. A_UINT32 mod_id;
  19705. /** actual power limit value, in steps of 0.5 dBm */
  19706. A_UINT32 limit_value;
  19707. } wmi_sar_get_limit_event_row;
  19708. #define WMI_SAR_BAND_ID_VALID_MASK (0x1)
  19709. #define WMI_SAR_CHAIN_ID_VALID_MASK (0x2)
  19710. #define WMI_SAR_MOD_ID_VALID_MASK (0x4)
  19711. #define WMI_SET_SAR_BAND_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_BAND_ID_VALID_MASK)
  19712. #define WMI_SET_SAR_CHAIN_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_CHAIN_ID_VALID_MASK)
  19713. #define WMI_SET_SAR_MOD_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_MOD_ID_VALID_MASK)
  19714. #define WMI_IS_SAR_BAND_ID_VALID(bitmap) ((bitmap) & WMI_SAR_BAND_ID_VALID_MASK)
  19715. #define WMI_IS_SAR_CHAIN_ID_VALID(bitmap) ((bitmap) & WMI_SAR_CHAIN_ID_VALID_MASK)
  19716. #define WMI_IS_SAR_MOD_ID_VALID(bitmap) ((bitmap) & WMI_SAR_MOD_ID_VALID_MASK)
  19717. /**
  19718. * This command is sent from WLAN host driver to firmware to
  19719. * get current Specific Absorption Rate (SAR) limits status from firmware.
  19720. * The command does not require any parameters as of now.
  19721. */
  19722. typedef struct {
  19723. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limits_cmd_param */
  19724. A_UINT32 tlv_header;
  19725. /** currently no parameters are required. Reserved bit field for future use added */
  19726. /* All bits need to be set to 0 while it is a reserved field. */
  19727. A_UINT32 reserved;
  19728. } wmi_sar_get_limits_cmd_fixed_param;
  19729. #define WMI_ROAM_AUTH_STATUS_CONNECTED 0x1 /** connected, but not authenticated */
  19730. #define WMI_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 /** connected and authenticated */
  19731. /** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic
  19732. generated whenever firmware roamed to new AP silently and
  19733. (a) If the host is awake, FW sends the event to the host immediately .
  19734. (b) If host is in sleep then either
  19735. (1) FW waits until host sends WMI_PDEV_RESUME_CMDID or WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID
  19736. command to FW (part of host wake up sequence from low power mode) before sending the event host.
  19737. (2) data/mgmt frame is received from roamed AP, which needs to return to host
  19738. */
  19739. #define GTK_OFFLOAD_KCK_EXTENDED_BYTES 32
  19740. typedef struct {
  19741. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material */
  19742. A_UINT32 tlv_header;
  19743. A_UINT8 kck[GTK_OFFLOAD_KCK_BYTES]; /* EAPOL-Key Key Confirmation Key (KCK) */
  19744. A_UINT8 kek[GTK_OFFLOAD_KEK_BYTES]; /* EAPOL-Key Key Encryption Key (KEK) */
  19745. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES];
  19746. } wmi_key_material;
  19747. typedef struct {
  19748. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material_ext */
  19749. A_UINT32 tlv_header;
  19750. /*
  19751. * key_buffer contains kck,kck2,kek,kek2,replay counter, in order
  19752. * The split between kck vs. kek should be known to host based on akmp.
  19753. */
  19754. A_UINT8 key_buffer[GTK_OFFLOAD_KEK_EXTENDED_BYTES+GTK_OFFLOAD_KCK_EXTENDED_BYTES+GTK_REPLAY_COUNTER_BYTES];
  19755. } wmi_key_material_ext;
  19756. typedef struct {
  19757. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param */
  19758. /** Unique id identifying the VDEV on which roaming is done by firmware */
  19759. A_UINT32 vdev_id;
  19760. /** auth_status: connected or authorized */
  19761. A_UINT32 auth_status;
  19762. /** roam_reason:
  19763. * bits 0-3 roam trigger reason LSbs - see WMI_ROAM_TRIGGER_REASON_XXX
  19764. * bits 4-5 subnet status - see WMI_ROAM_SUBNET_CHANGE_STATUS_XXX.
  19765. * bit 6 HW mode status, set 1 to indicate host to schedule
  19766. * HW mode change, see WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE.
  19767. * bit 7 0x1 to show bits 8-15 are valid
  19768. * bits 8-15 full WMI_ROAM_TRIGGER_REASON_ID/WMI_ROAM_TRIGGER_EXT_REASON_ID
  19769. * since 4 bits are not enough.
  19770. */
  19771. A_UINT32 roam_reason;
  19772. /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */
  19773. A_UINT32 rssi;
  19774. /** MAC address of roamed AP */
  19775. wmi_mac_addr bssid; /* BSSID */
  19776. /** whether the frame is beacon or probe rsp */
  19777. A_UINT32 is_beacon;
  19778. /** the length of beacon/probe rsp */
  19779. A_UINT32 bcn_probe_rsp_len;
  19780. /** the length of reassoc rsp */
  19781. A_UINT32 reassoc_rsp_len;
  19782. /** the length of reassoc req */
  19783. A_UINT32 reassoc_req_len;
  19784. /**
  19785. * maximum allowed Tx power (in dBm) for this connection.
  19786. * max_allowed_tx_power = 0 dBm means value is not specified.
  19787. */
  19788. A_INT32 max_allowed_tx_power;
  19789. /**
  19790. * TLV (tag length value) parameters follows roam_synch_event
  19791. * The TLV's are:
  19792. * A_UINT8 bcn_probe_rsp_frame[bcn_probe_resp_len];
  19793. * A_UINT8 reassoc_rsp_frame[reassoc_rsp_len];
  19794. * wmi_channel chan;
  19795. * wmi_key_material key[];
  19796. * A_UINT32 status[]; subnet changed status not being used currently.
  19797. * Will pass the information using roam_status.
  19798. * A_UINT8 reassoc_req_frame[reassoc_req_len];
  19799. * wmi_pdev_hw_mode_transition_event_fixed_param
  19800. * hw_mode_transition_fixed_param[];
  19801. * wmi_pdev_set_hw_mode_response_vdev_mac_entry
  19802. * wmi_pdev_set_hw_mode_response_vdev_mac_mapping[];
  19803. * wmi_roam_fils_synch_tlv_param roam_fils_synch_info[];
  19804. * wmi_key_material_ext key_ext[];
  19805. * wmi_roam_pmk_cache_synch_tlv_param roam_pmk_cache_synch_info[];
  19806. * wmi_pdev_band_to_mac mac_freq_mapping[];
  19807. */
  19808. } wmi_roam_synch_event_fixed_param;
  19809. /**
  19810. * The WMI_ROAM_SYNCH_FRAME_EVENTID message is used in conjunction with the
  19811. * WMI_ROAM_SYNCH_EVENTID message. The former will be sent 1st followed by
  19812. * the latter for cases where the WMI_ROAM_SYNCH_EVENTID message size would
  19813. * exceed 2K. The more_frag field in the WMI_ROAM_SYNCH_FRAME_EVENTID informs
  19814. * the host whether more WMI_ROAM_SYNCH_FRAME_EVENTID messages would follow;
  19815. * after the WMI_ROAM_SYNCH_FRAME_EVENTID messages the target sends the
  19816. * WMI_ROAM_SYNCH_EVENTID with bcn_probe_rsp_len, reassoc_rsp_len, and
  19817. * reassoc_rsp_len set to 0.
  19818. */
  19819. typedef struct {
  19820. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_frame_event_fixed_param */
  19821. /** Unique id identifying the VDEV on which roaming is done by firmware */
  19822. A_UINT32 vdev_id;
  19823. /** More frags to follow? */
  19824. A_UINT32 more_frag;
  19825. /** whether the frame is beacon or probe rsp */
  19826. A_UINT32 is_beacon;
  19827. /** the length of beacon/probe rsp */
  19828. A_UINT32 bcn_probe_rsp_len;
  19829. /** the length of reassoc rsp */
  19830. A_UINT32 reassoc_rsp_len;
  19831. /** the length of reassoc req */
  19832. A_UINT32 reassoc_req_len;
  19833. /**
  19834. * TLV (tag length value) parameters follows roam_synch_event
  19835. * The TLV's are:
  19836. * A_UINT8 bcn_probe_rsp_frame[bcn_probe_rsp_len];
  19837. * A_UINT8 reassoc_rsp_frame[reassoc_rsp_len];
  19838. * A_UINT8 reassoc_req_frame[reassoc_req_len];
  19839. */
  19840. } wmi_roam_synch_frame_event_fixed_param;
  19841. #define WMI_PEER_ESTIMATED_LINKSPEED_INVALID 0xFFFFFFFF
  19842. typedef struct {
  19843. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_get_estimated_linkspeed_cmd_fixed_param */
  19844. A_UINT32 tlv_header;
  19845. /** MAC address of the peer for which the estimated link speed is required. */
  19846. wmi_mac_addr peer_macaddr;
  19847. /* Set to 1 only if vdev_id field is valid */
  19848. A_UINT32 valid_vdev_id;
  19849. /* VDEV to which the peer belongs to */
  19850. A_UINT32 vdev_id;
  19851. } wmi_peer_get_estimated_linkspeed_cmd_fixed_param;
  19852. typedef struct {
  19853. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_estimated_linkspeed_event_fixed_param */
  19854. A_UINT32 tlv_header;
  19855. /** MAC address of the peer for which the estimated link speed is required.
  19856. */
  19857. wmi_mac_addr peer_macaddr;
  19858. /* Estimated link speed in kbps.
  19859. * When est_linkspeed_kbps is not valid, the value is set to WMI_PEER_ESTIMATED_LINKSPEED_INVALID.
  19860. */
  19861. A_UINT32 est_linkspeed_kbps;
  19862. /* Set to 1 only if vdev_id field is valid */
  19863. A_UINT32 valid_vdev_id;
  19864. /* VDEV to which the peer belongs to */
  19865. A_UINT32 vdev_id;
  19866. } wmi_peer_estimated_linkspeed_event_fixed_param;
  19867. typedef struct {
  19868. A_UINT32 tlv_header; /* TLV tag and len; tag equals */
  19869. /* vdev ID */
  19870. A_UINT32 vdev_id;
  19871. A_UINT32 data_len; /** length in byte of data[]. */
  19872. /* This structure is used to send REQ binary blobs
  19873. * from application/service to firmware where Host drv is pass through .
  19874. * Following this structure is the TLV:
  19875. * A_UINT8 data[]; <-- length in byte given by field data_len.
  19876. * A_UINT32 vdev_id_bitmap[];
  19877. * This array is present and non-zero length in MLO case, stats should
  19878. * only be provided from the vdev_id_bitmap in the bitmap when it is
  19879. * present.
  19880. */
  19881. } wmi_req_stats_ext_cmd_fixed_param;
  19882. typedef struct {
  19883. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats1_event_fix_param */
  19884. A_UINT32 vdev_id; /** vdev ID */
  19885. A_UINT32 data_len; /** length in byte of data[]. */
  19886. /* This structure is used to send REQ binary blobs
  19887. * from firmware to application/service where Host drv is pass through .
  19888. * Following this structure is the TLV:
  19889. * A_UINT8 data[]; <-- length in byte given by field data_len.
  19890. */
  19891. } wmi_stats_ext_event_fixed_param;
  19892. typedef struct {
  19893. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_resp_event_fixed_param */
  19894. /** unique id identifying the VDEV, generated by the caller */
  19895. A_UINT32 vdev_id;
  19896. /** peer MAC address */
  19897. wmi_mac_addr peer_macaddr;
  19898. } wmi_peer_delete_resp_event_fixed_param;
  19899. typedef struct {
  19900. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_all_peer_resp_event_fixed_param */
  19901. /** unique id identifying the VDEV, generated by the caller */
  19902. A_UINT32 vdev_id;
  19903. /* Status of peer delete all command */
  19904. /*
  19905. * Values for Status:
  19906. * 0 - OK; command successful
  19907. * 1 - EINVAL; Requested invalid vdev_id
  19908. * 2 - EFAILED; Delete all peer failed
  19909. */
  19910. A_UINT32 status;
  19911. } wmi_vdev_delete_all_peer_resp_event_fixed_param;
  19912. typedef struct {
  19913. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */
  19914. A_UINT32 tlv_header;
  19915. A_UINT32 vdev_id; /* vdev ID */
  19916. /* MAC address of the peer for which the estimated link speed is required.*/
  19917. wmi_mac_addr peer_macaddr;
  19918. A_UINT32 state; /* peer state */
  19919. } wmi_peer_state_event_fixed_param;
  19920. typedef struct {
  19921. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param */
  19922. A_UINT32 tlv_header;
  19923. /* unique id identifying the VDEV, generated by the caller */
  19924. A_UINT32 vdev_id;
  19925. /* peer MAC address */
  19926. wmi_mac_addr peer_macaddr;
  19927. /* status
  19928. * 0: ok
  19929. * 1: fail - peer not present
  19930. */
  19931. A_UINT32 status;
  19932. } wmi_peer_assoc_conf_event_fixed_param;
  19933. typedef struct {
  19934. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_conf_event_fixed_param */
  19935. A_UINT32 tlv_header;
  19936. /* unique id identifying the VDEV, generated by the caller */
  19937. A_UINT32 vdev_id;
  19938. /* peer MAC address */
  19939. wmi_mac_addr peer_macaddr;
  19940. /* 0: OK.
  19941. * 1: FAIL - same bss peer exist already. */
  19942. A_UINT32 status;
  19943. } wmi_peer_create_conf_event_fixed_param;
  19944. enum {
  19945. WMI_2G4_HT40_OBSS_SCAN_PASSIVE = 0, /** scan_type: passive */
  19946. WMI_2G4_HT40_OBSS_SCAN_ACTIVE, /** scan_type: active */
  19947. };
  19948. typedef struct {
  19949. /**
  19950. * TLV tag and len;
  19951. * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_enalbe_cmd_fixed_param
  19952. */
  19953. A_UINT32 tlv_header;
  19954. A_UINT32 vdev_id;
  19955. /**
  19956. * active or passive. if active all the channels are actively scanned.
  19957. * if passive then all the channels are passively scanned
  19958. */
  19959. A_UINT32 scan_type;
  19960. /**
  19961. * FW can perform multiple scans with in a OBSS scan interval.
  19962. * For each scan,
  19963. * if the scan is passive then obss_scan_passive_dwell is minimum dwell to be used for each channel ,
  19964. * if the scan is active then obss_scan_active_dwell is minimum dwell to be used for each channel .
  19965. * The unit for these 2 parameters is TUs.
  19966. */
  19967. A_UINT32 obss_scan_passive_dwell;
  19968. A_UINT32 obss_scan_active_dwell;
  19969. /**
  19970. * OBSS scan interval . FW needs to perform one or more OBSS scans within this interval and fulfill the
  19971. * both min and total per channel dwell time requirement
  19972. */
  19973. A_UINT32 bss_channel_width_trigger_scan_interval;
  19974. /**
  19975. * FW can perform multiple scans with in a OBSS scan interval.
  19976. * For each scan,
  19977. * the total per channel dwell time across all scans with in OBSS scan interval should be
  19978. * atleast obss_scan_passive_total_per channel for passive scas and obss_scan_active_total_per channel
  19979. * for active scans and ,
  19980. * The unit for these 2 parameters is TUs.
  19981. */
  19982. A_UINT32 obss_scan_passive_total_per_channel;
  19983. A_UINT32 obss_scan_active_total_per_channel;
  19984. A_UINT32 bss_width_channel_transition_delay_factor; /** parameter to check exemption from scan */
  19985. A_UINT32 obss_scan_activity_threshold; /** parameter to check exemption from scan */
  19986. /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */
  19987. A_UINT32 forty_mhz_intolerant; /** STA 40M bandwidth intolerant capability */
  19988. A_UINT32 current_operating_class; /** STA current operating class */
  19989. /** length of 2.4GHz channel list to scan at, channel number list in tlv->channels[] */
  19990. A_UINT32 channel_len;
  19991. /** length of optional ie data to append to probe reqest when active scan, ie data in tlv->ie_field[] */
  19992. A_UINT32 ie_len;
  19993. /**
  19994. * TLV (tag length value) parameters following the fixed param structure
  19995. * A_UINT8 channels[channel_len]; // channel numbers
  19996. * A_UINT8 ie_field[ie_len];
  19997. * A_UINT32 chan_freqs[channel_len] // in MHz
  19998. */
  19999. } wmi_obss_scan_enable_cmd_fixed_param;
  20000. typedef struct {
  20001. /**
  20002. * TLV tag and len;
  20003. * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_disalbe_cmd_fixed_param
  20004. */
  20005. A_UINT32 tlv_header;
  20006. A_UINT32 vdev_id;
  20007. } wmi_obss_scan_disable_cmd_fixed_param;
  20008. typedef struct {
  20009. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_prb_rsp_tx_status_event_fixed_param */
  20010. A_UINT32 tlv_header;
  20011. /** unique id identifying the VDEV */
  20012. A_UINT32 vdev_id;
  20013. /** prb rsp tx status, values defined in enum WMI_FRAME_TX_STATUS */
  20014. A_UINT32 tx_status;
  20015. } wmi_offload_prb_rsp_tx_status_event_fixed_param;
  20016. typedef enum {
  20017. WMI_FRAME_TX_OK, /* frame tx ok */
  20018. WMI_FRAME_TX_XRETRY, /* excessivley retried */
  20019. WMI_FRAME_TX_DROP, /* frame dropped by FW due to resources */
  20020. WMI_FRAME_TX_FILTERED, /* frame filtered by hardware */
  20021. } WMI_FRAME_TX_STATUS;
  20022. /**
  20023. * This command is sent from WLAN host driver to firmware to
  20024. * request firmware to send the latest channel avoidance range
  20025. * to host.
  20026. *
  20027. * This command is only applicable for APQ platform which has
  20028. * modem on the platform. If firmware doesn't support MWS Coex,
  20029. * this command can be dropped by firmware.
  20030. *
  20031. * Host would send this command to firmware to request a channel
  20032. * avoidance information update.
  20033. */
  20034. typedef struct {
  20035. /** TLV tag and len; tag equals
  20036. * WMITLV_TAG_STRUC_wmi_chan_avoid_update_cmd_param */
  20037. A_UINT32 tlv_header;
  20038. } wmi_chan_avoid_update_cmd_param;
  20039. /* ExtScan operation mode */
  20040. typedef enum {
  20041. WMI_EXTSCAN_MODE_NONE = 0x0000,
  20042. WMI_EXTSCAN_MODE_START = 0x0001, /* ExtScan/TableMonitoring operation started */
  20043. WMI_EXTSCAN_MODE_STOP = 0x0002, /* ExtScan/TableMonitoring operation stopped */
  20044. WMI_EXTSCAN_MODE_IGNORED = 0x0003, /* ExtScan command ignored due to error */
  20045. } wmi_extscan_operation_mode;
  20046. /* Channel Mask */
  20047. typedef enum {
  20048. WMI_CHANNEL_BAND_UNSPECIFIED = 0x0000,
  20049. WMI_CHANNEL_BAND_24 = 0x0001, /* 2.4 channel */
  20050. WMI_CHANNEL_BAND_5_NON_DFS = 0x0002, /* 5G Channels (No DFS channels) */
  20051. WMI_CHANNEL_BAND_DFS = 0x0004, /* DFS channels */
  20052. } wmi_channel_band_mask;
  20053. typedef enum {
  20054. WMI_EXTSCAN_CYCLE_STARTED_EVENT = 0x0001,
  20055. WMI_EXTSCAN_CYCLE_COMPLETED_EVENT = 0x0002,
  20056. WMI_EXTSCAN_BUCKET_STARTED_EVENT = 0x0004,
  20057. WMI_EXTSCAN_BUCKET_COMPLETED_EVENT = 0x0008,
  20058. WMI_EXTSCAN_BUCKET_FAILED_EVENT = 0x0010,
  20059. WMI_EXTSCAN_BUCKET_OVERRUN_EVENT = 0x0020,
  20060. WMI_EXTSCAN_THRESHOLD_NUM_SCANS = 0x0040,
  20061. WMI_EXTSCAN_THRESHOLD_PERCENT = 0x0080,
  20062. WMI_EXTSCAN_EVENT_MAX = 0x8000
  20063. } wmi_extscan_event_type;
  20064. #define WMI_EXTSCAN_CYCLE_EVENTS_MASK (WMI_EXTSCAN_CYCLE_STARTED_EVENT | \
  20065. WMI_EXTSCAN_CYCLE_COMPLETED_EVENT)
  20066. #define WMI_EXTSCAN_BUCKET_EVENTS_MASK (WMI_EXTSCAN_BUCKET_STARTED_EVENT | \
  20067. WMI_EXTSCAN_BUCKET_COMPLETED_EVENT | \
  20068. WMI_EXTSCAN_BUCKET_FAILED_EVENT | \
  20069. WMI_EXTSCAN_BUCKET_OVERRUN_EVENT)
  20070. typedef enum {
  20071. WMI_EXTSCAN_NO_FORWARDING = 0x0000,
  20072. WMI_EXTSCAN_FORWARD_FRAME_TO_HOST = 0x0001
  20073. } wmi_extscan_forwarding_flags;
  20074. typedef enum {
  20075. WMI_EXTSCAN_USE_MSD = 0x0001, /* Use Motion Sensor Detection */
  20076. WMI_EXTSCAN_EXTENDED_BATCHING_EN = 0x0002, /* Extscan LPASS extended batching feature is supported and enabled */
  20077. } wmi_extscan_configuration_flags;
  20078. typedef enum {
  20079. WMI_EXTSCAN_BUCKET_CACHE_RESULTS = 0x0001, /* Cache the results of bucket whose configuration flags has this bit set */
  20080. WMI_EXTSCAN_REPORT_EVENT_CONTEXT_HUB = 0x0002, /* Report ext scan results to context hub or not. */
  20081. } wmi_extscan_bucket_configuration_flags;
  20082. typedef enum {
  20083. WMI_EXTSCAN_STATUS_OK = 0,
  20084. WMI_EXTSCAN_STATUS_ERROR = 0x80000000,
  20085. WMI_EXTSCAN_STATUS_INVALID_PARAMETERS,
  20086. WMI_EXTSCAN_STATUS_INTERNAL_ERROR
  20087. } wmi_extscan_start_stop_status;
  20088. typedef struct {
  20089. /** Request ID - to identify command. Cannot be 0 */
  20090. A_UINT32 request_id;
  20091. /** Requestor ID - client requesting ExtScan */
  20092. A_UINT32 requestor_id;
  20093. /** VDEV id(interface) that is requesting scan */
  20094. A_UINT32 vdev_id;
  20095. } wmi_extscan_command_id;
  20096. typedef struct {
  20097. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  20098. /** channel in MHz */
  20099. A_UINT32 channel;
  20100. /** dwell time in msec - use defaults if 0 */
  20101. A_UINT32 min_dwell_time;
  20102. A_UINT32 max_dwell_time;
  20103. /** passive/active channel and other flags */
  20104. A_UINT32 control_flags; /* 0 => active, 1 => passive scan; ignored for DFS */
  20105. } wmi_extscan_bucket_channel;
  20106. /* Scan Bucket specification */
  20107. typedef struct {
  20108. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  20109. /** Bucket ID - 0-based */
  20110. A_UINT32 bucket_id;
  20111. /** ExtScan events subscription - events to be reported to client (see wmi_extscan_event_type) */
  20112. A_UINT32 notify_extscan_events;
  20113. /** Options to forward scan results - see wmi_extscan_forwarding_flags */
  20114. A_UINT32 forwarding_flags;
  20115. /** ExtScan configuration flags - wmi_extscan_bucket_configuration_flags */
  20116. A_UINT32 configuration_flags;
  20117. /** DEPRECATED member: multiplier to be applied to the periodic scan's base period */
  20118. A_UINT32 base_period_multiplier;
  20119. /** dwell time in msec on active channels - use defaults if 0 */
  20120. A_UINT32 min_dwell_time_active;
  20121. A_UINT32 max_dwell_time_active;
  20122. /** dwell time in msec on passive channels - use defaults if 0 */
  20123. A_UINT32 min_dwell_time_passive;
  20124. A_UINT32 max_dwell_time_passive;
  20125. /** see wmi_channel_band_mask; when equal to WMI_CHANNEL_UNSPECIFIED, use channel list */
  20126. A_UINT32 channel_band;
  20127. /** number of channels (if channel_band is WMI_CHANNEL_UNSPECIFIED) */
  20128. A_UINT32 num_channels;
  20129. /** scan period upon start or restart of the bucket - periodicity of the bucket to begin with */
  20130. A_UINT32 min_period;
  20131. /** period above which exponent is not applied anymore */
  20132. A_UINT32 max_period;
  20133. /** back off value to be applied to bucket's periodicity after exp_max_step_count scan cycles
  20134. * new_bucket_period = last_bucket_period + last_exponent_period * exp_backoff
  20135. */
  20136. A_UINT32 exp_backoff;
  20137. /** number of scans performed at a given periodicity after which exponential back off value is
  20138. * applied to current periodicity to obtain a newer one
  20139. */
  20140. A_UINT32 exp_max_step_count;
  20141. /** Followed by the variable length TLV chan_list:
  20142. * wmi_extscan_bucket_channel chan_list[] */
  20143. } wmi_extscan_bucket;
  20144. typedef struct {
  20145. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param */
  20146. /** Request ID - to identify command. Cannot be 0 */
  20147. A_UINT32 request_id;
  20148. /** Requestor ID - client requesting ExtScan */
  20149. A_UINT32 requestor_id;
  20150. /** VDEV id(interface) that is requesting scan */
  20151. A_UINT32 vdev_id;
  20152. /** table ID - to allow support for multiple simultaneous requests */
  20153. A_UINT32 table_id;
  20154. /** Base period (milliseconds) used by scan buckets to define periodicity of the scans */
  20155. A_UINT32 base_period;
  20156. /** Maximum number of iterations to run - one iteration is the scanning of the least frequent bucket */
  20157. A_UINT32 max_iterations;
  20158. /** Options to forward scan results - see wmi_extscan_forwarding_flags */
  20159. A_UINT32 forwarding_flags;
  20160. /** ExtScan configuration flags - wmi_extscan_configuration_flags */
  20161. A_UINT32 configuration_flags;
  20162. /** ExtScan events subscription - bitmask indicating which events should be send to client (see wmi_extscan_event_type) */
  20163. A_UINT32 notify_extscan_events;
  20164. /** Scan Priority, input to scan scheduler */
  20165. A_UINT32 scan_priority;
  20166. /** Maximum number of BSSIDs to cache on each scan cycle */
  20167. A_UINT32 max_bssids_per_scan_cycle;
  20168. /** Minimum RSSI value to report */
  20169. A_UINT32 min_rssi;
  20170. /** Maximum table usage in percentage */
  20171. A_UINT32 max_table_usage;
  20172. /** default dwell time in msec on active channels */
  20173. A_UINT32 min_dwell_time_active;
  20174. A_UINT32 max_dwell_time_active;
  20175. /** default dwell time in msec on passive channels */
  20176. A_UINT32 min_dwell_time_passive;
  20177. A_UINT32 max_dwell_time_passive;
  20178. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  20179. A_UINT32 min_rest_time;
  20180. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  20181. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  20182. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  20183. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  20184. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  20185. * irrespective of activity. activity is determined by the idle_time parameter.
  20186. */
  20187. A_UINT32 max_rest_time;
  20188. /** time before sending next set of probe requests.
  20189. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  20190. * The number of probe requests specified depends on the ssid_list and bssid_list
  20191. */
  20192. /** Max number of probes to be sent */
  20193. A_UINT32 n_probes;
  20194. /** time in msec between 2 sets of probe requests. */
  20195. A_UINT32 repeat_probe_time;
  20196. /** time in msec between 2 consequetive probe requests with in a set. */
  20197. A_UINT32 probe_spacing_time;
  20198. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  20199. A_UINT32 idle_time;
  20200. /** maximum time in msec allowed for scan */
  20201. A_UINT32 max_scan_time;
  20202. /** delay in msec before sending first probe request after switching to a channel */
  20203. A_UINT32 probe_delay;
  20204. /** Scan control flags */
  20205. A_UINT32 scan_ctrl_flags;
  20206. /** Burst duration time in msec*/
  20207. A_UINT32 burst_duration;
  20208. /** number of bssids in the TLV bssid_list[] */
  20209. A_UINT32 num_bssid;
  20210. /** number of ssid in the TLV ssid_list[] */
  20211. A_UINT32 num_ssids;
  20212. /** number of bytes in TLV ie_data[] */
  20213. A_UINT32 ie_len;
  20214. /** number of buckets in the TLV bucket_list[] */
  20215. A_UINT32 num_buckets;
  20216. /** in number of scans, send notifications to host after these many scans */
  20217. A_UINT32 report_threshold_num_scans;
  20218. /** number of channels in channel_list[] determined by the
  20219. sum of wmi_extscan_bucket.num_channels in array */
  20220. /**
  20221. * TLV (tag length value) parameters follow the extscan_cmd
  20222. * structure. The TLV's are:
  20223. * wmi_ssid ssid_list[];
  20224. * wmi_mac_addr bssid_list[];
  20225. * A_UINT8 ie_data[];
  20226. * wmi_extscan_bucket bucket_list[];
  20227. * wmi_extscan_bucket_channel channel_list[];
  20228. */
  20229. } wmi_extscan_start_cmd_fixed_param;
  20230. typedef struct {
  20231. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_stop_cmd_fixed_param */
  20232. /** Request ID - to match running command. 0 matches any request */
  20233. A_UINT32 request_id;
  20234. /** Requestor ID - client requesting stop */
  20235. A_UINT32 requestor_id;
  20236. /** VDEV id(interface) that is requesting scan */
  20237. A_UINT32 vdev_id;
  20238. /** table ID - to allow support for multiple simultaneous requests */
  20239. A_UINT32 table_id;
  20240. } wmi_extscan_stop_cmd_fixed_param;
  20241. enum wmi_extscan_get_cached_results_flags {
  20242. WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_NONE = 0x0000,
  20243. WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_FLUSH_TABLE = 0x0001
  20244. };
  20245. typedef struct {
  20246. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_cached_results_cmd_fixed_param */
  20247. /** request ID - used to correlate command with events */
  20248. A_UINT32 request_id;
  20249. /** Requestor ID - client that requested results */
  20250. A_UINT32 requestor_id;
  20251. /** VDEV id(interface) that is requesting scan */
  20252. A_UINT32 vdev_id;
  20253. /** table ID - to allow support for multiple simultaneous requests */
  20254. A_UINT32 table_id;
  20255. /** maximum number of results to be returned */
  20256. A_UINT32 max_results;
  20257. /** flush BSSID list - wmi_extscan_get_cached_results_flags */
  20258. A_UINT32 control_flags; /* enum wmi_extscan_get_cached_results_flags */
  20259. } wmi_extscan_get_cached_results_cmd_fixed_param;
  20260. typedef struct {
  20261. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_wlan_change_results_cmd_fixed_param */
  20262. /** request ID - used to correlate command with events */
  20263. A_UINT32 request_id;
  20264. /** Requestor ID - client that requested results */
  20265. A_UINT32 requestor_id;
  20266. /** VDEV id(interface) that is requesting scan */
  20267. A_UINT32 vdev_id;
  20268. /** table ID - to allow support for multiple simultaneous requests */
  20269. A_UINT32 table_id;
  20270. } wmi_extscan_get_wlan_change_results_cmd_fixed_param;
  20271. typedef struct {
  20272. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  20273. /** bssid */
  20274. wmi_mac_addr bssid;
  20275. /** channel in MHz */
  20276. A_UINT32 channel;
  20277. /** upper RSSI limit */
  20278. A_UINT32 upper_rssi_limit;
  20279. /** lower RSSI limit */
  20280. A_UINT32 lower_rssi_limit;
  20281. } wmi_extscan_wlan_change_bssid_param;
  20282. typedef struct {
  20283. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param */
  20284. /** Request ID - to identify command. Cannot be 0 */
  20285. A_UINT32 request_id;
  20286. /** Requestor ID - client requesting wlan change monitoring */
  20287. A_UINT32 requestor_id;
  20288. /** VDEV id(interface) that is requesting scan */
  20289. A_UINT32 vdev_id;
  20290. /** table ID - to allow support for multiple simultaneous tables */
  20291. A_UINT32 table_id;
  20292. /** operation mode: start/stop */
  20293. A_UINT32 mode; /* wmi_extscan_operation_mode */
  20294. /** number of rssi samples to store */
  20295. A_UINT32 max_rssi_samples;
  20296. /** number of samples to use to calculate RSSI average */
  20297. A_UINT32 rssi_averaging_samples;
  20298. /** number of scans to confirm loss of contact with RSSI */
  20299. A_UINT32 lost_ap_scan_count;
  20300. /** number of out-of-range BSSIDs necessary to send event */
  20301. A_UINT32 max_out_of_range_count;
  20302. /** total number of bssid signal descriptors (in all pages) */
  20303. A_UINT32 total_entries;
  20304. /** index of the first bssid entry found in the TLV wlan_change_descriptor_list*/
  20305. A_UINT32 first_entry_index;
  20306. /** number of bssid signal descriptors in this page */
  20307. A_UINT32 num_entries_in_page;
  20308. /* Following this structure is the TLV:
  20309. * wmi_extscan_wlan_change_bssid_param wlan_change_descriptor_list[];
  20310. * (number of elements given by field num_page_entries)
  20311. */
  20312. } wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param;
  20313. typedef struct {
  20314. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  20315. /** bssid */
  20316. wmi_mac_addr bssid;
  20317. /** RSSI min threshold for reporting */
  20318. A_UINT32 min_rssi;
  20319. /** Deprecated entry - channel in MHz */
  20320. A_UINT32 channel;
  20321. /** RSSI max threshold for reporting */
  20322. A_UINT32 max_rssi;
  20323. } wmi_extscan_hotlist_entry;
  20324. typedef struct {
  20325. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_monitor_cmd_fixed_param */
  20326. /** Request ID - to identify command. Cannot be 0 */
  20327. A_UINT32 request_id;
  20328. /** Requestor ID - client requesting hotlist monitoring */
  20329. A_UINT32 requestor_id;
  20330. /** VDEV id(interface) that is requesting scan */
  20331. A_UINT32 vdev_id;
  20332. /** table ID - to allow support for multiple simultaneous tables */
  20333. A_UINT32 table_id;
  20334. /** operation mode: start/stop */
  20335. A_UINT32 mode; /* wmi_extscan_operation_mode */
  20336. /** total number of bssids (in all pages) */
  20337. A_UINT32 total_entries;
  20338. /** index of the first bssid entry found in the TLV wmi_extscan_hotlist_entry */
  20339. A_UINT32 first_entry_index;
  20340. /** number of bssids in this page */
  20341. A_UINT32 num_entries_in_page;
  20342. /** number of consecutive scans to confirm loss of contact with AP */
  20343. A_UINT32 lost_ap_scan_count;
  20344. /* Following this structure is the TLV:
  20345. * wmi_extscan_hotlist_entry hotlist[]; <-- number of elements given by field num_page_entries.
  20346. */
  20347. } wmi_extscan_configure_hotlist_monitor_cmd_fixed_param;
  20348. typedef struct {
  20349. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  20350. /**ssid */
  20351. wmi_ssid ssid;
  20352. /**band */
  20353. A_UINT32 band;
  20354. /**RSSI threshold for reporting */
  20355. A_UINT32 min_rssi;
  20356. A_UINT32 max_rssi;
  20357. } wmi_extscan_hotlist_ssid_entry;
  20358. typedef struct {
  20359. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param */
  20360. /** Request ID - to identify command. Cannot be 0 */
  20361. A_UINT32 request_id;
  20362. /** Requestor ID - client requesting hotlist ssid monitoring */
  20363. A_UINT32 requestor_id;
  20364. /** VDEV id(interface) that is requesting scan */
  20365. A_UINT32 vdev_id;
  20366. /** table ID - to allow support for multiple simultaneous tables */
  20367. A_UINT32 table_id;
  20368. /** operation mode: start/stop */
  20369. A_UINT32 mode; /* wmi_extscan_operation_mode */
  20370. /**total number of ssids (in all pages) */
  20371. A_UINT32 total_entries;
  20372. /**index of the first ssid entry found in the TLV wmi_extscan_hotlist_ssid_entry*/
  20373. A_UINT32 first_entry_index;
  20374. /**number of ssids in this page */
  20375. A_UINT32 num_entries_in_page;
  20376. /** number of consecutive scans to confirm loss of an ssid **/
  20377. A_UINT32 lost_ap_scan_count;
  20378. /* Following this structure is the TLV:
  20379. * wmi_extscan_hotlist_ssid_entry hotlist_ssid[]; <-- number of elements given by field num_page_entries.
  20380. */
  20381. } wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param;
  20382. typedef struct {
  20383. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  20384. /** table ID - to allow support for multiple simultaneous tables */
  20385. A_UINT32 table_id;
  20386. /** size in bytes of scan cache entry */
  20387. A_UINT32 scan_cache_entry_size;
  20388. /** maximum number of scan cache entries */
  20389. A_UINT32 max_scan_cache_entries;
  20390. /** maximum number of buckets per extscan request */
  20391. A_UINT32 max_buckets;
  20392. /** maximum number of BSSIDs that will be stored in each scan (best n/w as per RSSI) */
  20393. A_UINT32 max_bssid_per_scan;
  20394. /** table usage level at which indication must be sent to host */
  20395. A_UINT32 max_table_usage_threshold;
  20396. } wmi_extscan_cache_capabilities;
  20397. typedef struct {
  20398. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  20399. /** table ID - to allow support for multiple simultaneous tables */
  20400. A_UINT32 table_id;
  20401. /** size in bytes of wlan change entry */
  20402. A_UINT32 wlan_change_entry_size;
  20403. /** maximum number of entries in wlan change table */
  20404. A_UINT32 max_wlan_change_entries;
  20405. /** number of RSSI samples used for averaging RSSI */
  20406. A_UINT32 max_rssi_averaging_samples;
  20407. /** number of BSSID/RSSI entries (BSSID pointer, RSSI, timestamp) that device can hold */
  20408. A_UINT32 max_rssi_history_entries;
  20409. } wmi_extscan_wlan_change_monitor_capabilities;
  20410. typedef struct {
  20411. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  20412. /** table ID - to allow support for multiple simultaneous tables */
  20413. A_UINT32 table_id;
  20414. /** size in bytes of hotlist entry */
  20415. A_UINT32 wlan_hotlist_entry_size;
  20416. /** maximum number of entries in wlan change table */
  20417. A_UINT32 max_hotlist_entries;
  20418. } wmi_extscan_hotlist_monitor_capabilities;
  20419. typedef struct {
  20420. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_set_capabilities_cmd_fixed_param */
  20421. /** Request ID - matches request ID used to start hot list monitoring */
  20422. A_UINT32 request_id;
  20423. /** Requestor ID - client requesting stop */
  20424. A_UINT32 requestor_id;
  20425. /** number of extscan caches */
  20426. A_UINT32 num_extscan_cache_tables;
  20427. /** number of wlan change lists */
  20428. A_UINT32 num_wlan_change_monitor_tables;
  20429. /** number of hotlists */
  20430. A_UINT32 num_hotlist_monitor_tables;
  20431. /** if one sided rtt data collection is supported */
  20432. A_UINT32 rtt_one_sided_supported;
  20433. /** if 11v data collection is supported */
  20434. A_UINT32 rtt_11v_supported;
  20435. /** if 11mc data collection is supported */
  20436. A_UINT32 rtt_ftm_supported;
  20437. /** number of extscan cache capabilities (one per table) */
  20438. A_UINT32 num_extscan_cache_capabilities;
  20439. /** number of wlan change capabilities (one per table) */
  20440. A_UINT32 num_extscan_wlan_change_capabilities;
  20441. /** number of extscan hotlist capabilities (one per table) */
  20442. A_UINT32 num_extscan_hotlist_capabilities;
  20443. /* Following this structure is the TLV:
  20444. * wmi_extscan_cache_capabilities extscan_cache_capabilities; <-- number of capabilities given by num_extscan_caches
  20445. * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities; <-- number of capabilities given by num_wlan_change_monitor_tables
  20446. * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities; <-- number of capabilities given by num_hotlist_monitor_tables
  20447. */
  20448. } wmi_extscan_set_capabilities_cmd_fixed_param;
  20449. typedef struct {
  20450. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_capabilities_cmd_fixed_param */
  20451. /** Request ID - matches request ID used to start hot list monitoring */
  20452. A_UINT32 request_id;
  20453. /** Requestor ID - client requesting capabilities */
  20454. A_UINT32 requestor_id;
  20455. } wmi_extscan_get_capabilities_cmd_fixed_param;
  20456. typedef struct {
  20457. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param */
  20458. /** Request ID of the operation that was started/stopped */
  20459. A_UINT32 request_id;
  20460. /** Requestor ID of the operation that was started/stopped */
  20461. A_UINT32 requestor_id;
  20462. /** VDEV id(interface) of the operation that was started/stopped */
  20463. A_UINT32 vdev_id;
  20464. /** extscan WMI command */
  20465. A_UINT32 command;
  20466. /** operation mode: start/stop */
  20467. A_UINT32 mode; /* wmi_extscan_operation_mode */
  20468. /**success/failure */
  20469. A_UINT32 status; /* enum wmi_extscan_start_stop_status */
  20470. /** table ID - to allow support for multiple simultaneous requests */
  20471. A_UINT32 table_id;
  20472. } wmi_extscan_start_stop_event_fixed_param;
  20473. typedef struct {
  20474. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param */
  20475. /** Request ID of the extscan operation that is currently running */
  20476. A_UINT32 request_id;
  20477. /** Requestor ID of the extscan operation that is currently running */
  20478. A_UINT32 requestor_id;
  20479. /** VDEV id(interface) of the extscan operation that is currently running */
  20480. A_UINT32 vdev_id;
  20481. /** scan event (wmi_scan_event_type) */
  20482. A_UINT32 event; /* wmi_extscan_event_type */
  20483. /** table ID - to allow support for multiple simultaneous requests */
  20484. A_UINT32 table_id;
  20485. /**number of buckets */
  20486. A_UINT32 num_buckets;
  20487. /* Following this structure is the TLV:
  20488. * A_UINT32 bucket_id[]; <-- number of elements given by field num_buckets.
  20489. */
  20490. } wmi_extscan_operation_event_fixed_param;
  20491. /* Types of extscan tables */
  20492. typedef enum {
  20493. EXTSCAN_TABLE_NONE = 0,
  20494. EXTSCAN_TABLE_BSSID = 1,
  20495. EXTSCAN_TABLE_RSSI = 2,
  20496. } wmi_extscan_table_type;
  20497. typedef struct {
  20498. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param */
  20499. /** Request ID of the extscan operation that is currently running */
  20500. A_UINT32 request_id;
  20501. /** Requestor ID of the extscan operation that is currently running */
  20502. A_UINT32 requestor_id;
  20503. /** VDEV id(interface) of the extscan operation that is currently running */
  20504. A_UINT32 vdev_id;
  20505. /** table ID - to allow support for multiple simultaneous tables */
  20506. A_UINT32 table_id;
  20507. /**see wmi_extscan_table_type for table reporting usage */
  20508. A_UINT32 table_type;
  20509. /**number of entries in use */
  20510. A_UINT32 entries_in_use;
  20511. /**maximum number of entries in table */
  20512. A_UINT32 maximum_entries;
  20513. } wmi_extscan_table_usage_event_fixed_param;
  20514. typedef enum {
  20515. WMI_SCAN_STATUS_INTERRUPTED = 1 /* Indicates scan got interrupted i.e. aborted or pre-empted for a long time (> 1sec)
  20516. this can be used to discard scan results */
  20517. } wmi_scan_status_flags;
  20518. typedef struct {
  20519. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  20520. /** RSSI */
  20521. A_UINT32 rssi;
  20522. /** time stamp in milliseconds */
  20523. A_UINT32 tstamp;
  20524. /** Extscan cycle during which this entry was scanned */
  20525. A_UINT32 scan_cycle_id;
  20526. /** flag to indicate if the given result was obtained as part of interrupted (aborted/large time gap preempted) scan */
  20527. A_UINT32 flags;
  20528. /** Bitmask of buckets (i.e. sets of channels) scanned */
  20529. A_UINT32 buckets_scanned;
  20530. } wmi_extscan_rssi_info;
  20531. typedef struct {
  20532. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  20533. /** bssid */
  20534. wmi_mac_addr bssid;
  20535. /** ssid */
  20536. wmi_ssid ssid;
  20537. /** channel in MHz */
  20538. A_UINT32 channel;
  20539. /** capabilities */
  20540. A_UINT32 capabilities;
  20541. /** beacon interval in TUs */
  20542. A_UINT32 beacon_interval;
  20543. /** time stamp in milliseconds - time last seen */
  20544. A_UINT32 tstamp;
  20545. /** flags - _tExtScanEntryFlags */
  20546. A_UINT32 flags;
  20547. /** RTT in ns */
  20548. A_UINT32 rtt;
  20549. /** rtt standard deviation */
  20550. A_UINT32 rtt_sd;
  20551. /** rssi information */
  20552. A_UINT32 number_rssi_samples;
  20553. /** IE length */
  20554. A_UINT32 ie_length; /* length of IE data */
  20555. } wmi_extscan_wlan_descriptor;
  20556. typedef struct {
  20557. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param */
  20558. /** Request ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  20559. A_UINT32 request_id;
  20560. /** Requestor ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  20561. A_UINT32 requestor_id;
  20562. /** VDEV id(interface) of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  20563. A_UINT32 vdev_id;
  20564. /** Request ID of the extscan operation that is currently running */
  20565. A_UINT32 extscan_request_id;
  20566. /** Requestor ID of the extscan operation that is currently running */
  20567. A_UINT32 extscan_requestor_id;
  20568. /** VDEV id(interface) of the extscan operation that is currently running */
  20569. A_UINT32 extscan_vdev_id;
  20570. /** table ID - to allow support for multiple simultaneous tables */
  20571. A_UINT32 table_id;
  20572. /**current time stamp in seconds. Used to provide a baseline for the relative timestamps returned for each block and entry */
  20573. A_UINT32 current_tstamp;
  20574. /**total number of bssids (in all pages) */
  20575. A_UINT32 total_entries;
  20576. /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  20577. A_UINT32 first_entry_index;
  20578. /**number of bssids in this page */
  20579. A_UINT32 num_entries_in_page;
  20580. /** number of buckets scanned**/
  20581. A_UINT32 buckets_scanned;
  20582. /* Followed by the variable length TLVs
  20583. * wmi_extscan_wlan_descriptor bssid_list[]
  20584. * wmi_extscan_rssi_info rssi_list[]
  20585. * A_UINT8 ie_list[]
  20586. */
  20587. } wmi_extscan_cached_results_event_fixed_param;
  20588. typedef enum {
  20589. EXTSCAN_WLAN_CHANGE_FLAG_NONE = 0x00,
  20590. EXTSCAN_WLAN_CHANGE_FLAG_OUT_OF_RANGE = 0x01,
  20591. EXTSCAN_WLAN_CHANGE_FLAG_AP_LOST = 0x02,
  20592. } wmi_extscan_wlan_change_flags;
  20593. typedef struct {
  20594. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  20595. /**bssid */
  20596. wmi_mac_addr bssid;
  20597. /**time stamp in milliseconds */
  20598. A_UINT32 tstamp;
  20599. /**upper RSSI limit */
  20600. A_UINT32 upper_rssi_limit;
  20601. /**lower RSSI limit */
  20602. A_UINT32 lower_rssi_limit;
  20603. /** channel */
  20604. A_UINT32 channel; /* in MHz */
  20605. /**current RSSI average */
  20606. A_UINT32 rssi_average;
  20607. /**flags - wmi_extscan_wlan_change_flags */
  20608. A_UINT32 flags;
  20609. /**legnth of RSSI history to follow (number of values) */
  20610. A_UINT32 num_rssi_samples;
  20611. } wmi_extscan_wlan_change_result_bssid;
  20612. typedef struct {
  20613. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param */
  20614. /** Request ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  20615. A_UINT32 request_id;
  20616. /** Requestor ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  20617. A_UINT32 requestor_id;
  20618. /** VDEV id(interface) of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  20619. A_UINT32 vdev_id;
  20620. /** Request ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  20621. A_UINT32 config_request_id;
  20622. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  20623. A_UINT32 config_requestor_id;
  20624. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  20625. A_UINT32 config_vdev_id;
  20626. /** table ID - to allow support for multiple simultaneous tables */
  20627. A_UINT32 table_id;
  20628. /**number of entries with RSSI out of range or BSSID not detected */
  20629. A_UINT32 change_count;
  20630. /**total number of bssid signal descriptors (in all pages) */
  20631. A_UINT32 total_entries;
  20632. /**index of the first bssid signal descriptor entry found in the TLV wmi_extscan_wlan_descriptor*/
  20633. A_UINT32 first_entry_index;
  20634. /**number of bssids signal descriptors in this page */
  20635. A_UINT32 num_entries_in_page;
  20636. /* Following this structure is the TLV:
  20637. * wmi_extscan_wlan_change_result_bssid bssid_signal_descriptor_list[];
  20638. * (number of descriptors given by field num_entries_in_page)
  20639. * Following this structure is the list of RSSI values (each is an A_UINT8):
  20640. * A_UINT8 rssi_list[]; <-- last N RSSI values.
  20641. */
  20642. } wmi_extscan_wlan_change_results_event_fixed_param;
  20643. enum _tExtScanEntryFlags
  20644. {
  20645. WMI_HOTLIST_FLAG_NONE = 0x00,
  20646. WMI_HOTLIST_FLAG_PRESENCE = 0x01,
  20647. WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80,
  20648. };
  20649. typedef struct {
  20650. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
  20651. /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  20652. A_UINT32 config_request_id;
  20653. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  20654. A_UINT32 config_requestor_id;
  20655. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  20656. A_UINT32 config_vdev_id;
  20657. /** table ID - to allow support for multiple simultaneous tables */
  20658. A_UINT32 table_id;
  20659. /**total number of bssids (in all pages) */
  20660. A_UINT32 total_entries;
  20661. /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  20662. A_UINT32 first_entry_index;
  20663. /**number of bssids in this page */
  20664. A_UINT32 num_entries_in_page;
  20665. /* Following this structure is the TLV:
  20666. * wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
  20667. */
  20668. } wmi_extscan_hotlist_match_event_fixed_param;
  20669. typedef struct {
  20670. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
  20671. /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  20672. A_UINT32 config_request_id;
  20673. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  20674. A_UINT32 config_requestor_id;
  20675. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  20676. A_UINT32 config_vdev_id;
  20677. /** table ID - to allow support for multiple simultaneous tables */
  20678. A_UINT32 table_id;
  20679. /**total number of ssids (in all pages) */
  20680. A_UINT32 total_entries;
  20681. /**index of the first ssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  20682. A_UINT32 first_entry_index;
  20683. /**number of ssids in this page */
  20684. A_UINT32 num_entries_in_page;
  20685. /* Following this structure is the TLV:
  20686. * wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
  20687. */
  20688. } wmi_extscan_hotlist_ssid_match_event_fixed_param;
  20689. typedef struct {
  20690. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param */
  20691. /** Request ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  20692. A_UINT32 request_id;
  20693. /** Requestor ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  20694. A_UINT32 requestor_id;
  20695. /** VDEV id(interface) of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  20696. A_UINT32 vdev_id;
  20697. /** number of extscan caches */
  20698. A_UINT32 num_extscan_cache_tables;
  20699. /** number of wlan change lists */
  20700. A_UINT32 num_wlan_change_monitor_tables;
  20701. /** number of hotlists */
  20702. A_UINT32 num_hotlist_monitor_tables;
  20703. /** if one sided rtt data collection is supported */
  20704. A_UINT32 rtt_one_sided_supported;
  20705. /** if 11v data collection is supported */
  20706. A_UINT32 rtt_11v_supported;
  20707. /** if 11mc data collection is supported */
  20708. A_UINT32 rtt_ftm_supported;
  20709. /** number of extscan cache capabilities (one per table) */
  20710. A_UINT32 num_extscan_cache_capabilities;
  20711. /** number of wlan change capabilities (one per table) */
  20712. A_UINT32 num_extscan_wlan_change_capabilities;
  20713. /** number of extscan hotlist capabilities (one per table) */
  20714. A_UINT32 num_extscan_hotlist_capabilities;
  20715. /* max number of roaming ssid whitelist firmware can support */
  20716. A_UINT32 num_roam_ssid_whitelist;
  20717. /* max number of blacklist bssid firmware can support */
  20718. A_UINT32 num_roam_bssid_blacklist;
  20719. /* max number of preferred list firmware can support */
  20720. A_UINT32 num_roam_bssid_preferred_list;
  20721. /* max number of hotlist ssids firmware can support */
  20722. A_UINT32 num_extscan_hotlist_ssid;
  20723. /* max number of epno networks firmware can support */
  20724. A_UINT32 num_epno_networks;
  20725. /* Following this structure are the TLVs describing the capabilities of of the various types of lists. The FW theoretically
  20726. * supports multiple lists of each type.
  20727. *
  20728. * wmi_extscan_cache_capabilities extscan_cache_capabilities[] <-- capabilities of extscan cache (BSSID/RSSI lists)
  20729. * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities[] <-- capabilities of wlan_change_monitor_tables
  20730. * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities[] <-- capabilities of hotlist_monitor_tables
  20731. */
  20732. } wmi_extscan_capabilities_event_fixed_param;
  20733. /* WMI_D0_WOW_DISABLE_ACK_EVENTID */
  20734. typedef struct{
  20735. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param */
  20736. A_UINT32 reserved0; /* for future need */
  20737. } wmi_d0_wow_disable_ack_event_fixed_param;
  20738. /** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */
  20739. typedef struct {
  20740. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param */
  20741. /** pdev_id for identifying the MAC
  20742. * See macros starting with WMI_PDEV_ID_ for values.
  20743. */
  20744. A_UINT32 pdev_id;
  20745. } wmi_pdev_resume_event_fixed_param;
  20746. /** value representing all modules */
  20747. #define WMI_DEBUG_LOG_MODULE_ALL 0xffff
  20748. /* param definitions */
  20749. /**
  20750. * Log level for a given module. Value contains both module id and log level.
  20751. * here is the bitmap definition for value.
  20752. * module Id : 16
  20753. * Flags : reserved
  20754. * Level : 8
  20755. * if odule Id is WMI_DEBUG_LOG_MODULE_ALL then log level is applied to all modules (global).
  20756. * WMI_DEBUG_LOG_MIDULE_ALL will overwrites per module level setting.
  20757. */
  20758. #define WMI_DEBUG_LOG_PARAM_LOG_LEVEL 0x1
  20759. #define WMI_DBGLOG_SET_LOG_LEVEL(val,lvl) do { \
  20760. (val) |= (lvl & 0xff); \
  20761. } while (0)
  20762. #define WMI_DBGLOG_GET_LOG_LEVEL(val) ((val) & 0xff)
  20763. #define WMI_DBGLOG_SET_MODULE_ID(val,mid) do { \
  20764. (val) |= ((mid & 0xffff) << 16); \
  20765. } while (0)
  20766. #define WMI_DBGLOG_GET_MODULE_ID(val) (((val) >> 16) & 0xffff)
  20767. /**
  20768. * Enable the debug log for a given vdev. Value is vdev id
  20769. */
  20770. #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE 0x2
  20771. /**
  20772. * Disable the debug log for a given vdev. Value is vdev id
  20773. * All the log level for a given VDEV is disabled except the ERROR log messages
  20774. */
  20775. #define WMI_DEBUG_LOG_PARAM_VDEV_DISABLE 0x3
  20776. /**
  20777. * set vdev enable bitmap. value is the vden enable bitmap
  20778. */
  20779. #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP 0x4
  20780. /**
  20781. * set a given log level to all the modules specified in the module bitmap.
  20782. * and set the log levle for all other modules to DBGLOG_ERR.
  20783. * value: log levelt to be set.
  20784. * module_id_bitmap : identifies the modules for which the log level should be set and
  20785. * modules for which the log level should be reset to DBGLOG_ERR.
  20786. */
  20787. #define WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP 0x5
  20788. /**
  20789. * Wow mode specific logging enablement
  20790. * Wow mode module_id_bitmap : identifies the modules for which the log level
  20791. * should be set in WOW and modules for which the log level
  20792. * should be reset to DBGLOG_MAX_LVL.
  20793. */
  20794. #define WMI_DEBUG_LOG_PARAM_WOW_MOD_ENABLE_BITMAP 0x6
  20795. #define NUM_MODULES_PER_ENTRY ((sizeof(A_UINT32)) << 3)
  20796. #define WMI_MODULE_ENABLE(pmid_bitmap,mod_id) \
  20797. ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] |= \
  20798. (1 << ((mod_id)%NUM_MODULES_PER_ENTRY)))
  20799. #define WMI_MODULE_DISABLE(pmid_bitmap,mod_id) \
  20800. ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &= \
  20801. (~(1 << ((mod_id)%NUM_MODULES_PER_ENTRY))))
  20802. #define WMI_MODULE_IS_ENABLED(pmid_bitmap,mod_id) \
  20803. (((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] & \
  20804. (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) != 0)
  20805. #define MAX_MODULE_ID_BITMAP_WORDS 16 /* 16*32=512 module ids. should be more than sufficient */
  20806. typedef struct {
  20807. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_log_config_cmd_fixed_param */
  20808. A_UINT32 dbg_log_param; /** param types are defined above */
  20809. A_UINT32 value;
  20810. /* The below array will follow this tlv ->fixed length module_id_bitmap[]
  20811. A_UINT32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS];
  20812. */
  20813. } wmi_debug_log_config_cmd_fixed_param;
  20814. typedef struct {
  20815. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param */
  20816. A_UINT32 param; /* Reserved for future use */
  20817. /** pdev_id for identifying the MAC
  20818. * See macros starting with WMI_PDEV_ID_ for values.
  20819. */
  20820. A_UINT32 pdev_id;
  20821. } wmi_pdev_get_temperature_cmd_fixed_param;
  20822. typedef struct {
  20823. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_temperature_event_fixed_param */
  20824. A_INT32 value; /* temprature value in Celcius degree */
  20825. /** pdev_id for identifying the MAC
  20826. * See macros starting with WMI_PDEV_ID_ for values.
  20827. */
  20828. A_UINT32 pdev_id;
  20829. } wmi_pdev_temperature_event_fixed_param;
  20830. typedef enum {
  20831. ANTDIV_HW_CFG_STATUS,
  20832. ANTDIV_SW_CFG_STATUS,
  20833. ANTDIV_MAX_STATUS_TYPE_NUM
  20834. } ANTDIV_STATUS_TYPE;
  20835. typedef struct {
  20836. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_antdiv_status_cmd_fixed_param */
  20837. A_UINT32 status_event_id; /* Status event ID - see ANTDIV_STATUS_TYPE */
  20838. /** pdev_id for identifying the MAC
  20839. * See macros starting with WMI_PDEV_ID_ for values.
  20840. */
  20841. A_UINT32 pdev_id;
  20842. } wmi_pdev_get_antdiv_status_cmd_fixed_param;
  20843. typedef struct {
  20844. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_antdiv_status_event_fixed_param */
  20845. A_UINT32 support; /* ANT DIV feature enabled or not */
  20846. A_UINT32 chain_num; /* how many chain supported */
  20847. A_UINT32 ant_num; /* how many ANT supported, 32 max */
  20848. /*
  20849. * Each entry is for a tx/rx chain, and contains a bitmap identifying
  20850. * the antennas attached to that tx/rx chain.
  20851. */
  20852. A_UINT32 selectable_ant_mask[8];
  20853. /** pdev_id for identifying the MAC
  20854. * See macros starting with WMI_PDEV_ID_ for values.
  20855. */
  20856. A_UINT32 pdev_id;
  20857. } wmi_pdev_antdiv_status_event_fixed_param;
  20858. typedef struct {
  20859. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param */
  20860. A_UINT32 vdev_id;
  20861. A_UINT32 enable;
  20862. A_UINT32 srv_ipv4; /* server IP */
  20863. A_UINT32 start_lsb; /* starting address assigned to client */
  20864. A_UINT32 num_client; /* number of clients we support */
  20865. } wmi_set_dhcp_server_offload_cmd_fixed_param;
  20866. typedef enum {
  20867. AP_RX_DATA_OFFLOAD = 0x00,
  20868. STA_RX_DATA_OFFLOAD = 0x01,
  20869. } wmi_ipa_offload_types;
  20870. /**
  20871. * This command is sent from WLAN host driver to firmware for
  20872. * enabling/disabling IPA data-path offload features.
  20873. *
  20874. *
  20875. * Enabling data path offload to IPA(based on host INI configuration), example:
  20876. * when STA interface comes up,
  20877. * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
  20878. * (enable = 1, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
  20879. *
  20880. * Disabling data path offload to IPA, example:
  20881. * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
  20882. * (enable = 0, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
  20883. *
  20884. *
  20885. * This command is applicable only on the PCIE LL systems
  20886. *
  20887. */
  20888. typedef struct {
  20889. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_offload_enable_disable_cmd_fixed_param */
  20890. A_UINT32 offload_type; /* wmi_ipa_offload_types enum values */
  20891. A_UINT32 vdev_id;
  20892. A_UINT32 enable; /* 1 == enable, 0 == disable */
  20893. } wmi_ipa_offload_enable_disable_cmd_fixed_param;
  20894. typedef enum {
  20895. WMI_LED_FLASHING_PATTERN_NOT_CONNECTED = 0,
  20896. WMI_LED_FLASHING_PATTERN_CONNECTED = 1,
  20897. WMI_LED_FLASHING_PATTERN_RESERVED = 2,
  20898. } wmi_set_led_flashing_type;
  20899. /**
  20900. 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.
  20901. Each 32 bit value consists of 4 bytes, where each byte defines the number of 50ms intervals that the GPIO will
  20902. remain at a predetermined state. The 64 bit value provides 8 unique GPIO timing intervals. The pattern starts
  20903. 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
  20904. pattern returns to the MSB of X_0 and repeats. The GPIO state for each timing interval alternates from Low to
  20905. High and the first interval of the pattern represents the time when the GPIO is Low. When a timing interval of
  20906. Zero is reached, it is skipped and moves on to the next interval.
  20907. */
  20908. typedef struct{
  20909. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_led_flashing_cmd_fixed_param */
  20910. A_UINT32 pattern_id; /* pattern identifier */
  20911. A_UINT32 led_x0; /* led flashing parameter0 */
  20912. A_UINT32 led_x1; /* led flashing parameter1 */
  20913. A_UINT32 gpio_num; /* GPIO number */
  20914. } wmi_set_led_flashing_cmd_fixed_param;
  20915. /**
  20916. * The purpose of the multicast Domain Name System (mDNS) is to resolve host names to IP addresses
  20917. * within small networks that do not include a local name server.
  20918. * It utilizes essentially the same programming interfaces, packet formats and operating semantics
  20919. * as the unicast DNS, and the advantage is zero configuration service while no need for central or
  20920. * global server.
  20921. * Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover a named list of services
  20922. * by type in a specified domain using standard DNS queries.
  20923. * Here, we provide the ability to advertise the available services by responding to mDNS queries.
  20924. */
  20925. typedef struct {
  20926. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_offload_cmd_fixed_param */
  20927. A_UINT32 vdev_id;
  20928. A_UINT32 enable;
  20929. } wmi_mdns_offload_cmd_fixed_param;
  20930. #define WMI_MAX_MDNS_FQDN_LEN 64
  20931. #define WMI_MAX_MDNS_RESP_LEN 512
  20932. #define WMI_MDNS_FQDN_TYPE_GENERAL 0
  20933. #define WMI_MDNS_FQDN_TYPE_UNIQUE 1
  20934. typedef struct {
  20935. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_fqdn_cmd_fixed_param */
  20936. A_UINT32 vdev_id;
  20937. /** type of fqdn, general or unique */
  20938. A_UINT32 type;
  20939. /** length of fqdn */
  20940. A_UINT32 fqdn_len;
  20941. /* Following this structure is the TLV byte stream of fqdn data of length fqdn_len
  20942. * A_UINT8 fqdn_data[]; <-- fully-qualified domain name to check if match with the received queries
  20943. */
  20944. } wmi_mdns_set_fqdn_cmd_fixed_param;
  20945. typedef struct {
  20946. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param */
  20947. A_UINT32 vdev_id;
  20948. /** Answer Resource Record count */
  20949. A_UINT32 AR_count;
  20950. /** length of response */
  20951. A_UINT32 resp_len;
  20952. /* Following this structure is the TLV byte stream of resp data of length resp_len
  20953. * A_UINT8 resp_data[]; <-- responses consisits of Resource Records
  20954. */
  20955. } wmi_mdns_set_resp_cmd_fixed_param;
  20956. typedef struct {
  20957. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_staIP_cmd_fixed_param */
  20958. A_UINT32 vdev_id;
  20959. A_UINT32 staIP; /* IPv4 address for STA mode */
  20960. } wmi_mdns_set_staIP_cmd_fixed_param;
  20961. typedef struct {
  20962. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param */
  20963. A_UINT32 vdev_id;
  20964. } wmi_mdns_get_stats_cmd_fixed_param;
  20965. typedef struct {
  20966. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param */
  20967. A_UINT32 vdev_id;
  20968. /** curTimestamp in milliseconds */
  20969. A_UINT32 curTimestamp;
  20970. /** last received Query in milliseconds */
  20971. A_UINT32 lastQueryTimestamp;
  20972. /** last sent Response in milliseconds */
  20973. A_UINT32 lastResponseTimestamp;
  20974. /** stats of received queries */
  20975. A_UINT32 totalQueries;
  20976. /** stats of macth queries */
  20977. A_UINT32 totalMatches;
  20978. /** stats of responses */
  20979. A_UINT32 totalResponses;
  20980. /** indicate the current status of mDNS offload */
  20981. A_UINT32 status;
  20982. } wmi_mdns_stats_event_fixed_param;
  20983. /**
  20984. * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process
  20985. * down to the firmware. When this feature is enabled, firmware can process the association/disassociation
  20986. * request and create/remove connection even host is suspended.
  20987. * 3 major components are offloaded:
  20988. * 1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response.
  20989. * 2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4.
  20990. * 3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK.
  20991. * Current implementation only supports WPA2 CCMP.
  20992. */
  20993. typedef struct {
  20994. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */
  20995. /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */
  20996. A_UINT32 vdev_id;
  20997. /** enable/disable sap auth offload */
  20998. A_UINT32 enable;
  20999. /** sap ssid */
  21000. wmi_ssid ap_ssid;
  21001. /** authentication mode (defined above) */
  21002. A_UINT32 rsn_authmode;
  21003. /** unicast cipher set */
  21004. A_UINT32 rsn_ucastcipherset;
  21005. /** mcast/group cipher set */
  21006. A_UINT32 rsn_mcastcipherset;
  21007. /** mcast/group management frames cipher set */
  21008. A_UINT32 rsn_mcastmgmtcipherset;
  21009. /** sap channel */
  21010. A_UINT32 channel;
  21011. /** length of psk */
  21012. A_UINT32 psk_len;
  21013. /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len
  21014. * A_UINT8 psk[];
  21015. */
  21016. } wmi_sap_ofl_enable_cmd_fixed_param;
  21017. typedef struct {
  21018. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */
  21019. /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */
  21020. A_UINT32 vdev_id;
  21021. /** aid (association id) of this station */
  21022. A_UINT32 assoc_id;
  21023. /** peer station's mac addr */
  21024. wmi_mac_addr peer_macaddr;
  21025. /** length of association request frame */
  21026. A_UINT32 data_len;
  21027. /* Following this structure is the TLV byte stream of a whole association request frame of length data_len
  21028. * A_UINT8 bufp[];
  21029. */
  21030. } wmi_sap_ofl_add_sta_event_fixed_param;
  21031. typedef enum {
  21032. SAP_OFL_DEL_STA_FLAG_NONE = 0x00,
  21033. SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01,
  21034. } wmi_sap_ofl_del_sta_flags;
  21035. typedef struct {
  21036. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */
  21037. /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */
  21038. A_UINT32 vdev_id;
  21039. /** aid (association id) of this station */
  21040. A_UINT32 assoc_id;
  21041. /** peer station's mac addr */
  21042. wmi_mac_addr peer_macaddr;
  21043. /** disassociation reason */
  21044. A_UINT32 reason;
  21045. /** flags - wmi_sap_ofl_del_sta_flags */
  21046. A_UINT32 flags;
  21047. } wmi_sap_ofl_del_sta_event_fixed_param;
  21048. typedef struct {
  21049. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_set_blacklist_param_cmd_fixed_param */
  21050. A_UINT32 vdev_id;
  21051. /* Number of client failure connection attempt */
  21052. A_UINT32 num_retry;
  21053. /* Time in milliseconds to record the client's failure connection attempts */
  21054. A_UINT32 retry_allow_time_ms;
  21055. /* Time in milliseconds to drop the connection request if client is blacklisted */
  21056. A_UINT32 blackout_time_ms;
  21057. } wmi_sap_set_blacklist_param_cmd_fixed_param;
  21058. typedef struct {
  21059. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */
  21060. A_UINT32 data_len; /** length in byte of data[]. */
  21061. /** This structure is used to send REQ binary blobs
  21062. * from application/service to firmware where Host drv is pass through .
  21063. * Following this structure is the TLV:
  21064. * A_UINT8 data[]; <-- length in byte given by field data_len.
  21065. */
  21066. } wmi_apfind_cmd_param;
  21067. typedef enum apfind_event_type_e {
  21068. APFIND_MATCH_EVENT = 0,
  21069. APFIND_WAKEUP_EVENT,
  21070. } APFIND_EVENT_TYPE;
  21071. typedef struct {
  21072. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */
  21073. A_UINT32 event_type; /** APFIND_EVENT_TYPE */
  21074. A_UINT32 data_len; /** length in byte of data[]. */
  21075. /** This structure is used to send event binary blobs
  21076. * from firmware to application/service and Host drv.
  21077. * Following this structure is the TLV:
  21078. * A_UINT8 data[]; <-- length in byte given by field data_len.
  21079. */
  21080. } wmi_apfind_event_hdr;
  21081. /* SAP obss detection offload types */
  21082. typedef enum {
  21083. WMI_SAP_OBSS_DETECTION_MODE_DISABLED = 0, /* fw to disable the detection */
  21084. WMI_SAP_OBSS_DETECTION_MODE_PRESENT_NOTIFY = 1, /* if the matching beacon is present, notify host immediately */
  21085. WMI_SAP_OBSS_DETECTION_MODE_ABSENT_TIMEOUT_NOTIFY = 2,/* if the matching beacon is absent for the timeout period, notify host */
  21086. } WMI_SAP_OBSS_DETECTION_MODE;
  21087. typedef struct wmi_sap_obss_detection_cfg_cmd_s {
  21088. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_sap_obss_detection_cfg_cmd_fixed_param */
  21089. A_UINT32 vdev_id;
  21090. A_UINT32 detect_period_ms;
  21091. /* detect whether there is 11b ap/ibss */
  21092. A_UINT32 b_ap_detect_mode; /* refer WMI_SAP_OBSS_DETECTION_MODE */
  21093. /* detect whether there is 11b sta connected with other APs */
  21094. A_UINT32 b_sta_detect_mode;
  21095. /* detect whether there is 11g AP */
  21096. A_UINT32 g_ap_detect_mode;
  21097. /* detect whether there is legacy 11a traffic */
  21098. A_UINT32 a_detect_mode;
  21099. /* detect whether there is ap which is ht legacy mode */
  21100. A_UINT32 ht_legacy_detect_mode;
  21101. /* detect whether there is ap which is ht mixed mode : has 11b/11g sta */
  21102. A_UINT32 ht_mixed_detect_mode;
  21103. /* detect whether there is ap which has 20M only station */
  21104. A_UINT32 ht_20mhz_detect_mode;
  21105. } wmi_sap_obss_detection_cfg_cmd_fixed_param;
  21106. typedef enum {
  21107. WMI_SAP_OBSS_DETECTION_EVENT_REASON_NOT_SUPPORT = 0,
  21108. WMI_SAP_OBSS_DETECTION_EVENT_REASON_PRESENT_NOTIFY,
  21109. WMI_SAP_OBSS_DETECTION_EVENT_REASON_ABSENT_TIMEOUT,
  21110. } WMI_SAP_OBSS_DETECTION_EVENT_REASON;
  21111. /* WMI_SAP_OBSS_DETECTION_MATCH_MASK is one or more of the following shift bits */
  21112. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11B_AP_S 0
  21113. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11B_STA_S 1
  21114. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11G_AP_S 2
  21115. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11A_S 3
  21116. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_LEGACY_S 4
  21117. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_MIXED_S 5
  21118. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_20MHZ_S 6
  21119. typedef struct wmi_sap_obss_detection_info_evt_s {
  21120. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_sap_obss_detection_info_evt_fixed_param */
  21121. A_UINT32 vdev_id;
  21122. A_UINT32 reason; /* refer WMI_SAP_OBSS_DETECTION_EVENT_REASON */
  21123. A_UINT32 matched_detection_masks; /* bit(s) from WMI_SAP_OBSS_DETECTION_MATCH_MASK */
  21124. wmi_mac_addr matched_bssid_addr; /* valid when reason is WMI_SAP_OBSS_DETECTION_EVENT_REASON_PRESENT_NOTIFY */
  21125. } wmi_sap_obss_detection_info_evt_fixed_param;
  21126. /** WMI command to enable STA FW handle bss color change notification from AP */
  21127. typedef struct {
  21128. A_UINT32 tlv_header; /* tag equals WMITLV_TAG_STRUC_wmi_bss_color_change_enable_fixed_param */
  21129. A_UINT32 vdev_id;
  21130. A_UINT32 enable;
  21131. } wmi_bss_color_change_enable_fixed_param;
  21132. typedef enum {
  21133. WMI_BSS_COLOR_COLLISION_DISABLE = 0,
  21134. WMI_BSS_COLOR_COLLISION_DETECTION,
  21135. WMI_BSS_COLOR_FREE_SLOT_TIMER_EXPIRY,
  21136. WMI_BSS_COLOR_FREE_SLOT_AVAILABLE,
  21137. } WMI_BSS_COLOR_COLLISION_EVT_TYPE;
  21138. /** Command to enable OBSS Color collision detection for both STA and AP mode */
  21139. typedef struct {
  21140. A_UINT32 tlv_header; /* tag equals WMITLV_TAG_STRUC_wmi_obss_color_collision_det_config_fixed_param */
  21141. A_UINT32 vdev_id;
  21142. A_UINT32 flags; /* proposed for future use cases */
  21143. A_UINT32 evt_type; /* WMI_BSS_COLOR_COLLISION_EVT_TYPE */
  21144. A_UINT32 current_bss_color;
  21145. A_UINT32 detection_period_ms; /* scan interval for both AP and STA mode */
  21146. A_UINT32 scan_period_ms; /* scan period for passive scan to detect collision */
  21147. A_UINT32 free_slot_expiry_time_ms; /* FW to notify host at timer expiry after which Host disables bss color */
  21148. } wmi_obss_color_collision_det_config_fixed_param;
  21149. /** WMI event to notify host on OBSS Color collision detection, free slot available for AP mode */
  21150. typedef struct {
  21151. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_obss_color_collision_evt_fixed_param */
  21152. A_UINT32 vdev_id;
  21153. A_UINT32 evt_type; /* WMI_BSS_COLOR_COLLISION_EVT_TYPE */
  21154. A_UINT32 bss_color_bitmap_bit0to31; /* Bit set indicating BSS color present */
  21155. A_UINT32 bss_color_bitmap_bit32to63; /* Bit set indicating BSS color present */
  21156. } wmi_obss_color_collision_evt_fixed_param;
  21157. /*
  21158. * WMI event to notify host if latency_flags/latency_level got changed
  21159. * or if latency got enabled/disabled.
  21160. * When latency disable is received in the beacon vendor IE and wlm
  21161. * parameters are restored, latency_enable will be zero.
  21162. * latency level and latency flags will be those of wlm params.
  21163. * Lay out of latency flags is as follows. The field is same as flags
  21164. * in wmi_wlm_config_cmd_fixed_param.
  21165. *
  21166. * |31 19| 18 | 17|16 14| 13 | 12| 11 | 10 | 9 | 8 |7 6|5 4|3 2| 1 | 0 |
  21167. * +-----+-----+---+-----+----+---+----+----+-----+----+----+----+----+---+---+
  21168. * | RSVD|SRATE|RTS| NSS |EDCA|TRY|SSLP|CSLP|DBMPS|RSVD|Roam|RSVD|DWLT|DFS|SUP|
  21169. * +------------------------------+---------------+---------+-----------------+
  21170. * | WAL | PS | Roam | Scan |
  21171. */
  21172. typedef struct {
  21173. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_bcn_latency_fixed_param */
  21174. A_UINT32 vdev_id;
  21175. A_UINT32 latency_enable;
  21176. A_UINT32 latency_level;
  21177. A_UINT32 latency_flags;
  21178. } wmi_vdev_bcn_latency_fixed_param;
  21179. /**
  21180. * OCB DCC types and structures.
  21181. */
  21182. /**
  21183. * DCC types as described in ETSI TS 102 687
  21184. * Type Format stepSize referenceValue numBits
  21185. * -------------------------------------------------------------------------
  21186. * ndlType_acPrio INTEGER (0...7) 1 number 3
  21187. * ndlType_controlLoop INTEGER (0...7) 1 0 3
  21188. * ndlType_arrivalRate INTEGER (0..8191) 0.01 /s 0 13
  21189. * ndlType_channelLoad INTEGER (0..1000) 0.1 % 0 % 10
  21190. * ndlType_channelUse INTEGER (0..8000) 0.0125 % 0 % 13
  21191. * ndlType_datarate INTEGER (0..7) Table 8 3
  21192. * ndlType_distance INTEGER (0..4095) 1 m 0 12
  21193. * ndlType_numberElements INTEGER (0..63) number 6
  21194. * ndlType_packetDuration INTEGER (0..2047) TSYM 0 11
  21195. * ndlType_packetInterval INTEGER (0..1023) 10 ms 0 10
  21196. * ndlType_pathloss INTEGER (0..31) 0.1 1.0 5
  21197. * ndlType_rxPower INTEGER (0..127) -0.5 dB -40 dBm 7
  21198. * ndlType_snr INTEGER (0..127) 0.5 dB -10 dB 7
  21199. * ndlType_timing INTEGER (0..4095) 10 ms 0 12
  21200. * ndlType_txPower INTEGER (0..127) 0.5 dB -20 dBm 7
  21201. * ndlType_ratio INTEGER (0..100) 1 % 0 % 7
  21202. * ndlType_exponent INTEGER (0..100) 0.1 0 7
  21203. * ndlType_queueStatus Enumeration Table A.2 1
  21204. * ndlType_dccMechanism Bitset Table A.2 6
  21205. *
  21206. * NOTE: All of following size macros (SIZE_NDLTYPE_ACPRIO through SIZE_BYTE)
  21207. * cannot be changed without breaking WMI compatibility.
  21208. *
  21209. * NOTE: For each of the types, one additional bit is allocated. This
  21210. * leftmost bit is used to indicate that the value is invalid. */
  21211. #define SIZE_NDLTYPE_ACPRIO (1 + 3)
  21212. #define SIZE_NDLTYPE_CONTROLLOOP (1 + 3)
  21213. #define SIZE_NDLTYPE_ARRIVALRATE (1 + 13)
  21214. #define SIZE_NDLTYPE_CHANNELLOAD (1 + 10)
  21215. #define SIZE_NDLTYPE_CHANNELUSE (1 + 13)
  21216. #define SIZE_NDLTYPE_DATARATE (1 + 3)
  21217. #define SIZE_NDLTYPE_DISTANCE (1 + 12)
  21218. #define SIZE_NDLTYPE_NUMBERELEMENTS (1 + 6)
  21219. #define SIZE_NDLTYPE_PACKETDURATION (1 + 11)
  21220. #define SIZE_NDLTYPE_PACKETINTERVAL (1 + 10)
  21221. #define SIZE_NDLTYPE_PATHLOSS (1 + 5)
  21222. #define SIZE_NDLTYPE_RXPOWER (1 + 7)
  21223. #define SIZE_NDLTYPE_SNR (1 + 7)
  21224. #define SIZE_NDLTYPE_TIMING (1 + 12)
  21225. #define SIZE_NDLTYPE_TXPOWER (1 + 7)
  21226. #define SIZE_NDLTYPE_RATIO (1 + 7)
  21227. #define SIZE_NDLTYPE_EXPONENT (1 + 7)
  21228. #define SIZE_NDLTYPE_QUEUESTATUS (1 + 1)
  21229. #define SIZE_NDLTYPE_DCCMECHANISM (1 + 6)
  21230. #define SIZE_BYTE (8)
  21231. #define INVALID_ACPRIO ((1 << SIZE_NDLTYPE_ACPRIO) - 1)
  21232. #define INVALID_CONTROLLOOP ((1 << SIZE_NDLTYPE_CONTROLLOOP) - 1)
  21233. #define INVALID_ARRIVALRATE ((1 << SIZE_NDLTYPE_ARRIVALRATE) - 1)
  21234. #define INVALID_CHANNELLOAD ((1 << SIZE_NDLTYPE_CHANNELLOAD) - 1)
  21235. #define INVALID_CHANNELUSE ((1 << SIZE_NDLTYPE_CHANNELUSE) - 1)
  21236. #define INVALID_DATARATE ((1 << SIZE_NDLTYPE_DATARATE) - 1)
  21237. #define INVALID_DISTANCE ((1 << SIZE_NDLTYPE_DISTANCE) - 1)
  21238. #define INVALID_NUMBERELEMENTS ((1 << SIZE_NDLTYPE_NUMBERELEMENTS) - 1)
  21239. #define INVALID_PACKETDURATION ((1 << SIZE_NDLTYPE_PACKETDURATION) - 1)
  21240. #define INVALID_PACKETINTERVAL ((1 << SIZE_NDLTYPE_PACKETINTERVAL) - 1)
  21241. #define INVALID_PATHLOSS ((1 << SIZE_NDLTYPE_PATHLOSS) - 1)
  21242. #define INVALID_RXPOWER ((1 << SIZE_NDLTYPE_RXPOWER) - 1)
  21243. #define INVALID_SNR ((1 << SIZE_NDLTYPE_SNR) - 1)
  21244. #define INVALID_TIMING ((1 << SIZE_NDLTYPE_TIMING) - 1)
  21245. #define INVALID_TXPOWER ((1 << SIZE_NDLTYPE_TXPOWER) - 1)
  21246. #define INVALID_RATIO ((1 << SIZE_NDLTYPE_RATIO) - 1)
  21247. #define INVALID_EXPONENT ((1 << SIZE_NDLTYPE_EXPONENT) - 1)
  21248. #define INVALID_QUEUESTATS ((1 << SIZE_NDLTYPE_QUEUESTATUS) - 1)
  21249. #define INVALID_DCCMECHANISM ((1 << SIZE_NDLTYPE_DCCMECHANISM) - 1)
  21250. /** The MCS_COUNT macro cannot be modified without breaking
  21251. * WMI compatibility. */
  21252. #define MCS_COUNT (8)
  21253. /** Flags for ndlType_dccMechanism. */
  21254. typedef enum {
  21255. DCC_MECHANISM_TPC = 1,
  21256. DCC_MECHANISM_TRC = 2,
  21257. DCC_MECHANISM_TDC = 4,
  21258. DCC_MECHANISM_DSC = 8,
  21259. DCC_MECHANISM_TAC = 16,
  21260. DCC_MECHANISM_RESERVED = 32,
  21261. DCC_MECHANISM_ALL = 0x3f,
  21262. } wmi_dcc_ndl_type_dcc_mechanism;
  21263. /** Values for ndlType_queueStatus. */
  21264. typedef enum {
  21265. DCC_QUEUE_CLOSED = 0,
  21266. DCC_QUEUE_OPEN = 1,
  21267. } wmi_dcc_ndl_type_queue_status;
  21268. /** For ndlType_acPrio, use the values in wmi_traffic_ac. */
  21269. /** Values for ndlType_datarate */
  21270. typedef enum {
  21271. DCC_DATARATE_3_MBPS = 0,
  21272. DCC_DATARATE_4_5_MBPS = 1,
  21273. DCC_DATARATE_6_MBPS = 2,
  21274. DCC_DATARATE_9_MBPS = 3,
  21275. DCC_DATARATE_12_MBPS = 4,
  21276. DCC_DATARATE_18_MBPS = 5,
  21277. DCC_DATARATE_24_MBPS = 6,
  21278. DCC_DATARATE_27_MBPS = 7,
  21279. } wmi_dcc_ndl_type_datarate;
  21280. /** Data structure for active state configuration. */
  21281. typedef struct {
  21282. /** TLV tag and len; tag equals
  21283. * WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config */
  21284. A_UINT32 tlv_header;
  21285. /**
  21286. * NDL_asStateId, ndlType_numberElements, 1+6 bits.
  21287. * NDL_asChanLoad, ndlType_channelLoad, 1+10 bits.
  21288. */
  21289. A_UINT32 state_info;
  21290. /**
  21291. * NDL_asDcc(AC_BK), ndlType_dccMechanism, 1+6 bits.
  21292. * NDL_asDcc(AC_BE), ndlType_dccMechanism, 1+6 bits.
  21293. * NDL_asDcc(AC_VI), ndlType_dccMechanism, 1+6 bits.
  21294. * NDL_asDcc(AC_VO), ndlType_dccMechanism, 1+6 bits.
  21295. */
  21296. A_UINT32 as_dcc[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DCCMECHANISM)];
  21297. /**
  21298. * NDL_asTxPower(AC_BK), ndlType_txPower, 1+7 bits.
  21299. * NDL_asTxPower(AC_BE), ndlType_txPower, 1+7 bits.
  21300. * NDL_asTxPower(AC_VI), ndlType_txPower, 1+7 bits.
  21301. * NDL_asTxPower(AC_VO), ndlType_txPower, 1+7 bits.
  21302. */
  21303. A_UINT32 as_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  21304. /**
  21305. * NDL_asPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
  21306. * NDL_asPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
  21307. * NDL_asPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
  21308. * NDL_asPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
  21309. */
  21310. A_UINT32 as_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
  21311. /**
  21312. * NDL_asDatarate(AC_BK), ndlType_datarate, 1+3 bits.
  21313. * NDL_asDatarate(AC_BE), ndlType_datarate, 1+3 bits.
  21314. * NDL_asDatarate(AC_VI), ndlType_datarate, 1+3 bits.
  21315. * NDL_asDatarate(AC_VO), ndlType_datarate, 1+3 bits.
  21316. */
  21317. A_UINT32 as_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
  21318. /**
  21319. * NDL_asCarrierSense(AC_BK), ndlType_rxPower, 1+7 bits.
  21320. * NDL_asCarrierSense(AC_BE), ndlType_rxPower, 1+7 bits.
  21321. * NDL_asCarrierSense(AC_VI), ndlType_rxPower, 1+7 bits.
  21322. * NDL_asCarrierSense(AC_VO), ndlType_rxPower, 1+7 bits.
  21323. */
  21324. A_UINT32 as_carrier_sense_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_RXPOWER)];
  21325. } wmi_dcc_ndl_active_state_config;
  21326. #define WMI_NDL_AS_STATE_ID_GET(ptr) WMI_GET_BITS((ptr)->state_info, 0, 7)
  21327. #define WMI_NDL_AS_STATE_ID_SET(ptr,val) WMI_SET_BITS((ptr)->state_info, 0, 7, val)
  21328. #define WMI_NDL_AS_CHAN_LOAD_GET(ptr) WMI_GET_BITS((ptr)->state_info, 7, 11)
  21329. #define WMI_NDL_AS_CHAN_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->state_info, 7, 11, val)
  21330. #define WMI_NDL_AS_DCC_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM)
  21331. #define WMI_NDL_AS_DCC_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM, val)
  21332. #define WMI_NDL_AS_TX_POWER_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  21333. #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)
  21334. #define WMI_NDL_AS_PACKET_INTERVAL_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
  21335. #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)
  21336. #define WMI_NDL_AS_DATARATE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
  21337. #define WMI_NDL_AS_DATARATE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
  21338. #define WMI_NDL_AS_CARRIER_SENSE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER)
  21339. #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)
  21340. /** Data structure for EDCA/QOS parameters. */
  21341. typedef struct
  21342. {
  21343. /** TLV tag and len; tag equals
  21344. * WMITLV_TAG_STRUC_wmi_qos_parameter */
  21345. A_UINT32 tlv_header;
  21346. /** Arbitration Inter-Frame Spacing. Range: 2-15 */
  21347. A_UINT32 aifsn;
  21348. /** Contention Window minimum. Range: 1 - 10 */
  21349. A_UINT32 cwmin;
  21350. /** Contention Window maximum. Range: 1 - 10 */
  21351. A_UINT32 cwmax;
  21352. } wmi_qos_parameter;
  21353. /** Data structure for information specific to a channel. */
  21354. typedef struct {
  21355. /** TLV tag and len; tag equals
  21356. * WMITLV_TAG_STRUC_wmi_ocb_channel */
  21357. A_UINT32 tlv_header;
  21358. A_UINT32 bandwidth; /* MHz units */
  21359. wmi_mac_addr mac_address;
  21360. } wmi_ocb_channel;
  21361. /** Data structure for an element of the schedule array. */
  21362. typedef struct {
  21363. /** TLV tag and len; tag equals
  21364. * WMITLV_TAG_STRUC_wmi_ocb_schedule_element */
  21365. A_UINT32 tlv_header;
  21366. A_UINT32 channel_freq; /* MHz units */
  21367. A_UINT32 total_duration; /* ms units */
  21368. A_UINT32 guard_interval; /* ms units */
  21369. } wmi_ocb_schedule_element;
  21370. /** Data structure for OCB configuration. */
  21371. typedef struct {
  21372. /** TLV tag and len; tag equals
  21373. * WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param */
  21374. A_UINT32 tlv_header;
  21375. /** VDEV id(interface) that is being configured */
  21376. A_UINT32 vdev_id;
  21377. A_UINT32 channel_count;
  21378. A_UINT32 schedule_size;
  21379. A_UINT32 flags;
  21380. A_UINT32 ta_max_duration; /* Max duration of continuing multichannel operation without receiving a TA frame (units = seconds) */
  21381. /** This is followed by a TLV array of wmi_channel. */
  21382. /** This is followed by a TLV array of wmi_ocb_channel. */
  21383. /** This is followed by a TLV array of wmi_qos_parameter. */
  21384. /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
  21385. /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
  21386. /** This is followed by a TLV array of wmi_ocb_schedule_element. */
  21387. } wmi_ocb_set_config_cmd_fixed_param;
  21388. #define EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET 0
  21389. #define EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK 1
  21390. #define WMI_OCB_EXPIRY_TIME_IN_TSF(ptr) (((ptr)->flags & EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK) >> EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET)
  21391. /** Data structure for the response to the WMI_OCB_SET_CONFIG_CMDID command. */
  21392. typedef struct {
  21393. /** TLV tag and len; tag equals
  21394. * WMITLV_TAG_STRUC_wmi_ocb_set_config_resp_event_fixed_param */
  21395. A_UINT32 tlv_header;
  21396. /* VDEV identifier */
  21397. A_UINT32 vdev_id;
  21398. A_UINT32 status;
  21399. } wmi_ocb_set_config_resp_event_fixed_param;
  21400. /* SIZE_UTC_TIME and SIZE_UTC_TIME_ERROR cannot be modified without breaking
  21401. WMI compatibility. */
  21402. #define SIZE_UTC_TIME (10) /* The size of the utc time in bytes. */
  21403. #define SIZE_UTC_TIME_ERROR (5) /* The size of the utc time error in bytes. */
  21404. /** Data structure to set the UTC time. */
  21405. typedef struct {
  21406. /** TLV tag and len; tag equals
  21407. * WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param */
  21408. A_UINT32 tlv_header;
  21409. /* VDEV identifier */
  21410. A_UINT32 vdev_id;
  21411. /** 10 bytes of the utc time. */
  21412. A_UINT32 utc_time[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME,SIZE_BYTE)];
  21413. /** 5 bytes of the time error. */
  21414. A_UINT32 time_error[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME_ERROR,SIZE_BYTE)];
  21415. } wmi_ocb_set_utc_time_cmd_fixed_param;
  21416. #define WMI_UTC_TIME_GET(ptr,byte_index) wmi_packed_arr_get_bits((ptr)->utc_time, byte_index, SIZE_BYTE)
  21417. #define WMI_UTC_TIME_SET(ptr,byte_index,val) wmi_packed_arr_set_bits((ptr)->utc_time, byte_index, SIZE_BYTE, val)
  21418. #define WMI_TIME_ERROR_GET(ptr,byte_index) wmi_packed_arr_get_bits((ptr)->time_error, byte_index, SIZE_BYTE)
  21419. #define WMI_TIME_ERROR_SET(ptr,byte_index,val) wmi_packed_arr_set_bits((ptr)->time_error, byte_index, SIZE_BYTE, val)
  21420. /** Data structure start the timing advertisement. The template for the
  21421. * timing advertisement frame follows this structure in the WMI command.
  21422. */
  21423. typedef struct {
  21424. /** TLV tag and len; tag equals
  21425. * WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param */
  21426. A_UINT32 tlv_header;
  21427. /* VDEV identifier */
  21428. A_UINT32 vdev_id;
  21429. /** Number of times the TA is sent every 5 seconds. */
  21430. A_UINT32 repeat_rate;
  21431. /** The frequency on which to transmit. */
  21432. A_UINT32 channel_freq; /* MHz units */
  21433. /** The offset into the template of the timestamp. */
  21434. A_UINT32 timestamp_offset;
  21435. /** The offset into the template of the time value. */
  21436. A_UINT32 time_value_offset;
  21437. /** The length of the timing advertisement template. The
  21438. * template is in the TLV data. */
  21439. A_UINT32 timing_advert_template_length;
  21440. /** This is followed by a binary array containing the TA template. */
  21441. } wmi_ocb_start_timing_advert_cmd_fixed_param;
  21442. /** Data structure to stop the timing advertisement. */
  21443. typedef struct {
  21444. /** TLV tag and len; tag equals
  21445. * WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param */
  21446. A_UINT32 tlv_header;
  21447. /* VDEV identifier */
  21448. A_UINT32 vdev_id;
  21449. A_UINT32 channel_freq; /* MHz units */
  21450. } wmi_ocb_stop_timing_advert_cmd_fixed_param;
  21451. /** Data structure for the request for WMI_OCB_GET_TSF_TIMER_CMDID. */
  21452. typedef struct {
  21453. /** TLV tag and len; tag equals
  21454. * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param */
  21455. A_UINT32 tlv_header;
  21456. /* VDEV identifier */
  21457. A_UINT32 vdev_id;
  21458. A_UINT32 reserved;
  21459. } wmi_ocb_get_tsf_timer_cmd_fixed_param;
  21460. /** Data structure for the response to WMI_OCB_GET_TSF_TIMER_CMDID. */
  21461. typedef struct {
  21462. /** TLV tag and len; tag equals
  21463. * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_resp_event_fixed_param */
  21464. A_UINT32 tlv_header;
  21465. /* VDEV identifier */
  21466. A_UINT32 vdev_id;
  21467. A_UINT32 tsf_timer_high;
  21468. A_UINT32 tsf_timer_low;
  21469. } wmi_ocb_get_tsf_timer_resp_event_fixed_param;
  21470. /** Data structure for DCC stats configuration per channel. */
  21471. typedef struct {
  21472. /** TLV tag and len; tag equals
  21473. * WMITLV_TAG_STRUC_wmi_dcc_ndl_stats_per_channel */
  21474. A_UINT32 tlv_header;
  21475. /** The channel for which this applies, 16 bits. */
  21476. /** The dcc_stats_bitmap, 8 bits. */
  21477. A_UINT32 chan_info;
  21478. /** Demodulation model parameters. */
  21479. /**
  21480. * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
  21481. * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
  21482. * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
  21483. * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
  21484. * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
  21485. * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
  21486. * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
  21487. * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
  21488. */
  21489. A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
  21490. /** Communication ranges. */
  21491. /**
  21492. * tx_power, ndlType_txPower, 1+7 bits.
  21493. * datarate, ndlType_datarate, 1+3 bits.
  21494. */
  21495. A_UINT32 tx_power_datarate;
  21496. /**
  21497. * NDL_carrierSenseRange, ndlType_distance, 1+12 bits.
  21498. * NDL_estCommRange, ndlType_distance, 1+12 bits.
  21499. */
  21500. A_UINT32 carrier_sense_est_comm_range;
  21501. /** Channel load measures. */
  21502. /**
  21503. * dccSensitivity, ndlType_rxPower, 1+7 bits.
  21504. * carrierSense, ndlType_rxPower, 1+7 bits.
  21505. * NDL_channelLoad, ndlType_channelLoad, 1+10 bits.
  21506. */
  21507. A_UINT32 dcc_stats;
  21508. /**
  21509. * NDL_packetArrivalRate, ndlType_arrivalRate, 1+13 bits.
  21510. * NDL_packetAvgDuration, ndlType_packetDuration, 1+11 bits.
  21511. */
  21512. A_UINT32 packet_stats;
  21513. /**
  21514. * NDL_channelBusyTime, ndlType_channelLoad, 1+10 bits.
  21515. */
  21516. A_UINT32 channel_busy_time;
  21517. /** Transmit packet statistics. */
  21518. /**
  21519. * NDL_txPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
  21520. * NDL_txPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
  21521. * NDL_txPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
  21522. * NDL_txPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
  21523. */
  21524. A_UINT32 tx_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_ARRIVALRATE)];
  21525. /**
  21526. * NDL_txPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  21527. * NDL_txPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  21528. * NDL_txPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  21529. * NDL_txPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  21530. */
  21531. A_UINT32 tx_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
  21532. /**
  21533. * NDL_txChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
  21534. * NDL_txChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
  21535. * NDL_txChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
  21536. * NDL_txChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
  21537. */
  21538. A_UINT32 tx_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_CHANNELUSE)];
  21539. /**
  21540. * NDL_txSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
  21541. * NDL_txSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
  21542. * NDL_txSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
  21543. * NDL_txSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
  21544. */
  21545. A_UINT32 tx_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
  21546. } wmi_dcc_ndl_stats_per_channel;
  21547. #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  21548. #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  21549. #define WMI_NDL_STATS_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
  21550. #define WMI_NDL_STATS_CHAN_FREQ_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
  21551. #define WMI_NDL_STATS_DCC_STATS_BITMAP_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 8)
  21552. #define WMI_NDL_STATS_DCC_STATS_BITMAP_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 16, 8, val)
  21553. #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  21554. #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  21555. #define WMI_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 8)
  21556. #define WMI_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 8, val)
  21557. #define WMI_TX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 4)
  21558. #define WMI_TX_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 4, val)
  21559. #define WMI_NDL_CARRIER_SENSE_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13)
  21560. #define WMI_NDL_CARRIER_SENSE_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13, val)
  21561. #define WMI_NDL_EST_COMM_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13)
  21562. #define WMI_NDL_EST_COMM_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13, val)
  21563. #define WMI_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 0, 8)
  21564. #define WMI_DCC_SENSITIVITY_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 0, 8, val)
  21565. #define WMI_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 8, 8)
  21566. #define WMI_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 8, 8, val)
  21567. #define WMI_NDL_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 16, 11)
  21568. #define WMI_NDL_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 16, 11, val)
  21569. #define WMI_NDL_PACKET_ARRIVAL_RATE_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 0, 14)
  21570. #define WMI_NDL_PACKET_ARRIVAL_RATE_SET(ptr,val) WMI_SET_BITS((ptr)->packet_stats, 0, 14, val)
  21571. #define WMI_NDL_PACKET_AVG_DURATION_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 14, 12)
  21572. #define WMI_NDL_PACKET_AVG_DURATION_SET(ptr,val) WMI_SET_BITS((ptr)->packet_stats, 14, 12, val)
  21573. #define WMI_NDL_CHANNEL_BUSY_TIME_GET(ptr) WMI_GET_BITS((ptr)->channel_busy_time, 0, 11)
  21574. #define WMI_NDL_CHANNEL_BUSY_TIME_SET(ptr,val) WMI_SET_BITS((ptr)->channel_busy_time, 0, 11, val)
  21575. #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)
  21576. #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)
  21577. #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)
  21578. #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)
  21579. #define WMI_NDL_TX_CHANNEL_USE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
  21580. #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)
  21581. #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)
  21582. #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)
  21583. /** Bitmap for DCC stats. */
  21584. typedef enum {
  21585. DCC_STATS_DEMODULATION_MODEL = 1,
  21586. DCC_STATS_COMMUNICATION_RANGES = 2,
  21587. DCC_STATS_CHANNEL_LOAD_MEASURES = 4,
  21588. DCC_STATS_TRANSMIT_PACKET_STATS = 8,
  21589. DCC_STATS_TRANSMIT_MODEL_PARAMETER = 16,
  21590. DCC_STATS_ALL = 0xff,
  21591. } wmi_dcc_stats_bitmap;
  21592. /** Data structure for getting the DCC stats. */
  21593. typedef struct {
  21594. /** TLV tag and len; tag equals
  21595. * WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param */
  21596. A_UINT32 tlv_header;
  21597. /* VDEV identifier */
  21598. A_UINT32 vdev_id;
  21599. /** The number of channels for which stats are being requested. */
  21600. A_UINT32 num_channels;
  21601. /** This is followed by a TLV array of wmi_dcc_channel_stats_request. */
  21602. } wmi_dcc_get_stats_cmd_fixed_param;
  21603. typedef struct {
  21604. /** TLV tag and len; tag equals
  21605. * WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request */
  21606. A_UINT32 tlv_header;
  21607. /** The channel for which this applies. */
  21608. A_UINT32 chan_freq; /* MHz units */
  21609. /** The DCC stats being requested. */
  21610. A_UINT32 dcc_stats_bitmap;
  21611. } wmi_dcc_channel_stats_request;
  21612. /** Data structure for the response with the DCC stats. */
  21613. typedef struct {
  21614. /** TLV tag and len; tag equals
  21615. * WMITLV_TAG_STRUC_wmi_dcc_get_stats_resp_event_fixed_param */
  21616. A_UINT32 tlv_header;
  21617. /* VDEV identifier */
  21618. A_UINT32 vdev_id;
  21619. /** Number of channels in the response. */
  21620. A_UINT32 num_channels;
  21621. /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
  21622. } wmi_dcc_get_stats_resp_event_fixed_param;
  21623. /** Data structure for clearing the DCC stats. */
  21624. typedef struct {
  21625. /** TLV tag and len; tag equals
  21626. * WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param */
  21627. A_UINT32 tlv_header;
  21628. /* VDEV identifier */
  21629. A_UINT32 vdev_id;
  21630. A_UINT32 dcc_stats_bitmap;
  21631. } wmi_dcc_clear_stats_cmd_fixed_param;
  21632. /** Data structure for the pushed DCC stats */
  21633. typedef struct {
  21634. /** TLV tag and len; tag equals
  21635. * WMITLV_TAG_STRUC_wmi_dcc_stats_event_fixed_param */
  21636. A_UINT32 tlv_header;
  21637. /* VDEV identifier */
  21638. A_UINT32 vdev_id;
  21639. /** The number of channels in the response. */
  21640. A_UINT32 num_channels;
  21641. /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
  21642. } wmi_dcc_stats_event_fixed_param;
  21643. /** Data structure for updating NDL per channel. */
  21644. typedef struct {
  21645. /** TLV tag and len; tag equals
  21646. * WMITLV_TAG_STRUC_wmi_dcc_ndl_chan */
  21647. A_UINT32 tlv_header;
  21648. /**
  21649. * Channel frequency, 16 bits
  21650. * NDL_numActiveState, ndlType_numberElements, 1+6 bits
  21651. */
  21652. A_UINT32 chan_info;
  21653. /**
  21654. * NDL_minDccSampling, 10 bits.
  21655. * Maximum time interval between subsequent checks of the DCC rules.
  21656. */
  21657. A_UINT32 ndl_min_dcc_sampling;
  21658. /**
  21659. * dcc_enable, 1 bit.
  21660. * dcc_stats_enable, 1 bit.
  21661. * dcc_stats_interval, 16 bits.
  21662. */
  21663. A_UINT32 dcc_flags;
  21664. /** General DCC configuration. */
  21665. /**
  21666. * NDL_timeUp, ndlType_timing, 1+12 bits.
  21667. * NDL_timeDown, ndlType_timing, 1+12 bits.
  21668. */
  21669. A_UINT32 general_config;
  21670. /** Transmit power thresholds. */
  21671. /**
  21672. * NDL_minTxPower, ndlType_txPower, 1+7 bits.
  21673. * NDL_maxTxPower, ndlType_txPower, 1+7 bits.
  21674. */
  21675. A_UINT32 min_max_tx_power; /* see "ETSI TS 102 687" table above for units */
  21676. /**
  21677. * NDL_defTxPower(AC_BK), ndlType_txPower, 1+7 bits.
  21678. * NDL_defTxPower(AC_BE), ndlType_txPower, 1+7 bits.
  21679. * NDL_defTxPower(AC_VI), ndlType_txPower, 1+7 bits.
  21680. * NDL_defTxPower(AC_VO), ndlType_txPower, 1+7 bits.
  21681. */
  21682. /* see "ETSI TS 102 687" table above for units */
  21683. A_UINT32 def_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
  21684. /** Packet timing thresholds. */
  21685. /**
  21686. * NDL_maxPacketDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  21687. * NDL_maxPacketDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  21688. * NDL_maxPacketDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  21689. * NDL_maxPacketDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  21690. */
  21691. A_UINT32 max_packet_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
  21692. /**
  21693. * NDL_minPacketInterval, ndlType_packetInterval, 1+10 bits.
  21694. * NDL_maxPacketInterval, ndlType_packetInterval, 1+10 bits.
  21695. */
  21696. A_UINT32 min_max_packet_interval;
  21697. /**
  21698. * NDL_defPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
  21699. * NDL_defPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
  21700. * NDL_defPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
  21701. * NDL_defPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
  21702. */
  21703. A_UINT32 def_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETINTERVAL)];
  21704. /** Packet datarate thresholds. */
  21705. /**
  21706. * NDL_minDatarate, ndlType_datarate, 1+3 bits.
  21707. * NDL_maxDatarate, ndlType_datarate, 1+3 bits.
  21708. */
  21709. A_UINT32 min_max_datarate;
  21710. /**
  21711. * NDL_defDatarate(AC_BK), ndlType_datarate, 1+3 bits.
  21712. * NDL_defDatarate(AC_BE), ndlType_datarate, 1+3 bits.
  21713. * NDL_defDatarate(AC_VI), ndlType_datarate, 1+3 bits.
  21714. * NDL_defDatarate(AC_VO), ndlType_datarate, 1+3 bits.
  21715. */
  21716. A_UINT32 def_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_DATARATE)];
  21717. /** Receive signal thresholds. */
  21718. /**
  21719. * NDL_minCarrierSense, ndlType_rxPower, 1+7 bits.
  21720. * NDL_maxCarrierSense, ndlType_rxPower, 1+7 bits.
  21721. * NDL_defCarrierSense, ndlType_rxPower, 1+7 bits.
  21722. */
  21723. A_UINT32 min_max_def_carrier_sense;
  21724. /** Receive model parameter. */
  21725. /**
  21726. * NDL_defDccSensitivity, ndlType_rxPower, 1+7 bits.
  21727. * NDL_maxCsRange, ndlType_distance, 1+12 bits.
  21728. * NDL_refPathLoss, ndlType_pathloss, 1+5 bits.
  21729. */
  21730. A_UINT32 receive_model_parameter;
  21731. /**
  21732. * NDL_minSNR, ndlType_snr, 1+7 bits.
  21733. */
  21734. A_UINT32 receive_model_parameter_2;
  21735. /** Demodulation model parameters. */
  21736. /**
  21737. * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
  21738. * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
  21739. * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
  21740. * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
  21741. * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
  21742. * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
  21743. * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
  21744. * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
  21745. */
  21746. A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
  21747. /** Transmit model parameters. */
  21748. /**
  21749. * NDL_tmPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
  21750. * NDL_tmPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
  21751. * NDL_tmPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
  21752. * NDL_tmPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
  21753. */
  21754. A_UINT32 tm_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
  21755. /**
  21756. * NDL_tmPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  21757. * NDL_tmPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  21758. * NDL_tmPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  21759. * NDL_tmPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  21760. */
  21761. A_UINT32 tm_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
  21762. /**
  21763. * NDL_tmSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
  21764. * NDL_tmSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
  21765. * NDL_tmSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
  21766. * NDL_tmSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
  21767. */
  21768. A_UINT32 tm_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  21769. /**
  21770. * NDL_tmMaxChannelUse, ndlType_channelUse, 1+13 bits.
  21771. */
  21772. A_UINT32 tm_max_channel_use;
  21773. /**
  21774. * NDL_tmChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
  21775. * NDL_tmChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
  21776. * NDL_tmChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
  21777. * NDL_tmChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
  21778. */
  21779. A_UINT32 tm_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
  21780. /** Channel load thresholds. */
  21781. /**
  21782. * NDL_minChannelLoad, ndlType_channelLoad, 1+10 bits.
  21783. * NDL_maxChannelLoad, ndlType_channelLoad, 1+10 bits.
  21784. */
  21785. A_UINT32 min_max_channel_load;
  21786. /** Transmit queue parameters. */
  21787. /**
  21788. * NDL_numQueue, ndlType_acPrio, 1+3 bits.
  21789. * NDL_refQueueStatus(AC_BK), ndlType_queueStatus, 1+1 bit.
  21790. * NDL_refQueueStatus(AC_BE), ndlType_queueStatus, 1+1 bit.
  21791. * NDL_refQueueStatus(AC_VI), ndlType_queueStatus, 1+1 bit.
  21792. * NDL_refQueueStatus(AC_VO), ndlType_queueStatus, 1+1 bit.
  21793. */
  21794. A_UINT32 transmit_queue_parameters;
  21795. /**
  21796. * NDL_refQueueLen(AC_BK), ndlType_numberElements, 1+6 bits.
  21797. * NDL_refQueueLen(AC_BE), ndlType_numberElements, 1+6 bits.
  21798. * NDL_refQueueLen(AC_VI), ndlType_numberElements, 1+6 bits.
  21799. * NDL_refQueueLen(AC_VO), ndlType_numberElements, 1+6 bits.
  21800. */
  21801. A_UINT32 numberElements[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_NUMBERELEMENTS)];
  21802. } wmi_dcc_ndl_chan;
  21803. #define WMI_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
  21804. #define WMI_CHAN_FREQ_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
  21805. #define WMI_NDL_NUM_ACTIVE_STATE_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 7)
  21806. #define WMI_NDL_NUM_ACTIVE_STATE_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 16, 7, val)
  21807. #define WMI_NDL_MIN_DCC_SAMPLING_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10)
  21808. #define WMI_NDL_MIN_DCC_SAMPLING_SET(ptr,val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10, val)
  21809. #define WMI_NDL_MEASURE_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16)
  21810. #define WMI_NDL_MEASURE_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16, val)
  21811. #define WMI_NDL_DCC_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 0, 1)
  21812. #define WMI_NDL_DCC_ENABLE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 0, 1, val)
  21813. #define WMI_NDL_DCC_STATS_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 1, 1)
  21814. #define WMI_NDL_DCC_STATS_ENABLE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 1, 1, val)
  21815. #define WMI_NDL_DCC_STATS_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 2, 16)
  21816. #define WMI_NDL_DCC_STATS_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 2, 16, val)
  21817. #define WMI_NDL_TIME_UP_GET(ptr) WMI_GET_BITS((ptr)->general_config, 0, 13)
  21818. #define WMI_NDL_TIME_UP_SET(ptr,val) WMI_SET_BITS((ptr)->general_config, 0, 13, val)
  21819. #define WMI_NDL_TIME_DOWN_GET(ptr) WMI_GET_BITS((ptr)->general_config, 13, 13)
  21820. #define WMI_NDL_TIME_DOWN_SET(ptr,val) WMI_SET_BITS((ptr)->general_config, 13, 13, val)
  21821. #define WMI_NDL_MIN_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 0, 8)
  21822. #define WMI_NDL_MIN_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_tx_power, 0, 8, val)
  21823. #define WMI_NDL_MAX_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 8, 8)
  21824. #define WMI_NDL_MAX_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_tx_power, 8, 8, val)
  21825. #define WMI_NDL_DEF_TX_POWER_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  21826. #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)
  21827. #define WMI_NDL_MAX_PACKET_DURATION_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
  21828. #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)
  21829. #define WMI_NDL_MIN_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 0, 11)
  21830. #define WMI_NDL_MIN_PACKET_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_packet_interval, 0, 11, val)
  21831. #define WMI_NDL_MAX_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 11, 11)
  21832. #define WMI_NDL_MAX_PACKET_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_packet_interval, 11, 11, val)
  21833. #define WMI_NDL_DEF_PACKET_INTERVAL_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
  21834. #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)
  21835. #define WMI_NDL_MIN_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 0, 4)
  21836. #define WMI_NDL_MIN_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_datarate, 0, 4, val)
  21837. #define WMI_NDL_MAX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 4, 4)
  21838. #define WMI_NDL_MAX_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_datarate, 4, 4, val)
  21839. #define WMI_NDL_DEF_DATARATE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
  21840. #define WMI_NDL_DEF_DATARATE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
  21841. #define WMI_NDL_MIN_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 0, 8)
  21842. #define WMI_NDL_MIN_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 0, 8, val)
  21843. #define WMI_NDL_MAX_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 8, 8)
  21844. #define WMI_NDL_MAX_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 8, 8, val)
  21845. #define WMI_NDL_DEF_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 16, 8)
  21846. #define WMI_NDL_DEF_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 16, 8, val)
  21847. #define WMI_NDL_DEF_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 0, 8)
  21848. #define WMI_NDL_DEF_DCC_SENSITIVITY_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 0, 8, val)
  21849. #define WMI_NDL_MAX_CS_RANGE_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 8, 13)
  21850. #define WMI_NDL_MAX_CS_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 8, 13, val)
  21851. #define WMI_NDL_REF_PATH_LOSS_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 21, 6)
  21852. #define WMI_NDL_REF_PATH_LOSS_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 21, 6, val)
  21853. #define WMI_NDL_MIN_SNR_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter_2, 0, 8)
  21854. #define WMI_NDL_MIN_SNR_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter_2, 0, 8, val)
  21855. #define WMI_NDL_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  21856. #define WMI_NDL_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  21857. #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)
  21858. #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)
  21859. #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)
  21860. #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)
  21861. #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)
  21862. #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)
  21863. #define WMI_NDL_TM_MAX_CHANNEL_USE_GET(ptr) WMI_GET_BITS((ptr)->tm_max_channel_use, 0, 14)
  21864. #define WMI_NDL_TM_MAX_CHANNEL_USE_SET(ptr,val) WMI_SET_BITS((ptr)->tm_max_channel_use, 0, 14, val)
  21865. #define WMI_NDL_TM_CHANNEL_USE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
  21866. #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)
  21867. #define WMI_NDL_MIN_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 0, 11)
  21868. #define WMI_NDL_MIN_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_channel_load, 0, 11, val)
  21869. #define WMI_NDL_MAX_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 11, 11)
  21870. #define WMI_NDL_MAX_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_channel_load, 11, 11, val)
  21871. #define WMI_NDL_NUM_QUEUE_GET(ptr) WMI_GET_BITS((ptr)->transmit_queue_parameters, 0, 4)
  21872. #define WMI_NDL_NUM_QUEUE_SET(ptr,val) WMI_SET_BITS((ptr)->transmit_queue_parameters, 0, 4, val)
  21873. #define WMI_NDL_REF_QUEUE_STATUS_GET(ptr,acprio) WMI_GET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2)
  21874. #define WMI_NDL_REF_QUEUE_STATUS_SET(ptr,acprio,val) WMI_SET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2, val)
  21875. #define WMI_NDL_REF_QUEUE_LEN_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS)
  21876. #define WMI_NDL_REF_QUEUE_LEN_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS, val)
  21877. /** Data structure for updating the NDL. */
  21878. typedef struct {
  21879. /** TLV tag and len; tag equals
  21880. * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param */
  21881. A_UINT32 tlv_header;
  21882. /* VDEV identifier */
  21883. A_UINT32 vdev_id;
  21884. /** The number of channels in the request. */
  21885. A_UINT32 num_channel;
  21886. /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
  21887. /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
  21888. } wmi_dcc_update_ndl_cmd_fixed_param;
  21889. typedef struct {
  21890. /** TLV tag and len; tag equals
  21891. * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_resp_event_fixed_param */
  21892. A_UINT32 tlv_header;
  21893. /* VDEV identifier */
  21894. A_UINT32 vdev_id;
  21895. A_UINT32 status;
  21896. } wmi_dcc_update_ndl_resp_event_fixed_param;
  21897. /* Actions for TSF timestamp */
  21898. typedef enum {
  21899. TSF_TSTAMP_CAPTURE_REQ = 1,
  21900. TSF_TSTAMP_CAPTURE_RESET = 2,
  21901. TSF_TSTAMP_READ_VALUE = 3,
  21902. TSF_TSTAMP_QTIMER_CAPTURE_REQ = 4,
  21903. TSF_TSTAMP_AUTO_REPORT_ENABLE = 5,
  21904. TSF_TSTAMP_AUTO_REPORT_DISABLE = 6,
  21905. } wmi_tsf_tstamp_action;
  21906. typedef struct {
  21907. /** TLV tag and len; tag equals
  21908. * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */
  21909. A_UINT32 tlv_header;
  21910. /** unique id identifying the VDEV, generated by the caller */
  21911. A_UINT32 vdev_id;
  21912. /* action type, refer to wmi_tsf_tstamp_action */
  21913. A_UINT32 tsf_action;
  21914. } wmi_vdev_tsf_tstamp_action_cmd_fixed_param;
  21915. typedef struct {
  21916. /* TLV tag and len; tag equals
  21917. * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */
  21918. A_UINT32 tlv_header;
  21919. /* VDEV identifier */
  21920. A_UINT32 vdev_id;
  21921. /* low 32bit of tsf */
  21922. A_UINT32 tsf_low;
  21923. /* high 32 bit of tsf */
  21924. A_UINT32 tsf_high;
  21925. /* low 32 bits of qtimer */
  21926. A_UINT32 qtimer_low;
  21927. /* high 32 bits of qtimer */
  21928. A_UINT32 qtimer_high;
  21929. /*
  21930. * tsf_id: TSF ID for the current vdev
  21931. * This field should be ignored unless the tsf_id_valid flag is set.
  21932. */
  21933. A_UINT32 tsf_id;
  21934. A_UINT32 tsf_id_valid;
  21935. /*
  21936. * mac_id: MAC identifier
  21937. * This field should be ignored unless the mac_id_valid flag is set.
  21938. */
  21939. A_UINT32 mac_id;
  21940. A_UINT32 mac_id_valid;
  21941. /* low 32 bits of wlan global tsf */
  21942. A_UINT32 wlan_global_tsf_low;
  21943. /* high 32 bits of wlan global tsf */
  21944. A_UINT32 wlan_global_tsf_high;
  21945. } wmi_vdev_tsf_report_event_fixed_param;
  21946. /* ie_id values:
  21947. * 0 to 255 are used for individual IEEE802.11 Information Element types
  21948. */
  21949. #define WMI_SET_VDEV_IE_ID_SCAN_SET_DEFAULT_IE 256
  21950. /* source values: */
  21951. #define WMI_SET_VDEV_IE_SOURCE_HOST 0x0
  21952. /* band values: */
  21953. typedef enum {
  21954. WMI_SET_VDEV_IE_BAND_ALL = 0,
  21955. WMI_SET_VDEV_IE_BAND_2_4GHZ,
  21956. WMI_SET_VDEV_IE_BAND_5GHZ,
  21957. } wmi_set_vdev_ie_band;
  21958. typedef struct {
  21959. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */
  21960. A_UINT32 tlv_header;
  21961. /** unique id identifying the VDEV, generated by the caller */
  21962. A_UINT32 vdev_id;
  21963. /** unique id to identify the ie_data as defined by ieee 802.11 spec */
  21964. A_UINT32 ie_id;
  21965. /** ie_len corresponds to num of bytes in ie_data[] */
  21966. A_UINT32 ie_len;
  21967. /** source of this command */
  21968. A_UINT32 ie_source; /* see WMI_SET_VDEV_IE_SOURCE_ defs */
  21969. /** band for this IE - se wmi_set_vdev_ie_band enum */
  21970. A_UINT32 band;
  21971. /**
  21972. * Following this structure is the TLV byte stream of ie data of length ie_buf_len:
  21973. * A_UINT8 ie_data[];
  21974. *
  21975. */
  21976. } wmi_vdev_set_ie_cmd_fixed_param;
  21977. /* DISA feature related data structures */
  21978. #define MAX_MAC_HEADER_LEN 32
  21979. typedef enum {
  21980. WMI_ENCRYPT_DECRYPT_FLAG_INVALID,
  21981. WMI_ENCRYPT = 1,
  21982. WMI_DECRYPT = 2,
  21983. } WMI_ENCRYPT_DECRYPT_FLAG;
  21984. typedef struct {
  21985. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param */
  21986. /** unique id identifying the VDEV, generated by the caller */
  21987. A_UINT32 vdev_id;
  21988. A_UINT32 key_flag; /* WMI_ENCRYPT_DECRYPT_FLAG */
  21989. A_UINT32 key_idx;
  21990. A_UINT32 key_cipher;
  21991. A_UINT32 key_len; /* units = bytes */
  21992. A_UINT32 key_txmic_len; /* units = bytes */
  21993. A_UINT32 key_rxmic_len; /* units = bytes */
  21994. /** Key: This array needs to be provided in little-endian order */
  21995. A_UINT8 key_data[WMI_MAX_KEY_LEN];
  21996. /** Packet number: This array needs to be provided in little-endian order.
  21997. * If the PN is less than 8 bytes, the PN data shall be placed into this
  21998. * pn[] array starting at byte 0, leaving the MSBs empty.
  21999. */
  22000. A_UINT8 pn[8];
  22001. /** 802.11 MAC header to be typecast to struct ieee80211_qosframe_addr4
  22002. * This array needs to be provided in little-endian order.
  22003. */
  22004. A_UINT8 mac_hdr[MAX_MAC_HEADER_LEN];
  22005. A_UINT32 data_len; /** Payload length, units = bytes */
  22006. /*
  22007. * Following this struct are this TLV:
  22008. * A_UINT8 data[]; <-- actual data to be encrypted,
  22009. * needs to be provided in little-endian order
  22010. */
  22011. } wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param;
  22012. /* This event is generated in response to WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from HOST.
  22013. * On receiving WMI command WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from
  22014. * HOST with DISA test vectors, DISA frame will prepared and submitted to HW,
  22015. * then on receiving the tx completion for the DISA frame this WMI event
  22016. * will be delivered to HOST with the encrypted frame.
  22017. */
  22018. typedef struct {
  22019. /** TLV tag and len; tag equals
  22020. * WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param */
  22021. A_UINT32 tlv_header;
  22022. /* VDEV identifier */
  22023. A_UINT32 vdev_id;
  22024. A_INT32 status; /* 0: success, -1: Failure, */
  22025. /* 802.11 header length + encrypted payload length (units = bytes) */
  22026. A_UINT32 data_length;
  22027. /*
  22028. * Following this struct is this TLV:
  22029. * A_UINT8 enc80211_frame[]; <-- Encrypted 802.11 frame;
  22030. * 802.11 header + encrypted payload,
  22031. * provided in little-endian order
  22032. */
  22033. } wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param;
  22034. /* DEPRECATED - use wmi_pdev_set_pcl_cmd_fixed_param instead */
  22035. typedef struct {
  22036. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param */
  22037. /** Set Preferred Channel List **/
  22038. /** # of channels to scan */
  22039. A_UINT32 num_chan;
  22040. /**
  22041. * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
  22042. * structure. The TLV's are:
  22043. * A_UINT32 channel_list[];
  22044. **/
  22045. } wmi_soc_set_pcl_cmd_fixed_param;
  22046. /* Values for channel_weight */
  22047. typedef enum {
  22048. WMI_PCL_WEIGHT_DISALLOW = 0,
  22049. WMI_PCL_WEIGHT_LOW = 1,
  22050. WMI_PCL_WEIGHT_MEDIUM = 2,
  22051. WMI_PCL_WEIGHT_HIGH = 3,
  22052. WMI_PCL_WEIGHT_VERY_HIGH = 4,
  22053. } wmi_pcl_chan_weight;
  22054. typedef struct {
  22055. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_pcl_cmd_fixed_param */
  22056. /** Set Preferred Channel List **/
  22057. /** pdev_id for identifying the MAC
  22058. * See macros starting with WMI_PDEV_ID_ for values.
  22059. */
  22060. A_UINT32 pdev_id;
  22061. /** # of channels to scan */
  22062. A_UINT32 num_chan;
  22063. /**
  22064. * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
  22065. * structure. The TLV's are:
  22066. * A_UINT32 channel_weight[]; channel order & size will be as per the list provided in WMI_SCAN_CHAN_LIST_CMDID
  22067. **/
  22068. } wmi_pdev_set_pcl_cmd_fixed_param;
  22069. /* DEPRECATED - use wmi_pdev_set_hw_mode_cmd_fixed_param instead */
  22070. typedef struct {
  22071. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param */
  22072. /** Set Hardware Mode **/
  22073. /* Hardware Mode Index */
  22074. A_UINT32 hw_mode_index;
  22075. } wmi_soc_set_hw_mode_cmd_fixed_param;
  22076. typedef struct {
  22077. A_UINT32 tlv_header; /* TLV tag and len tag equals WMITLV_TAG_STRUC_wmi_pdev_band_to_mac */
  22078. /** pdev_id for identifying the MAC
  22079. * See macros starting with WMI_PDEV_ID_ for values.
  22080. */
  22081. A_UINT32 pdev_id;
  22082. /* start frequency in MHz */
  22083. A_UINT32 start_freq;
  22084. /* end frequency in MHz */
  22085. A_UINT32 end_freq;
  22086. } wmi_pdev_band_to_mac;
  22087. typedef struct {
  22088. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_cmd_fixed_param */
  22089. /** Set Hardware Mode **/
  22090. /** pdev_id for identifying the MAC
  22091. * See macros starting with WMI_PDEV_ID_ for values.
  22092. */
  22093. A_UINT32 pdev_id;
  22094. /* Hardware Mode Index */
  22095. A_UINT32 hw_mode_index;
  22096. /* Number of band to mac TLVs */
  22097. A_UINT32 num_band_to_mac;
  22098. /* Followed by TLVs of type
  22099. * num_band_to_mac * wmi_pdev_band_to_mac.
  22100. */
  22101. } wmi_pdev_set_hw_mode_cmd_fixed_param;
  22102. /* DEPRECATED - use wmi_pdev_set_dual_mac_config_cmd_fixed_param instead */
  22103. typedef struct {
  22104. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_cmd_fixed_param */
  22105. /** Set Dual MAC Firmware Configuration **/
  22106. /* Concurrent scan configuration bits */
  22107. A_UINT32 concurrent_scan_config_bits;
  22108. /* Firmware mode configuration bits */
  22109. A_UINT32 fw_mode_config_bits;
  22110. } wmi_soc_set_dual_mac_config_cmd_fixed_param;
  22111. typedef struct {
  22112. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_cmd_fixed_param */
  22113. /** Set Dual MAC Firmware Configuration **/
  22114. /** pdev_id for identifying the MAC
  22115. * See macros starting with WMI_PDEV_ID_ for values.
  22116. */
  22117. A_UINT32 pdev_id;
  22118. /* Concurrent scan configuration bits */
  22119. A_UINT32 concurrent_scan_config_bits;
  22120. /* Firmware mode configuration bits */
  22121. A_UINT32 fw_mode_config_bits;
  22122. } wmi_pdev_set_mac_config_cmd_fixed_param;
  22123. typedef struct { /* DEPRECATED */
  22124. A_UINT32 num_tx_chains;
  22125. A_UINT32 num_rx_chains;
  22126. A_UINT32 reserved[2];
  22127. } soc_num_tx_rx_chains;
  22128. typedef struct {
  22129. A_UINT32 num_tx_chains_2g;
  22130. A_UINT32 num_rx_chains_2g;
  22131. A_UINT32 num_tx_chains_5g;
  22132. A_UINT32 num_rx_chains_5g;
  22133. } band_num_tx_rx_chains;
  22134. typedef union { /* DEPRECATED */
  22135. soc_num_tx_rx_chains soc_txrx_chain_setting;
  22136. band_num_tx_rx_chains band_txrx_chain_setting;
  22137. } antenna_num_tx_rx_chains;
  22138. typedef enum {
  22139. ANTENNA_MODE_DISABLED = 0x0,
  22140. ANTENNA_MODE_LOW_POWER_LOCATION_SCAN = 0x01,
  22141. /* reserved */
  22142. } antenna_mode_reason;
  22143. /* DEPRECATED - use wmi_pdev_set_antenna_mode_cmd_fixed_param instead */
  22144. typedef struct {
  22145. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_antenna_mode_cmd_fixed_param */
  22146. /* the reason for setting antenna mode, refer antenna_mode_reason */
  22147. A_UINT32 reason;
  22148. /*
  22149. * The above reason parameter will select whether the following union
  22150. * is soc_num_tx_rx_chains or band_num_tx_rx_chains.
  22151. */
  22152. antenna_num_tx_rx_chains num_txrx_chains_setting;
  22153. } wmi_soc_set_antenna_mode_cmd_fixed_param;
  22154. typedef struct {
  22155. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_mode_cmd_fixed_param */
  22156. /** pdev_id for identifying the MAC
  22157. * See macros starting with WMI_PDEV_ID_ for values.
  22158. */
  22159. A_UINT32 pdev_id;
  22160. /* Bits 0-15 is the number of RX chains and 16-31 is the number of TX chains */
  22161. A_UINT32 num_txrx_chains;
  22162. } wmi_pdev_set_antenna_mode_cmd_fixed_param;
  22163. /** Data structure for information specific to a VDEV to MAC mapping. */
  22164. /* DEPRECATED - use wmi_pdev_set_hw_mode_response_vdev_mac_entry instead */
  22165. typedef struct {
  22166. /** TLV tag and len; tag equals
  22167. * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */
  22168. A_UINT32 tlv_header;
  22169. A_UINT32 vdev_id; /* VDEV ID */
  22170. A_UINT32 mac_id; /* MAC ID */
  22171. } wmi_soc_set_hw_mode_response_vdev_mac_entry;
  22172. /** Data structure for information specific to a VDEV to MAC mapping. */
  22173. typedef struct {
  22174. /** TLV tag and len; tag equals
  22175. * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_vdev_mac_entry */
  22176. A_UINT32 tlv_header;
  22177. /** pdev_id for identifying the MAC
  22178. * See macros starting with WMI_PDEV_ID_ for values.
  22179. */
  22180. A_UINT32 pdev_id;
  22181. A_UINT32 vdev_id;
  22182. } wmi_pdev_set_hw_mode_response_vdev_mac_entry;
  22183. /* DEPRECATED - use wmi_pdev_set_hw_mode_response_event_fixed_param instead */
  22184. typedef struct {
  22185. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param */
  22186. /** Set Hardware Mode Response Event **/
  22187. /* Status of set_hw_mode command */
  22188. /*
  22189. * Values for Status:
  22190. * 0 - OK; command successful
  22191. * 1 - EINVAL; Requested invalid hw_mode
  22192. * 2 - ECANCELED; HW mode change canceled
  22193. * 3 - ENOTSUP; HW mode not supported
  22194. * 4 - EHARDWARE; HW mode change prevented by hardware
  22195. * 5 - EPENDING; HW mode change is pending
  22196. * 6 - ECOEX; HW mode change conflict with Coex
  22197. */
  22198. A_UINT32 status;
  22199. /* Configured Hardware Mode */
  22200. A_UINT32 cfgd_hw_mode_index;
  22201. /* Number of Vdev to Mac entries */
  22202. A_UINT32 num_vdev_mac_entries;
  22203. /**
  22204. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  22205. * structure. The TLV's are:
  22206. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  22207. */
  22208. } wmi_soc_set_hw_mode_response_event_fixed_param;
  22209. typedef struct {
  22210. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_event_fixed_param */
  22211. /** Set Hardware Mode Response Event **/
  22212. /** pdev_id for identifying the MAC
  22213. * See macros starting with WMI_PDEV_ID_ for values.
  22214. */
  22215. A_UINT32 pdev_id;
  22216. /* Status of set_hw_mode command */
  22217. /*
  22218. * Values for Status:
  22219. * 0 - OK; command successful
  22220. * 1 - EINVAL; Requested invalid hw_mode
  22221. * 2 - ECANCELED; HW mode change canceled
  22222. * 3 - ENOTSUP; HW mode not supported
  22223. * 4 - EHARDWARE; HW mode change prevented by hardware
  22224. * 5 - EPENDING; HW mode change is pending
  22225. * 6 - ECOEX; HW mode change conflict with Coex
  22226. */
  22227. A_UINT32 status;
  22228. /* Configured Hardware Mode */
  22229. A_UINT32 cfgd_hw_mode_index;
  22230. /* Number of Vdev to Mac entries */
  22231. A_UINT32 num_vdev_mac_entries;
  22232. /**
  22233. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  22234. * structure. The TLV's are:
  22235. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  22236. */
  22237. } wmi_pdev_set_hw_mode_response_event_fixed_param;
  22238. /* DEPRECATED - use wmi_pdev_hw_mode_transition_event_fixed_param instead */
  22239. typedef struct {
  22240. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param */
  22241. /** Hardware Mode Transition Event **/
  22242. /* Original or old Hardware mode */
  22243. A_UINT32 old_hw_mode_index;
  22244. /* New Hardware Mode */
  22245. A_UINT32 new_hw_mode_index;
  22246. /* Number of Vdev to Mac entries */
  22247. A_UINT32 num_vdev_mac_entries;
  22248. /**
  22249. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  22250. * structure. The TLV's are:
  22251. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  22252. */
  22253. } wmi_soc_hw_mode_transition_event_fixed_param;
  22254. typedef struct {
  22255. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_hw_mode_transition_event_fixed_param */
  22256. /** Hardware Mode Transition Event **/
  22257. /** pdev_id for identifying the MAC
  22258. * See macros starting with WMI_PDEV_ID_ for values.
  22259. */
  22260. A_UINT32 pdev_id;
  22261. /* Original or old Hardware mode */
  22262. A_UINT32 old_hw_mode_index;
  22263. /* New Hardware Mode */
  22264. A_UINT32 new_hw_mode_index;
  22265. /* Number of Vdev to Mac entries */
  22266. A_UINT32 num_vdev_mac_entries;
  22267. /**
  22268. * TLV (tag length value) parameters follow the pdev_set_hw_mode_response_event
  22269. * structure. The TLV's are:
  22270. * wmi_pdev_set_hw_mode_response_vdev_mac_entry
  22271. * wmi_pdev_set_hw_mode_response_vdev_mac_mapping[];
  22272. * wmi_pdev_band_to_mac mac_freq_mapping[];
  22273. */
  22274. } wmi_pdev_hw_mode_transition_event_fixed_param;
  22275. /**
  22276. * This command is sent from WLAN host driver to firmware for
  22277. * plugging in reorder queue desc to lithium hw.
  22278. *
  22279. * Example: plug-in queue desc for TID 5
  22280. * host->target: WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
  22281. * (vdev_id = PEER vdev id,
  22282. * peer_macaddr = PEER mac addr,
  22283. * tid = 5,
  22284. * queue_ptr_lo = queue desc addr lower 32 bits,
  22285. * queue_ptr_hi = queue desc addr higher 32 bits,
  22286. * queue_no = 16-bit number assigned by host for queue,
  22287. * stored in bits 15:0 of queue_no field)
  22288. */
  22289. typedef struct {
  22290. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_setup_cmd_fixed_param */
  22291. A_UINT32 vdev_id;
  22292. wmi_mac_addr peer_macaddr; /* peer mac address */
  22293. A_UINT32 tid; /* 0 to 15 = QoS TIDs, 16 = non-qos TID */
  22294. A_UINT32 queue_ptr_lo; /* lower 32 bits of queue desc adddress */
  22295. A_UINT32 queue_ptr_hi; /* upper 32 bits of queue desc adddress */
  22296. A_UINT32 queue_no; /* 16-bit number assigned by host for queue,
  22297. stored in bits 15:0 of queue_no field */
  22298. A_UINT32 ba_window_size_valid; /* Is ba_window_size valid?
  22299. * 0 = Invalid, 1 = Valid */
  22300. A_UINT32 ba_window_size; /* Valid values: 0 to 256
  22301. * Host sends the message when BA session is
  22302. * established or terminated for the TID. */
  22303. } wmi_peer_reorder_queue_setup_cmd_fixed_param;
  22304. /**
  22305. * This command is sent from WLAN host driver to firmware for
  22306. * removing one or more reorder queue desc to lithium hw.
  22307. *
  22308. * Example: remove queue desc for all TIDs
  22309. * host->target: WMI_PEER_REORDER_REMOVE_CMDID,
  22310. * (vdev_id = PEER vdev id,
  22311. * peer_macaddr = PEER mac addr,
  22312. * tid = 0x1FFFF,
  22313. */
  22314. typedef struct {
  22315. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_remove_cmd_fixed_param */
  22316. A_UINT32 vdev_id;
  22317. wmi_mac_addr peer_macaddr; /* peer mac address */
  22318. A_UINT32 tid_mask; /* bits 0 to 15 = QoS TIDs, bit 16 = non-qos TID */
  22319. } wmi_peer_reorder_queue_remove_cmd_fixed_param;
  22320. /* DEPRECATED - use wmi_pdev_set_mac_config_response_event_fixed_param instead */
  22321. typedef struct {
  22322. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param */
  22323. /** Set Dual MAC Config Response Event **/
  22324. /* Status for set_dual_mac_config command */
  22325. /*
  22326. * Values for Status:
  22327. * 0 - OK; command successful
  22328. * 1 - EINVAL; Requested invalid hw_mode
  22329. * 3 - ENOTSUP; HW mode not supported
  22330. * 4 - EHARDWARE; HW mode change prevented by hardware
  22331. * 6 - ECOEX; HW mode change conflict with Coex
  22332. */
  22333. A_UINT32 status;
  22334. } wmi_soc_set_dual_mac_config_response_event_fixed_param;
  22335. typedef struct {
  22336. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_response_event_fixed_param */
  22337. /** Set Dual MAC Config Response Event **/
  22338. /** pdev_id for identifying the MAC
  22339. * See macros starting with WMI_PDEV_ID_ for values.
  22340. */
  22341. A_UINT32 pdev_id;
  22342. /* Status for set_dual_mac_config command */
  22343. /*
  22344. * Values for Status:
  22345. * 0 - OK; command successful
  22346. * 1 - EINVAL; Requested invalid hw_mode
  22347. * 3 - ENOTSUP; HW mode not supported
  22348. * 4 - EHARDWARE; HW mode change prevented by hardware
  22349. * 6 - ECOEX; HW mode change conflict with Coex
  22350. */
  22351. A_UINT32 status;
  22352. } wmi_pdev_set_mac_config_response_event_fixed_param;
  22353. typedef enum {
  22354. MAWC_MOTION_STATE_UNKNOWN,
  22355. MAWC_MOTION_STATE_STATIONARY,
  22356. MAWC_MOTION_STATE_WALK,
  22357. MAWC_MOTION_STATE_TRANSIT,
  22358. } MAWC_MOTION_STATE;
  22359. typedef enum {
  22360. MAWC_SENSOR_STATUS_OK,
  22361. MAWC_SENSOR_STATUS_FAILED_TO_ENABLE,
  22362. MAWC_SENSOR_STATUS_SHUTDOWN,
  22363. } MAWC_SENSOR_STATUS;
  22364. typedef struct {
  22365. /* TLV tag and len; tag equals
  22366. * WMITLV_TAG_STRUC_wmi_mawc_sensor_report_ind_cmd_fixed_param */
  22367. A_UINT32 tlv_header;
  22368. /** new motion state, MAWC_MOTION_STATE */
  22369. A_UINT32 motion_state;
  22370. /** status code of sensor, MAWC_SENSOR_STATUS */
  22371. A_UINT32 sensor_status;
  22372. } wmi_mawc_sensor_report_ind_cmd_fixed_param;
  22373. /* MBO flag field definition */
  22374. /* Bit 0: 0 - Allow to connect to both MBO and non-MBO AP
  22375. * 1 - Allow to connect to MBO AP only
  22376. * Bit 1-31 : reserved.
  22377. */
  22378. #define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE (1<<0) /* DEPRECATED */
  22379. typedef struct {
  22380. /* TLV tag and len; tag equals
  22381. * WMITLV_TAG_STRUC_wmi_roam_set_mbo_fixed_param */
  22382. A_UINT32 tlv_header;
  22383. /** vdev id */
  22384. A_UINT32 vdev_id;
  22385. /** enable or disable MBO */
  22386. A_UINT32 enable;
  22387. /** MBO flags, refer to definition of MBO flags*/
  22388. A_UINT32 flags;
  22389. } wmi_roam_set_mbo_fixed_param; /* DEPRECATED */
  22390. typedef struct {
  22391. /* TLV tag and len; tag equals
  22392. * WMITLV_TAG_ARRAY_STRUC */
  22393. A_UINT32 tlv_header;
  22394. /** Current operating class number */
  22395. A_UINT32 cur_op_class;
  22396. /** Country string of current reg domain,
  22397. * the expected value should be same as country str defined
  22398. * in country IE.
  22399. * 3 octets (COUNTRY_STR) + 1 octet (always 0)
  22400. * The ordering of this array must be maintained,
  22401. * even when a big-endian host's WMI messages undergo
  22402. * automatic byte reordering for conversion to the
  22403. * little-endian ordering required by the target.
  22404. * On big-endian hosts, this array may need to be byte-swapped
  22405. * by the host, so the subsequent automatic byte-swap
  22406. * will result in the correct final byte order.
  22407. * global operating class: set country_str[0]=0
  22408. */
  22409. A_UINT8 country_str[4];
  22410. /** Supported operating class number in current regdomain */
  22411. A_UINT32 supp_op_class_num;
  22412. /* The TLVs will follow. */
  22413. /* A_UINT32 supp_op_class_list[] */
  22414. } wmi_supported_operating_class_param;
  22415. typedef struct {
  22416. /* TLV tag and len; tag equals
  22417. * WMITLV_TAG_ARRAY_STRUC */
  22418. A_UINT32 tlv_header;
  22419. /** non preferred channel attribute length */
  22420. A_UINT32 non_prefer_ch_attr_len;
  22421. /* The TLVs will follow. */
  22422. /** A_UINT8 non_prefer_ch_attr[];*/
  22423. } wmi_mbo_non_preferred_channel_report_param;
  22424. typedef struct {
  22425. /* TLV tag and len; tag equals
  22426. * WMITLV_TAG_STRUC_wmi_mawc_enable_sensor_event_fixed_param */
  22427. A_UINT32 tlv_header;
  22428. /* enable(1) or disable(0) */
  22429. A_UINT32 enable;
  22430. } wmi_mawc_enable_sensor_event_fixed_param;
  22431. typedef struct {
  22432. /* TLV tag and len; tag equals
  22433. * WMITLV_TAG_STRUC_wmi_extscan_configure_mawc_cmd_fixed_param */
  22434. A_UINT32 tlv_header;
  22435. /* Unique id identifying the VDEV */
  22436. A_UINT32 vdev_id;
  22437. /* enable(1) or disable(0) MAWC */
  22438. A_UINT32 enable;
  22439. /* ratio of skipping suppressing scan, skip one out of x */
  22440. A_UINT32 suppress_ratio;
  22441. } wmi_extscan_configure_mawc_cmd_fixed_param;
  22442. typedef struct {
  22443. /* TLV tag and len; tag equals
  22444. * WMITLV_TAG_STRUC_wmi_roam_per_config_fixed_param */
  22445. A_UINT32 tlv_header;
  22446. /* Unique id identifying the VDEV */
  22447. A_UINT32 vdev_id;
  22448. /* enable(1) or disable(0) packet error rate trigger for roaming */
  22449. A_UINT32 enable;
  22450. /* high_rate_thresh, low_rate_thresh, pkt_err_rate_thresh_pct:
  22451. * If PER monitoring as a trigger for roaming is enabled,
  22452. * it is controlled by high_rate_thresh, low_rate_thresh, and
  22453. * pkt_err_rate_thresh_pct.
  22454. * PER monitoring is performed only when the time-averaged throughput
  22455. * is less than high_rate_thresh.
  22456. * During PER monitoring, the target keeps track of the PHY rate for
  22457. * each of the first N PPDUs within a time window.
  22458. * If the number of PPDUs with PHY rate < low_rate_thresh exceeds
  22459. * N * pkt_err_rate_thresh_pct / 100, roaming will be triggered.
  22460. *
  22461. * This PER monitoring as a trigger for roaming is performed
  22462. * concurrently but independently for rx and tx.
  22463. */
  22464. A_UINT32 high_rate_thresh; /* units = Kbps */
  22465. A_UINT32 low_rate_thresh; /* units = Kbps */
  22466. A_UINT32 pkt_err_rate_thresh_pct;
  22467. /*
  22468. * rest time after associating to a new AP before
  22469. * starting to monitor PER as a roaming trigger,
  22470. * (units are seconds)
  22471. */
  22472. A_UINT32 per_rest_time;
  22473. /* This is the total time for which PER monitoring will be run.
  22474. * After completion of time windows, the average PER over the window
  22475. * will be computed.
  22476. * The parameter value stores specifications for both TX and RX
  22477. * monitor times.
  22478. * The two least-significant bytes (0 & 1) hold the RX monitor time;
  22479. * the two most-significant bytes (2 & 3) hold the TX monitor time.
  22480. */
  22481. A_UINT32 pkt_err_rate_mon_time; /* units = seconds */
  22482. /* Minimum roamable AP RSSI for candidate selection for PER based roam */
  22483. A_INT32 min_candidate_rssi; /* units = dBm */
  22484. } wmi_roam_per_config_fixed_param;
  22485. typedef struct {
  22486. /* TLV tag and len; tag equals
  22487. * WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param */
  22488. A_UINT32 tlv_header;
  22489. /* Unique id identifying the VDEV */
  22490. A_UINT32 vdev_id;
  22491. /* enable(1) or disable(0) MAWC */
  22492. A_UINT32 enable;
  22493. /* ratio of exponential backoff, next = current + current*ratio/100 */
  22494. A_UINT32 exp_backoff_ratio;
  22495. /* initial scan interval(msec) */
  22496. A_UINT32 init_scan_interval;
  22497. /* max scan interval(msec) */
  22498. A_UINT32 max_scan_interval;
  22499. } wmi_nlo_configure_mawc_cmd_fixed_param;
  22500. typedef struct {
  22501. /* TLV tag and len; tag equals
  22502. * WMITLV_TAG_STRUC_wmi_roam_configure_mawc_cmd_fixed_param */
  22503. A_UINT32 tlv_header;
  22504. /* Unique id identifying the VDEV */
  22505. A_UINT32 vdev_id;
  22506. /* enable(1) or disable(0) MAWC */
  22507. A_UINT32 enable;
  22508. /* data traffic load (kBps) to register CMC */
  22509. A_UINT32 traffic_load_threshold;
  22510. /* RSSI threshold (dBm) to scan for Best AP */
  22511. A_UINT32 best_ap_rssi_threshold;
  22512. /* high RSSI threshold adjustment in Stationary to suppress scan */
  22513. A_UINT32 rssi_stationary_high_adjust;
  22514. /* low RSSI threshold adjustment in Stationary to suppress scan */
  22515. A_UINT32 rssi_stationary_low_adjust;
  22516. } wmi_roam_configure_mawc_cmd_fixed_param;
  22517. #define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD 2
  22518. #define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER 5
  22519. typedef enum {
  22520. PACKET_FILTER_TYPE_INVALID = 0,
  22521. PACKET_FILTER_TYPE_FILTER_PKT,
  22522. PACKET_FILTER_TYPE_RESERVE_PKT, /* not used */
  22523. PACKET_FILTER_TYPE_MAX_ENUM_SIZE
  22524. } WMI_PACKET_FILTER_FILTER_TYPE;
  22525. typedef enum {
  22526. PACKET_FILTER_PROTO_TYPE_INVALID = 0,
  22527. /* L2 header */
  22528. PACKET_FILTER_PROTO_TYPE_MAC,
  22529. PACKET_FILTER_PROTO_TYPE_SNAP,
  22530. /* L3 header (EtherType) */
  22531. PACKET_FILTER_PROTO_TYPE_IPV4,
  22532. PACKET_FILTER_PROTO_TYPE_IPV6,
  22533. /* L4 header (IP protocol) */
  22534. PACKET_FILTER_PROTO_TYPE_UDP,
  22535. PACKET_FILTER_PROTO_TYPE_TCP,
  22536. PACKET_FILTER_PROTO_TYPE_ICMPV6,
  22537. PACKET_FILTER_PROTO_TYPE_MAX
  22538. } WMI_PACKET_FILTER_PROTO_TYPE;
  22539. typedef enum {
  22540. PACKET_FILTER_CMP_TYPE_INVALID = 0,
  22541. PACKET_FILTER_CMP_TYPE_EQUAL,
  22542. PACKET_FILTER_CMP_TYPE_MASK_EQUAL,
  22543. PACKET_FILTER_CMP_TYPE_NOT_EQUAL,
  22544. PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
  22545. PACKET_FILTER_CMP_TYPE_ADDRTYPE,
  22546. PACKET_FILTER_CMP_TYPE_MAX
  22547. } WMI_PACKET_FILTER_CMP_TYPE;
  22548. typedef enum {
  22549. PACKET_FILTER_SET_INACTIVE = 0,
  22550. PACKET_FILTER_SET_ACTIVE
  22551. } WMI_PACKET_FILTER_ACTION;
  22552. typedef enum {
  22553. PACKET_FILTER_SET_DISABLE = 0,
  22554. PACKET_FILTER_SET_ENABLE
  22555. } WMI_PACKET_FILTER_RUNTIME_ENABLE;
  22556. typedef struct {
  22557. A_UINT32 proto_type;
  22558. A_UINT32 cmp_type;
  22559. A_UINT32 data_length; /* Length of the data to compare (units = bytes) */
  22560. A_UINT32 data_offset; /* from start of the respective frame header (units = bytes) */
  22561. A_UINT32 compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Data to compare, little-endian order */
  22562. A_UINT32 dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Mask to be applied on rcvd packet data before compare, little-endian order */
  22563. } WMI_PACKET_FILTER_PARAMS_TYPE;
  22564. typedef struct {
  22565. A_UINT32 tlv_header;
  22566. A_UINT32 vdev_id;
  22567. A_UINT32 filter_id;
  22568. A_UINT32 filter_action; /* WMI_PACKET_FILTER_ACTION */
  22569. A_UINT32 filter_type;
  22570. A_UINT32 num_params; /* how many entries in paramsData are valid */
  22571. A_UINT32 coalesce_time; /* not currently used - fill with 0x0 */
  22572. WMI_PACKET_FILTER_PARAMS_TYPE paramsData[WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER];
  22573. /* deprecated0:
  22574. * This field simply provides filler space to retain the original message
  22575. * format while reducing WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER
  22576. * from 10 to 5.
  22577. */
  22578. WMI_PACKET_FILTER_PARAMS_TYPE deprecated0[5];
  22579. } WMI_PACKET_FILTER_CONFIG_CMD_fixed_param;
  22580. /* enable / disable all filters within the specified vdev */
  22581. typedef struct {
  22582. A_UINT32 tlv_header;
  22583. A_UINT32 vdev_id;
  22584. A_UINT32 enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */
  22585. } WMI_PACKET_FILTER_ENABLE_CMD_fixed_param;
  22586. #define WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS 0
  22587. #define WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS 9
  22588. #define WMI_LRO_INFO_TCP_FLAG_VALS_SET(tcp_flag_u32, tcp_flag_values) \
  22589. WMI_SET_BITS(tcp_flag_u32, \
  22590. WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
  22591. WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS, \
  22592. tcp_flag_values)
  22593. #define WMI_LRO_INFO_TCP_FLAG_VALS_GET(tcp_flag_u32) \
  22594. WMI_GET_BITS(tcp_flag_u32, \
  22595. WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
  22596. WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS)
  22597. #define WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS 9
  22598. #define WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS 9
  22599. #define WMI_LRO_INFO_TCP_FLAGS_MASK_SET(tcp_flag_u32, tcp_flags_mask) \
  22600. WMI_SET_BITS(tcp_flag_u32, \
  22601. WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
  22602. WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS, \
  22603. tcp_flags_mask)
  22604. #define WMI_LRO_INFO_TCP_FLAGS_MASK_GET(tcp_flag_u32) \
  22605. WMI_GET_BITS(tcp_flag_u32, \
  22606. WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
  22607. WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS)
  22608. typedef struct {
  22609. A_UINT32 tlv_header;
  22610. /**
  22611. * @brief lro_enable - indicates whether lro is enabled
  22612. * [0] LRO Enable
  22613. */
  22614. A_UINT32 lro_enable;
  22615. /**
  22616. * @brief tcp_flag_u32 - mask of which TCP flags to check and
  22617. * values to check for
  22618. * [8:0] TCP flag values - If the TCP flags from the packet do not match
  22619. * the values in this field after masking with TCP flags mask below,
  22620. * LRO eligible will not be set
  22621. * [17:9] TCP flags mask - Mask field for comparing the TCP values
  22622. * provided above with the TCP flags field in the received packet
  22623. * Use WMI_LRO_INFO_TCP_FLAG_VALS and WMI_LRO_INFO_TCP_FLAGS_MASK
  22624. * macros to isolate the mask field and values field that are packed
  22625. * into this u32 "word".
  22626. */
  22627. A_UINT32 tcp_flag_u32;
  22628. /**
  22629. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  22630. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  22631. * bytes 0 to 3
  22632. *
  22633. * In this and all the below toeplitz_hash fields, the bytes are
  22634. * specified in little-endian order. For example:
  22635. * toeplitz_hash_ipv4_0_3 bits 7:0 holds seed byte 0
  22636. * toeplitz_hash_ipv4_0_3 bits 15:8 holds seed byte 1
  22637. * toeplitz_hash_ipv4_0_3 bits 23:16 holds seed byte 2
  22638. * toeplitz_hash_ipv4_0_3 bits 31:24 holds seed byte 3
  22639. */
  22640. A_UINT32 toeplitz_hash_ipv4_0_3;
  22641. /**
  22642. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  22643. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  22644. * bytes 4 to 7
  22645. */
  22646. A_UINT32 toeplitz_hash_ipv4_4_7;
  22647. /**
  22648. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  22649. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  22650. * bytes 8 to 11
  22651. */
  22652. A_UINT32 toeplitz_hash_ipv4_8_11;
  22653. /**
  22654. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  22655. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  22656. * bytes 12 to 15
  22657. */
  22658. A_UINT32 toeplitz_hash_ipv4_12_15;
  22659. /**
  22660. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  22661. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  22662. * byte 16
  22663. */
  22664. A_UINT32 toeplitz_hash_ipv4_16;
  22665. /**
  22666. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  22667. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  22668. * bytes 0 to 3
  22669. */
  22670. A_UINT32 toeplitz_hash_ipv6_0_3;
  22671. /**
  22672. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  22673. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  22674. * bytes 4 to 7
  22675. */
  22676. A_UINT32 toeplitz_hash_ipv6_4_7;
  22677. /**
  22678. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  22679. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  22680. * bytes 8 to 11
  22681. */
  22682. A_UINT32 toeplitz_hash_ipv6_8_11;
  22683. /**
  22684. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  22685. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  22686. * bytes 12 to 15
  22687. */
  22688. A_UINT32 toeplitz_hash_ipv6_12_15;
  22689. /**
  22690. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  22691. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  22692. * bytes 16 to 19
  22693. */
  22694. A_UINT32 toeplitz_hash_ipv6_16_19;
  22695. /**
  22696. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  22697. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  22698. * bytes 20 to 22
  22699. */
  22700. A_UINT32 toeplitz_hash_ipv6_20_23;
  22701. /**
  22702. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  22703. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  22704. * bytes 24 to 27
  22705. */
  22706. A_UINT32 toeplitz_hash_ipv6_24_27;
  22707. /**
  22708. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  22709. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  22710. * bytes 28 to 31
  22711. */
  22712. A_UINT32 toeplitz_hash_ipv6_28_31;
  22713. /**
  22714. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  22715. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  22716. * bytes 32 to 35
  22717. */
  22718. A_UINT32 toeplitz_hash_ipv6_32_35;
  22719. /**
  22720. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  22721. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  22722. * bytes 36 to 39
  22723. */
  22724. A_UINT32 toeplitz_hash_ipv6_36_39;
  22725. /**
  22726. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  22727. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  22728. * byte 40
  22729. */
  22730. A_UINT32 toeplitz_hash_ipv6_40;
  22731. /**
  22732. * @brief pdev_id - identifies the MAC
  22733. * See macros starting with WMI_PDEV_ID_ for values.
  22734. */
  22735. A_UINT32 pdev_id;
  22736. } wmi_lro_info_cmd_fixed_param;
  22737. typedef struct {
  22738. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_cmd_fixed_param */
  22739. A_UINT32 offset; /* flash offset to write, starting from 0 */
  22740. A_UINT32 length; /* vaild data length in buffer, unit: byte */
  22741. } wmi_transfer_data_to_flash_cmd_fixed_param;
  22742. typedef struct {
  22743. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_complete_event_fixed_param */
  22744. /** Return status. 0 for success, non-zero otherwise */
  22745. A_UINT32 status;
  22746. } wmi_transfer_data_to_flash_complete_event_fixed_param;
  22747. typedef struct {
  22748. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_cmd_fixed_param */
  22749. A_UINT32 offset; /* flash offset to read, starting from 0 */
  22750. A_UINT32 length; /* data length to read, unit: byte */
  22751. } wmi_read_data_from_flash_cmd_fixed_param;
  22752. typedef struct {
  22753. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_event_fixed_param */
  22754. A_UINT32 status; /* Return status. 0 for success, non-zero otherwise */
  22755. A_UINT32 offset; /* flash offset reading from, starting from 0 */
  22756. A_UINT32 length; /* length of data being reported, unit: byte */
  22757. } wmi_read_data_from_flash_event_fixed_param;
  22758. typedef enum {
  22759. ENHANCED_MCAST_FILTER_DISABLED,
  22760. ENHANCED_MCAST_FILTER_ENABLED
  22761. } ENHANCED_MCAST_FILTER_CONFIG;
  22762. /*
  22763. * Command to enable/disable filtering of multicast IP with unicast mac
  22764. */
  22765. typedef struct {
  22766. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_config_enhanced_mcast_filter_fixed_param */
  22767. /* Unique id identifying the VDEV */
  22768. A_UINT32 vdev_id;
  22769. /* 1 = enable 0 = disable (see ENHANCED_MCAST_FILTER_CONFIG) */
  22770. A_UINT32 enable;
  22771. } wmi_config_enhanced_mcast_filter_cmd_fixed_param;
  22772. typedef struct {
  22773. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_wisa_cmd_fixed_param */
  22774. A_UINT32 tlv_header;
  22775. /** unique id identifying the VDEV, generated by the caller */
  22776. A_UINT32 vdev_id;
  22777. /** WISA enable / disable mode */
  22778. A_UINT32 wisa_mode;
  22779. } wmi_vdev_wisa_cmd_fixed_param;
  22780. /*
  22781. * This structure is used to report SMPS force mode set complete to host.
  22782. */
  22783. typedef struct {
  22784. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_complete_event_fixed_param */
  22785. /* Unique id identifying the VDEV */
  22786. A_UINT32 vdev_id;
  22787. /* Return status. 0 for success, non-zero otherwise */
  22788. A_UINT32 status;
  22789. } wmi_sta_smps_force_mode_complete_event_fixed_param;
  22790. /*
  22791. * This structure is used to report SCPC calibrated data to host.
  22792. */
  22793. typedef struct {
  22794. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scpc_event_fixed_param */
  22795. /** number of BDF patches. Each patch contains offset, length and data */
  22796. A_UINT32 num_patch;
  22797. /* This TLV is followed by another TLV of array of bytes
  22798. * A_UINT8 data[];
  22799. * This data array contains, for example
  22800. * patch1 offset(byte3~0), patch1 data length(byte7~4), patch1 data(byte11~8)
  22801. * patch2 offset(byte15~12), patch2 data length(byte19~16), patch2 data(byte47~20)
  22802. *
  22803. */
  22804. } wmi_scpc_event_fixed_param;
  22805. typedef enum {
  22806. FW_ACTIVE_BPF_MODE_DISABLE = (1 << 1),
  22807. FW_ACTIVE_BPF_MODE_FORCE_ENABLE = (1 << 2),
  22808. FW_ACTIVE_BPF_MODE_ADAPTIVE_ENABLE = (1 << 3),
  22809. } FW_ACTIVE_BPF_MODE;
  22810. /* bpf interface structure */
  22811. typedef struct wmi_bpf_get_capability_cmd_s {
  22812. A_UINT32 tlv_header;
  22813. A_UINT32 reserved; /* reserved for future use - must be filled with 0x0 */
  22814. } wmi_bpf_get_capability_cmd_fixed_param;
  22815. typedef struct wmi_bpf_capability_info_evt_s {
  22816. A_UINT32 tlv_header;
  22817. A_UINT32 bpf_version; /* fw's implement version */
  22818. A_UINT32 max_bpf_filters; /* max filters that fw supports */
  22819. A_UINT32 max_bytes_for_bpf_inst; /* the maximum bytes that can be used as bpf instructions */
  22820. A_UINT32 fw_active_bpf_support_mcbc_modes; /* multicast/broadcast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
  22821. A_UINT32 fw_active_bpf_support_uc_modes; /* unicast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
  22822. } wmi_bpf_capability_info_evt_fixed_param;
  22823. /* bit 0 of flags: report counters */
  22824. #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_S 0
  22825. #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_M 0x1
  22826. typedef struct wmi_bpf_get_vdev_stats_cmd_s {
  22827. A_UINT32 tlv_header;
  22828. A_UINT32 flags;
  22829. A_UINT32 vdev_id;
  22830. } wmi_bpf_get_vdev_stats_cmd_fixed_param;
  22831. typedef struct wmi_bpf_vdev_stats_info_evt_s {
  22832. A_UINT32 tlv_header;
  22833. A_UINT32 vdev_id;
  22834. A_UINT32 num_filters;
  22835. A_UINT32 num_checked_pkts;
  22836. A_UINT32 num_dropped_pkts;
  22837. } wmi_bpf_vdev_stats_info_evt_fixed_param;
  22838. typedef struct wmi_bpf_set_vdev_instructions_cmd_s {
  22839. A_UINT32 tlv_header;
  22840. A_UINT32 vdev_id;
  22841. A_UINT32 filter_id;
  22842. A_UINT32 bpf_version; /* host bpf version */
  22843. A_UINT32 total_length;
  22844. A_UINT32 current_offset;
  22845. A_UINT32 current_length;
  22846. /*
  22847. * The TLV follows:
  22848. * A_UINT8 buf_inst[]; <-- Variable length buffer for the instuctions
  22849. */
  22850. } wmi_bpf_set_vdev_instructions_cmd_fixed_param;
  22851. #define BPF_FILTER_ID_ALL 0xFFFFFFFF
  22852. typedef struct wmi_bpf_del_vdev_instructions_cmd_s {
  22853. A_UINT32 tlv_header;
  22854. A_UINT32 vdev_id;
  22855. A_UINT32 filter_id; /* BPF_FILTER_ID_ALL means delete all */
  22856. } wmi_bpf_del_vdev_instructions_cmd_fixed_param;
  22857. typedef struct wmi_bpf_set_vdev_active_mode_cmd_s {
  22858. A_UINT32 tlv_header;
  22859. A_UINT32 vdev_id;
  22860. A_UINT32 mcbc_mode; /* refer to FW_ACTIVE_BPF_MODE */
  22861. A_UINT32 uc_mode; /* refer to FW_ACTIVE_BPF_MODE */
  22862. } wmi_bpf_set_vdev_active_mode_cmd_fixed_param;
  22863. typedef struct wmi_bpf_set_vdev_enable_cmd_s {
  22864. A_UINT32 tlv_header;
  22865. A_UINT32 vdev_id;
  22866. A_UINT32 is_enabled; /* fw assume host default enables */
  22867. } wmi_bpf_set_vdev_enable_cmd_fixed_param;
  22868. typedef struct wmi_bpf_set_vdev_work_memory_cmd_s {
  22869. A_UINT32 tlv_header;
  22870. A_UINT32 vdev_id;
  22871. A_UINT32 bpf_version; /* bpf instruction version */
  22872. A_UINT32 program_len; /* the program length may be changed by this command */
  22873. A_UINT32 addr_offset; /* start writing addr in the working memory */
  22874. A_UINT32 length; /* the writing size of this command (byte units) */
  22875. /*
  22876. * The TLV follows:
  22877. * A_UINT8 buf_inst[]; <-- Variable length buffer with the data to write
  22878. */
  22879. } wmi_bpf_set_vdev_work_memory_cmd_fixed_param;
  22880. typedef struct wmi_bpf_get_vdev_work_memory_cmd_s {
  22881. A_UINT32 tlv_header;
  22882. A_UINT32 vdev_id;
  22883. A_UINT32 addr_offset; /* start reading addr in the working memory */
  22884. A_UINT32 length; /* reading size from addr (byte units) */
  22885. } wmi_bpf_get_vdev_work_memory_cmd_fixed_param;
  22886. typedef struct wmi_bpf_get_vdev_work_memory_resp_evt_s {
  22887. A_UINT32 tlv_header;
  22888. A_UINT32 vdev_id;
  22889. A_UINT32 offset; /* read memory offset from start_addr */
  22890. A_UINT32 length; /* read memory length of this command */
  22891. A_UINT32 fragment; /* 1 means more data will come, 0 means last fragment */
  22892. /*
  22893. * The TLV follows:
  22894. * A_UINT8 buf_inst[]; <-- Variable length buffer containing the read data
  22895. */
  22896. } wmi_bpf_get_vdev_work_memory_resp_evt_fixed_param;
  22897. #define AES_BLOCK_LEN 16 /* in bytes */
  22898. #define FIPS_KEY_LENGTH_128 16 /* in bytes */
  22899. #define FIPS_KEY_LENGTH_256 32 /* in bytes */
  22900. #define FIPS_ENCRYPT_CMD 0
  22901. #define FIPS_DECRYPT_CMD 1
  22902. #define FIPS_ENGINE_AES_CTR 0
  22903. #define FIPS_ENGINE_AES_MIC 1
  22904. #define FIPS_ERROR_OPER_TIMEOUT 1
  22905. /* WMI_PDEV_FIPS_CMDID */
  22906. typedef struct {
  22907. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_cmd_fixed_param */
  22908. union {
  22909. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  22910. /** pdev_id for identifying the MAC
  22911. * See macros starting with WMI_PDEV_ID_ for values.
  22912. */
  22913. A_UINT32 pdev_id;
  22914. };
  22915. A_UINT32 fips_cmd; /* FIPS_ENCRYPT or FIPS_DECRYPT */
  22916. A_UINT32 mode; /* FIPS_ENGINE_AES_CTR or FIPS_ENGINE_AES_MIC */
  22917. A_UINT32 key_len; /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256 (units = bytes) */
  22918. A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key */
  22919. A_UINT32 data_len; /* data length */
  22920. /*
  22921. * Following this structure is the TLV:
  22922. * A_UINT32 data[1]; <-- In Data (keep this in the end)
  22923. */
  22924. } wmi_pdev_fips_cmd_fixed_param;
  22925. typedef struct {
  22926. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_enable_cmd_fixed_param */
  22927. union {
  22928. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  22929. /** pdev_id for identifying the MAC
  22930. * See macros starting with WMI_PDEV_ID_ for values.
  22931. */
  22932. A_UINT32 pdev_id;
  22933. };
  22934. A_UINT32 enable; /* 1:enable, 0:disable */
  22935. A_UINT32 mode; /* 1:GPIO parallel mode, 0:GPIO serial mode */
  22936. A_UINT32 rx_antenna; /* rx antenna */
  22937. A_UINT32 tx_default_antenna; /* tx default antenna */
  22938. /*
  22939. * Following this structure is the TLV:
  22940. * wmi_pdev_smart_ant_gpio_handle
  22941. */
  22942. } wmi_pdev_smart_ant_enable_cmd_fixed_param;
  22943. /** GPIO pins/function values to control antennas */
  22944. typedef struct {
  22945. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_gpio_handle */
  22946. A_UINT32 gpio_pin; /* For serial: index 0-strobe index 1-data, For Parallel: per stream */
  22947. A_UINT32 gpio_func; /* GPIO function values for Smart Antenna */
  22948. /** pdev_id for identifying the MAC
  22949. * See macros starting with WMI_PDEV_ID_ for values.
  22950. */
  22951. A_UINT32 pdev_id;
  22952. } wmi_pdev_smart_ant_gpio_handle;
  22953. typedef struct {
  22954. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param */
  22955. union {
  22956. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  22957. /** pdev_id for identifying the MAC
  22958. * See macros starting with WMI_PDEV_ID_ for values.
  22959. */
  22960. A_UINT32 pdev_id;
  22961. };
  22962. A_UINT32 rx_antenna;
  22963. } wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param;
  22964. typedef struct {
  22965. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param */
  22966. /** unique id identifying the vdev, generated by the caller */
  22967. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  22968. /** peer MAC address */
  22969. wmi_mac_addr peer_macaddr;
  22970. /*
  22971. * Following this structure is the TLV:
  22972. * wmi_peer_smart_ant_set_tx_antenna_series
  22973. */
  22974. } wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param;
  22975. typedef struct {
  22976. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_series */
  22977. /* antenna array */
  22978. A_UINT32 antenna_series;
  22979. } wmi_peer_smart_ant_set_tx_antenna_series;
  22980. typedef struct {
  22981. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_param */
  22982. /* rate array */
  22983. union {
  22984. /* train_rate_series:
  22985. * original name, used for 8-bit rate-code implementations
  22986. */
  22987. A_UINT32 train_rate_series;
  22988. /* train_rate_series_lo:
  22989. * Contains the lower 32 bits of rate array, for larger rate-code
  22990. * implementations. This field is paired with train_rate_series_hi.
  22991. */
  22992. A_UINT32 train_rate_series_lo;
  22993. };
  22994. /* antenna array */
  22995. A_UINT32 train_antenna_series;
  22996. /* Rate flags */
  22997. /* TODO: For future use? */
  22998. A_UINT32 rc_flags;
  22999. /* rate array -- continued */
  23000. A_UINT32 train_rate_series_hi; /* Higher 32 bits of rate array */
  23001. } wmi_peer_smart_ant_set_train_antenna_param;
  23002. typedef struct {
  23003. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param */
  23004. /** unique id identifying the VDEV, generated by the caller */
  23005. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  23006. /** peer MAC address */
  23007. wmi_mac_addr peer_macaddr;
  23008. /* num packets; 0-stop training */
  23009. A_UINT32 num_pkts;
  23010. /*
  23011. * Following this structure is the TLV:
  23012. * wmi_peer_smart_ant_set_train_antenna_param
  23013. */
  23014. } wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param;
  23015. typedef struct {
  23016. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param */
  23017. /** unique id identifying the vdev, generated by the caller */
  23018. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  23019. /** peer MAC address */
  23020. wmi_mac_addr peer_macaddr;
  23021. /* command id*/
  23022. A_UINT32 cmd_id;
  23023. /* number of arguments passed */
  23024. A_UINT32 args_count;
  23025. /*
  23026. * Following this structure is the TLV:
  23027. * A_UINT32 args[]; <-- argument list
  23028. */
  23029. } wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param;
  23030. typedef struct {
  23031. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_ctrl_chain */
  23032. A_UINT32 antCtrlChain;
  23033. /** pdev_id for identifying the MAC
  23034. * See macros starting with WMI_PDEV_ID_ for values.
  23035. */
  23036. A_UINT32 pdev_id;
  23037. } wmi_pdev_set_ant_ctrl_chain;
  23038. typedef struct {
  23039. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_switch_tbl_cmd_fixed_param */
  23040. A_UINT32 mac_id; /* MAC ID */
  23041. A_UINT32 antCtrlCommon1;
  23042. A_UINT32 antCtrlCommon2;
  23043. /*
  23044. * Following this structure is the TLV:
  23045. * wmi_pdev_set_ant_ctrl_chain
  23046. */
  23047. } wmi_pdev_set_ant_switch_tbl_cmd_fixed_param;
  23048. typedef struct {
  23049. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ctl_table_cmd_fixed_param */
  23050. union {
  23051. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  23052. /** pdev_id for identifying the MAC
  23053. * See macros starting with WMI_PDEV_ID_ for values.
  23054. */
  23055. A_UINT32 pdev_id;
  23056. };
  23057. /** len of CTL info */
  23058. A_UINT32 ctl_len;
  23059. /* ctl array (len adjusted to number of words).
  23060. * Following this structure is the TLV:
  23061. * A_UINT32 ctl_info[1];
  23062. */
  23063. } wmi_pdev_set_ctl_table_cmd_fixed_param;
  23064. typedef struct {
  23065. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_bios_sar_cmd_fixed_param */
  23066. A_UINT32 pdev_id; /* pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  23067. A_UINT32 sar_len;
  23068. /* sar power array are stored in TLV, which follow this structure;
  23069. * sar_len is the number of valid bytes in the sar power array;
  23070. * sar power array contains 22 elements.
  23071. * Each element stores the maximum SAR power on certain band.
  23072. * Its type is A_UINT8 and its unit is 0.25 dBm.
  23073. * sar_power[0] for chain0 2g
  23074. * sar_power[1] for chain0 5g unii-1
  23075. * ...
  23076. * sar_power[4] for chain0 5g unii-4
  23077. * sar_power[5] for chain0 6g unii-5
  23078. * ...
  23079. * sar_power[10] for chain0 6g unii-10
  23080. * sar_power[11] for chain1 2g
  23081. * ...
  23082. * sar_power[21] for chain1 6g unii-10
  23083. */
  23084. A_UINT32 dbs_backoff_len;
  23085. /* dbs_backoff follow sar array, its type is A_UINT8;
  23086. * dbs_backoff[0] ~ dbs_backoff[5], these six elements are based on
  23087. * maximum SAR power, and make some offset adjustment in DBS mode.
  23088. * Their unit is 0.25 dB.
  23089. * dbs_backoff[0] for chain 0 2G
  23090. * dbs_backoff[1] for chain 0 5G
  23091. * dbs_backoff[2] for chain 0 6G
  23092. * dbs_backoff[3] for chain 1 2G
  23093. * dbs_backoff[4] for chain 1 5G
  23094. * dbs_backoff[5] for chain 1 6G
  23095. */
  23096. } wmi_pdev_set_bios_sar_table_cmd_fixed_param;
  23097. typedef struct {
  23098. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_bios_sar_cmd_fixed_param */
  23099. A_UINT32 pdev_id; /* pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  23100. A_UINT32 geo_len;
  23101. /* geo offset array is in TLV, followed this structure:
  23102. * A_UINT8 Geo_offset[];
  23103. * Geo_offset array has 18 elements. The meaning of each element is to
  23104. * adjust offset based on maximum SAR power according to different regions.
  23105. * Its unit is 0.25 dB.
  23106. * Geo_offset[0] chain 0 FCC_Offset on 2G
  23107. * Geo_offset[1] chain 0 FCC_Offset on 5G
  23108. * Geo_offset[2] chain 0 FCC_Offset on 6G
  23109. * Geo_offset[3] chain 0 CE_Offset on 2G
  23110. * Geo_offset[4] chain 0 CE_Offset on 5G
  23111. * Geo_offset[5] chain 0 CE_Offset on 6G
  23112. * Geo_offset[6] chain 0 ROW_Offset on 2G
  23113. * Geo_offset[7] chain 0 ROW_Offset on 5G
  23114. * Geo_offset[8] chain 0 ROW_Offset on 6G
  23115. * Geo_offset[9] chain 1 FCC_Offset on 2G
  23116. * ...
  23117. * Geo_offset[17] chain 1 ROW_Offset on 6G
  23118. * In actual use, FW will subtract an offset value according to the region;
  23119. */
  23120. } wmi_pdev_set_bios_geo_table_cmd_fixed_param;
  23121. typedef struct {
  23122. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mimogain_table_cmd_fixed_param */
  23123. union {
  23124. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  23125. /** pdev_id for identifying the MAC
  23126. * See macros starting with WMI_PDEV_ID_ for values.
  23127. */
  23128. A_UINT32 pdev_id;
  23129. };
  23130. A_UINT32 mimogain_info; /* see WMI_MIMOGAIN macros */
  23131. /*
  23132. * Bit 7:0 len of array gain table
  23133. * Bit 8 bypass multi chain gain or not
  23134. */
  23135. /* array gain table(s) (len adjusted to number of words).
  23136. * Following this structure is the TLV:
  23137. * A_UINT32 arraygain_tbl[1];
  23138. */
  23139. } wmi_pdev_set_mimogain_table_cmd_fixed_param;
  23140. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_S 0
  23141. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN (0xff << WMI_MIMOGAIN_ARRAY_GAIN_LEN_S)
  23142. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
  23143. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
  23144. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S 8
  23145. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS (0x1 << WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S)
  23146. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
  23147. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
  23148. typedef struct {
  23149. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fwtest_set_param_cmd_fixed_param */
  23150. /** parameter id */
  23151. A_UINT32 param_id;
  23152. /** parameter value */
  23153. A_UINT32 param_value;
  23154. } wmi_fwtest_set_param_cmd_fixed_param;
  23155. #define WMI_ATF_DENOMINATION 1000 /* Expressed in 1 part in 1000 (permille) */
  23156. #define WMI_ATF_SSID_FAIR_SCHED 0 /** fair ATF scheduling for vdev */
  23157. #define WMI_ATF_SSID_STRICT_SCHED 1 /** strict ATF scheduling for vdev */
  23158. #define WMI_ATF_SSID_FAIR_SCHED_WITH_UB 2 /** fair ATF scheduling with upper bound for VDEV */
  23159. typedef struct {
  23160. /** TLV tag and len; tag equals
  23161. * WMITLV_TAG_STRUC_wmi_atf_peer_info */
  23162. A_UINT32 tlv_header;
  23163. wmi_mac_addr peer_macaddr;
  23164. A_UINT32 atf_units; /* Based on 1 part in 1000 (per mille) */
  23165. A_UINT32 atf_groupid; /* Group Id of the peers for ATF SSID grouping */
  23166. A_UINT32 atf_units_reserved; /* Peer congestion threshold for future use */
  23167. A_UINT32 vdev_id;
  23168. A_UINT32 pdev_id;
  23169. } wmi_atf_peer_info;
  23170. typedef struct {
  23171. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param */
  23172. A_UINT32 num_peers;
  23173. /*
  23174. * Following this structure is the TLV:
  23175. * struct wmi_atf_peer_info peer_info[num_peers];
  23176. */
  23177. } wmi_peer_atf_request_fixed_param;
  23178. #define WMI_ATF_GROUP_SCHED_POLICY_BIT_POS 0
  23179. #define WMI_ATF_GROUP_SCHED_POLICY_NUM_BITS 4
  23180. #define WMI_ATF_GROUP_GET_GROUP_SCHED_POLICY(atf_group_flags) \
  23181. WMI_GET_BITS(atf_group_flags,WMI_ATF_GROUP_SCHED_POLICY_BIT_POS,WMI_ATF_GROUP_SCHED_POLICY_NUM_BITS)
  23182. #define WMI_ATF_GROUP_SET_GROUP_SCHED_POLICY(atf_group_flags,val) \
  23183. WMI_SET_BITS(atf_group_flags,WMI_ATF_GROUP_SCHED_POLICY_BIT_POS,WMI_ATF_GROUP_SCHED_POLICY_NUM_BITS,val)
  23184. typedef struct {
  23185. /** TLV tag and len; tag equals
  23186. * WMITLV_TAG_STRUC_wmi_atf_group_info */
  23187. A_UINT32 tlv_header;
  23188. A_UINT32 atf_group_id; /* ID of the Air Time Management group */
  23189. /* atf_group_units
  23190. * Fraction of air time allowed for the group, in per mille units
  23191. * (from 0-1000).
  23192. * For example, to indicate that the group can use 12.3% of the air time,
  23193. * the atf_group_units setting would be 123.
  23194. */
  23195. A_UINT32 atf_group_units;
  23196. /* atf_group_flags
  23197. * Bits 4-31 - Reserved (Shall be zero)
  23198. * Bits 0-3 - Group Schedule Policy (Fair/Strict/Fair with upper bound)
  23199. * Refer to WMI_ATF_SSID_ definitions
  23200. */
  23201. A_UINT32 atf_group_flags;
  23202. } wmi_atf_group_info;
  23203. typedef struct {
  23204. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_atf_ssid_grp_request_fixed_param */
  23205. A_UINT32 pdev_id;
  23206. /*
  23207. * Following this structure is the TLV:
  23208. * struct wmi_atf_group_info group_info[];
  23209. */
  23210. } wmi_atf_ssid_grp_request_fixed_param;
  23211. /* ATF Configurations for WMM ACs of a group, value for each AC shall be in
  23212. * percentage (0-100).
  23213. * This perecentage is relative to the residual airtime (derived by FW)
  23214. * configured for the group.
  23215. * When WMM ATF is not configured for a peer all values shall be 0.
  23216. */
  23217. typedef struct {
  23218. /** TLV tag and len; tag equals
  23219. * WMITLV_TAG_STRUC_wmi_atf_group_wmm_ac_info
  23220. */
  23221. A_UINT32 tlv_header;
  23222. A_UINT32 atf_group_id; /* ID of the Air Time Management group */
  23223. A_UINT32 atf_units_be;
  23224. A_UINT32 atf_units_bk;
  23225. A_UINT32 atf_units_vi;
  23226. A_UINT32 atf_units_vo;
  23227. } wmi_atf_group_wmm_ac_info;
  23228. typedef struct {
  23229. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_atf_grp_wmm_ac_cfg_request_fixed_param */
  23230. A_UINT32 pdev_id;
  23231. /*
  23232. * Following this structure is the TLV:
  23233. * struct wmi_atf_group_wmm_ac_info group_info[];
  23234. */
  23235. } wmi_atf_grp_wmm_ac_cfg_request_fixed_param;
  23236. #define WMI_VDEV_LATENCY_TIDNUM_BIT_POS 0
  23237. #define WMI_VDEV_LATENCY_TIDNUM_NUM_BITS 8
  23238. #define WMI_VDEV_LATENCY_GET_TIDNUM(vdev_latency_info) \
  23239. WMI_GET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_TIDNUM_BIT_POS, WMI_VDEV_LATENCY_TIDNUM_NUM_BITS)
  23240. #define WMI_VDEV_LATENCY_SET_TIDNUM(vdev_latency_info,val) \
  23241. WMI_SET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_TIDNUM_BIT_POS, WMI_VDEV_LATENCY_TIDNUM_NUM_BITS, val)
  23242. #define WMI_VDEV_LATENCY_AC_BIT_POS 8
  23243. #define WMI_VDEV_LATENCY_AC_NUM_BITS 2
  23244. #define WMI_VDEV_LATENCY_GET_AC(vdev_latency_info) \
  23245. WMI_GET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_AC_BIT_POS, WMI_VDEV_LATENCY_AC_NUM_BITS)
  23246. #define WMI_VDEV_LATENCY_SET_AC(vdev_latency_info,val) \
  23247. WMI_SET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_AC_BIT_POS, WMI_VDEV_LATENCY_AC_NUM_BITS, val)
  23248. #define WMI_VDEV_LATENCY_DL_VALID_BIT_POS 10
  23249. #define WMI_VDEV_LATENCY_DL_VALID_NUM_BITS 1
  23250. #define WMI_VDEV_LATENCY_GET_DL_VALID(vdev_latency_info) \
  23251. WMI_GET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_DL_VALID_BIT_POS, WMI_VDEV_LATENCY_DL_VALID_NUM_BITS)
  23252. #define WMI_VDEV_LATENCY_SET_DL_VALID(vdev_latency_info,val) \
  23253. WMI_SET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_DL_VALID_BIT_POS, WMI_VDEV_LATENCY_DL_VALID_NUM_BITS, val)
  23254. #define WMI_VDEV_LATENCY_UL_VALID_BIT_POS 11
  23255. #define WMI_VDEV_LATENCY_UL_VALID_NUM_BITS 1
  23256. #define WMI_VDEV_LATENCY_GET_UL_VALID(vdev_latency_info) \
  23257. WMI_GET_BITS(vdev_latency_info,WMI_VDEV_LATENCY_UL_VALID_BIT_POS, WMI_VDEV_LATENCY_UL_VALID_NUM_BITS)
  23258. #define WMI_VDEV_LATENCY_SET_UL_VALID(vdev_latency_info,val) \
  23259. WMI_SET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_UL_VALID_BIT_POS, WMI_VDEV_LATENCY_UL_VALID_NUM_BITS, val)
  23260. typedef struct {
  23261. /** TLV tag and len; tag equals
  23262. * WMITLV_TAG_STRUC_wmi_vdev_latency_info
  23263. */
  23264. A_UINT32 tlv_header;
  23265. /*
  23266. * Maximum expected average delay between 2 schedules in milliseconds
  23267. * of given TID type when it has active traffic.
  23268. * 0x0 is considered as invalid service interval.
  23269. */
  23270. A_UINT32 service_interval;
  23271. /* burst_size:
  23272. * The number of bytes transmitted (in DL TIDs) / received (in UL ACs)
  23273. * in service interval.
  23274. */
  23275. A_UINT32 burst_size;
  23276. /* max_latency:
  23277. * The maximum end to end latency expectation, in milliseconds.
  23278. * If this value is 0x0, it shall be ignored.
  23279. */
  23280. A_UINT32 max_latency;
  23281. /* max_per:
  23282. * The maximum PER (as a percent) for the peer-TID, in range 1 - 100.
  23283. * If this value is 0x0, it shall be ignored.
  23284. */
  23285. A_UINT32 max_per;
  23286. /* min_tput:
  23287. * The minimum guaranteed throughput to the peer-TID, in Kbps.
  23288. * If this value is 0x0, it shall be ignored.
  23289. */
  23290. A_UINT32 min_tput;
  23291. /* vdev_latency_info
  23292. * Bits 12 - 31 - Reserved (Shall be zero)
  23293. * Bit 11 - UL latency config indication.
  23294. * If this bit is set then this latency info will
  23295. * be used when triggering UL traffic. Until the
  23296. * AC specified in bits 8-9 has transferred at least
  23297. * burst_size amount of UL data within the service
  23298. * period, the AP will continue sending UL triggers
  23299. * when the STA has data of the specified access
  23300. * category ready to transmit.
  23301. * Note that the TID specified in bits 0-7 does not
  23302. * apply to UL; the TID-to-AC mapping applied to DL
  23303. * data that can be adjusted by the TID specified
  23304. * in bits 0-7 and the AC specified in bits 8-9 is
  23305. * distinct from the TID-to-AC mapping applied to
  23306. * UL data.
  23307. * Bit 10 - DL latency config indication. If the bit is set
  23308. * then DL TID will use this latency config.
  23309. * Bits 8 - 9 - This bit has info on the custom AC of DL TID.
  23310. * Also if bit 11 is set, the AP will apply some
  23311. * of these latency specs (in particular, burst_size)
  23312. * to UL traffic for this AC, by sending UL triggers
  23313. * until the desired amount of data has been received
  23314. * within the service period.
  23315. * Bits 0 - 7 - Specifies the TID of interest that corresponds
  23316. * to the AC specified in bits 8-9. This can be
  23317. * used to adjust the TID-to-AC mapping applied to
  23318. * DL data (if bit 10 is set).
  23319. */
  23320. A_UINT32 vdev_latency_info;
  23321. } wmi_vdev_latency_info;
  23322. /*
  23323. * Currently wmi_vdev_tid_latency_config_fixed_param will be sent per
  23324. * data tid to map the AC.
  23325. * Also to configure VDEV level latency config to be used by all TIDs
  23326. * based on the mapping.
  23327. * VDEV restart is expected during this command
  23328. */
  23329. typedef struct {
  23330. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_tid_latency_config_fixed_param */
  23331. A_UINT32 pdev_id;
  23332. A_UINT32 vdev_id;
  23333. /*
  23334. * Following this structure is the TLV:
  23335. * struct wmi_vdev_latency_info vdev_latency_info[];
  23336. */
  23337. } wmi_vdev_tid_latency_config_fixed_param;
  23338. #define WMI_TID_LATENCY_TIDNUM_BIT_POS 0
  23339. #define WMI_TID_LATENCY_TIDNUM_NUM_BITS 8
  23340. #define WMI_TID_LATENCY_GET_TIDNUM(latency_tid_info) \
  23341. WMI_GET_BITS(latency_tid_info, WMI_TID_LATENCY_TIDNUM_BIT_POS, WMI_TID_LATENCY_TIDNUM_NUM_BITS)
  23342. #define WMI_TID_LATENCY_SET_TIDNUM(latency_tid_info,val) \
  23343. WMI_SET_BITS(latency_tid_info, WMI_TID_LATENCY_TIDNUM_BIT_POS, WMI_TID_LATENCY_TIDNUM_NUM_BITS, val)
  23344. #define WMI_TID_LATENCY_AC_BIT_POS 8
  23345. #define WMI_TID_LATENCY_AC_NUM_BITS 2
  23346. #define WMI_TID_LATENCY_GET_AC(latency_tid_info) \
  23347. WMI_GET_BITS(latency_tid_info, WMI_TID_LATENCY_AC_BIT_POS , WMI_TID_LATENCY_AC_NUM_BITS)
  23348. #define WMI_TID_LATENCY_SET_AC(latency_tid_info,val) \
  23349. WMI_SET_BITS(latency_tid_info, WMI_TID_LATENCY_AC_BIT_POS , WMI_TID_LATENCY_AC_NUM_BITS, val)
  23350. #define WMI_TID_LATENCY_DL_ENABLE_BIT_POS 10
  23351. #define WMI_TID_LATENCY_DL_ENABLE_NUM_BITS 1
  23352. #define WMI_TID_LATENCY_GET_DL_ENABLE(latency_tid_info) \
  23353. WMI_GET_BITS(latency_tid_info,WMI_TID_LATENCY_DL_ENABLE_BIT_POS, WMI_TID_LATENCY_DL_ENABLE_NUM_BITS)
  23354. #define WMI_TID_LATENCY_SET_DL_ENABLE(latency_tid_info,val) \
  23355. WMI_SET_BITS(latency_tid_info,WMI_TID_LATENCY_DL_ENABLE_BIT_POS, WMI_TID_LATENCY_DL_ENABLE_NUM_BITS, val)
  23356. #define WMI_TID_LATENCY_UL_ENABLE_BIT_POS 11
  23357. #define WMI_TID_LATENCY_UL_ENABLE_NUM_BITS 1
  23358. #define WMI_TID_LATENCY_GET_UL_ENABLE(latency_tid_info) \
  23359. WMI_GET_BITS(latency_tid_info,WMI_TID_LATENCY_UL_ENABLE_BIT_POS, WMI_TID_LATENCY_UL_ENABLE_NUM_BITS)
  23360. #define WMI_TID_LATENCY_SET_UL_ENABLE(latency_tid_info,val) \
  23361. WMI_SET_BITS(latency_tid_info,WMI_TID_LATENCY_UL_ENABLE_BIT_POS, WMI_TID_LATENCY_UL_ENABLE_NUM_BITS, val)
  23362. #define WMI_LATENCY_BURST_SIZE_SUM_BIT_POS 12
  23363. #define WMI_LATENCY_BURST_SIZE_SUM_NUM_BITS 2
  23364. #define WMI_LATENCY_GET_BURST_SIZE_SUM(latency_tid_info) \
  23365. WMI_GET_BITS(latency_tid_info, WMI_LATENCY_BURST_SIZE_SUM_BIT_POS, WMI_LATENCY_BURST_SIZE_SUM_NUM_BITS)
  23366. #define WMI_LATENCY_SET_BURST_SIZE_SUM(latency_tid_info,val) \
  23367. WMI_SET_BITS(latency_tid_info, WMI_LATENCY_BURST_SIZE_SUM_BIT_POS, WMI_LATENCY_BURST_SIZE_SUM_NUM_BITS, val)
  23368. #define WMI_LATENCY_MSDUQ_ID_BIT_POS 14
  23369. #define WMI_LATENCY_MSDUQ_ID_NUM_BITS 4
  23370. #define WMI_LATENCY_GET_MSDUQ_ID(latency_tid_info) \
  23371. WMI_GET_BITS(latency_tid_info, WMI_LATENCY_MSDUQ_ID_BIT_POS, WMI_LATENCY_MSDUQ_ID_NUM_BITS)
  23372. #define WMI_LATENCY_SET_MSDUQ_ID(latency_tid_info,val) \
  23373. WMI_SET_BITS(latency_tid_info, WMI_LATENCY_MSDUQ_ID_BIT_POS, WMI_LATENCY_MSDUQ_ID_NUM_BITS, val)
  23374. typedef struct {
  23375. /** TLV tag and len; tag equals
  23376. * WMITLV_TAG_STRUC_wmi_tid_latency_info
  23377. */
  23378. A_UINT32 tlv_header;
  23379. wmi_mac_addr dest_macaddr; /* Mac address of end client */
  23380. /*
  23381. * Maximum expected average delay between 2 schedules in milliseconds
  23382. * of given TID type when it has active traffic.
  23383. * 0x0 is considered as invalid service interval.
  23384. */
  23385. A_UINT32 service_interval;
  23386. /*
  23387. * Cumulative number of bytes are expected to be transmitted or
  23388. * received in the service interval when this specific Peer-TID
  23389. * has active traffic.
  23390. * If cumulative number of bytes is 0x0, it is considered as
  23391. * invalid burst size. In that case, firmware would try to transmit
  23392. * and receive as many bytes as it can for this specific Peer-TID.
  23393. * This burst size will be added or subtracted from vdev burst size
  23394. * based on burst size sum bit in latency tid info.
  23395. * The VDEV burst size will be considered to be 0 when no VDEV latency
  23396. * command is received.
  23397. * If host needs to set burst size for a peer then they can use the
  23398. * peer cmd and set burst size sum bit to 1.
  23399. */
  23400. A_UINT32 burst_size_diff;
  23401. /* max_latency:
  23402. * The maximum end to end latency expectation, in milliseconds.
  23403. * If this value is 0x0, it shall be ignored.
  23404. */
  23405. A_UINT32 max_latency;
  23406. /* max_per:
  23407. * The maximum PER (as a percent) for the peer-TID, in range 1 - 100
  23408. * If this value is 0x0, it shall be ignored.
  23409. */
  23410. A_UINT32 max_per;
  23411. /* min_tput:
  23412. * The minimum guaranteed throughput to the peer-TID, in Kbps.
  23413. * If this value is 0x0, it shall be ignored.
  23414. */
  23415. A_UINT32 min_tput;
  23416. /* latency_tid_info
  23417. * Bits 18-31 - Reserved (Shall be zero)
  23418. * Bits 14-17 - MSDU queue flow id within the TID for configuring
  23419. * latency info per MSDU flow queue
  23420. * Bit 12-13 - burst size sum. Bit to indicate whether to add or
  23421. * subtract burst_size_diff from vdev cmd burst size:
  23422. * 1 -> addition
  23423. * 2 -> subtraction
  23424. * Bit 11 - UL latency config indication.
  23425. * If this bit is set then this latency info will
  23426. * be used when triggering UL traffic. Until the
  23427. * AC specified in bits 8-9 has transferred at least
  23428. * burst_size amount of UL data within the service
  23429. * period, the AP will continue sending UL triggers
  23430. * when the STA has data of the specified access
  23431. * category ready to transmit.
  23432. * Note that the TID specified in bits 0-7 does not
  23433. * apply to UL; the TID-to-AC mapping applied to DL
  23434. * data that can be adjusted by the TID specified
  23435. * in bits 0-7 and the AC specified in bits 8-9 is
  23436. * distinct from the TID-to-AC mapping applied to
  23437. * UL data.
  23438. * Bit 10 - DL latency config indication. If the bit is set
  23439. * then DL TID will use this latency config.
  23440. * Bits 8 - 9 - This bit has info on the custom AC of DL TID.
  23441. * Also if bit 11 is set, the AP will apply some
  23442. * of these latency specs (in particular, burst_size)
  23443. * to UL traffic for this AC, by sending UL triggers
  23444. * until the desired amount of data has been received
  23445. * within the service period.
  23446. * Bits 0 - 7 - Specifies the TID of interest that corresponds
  23447. * to the AC specified in bits 8-9. This can be
  23448. * used to adjust the TID-to-AC mapping applied to
  23449. * DL data (if bit 10 is set).
  23450. */
  23451. A_UINT32 latency_tid_info;
  23452. } wmi_tid_latency_info;
  23453. /*
  23454. * Currently wmi_peer_tid_set_latency_request_fixed_param will be sent
  23455. * per TID per latency configured client.
  23456. * In future this command might come for multiple latency configured
  23457. * clients together.
  23458. * The clients are expected to be associated while receiving this command.
  23459. */
  23460. typedef struct {
  23461. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_latency_config_fixed_param */
  23462. A_UINT32 pdev_id;
  23463. /*
  23464. * Following this structure is the TLV:
  23465. * struct wmi_tid_latency_info latency_info[];
  23466. */
  23467. } wmi_peer_tid_latency_config_fixed_param;
  23468. #define WMI_ATF_GROUP_CFG_PEER_BIT_POS 0
  23469. #define WMI_ATF_GROUP_CFG_PEER_NUM_BITS 1
  23470. #define WMI_ATF_GROUP_GET_CFG_PEER_BIT(atf_peer_flags) \
  23471. WMI_GET_BITS(atf_peer_flags,WMI_ATF_GROUP_CFG_PEER_BIT_POS,WMI_ATF_GROUP_CFG_PEER_NUM_BITS)
  23472. #define WMI_ATF_GROUP_SET_CFG_PEER_BIT(atf_peer_flags,val) \
  23473. WMI_SET_BITS(atf_peer_flags,WMI_ATF_GROUP_CFG_PEER_BIT_POS,WMI_ATF_GROUP_CFG_PEER_NUM_BITS,val)
  23474. typedef struct {
  23475. /** TLV tag and len; tag equals
  23476. * WMITLV_TAG_STRUC_wmi_peer_atf_ext_info */
  23477. A_UINT32 tlv_header;
  23478. wmi_mac_addr peer_macaddr;
  23479. A_UINT32 atf_group_id; /* Group Id of the peers for ATF SSID grouping */
  23480. /* atf_peer_flags
  23481. * Bits 1-31 - Reserved (Shall be zero)
  23482. * Bit 0 - Configured Peer Indication (0/1), this bit would be set by
  23483. * host to indicate that the peer has airtime % configured
  23484. * explicitly by user.
  23485. */
  23486. A_UINT32 atf_peer_flags;
  23487. } wmi_peer_atf_ext_info;
  23488. typedef struct {
  23489. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_atf_ext_request_fixed_param */
  23490. A_UINT32 pdev_id;
  23491. /*
  23492. * Following this structure is the TLV:
  23493. * struct wmi_peer_atf_ext_info peer_ext_info[];
  23494. */
  23495. } wmi_peer_atf_ext_request_fixed_param;
  23496. /* Structure for Bandwidth Fairness peer information */
  23497. typedef struct {
  23498. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bwf_peer_info */
  23499. A_UINT32 tlv_header;
  23500. wmi_mac_addr peer_macaddr;
  23501. A_UINT32 bwf_guaranteed_bandwidth; /* BWF guaranteed_bandwidth for the peers in mbps */
  23502. A_UINT32 bwf_max_airtime; /* BWF Maximum airtime percentage that can be allocated to the peer to meet the guaranteed_bandwidth */
  23503. A_UINT32 bwf_peer_priority; /* BWF priority of the peer to allocate the tokens dynamically */
  23504. A_UINT32 vdev_id;
  23505. A_UINT32 pdev_id;
  23506. } wmi_bwf_peer_info;
  23507. /* Structure for Bandwidth Fairness peer request */
  23508. typedef struct {
  23509. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_bwf_request_fixed_param */
  23510. A_UINT32 num_peers;
  23511. /*
  23512. * Following this structure is the TLV:
  23513. * struct wmi_bwf_peer_info peer_info[num_peers];
  23514. */
  23515. } wmi_peer_bwf_request_fixed_param;
  23516. /* Equal distribution of ATF air time within an VDEV. */
  23517. typedef struct {
  23518. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_atf_request_fixed_param */
  23519. A_UINT32 vdev_id;
  23520. A_UINT32 peer_atf_units; /* Per peer ATF units (per mille). */
  23521. A_UINT32 pdev_id;
  23522. } wmi_vdev_atf_request_fixed_param;
  23523. typedef struct {
  23524. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_cck_config_cmd_fixed_param */
  23525. /** pdev_id for identifying the MAC
  23526. * See macros starting with WMI_PDEV_ID_ for values.
  23527. */
  23528. A_UINT32 pdev_id;
  23529. /** parameter */
  23530. A_UINT32 param;
  23531. } wmi_pdev_get_ani_cck_config_cmd_fixed_param;
  23532. typedef struct {
  23533. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_ofdm_config_cmd_fixed_param */
  23534. /** pdev_id for identifying the MAC
  23535. * See macros starting with WMI_PDEV_ID_ for values.
  23536. */
  23537. A_UINT32 pdev_id;
  23538. /** parameter */
  23539. A_UINT32 param;
  23540. } wmi_pdev_get_ani_ofdm_config_cmd_fixed_param;
  23541. typedef struct {
  23542. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_QBOOST_CFG_CMD_fixed_param */
  23543. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  23544. A_UINT32 qb_enable;
  23545. wmi_mac_addr peer_macaddr;
  23546. } WMI_QBOOST_CFG_CMD_fixed_param;
  23547. #define WMI_INST_STATS_INVALID_RSSI 0
  23548. typedef struct {
  23549. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param */
  23550. A_UINT32 iRSSI; /* dB above the noise floor */
  23551. /* peer MAC address */
  23552. wmi_mac_addr peer_macaddr;
  23553. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  23554. } wmi_inst_rssi_stats_resp_fixed_param;
  23555. typedef struct {
  23556. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_cck_ofdm_rate_info */
  23557. A_UINT32 ratecode_legacy; /* Rate code for CCK OFDM */
  23558. } wmi_peer_cck_ofdm_rate_info;
  23559. typedef struct {
  23560. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcs_rate_info */
  23561. A_UINT32 ratecode_20; /* Rate code for 20MHz BW */
  23562. A_UINT32 ratecode_40; /* Rate code for 40MHz BW */
  23563. A_UINT32 ratecode_80; /* Rate code for 80MHz BW */
  23564. } wmi_peer_mcs_rate_info;
  23565. typedef struct {
  23566. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ratecode_list_event_fixed_param */
  23567. wmi_mac_addr peer_macaddr;
  23568. A_UINT32 ratecount; /* Max Rate count for each mode */
  23569. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  23570. A_UINT32 pdev_id; /* ID of the pdev this peer belongs to */
  23571. /*
  23572. * Following this structure are the TLV:
  23573. * struct wmi_peer_cck_ofdm_rate_info;
  23574. * struct wmi_peer_mcs_rate_info;
  23575. */
  23576. } wmi_peer_ratecode_list_event_fixed_param;
  23577. typedef struct wmi_wds_addr_event {
  23578. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wds_addr_event_fixed_param */
  23579. A_UINT32 event_type[4];
  23580. wmi_mac_addr peer_mac;
  23581. wmi_mac_addr dest_mac;
  23582. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  23583. } wmi_wds_addr_event_fixed_param;
  23584. /*
  23585. * Enum values for WMI_PEER_PS_SUPPORTED_BITMAP field,
  23586. * in wmi_peer_sta_ps_statechange_event structure.
  23587. */
  23588. typedef enum {
  23589. /* Used to indicate that peer_ps_valid is valid */
  23590. WMI_PEER_PS_VALID_SUPPORTED = 0x00000001,
  23591. /* Used to indicate that peer_ps_timestamp field is valid */
  23592. WMI_PEER_PS_TIMESTAMP_SUPPORTED = 0x00000002,
  23593. } WMI_PEER_PS_SUPPORTED_BITMAP;
  23594. typedef struct {
  23595. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_ps_statechange_event_fixed_param */
  23596. wmi_mac_addr peer_macaddr;
  23597. A_UINT32 peer_ps_state;
  23598. /* Start of extended structure */
  23599. /* Bitmap to indicate which fields in the extended structure are valid.
  23600. * Bitmap values correspond to enum WMI_PEER_PS_SUPPORTED_BITMAP
  23601. */
  23602. A_UINT32 peer_ps_supported_bitmap;
  23603. /* This field is used to indicate host of a valid PS state change.
  23604. * 1 - indicates a valid PS state change.
  23605. * 0 - indicates an invalid PS state change.
  23606. * Host to ignore the power save duration calculation when peer_ps_valid = 0
  23607. */
  23608. A_UINT32 peer_ps_valid;
  23609. /* This field indicates the time since target boot-up in MilliSeconds. */
  23610. A_UINT32 peer_ps_timestamp;
  23611. } wmi_peer_sta_ps_statechange_event_fixed_param;
  23612. /* WMI_PDEV_FIPS_EVENTID */
  23613. typedef struct {
  23614. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param */
  23615. union {
  23616. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  23617. /** pdev_id for identifying the MAC
  23618. * See macros starting with WMI_PDEV_ID_ for values.
  23619. */
  23620. A_UINT32 pdev_id;
  23621. };
  23622. A_UINT32 error_status; /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
  23623. A_UINT32 data_len; /* Data length */
  23624. /*
  23625. * Following this structure is the TLV:
  23626. * A_UINT32 data[1]; <-- Out Data (keep this in the end)
  23627. */
  23628. } wmi_pdev_fips_event_fixed_param;
  23629. typedef struct {
  23630. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_channel_hopping_event_fixed_param */
  23631. union {
  23632. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  23633. /** pdev_id for identifying the MAC
  23634. * See macros starting with WMI_PDEV_ID_ for values.
  23635. */
  23636. A_UINT32 pdev_id;
  23637. };
  23638. /* Noise threshold iterations with high values */
  23639. A_UINT32 noise_floor_report_iter;
  23640. /* Total noise threshold iterations */
  23641. A_UINT32 noise_floor_total_iter;
  23642. } wmi_pdev_channel_hopping_event_fixed_param;
  23643. enum {
  23644. WMI_PDEV_RESERVE_AST_ENTRY_OK,
  23645. WMI_PDEV_RESERVE_AST_ENTRY_HASH_COLLISION,
  23646. WMI_PDEV_RESERVE_AST_ENTRY_CROSSING_AXI_BOUNDARY,
  23647. };
  23648. typedef struct {
  23649. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_cmd_fixed_param */
  23650. union {
  23651. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  23652. /** pdev_id for identifying the MAC
  23653. * See macros starting with WMI_PDEV_ID_ for values.
  23654. */
  23655. A_UINT32 pdev_id;
  23656. };
  23657. A_UINT32 rate_flags;
  23658. /**
  23659. * FLAG_ONE_CHAIN 0x00000001 - one chain mask
  23660. * FLAG_TWO_CHAIN 0x00000003 - two chain mask
  23661. * FLAG_THREE_CHAIN 0x00000007 - three chain mask
  23662. * FLAG_FOUR_CHAIN 0x0000000F - four chain mask
  23663. * FLAG_FIVE_CHAIN 0x0000001F - five chain mask
  23664. * FLAG_SIX_CHAIN 0x0000003F - six chain mask
  23665. * FLAG_SEVEN_CHAIN 0x0000007F - seven chain mask
  23666. * FLAG_EIGHT_CHAIN 0x000000FF - eight chain mask
  23667. * FLAG_STBC 0x00000100 - STBC is set
  23668. * FLAG_40MHZ 0x00000200 - bits 9-10 used for BW:
  23669. * FLAG_80MHZ 0x00000400 (bw >> 9) & 3 will give
  23670. * FLAG_160MHZ 0x00000600 1 -> 40 MHz, 2 -> 80 MHz, 3 -> 160 MHz
  23671. * FLAG_TXBF 0x00000800 - Tx Bf enabled
  23672. * FLAG_RTSENA 0x00001000 - RTS enabled
  23673. * FLAG_CTSENA 0x00002000 - CTS enabled
  23674. * FLAG_LDPC 0x00004000 - LDPC set
  23675. * FLAG_SGI 0x00008000 - Short gaurd interval
  23676. * (0x00010000-0x00080000 unused)
  23677. *------------------
  23678. * 0x00100000-0x00700000 used for SU/MU/OFDMA tx mode
  23679. * FLAG_SU 0x00100000 - SU Data
  23680. * FLAG_DL_MU_MIMO_AC 0x00200000 - DL AC MU data
  23681. * FLAG_DL_MU_MIMO_AX 0x00300000 - DL AX MU data
  23682. * FLAG_DL_OFDMA 0x00400000 - DL OFDMA data
  23683. * FLAG_UL_OFDMA 0x00500000 - UL OFDMA data
  23684. * FLAG_UL_MU_MIMO 0x00600000 - UL MU data
  23685. *------------------
  23686. * */
  23687. A_UINT32 nss;
  23688. /**
  23689. * NSS 0x0 - 0x7
  23690. * */
  23691. A_UINT32 preamble;
  23692. /**
  23693. * PREAM_OFDM - 0x0
  23694. * PREAM_CCK - 0x1
  23695. * PREAM_HT - 0x2
  23696. * PREAM_VHT - 0x3
  23697. * PREAM_HE - 0x4
  23698. * */
  23699. A_UINT32 hw_rate;
  23700. /**
  23701. * *** HW_OFDM_RATE ***
  23702. * OFDM_48_MBPS - 0x0
  23703. * OFDM_24_MBPS - 0x1
  23704. * OFDM_12_MBPS - 0x2
  23705. * OFDM_6_MBPS - 0x3
  23706. * OFDM_54_MBPS - 0x4
  23707. * OFDM_36_MBPS - 0x5
  23708. * OFDM_18_MBPS - 0x6
  23709. * OFDM_9_MBPS - 0x7
  23710. *
  23711. * *** HW_CCK_RATE ***
  23712. * CCK_11_LONG_MBPS - 0x0
  23713. * CCK_5_5_LONG_MBPS - 0x1
  23714. * CCK_2_LONG_MBPS - 0x2
  23715. * CCK_1_LONG_MBPS - 0x3
  23716. * CCK_11_SHORT_MBPS - 0x4
  23717. * CCK_5_5_SHORT_MBPS - 0x5
  23718. * CCK_2_SHORT_MBPS - 0x6
  23719. *
  23720. * *** HW_HT / VHT_RATE ***
  23721. * MCS 0x0 - 0xb
  23722. * */
  23723. } wmi_pdev_get_tpc_cmd_fixed_param;
  23724. typedef struct {
  23725. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_chip_power_stats_cmd_fixed_param */
  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_pdev_get_chip_power_stats_cmd_fixed_param;
  23731. typedef struct {
  23732. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_bcn_recv_stats_cmd_fixed_param */
  23733. /** VDEV identifier */
  23734. A_UINT32 vdev_id;
  23735. } wmi_vdev_get_bcn_recv_stats_cmd_fixed_param;
  23736. /*
  23737. * wmi mws-coex command IDs
  23738. */
  23739. typedef enum {
  23740. WMI_MWS_COEX_STATE = 0x01,
  23741. WMI_MWS_COEX_DPWB_STATE,
  23742. WMI_MWS_COEX_TDM_STATE,
  23743. WMI_MWS_COEX_IDRX_STATE,
  23744. WMI_MWS_COEX_ANTENNA_SHARING_STATE,
  23745. } wmi_mws_coex_cmd_id;
  23746. typedef struct {
  23747. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_cmd_fixed_param */
  23748. /** VDEV identifier */
  23749. A_UINT32 vdev_id;
  23750. /** Command ID (type: wmi_mws_coex_cmd_id) */
  23751. A_UINT32 cmd_id;
  23752. } wmi_vdev_get_mws_coex_info_cmd_fixed_param;
  23753. typedef struct {
  23754. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param */
  23755. /** pdev_id for identifying the MAC
  23756. * See macros starting with WMI_PDEV_ID_ for values.
  23757. */
  23758. A_UINT32 pdev_id;
  23759. /*
  23760. * Following this structure is the TLV:
  23761. * A_UINT32 tpc[2];
  23762. * tpc[0] - maximum power per rate
  23763. * tpc[1] - minimum power per rate
  23764. * Currently this event only provides max and min power limits
  23765. * for a single rate. In the future this event may be expanded
  23766. * to provide the information for multiple rates.
  23767. * At that time, the format of the data will be provided.
  23768. */
  23769. } wmi_pdev_tpc_event_fixed_param;
  23770. typedef struct {
  23771. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_event_fixed_param */
  23772. union {
  23773. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  23774. /** pdev_id for identifying the MAC
  23775. * See macros starting with WMI_PDEV_ID_ for values.
  23776. */
  23777. A_UINT32 pdev_id;
  23778. };
  23779. A_UINT32 nfdBr_len;
  23780. A_UINT32 nfdBm_len;
  23781. A_UINT32 freqNum_len;
  23782. /*
  23783. * Following this structure is the TLV:
  23784. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr;
  23785. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm;
  23786. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum;
  23787. */
  23788. } wmi_pdev_nfcal_power_all_channels_event_fixed_param;
  23789. typedef struct {
  23790. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr */
  23791. A_UINT32 nfdBr;
  23792. } wmi_pdev_nfcal_power_all_channels_nfdBr;
  23793. typedef struct {
  23794. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm */
  23795. A_UINT32 nfdBm;
  23796. } wmi_pdev_nfcal_power_all_channels_nfdBm;
  23797. typedef struct {
  23798. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum */
  23799. A_UINT32 freqNum;
  23800. } wmi_pdev_nfcal_power_all_channels_freqNum;
  23801. typedef struct {
  23802. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_cck_event_fixed_param */
  23803. A_UINT32 cck_level;
  23804. } wmi_ani_cck_event_fixed_param;
  23805. typedef enum wmi_power_debug_reg_fmt_type {
  23806. /* WMI_POWER_DEBUG_REG_FMT_TYPE_ROME -> Dumps following 12 Registers
  23807. * SOC_SYSTEM_SLEEP
  23808. * WLAN_SYSTEM_SLEEP
  23809. * RTC_SYNC_FORCE_WAKE
  23810. * MAC_DMA_ISR
  23811. * MAC_DMA_TXRX_ISR
  23812. * MAC_DMA_ISR_S1
  23813. * MAC_DMA_ISR_S2
  23814. * MAC_DMA_ISR_S3
  23815. * MAC_DMA_ISR_S4
  23816. * MAC_DMA_ISR_S5
  23817. * MAC_DMA_ISR_S6
  23818. * MAC_DMA_ISR_S7
  23819. */
  23820. WMI_POWER_DEBUG_REG_FMT_TYPE_ROME,
  23821. WMI_POWER_DEBUG_REG_FMT_TYPE_MAX = 0xf,
  23822. } WMI_POWER_DEBUG_REG_FMT_TYPE;
  23823. typedef struct {
  23824. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chip_power_stats_event_fixed_param */
  23825. A_UINT32 cumulative_sleep_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
  23826. A_UINT32 cumulative_total_on_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
  23827. A_UINT32 deep_sleep_enter_counter; /* count of number of times chip enterred deep sleep */
  23828. A_UINT32 last_deep_sleep_enter_tstamp_ms; /* Last Timestamp when Chip went to deep sleep */
  23829. A_UINT32 debug_register_fmt; /* WMI_POWER_DEBUG_REG_FMT_TYPE enum, describes debug registers being dumped as part of the event */
  23830. A_UINT32 num_debug_register; /* number of debug registers being sent to host */
  23831. /*
  23832. * Following this structure is the TLV:
  23833. * A_UINT32 debug_registers[num_debug_registers];
  23834. */
  23835. } wmi_pdev_chip_power_stats_event_fixed_param;
  23836. typedef struct {
  23837. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_bcn_recv_stats_fixed_param */
  23838. A_UINT32 vdev_id;
  23839. /* total_bcn_cnt
  23840. * total beacon count (tbtt instances)
  23841. * After this value reaches 255 it saturates and stays at 255.
  23842. * This field is used to determine which of the 256 bits in the
  23843. * bmiss_bitmap field are valid.
  23844. */
  23845. A_UINT32 total_bcn_cnt;
  23846. /* total_bmiss_cnt
  23847. * Total beacon miss count in last 255 beacons, max value is 255.
  23848. * This value is the number of bits set within bmiss_bitmap.
  23849. */
  23850. A_UINT32 total_bmiss_cnt;
  23851. /* bmiss_bitmap
  23852. * This bitmap indicates the status of the last 255 beacons.
  23853. * If a bit is set, that means the corresponding beacon was missed.
  23854. * Bit 0 of bmiss_bitmap[0] represents the most recent beacon.
  23855. * The total_bcn_cnt field indicates how many bits within bmiss_bitmap
  23856. * are valid.
  23857. */
  23858. A_UINT32 bmiss_bitmap[8];
  23859. } wmi_vdev_bcn_recv_stats_fixed_param;
  23860. typedef struct {
  23861. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_fixed_param */
  23862. A_UINT32 vdev_id;
  23863. /* LTE-WLAN coexistence scheme bitmap
  23864. * Indicates the final schemes applied for the currrent Coex scenario.
  23865. * Bit 0 - TDM policy
  23866. * Bit 1 - Forced TDM policy
  23867. * Bit 2 - Dynamic Power Back-off policy
  23868. * Bit 3 - Channel Avoidance policy
  23869. * Bit 4 - Static Power Back-off policy
  23870. */
  23871. A_UINT32 coex_scheme_bitmap;
  23872. /* Active conflict count
  23873. * Indicates the number of Active conflicts for the current WLAN and LTE frequency combinations.
  23874. */
  23875. A_UINT32 active_conflict_count;
  23876. /* Potential conflict count
  23877. * Indicates the number of Potential conflicts for the current WLAN and LTE frequency combinations.
  23878. */
  23879. A_UINT32 potential_conflict_count;
  23880. /* Bitmap of the group-0 WLAN channels to be avoided during LTE-WLAN coex operation.
  23881. * Indicates the WLAN channels to be avoided in b/w WLAN CH-1 and WLAN CH-14.
  23882. */
  23883. A_UINT32 chavd_group0_bitmap;
  23884. /* Bitmap of the group-1 WLAN channels to be avoided during LTE-WLAN coex operation.
  23885. * Indicates the WLAN channels to be avoided in b/w WLAN CH-36 and WLAN CH-64.
  23886. */
  23887. A_UINT32 chavd_group1_bitmap;
  23888. /* Bitmap of the group-2 WLAN channels to be avoided during LTE-WLAN coex operation.
  23889. * Indicates the WLAN channels to be avoided in b/w WLAN CH-100 and WLAN CH-140.
  23890. */
  23891. A_UINT32 chavd_group2_bitmap;
  23892. /* Bitmap of the group-3 WLAN channels to be avoided during LTE-WLAN coex operation.
  23893. * Indicates the WLAN channels to be avoided in b/w WLAN CH-149 and WLAN CH-165.
  23894. */
  23895. A_UINT32 chavd_group3_bitmap;
  23896. } wmi_vdev_get_mws_coex_state_fixed_param;
  23897. typedef struct {
  23898. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_dpwb_state_fixed_param */
  23899. A_UINT32 vdev_id;
  23900. /* Current state of the Dynamic Power Back-off state machine
  23901. * MWSCOEX_PWB_UNINIT_STATE = 0, PWB state machine is in un-intialized state.
  23902. * MWSCOEX_PWB_WLAN_ON_SINR_START_STATE = 1, SINR measurement starts when WLAN is on
  23903. * MWSCOEX_PWB_WLAN_ON_WAIT_RESP_STATE = 2, Waiting for SINR response when WLAN is on
  23904. * MWSCOEX_PWB_WLAN_OFF_AWAIT_STATE = 3, WLAN off state for buffer between SINR on/off measurement.
  23905. * MWSCOEX_PWB_WLAN_OFF_SINR_START_STATE = 4, SINR measurement starts when WLAN is off
  23906. * MWSCOEX_PWB_WLAN_OFF_WAIT_RESP_STATE = 5, Waiting for SINR response when WLAN is off
  23907. * MWSCOEX_PWB_WLAN_OFF_SINR_STOP_STATE = 6, SINR measurement stops when WLAN is off
  23908. * MWSCOEX_PWB_FORCED_TDM_STATE = 7, Entered Forced TDM state.
  23909. * MWSCOEX_PWB_HALTED_STATE = 8, Power back-off algorithm halted.
  23910. * MWSCOEX_PWB_WLAN_ALWAYS_ON_SINR_START_STATE = 9, SINR measurement starts in WLAN always on state.
  23911. * MWSCOEX_PWB_WLAN_ALWAYS_ON_SINR_STOP_STATE = 10, SINR measurement stops in WLAN always on state.
  23912. */
  23913. A_UINT32 current_dpwb_state;
  23914. /* P(N+1) value in dBm i.e. Tx power to be applied in the next Dynamic Power Back-off cycle,
  23915. * where P(N) is the power applied during current cycle.
  23916. * ranges from 3dBm to 21 dBM
  23917. */
  23918. A_INT32 pnp1_value;
  23919. /* Indicates the duty cycle of current LTE frame.
  23920. * Duty cycle: Number of UL slots with uplink data and allocated RBs.
  23921. */
  23922. A_UINT32 lte_dutycycle;
  23923. /* LTE SINR value in dB, when WLAN is ON. */
  23924. A_INT32 sinr_wlan_on;
  23925. /* LTE SINR value in dB, when WLAN is OFF. */
  23926. A_INT32 sinr_wlan_off;
  23927. /* LTE blocks with error for the current bler report.
  23928. * Number of LTE blocks with error for a given number (block_count) of LTE blocks.
  23929. */
  23930. A_UINT32 bler_count;
  23931. /* Number of LTE blocks considered for bler count report.
  23932. * Bler repot will be generated after the reception of every "block_count" number of blocks.
  23933. */
  23934. A_UINT32 block_count;
  23935. /* WLAN RSSI level
  23936. * WLAN RSSI is devided in to 3 levels i.e. Good/Moderate/Low (configurable inside f/w)
  23937. * 0-Good, 1-Moderate, 2-Low
  23938. */
  23939. A_UINT32 wlan_rssi_level;
  23940. /* WLAN RSSI value in dBm considered in Dynamic Power back-off algorithm
  23941. * Dynamic power back-off algorithm considers either Rx data frame RSSI/Beacon RSSI based on some constraints.
  23942. */
  23943. A_INT32 wlan_rssi;
  23944. /* Indicates whether any TDM policy triggered from Dynamic power back-off policy.
  23945. * 1 - TDM triggered.
  23946. * 0 - TDM not triggered.
  23947. */
  23948. A_UINT32 is_tdm_running;
  23949. } wmi_vdev_get_mws_coex_dpwb_state_fixed_param;
  23950. typedef struct {
  23951. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_tdm_state_fixed_param */
  23952. A_UINT32 vdev_id;
  23953. /* Time Division Multiplexing (TDM) LTE-Coex Policy type.
  23954. * There are totally 4 types of TDM policies(1-SINR TDM, 2-RSSI TDM, 3-LOW RX RATE TDM, 4-STICKY TDM)
  23955. * Bit 0 - SINR TDM policy.
  23956. * Bit 1 - RSSI TDM policy.
  23957. * Bit 2 - Low Rx rate TDM policy
  23958. * Bit 3 - Sticky TDM policy
  23959. */
  23960. A_UINT32 tdm_policy_bitmap;
  23961. /* TDM LTE/WLAN sub-frame bitmap
  23962. * Indicates the bitmap of LTE/WLAN sub-frames.
  23963. * value 0: WLAN slot.
  23964. * value 1: LTE slot.
  23965. */
  23966. A_UINT32 tdm_sf_bitmap;
  23967. } wmi_vdev_get_mws_coex_tdm_state_fixed_param;
  23968. typedef struct {
  23969. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_idrx_state_fixed_param */
  23970. A_UINT32 vdev_id;
  23971. /* SUB0 LTE-coex tech.
  23972. *------------------------
  23973. * TECH TECH_ID
  23974. *------------------------
  23975. * LTE 0
  23976. * TDSCDMA 1
  23977. * GSM1 2
  23978. * ONEX 3
  23979. * HDR 4
  23980. * WCDMA 5
  23981. * GSM2 6
  23982. * GSM3 7
  23983. * WCDMA2 8
  23984. * LTE2 9
  23985. * Indicates the type of WWAN technology used as SUB0 i.e. SIM slot 1
  23986. */
  23987. A_UINT32 sub0_techid;
  23988. /* SUB0 mitigation policy.
  23989. * Indicates the mitigation policy used to coexist with WLAN.
  23990. * 1 - Tx blanking
  23991. * 2 - Static power back-off
  23992. */
  23993. A_UINT32 sub0_policy;
  23994. /* Set if SUB0 is in link critical state.
  23995. * Link critical will be set, if continuous page miss happens or RSSI is below -100 dBm at LTE side.
  23996. */
  23997. A_UINT32 sub0_is_link_critical;
  23998. /* LTE SUB0 imposed static power applied to WLAN due to LTE-WLAN coex.
  23999. * Value of static power applied during LTE page cycle ranges from 3-21 dBm.
  24000. */
  24001. A_INT32 sub0_static_power;
  24002. /* LTE SUB0 RSSI value in dBm */
  24003. A_INT32 sub0_rssi;
  24004. /* SUB1 LTE-coex tech.
  24005. *------------------------
  24006. * TECH TECH_ID
  24007. *------------------------
  24008. * LTE 0
  24009. * TDSCDMA 1
  24010. * GSM1 2
  24011. * ONEX 3
  24012. * HDR 4
  24013. * WCDMA 5
  24014. * GSM2 6
  24015. * GSM3 7
  24016. * WCDMA2 8
  24017. * LTE2 9
  24018. * Indicates the type of WWAN technology used as SUB1 i.e. SIM slot 2
  24019. */
  24020. A_UINT32 sub1_techid;
  24021. /* SUB1 mitigation policy.
  24022. * Indicates the mitigation policy used to coexist with WLAN.
  24023. * 1 - Tx blanking
  24024. * 2 - Static power back-off
  24025. */
  24026. A_UINT32 sub1_policy;
  24027. /* Set if SUB1 is in link critical state.
  24028. * Link critical will be set, if continuous page miss happens or RSSI is below -100 dBm at LTE side.
  24029. */
  24030. A_UINT32 sub1_is_link_critical;
  24031. /* LTE SUB1 imposed static power applied to WLAN due to LTE-WLAN coex.
  24032. * Value of static power applied during LTE page cycle ranges from 3-21 dBm.
  24033. */
  24034. A_INT32 sub1_static_power;
  24035. /* LTE SUB1 RSSI value in dBm */
  24036. A_INT32 sub1_rssi;
  24037. } wmi_vdev_get_mws_coex_idrx_state_fixed_param;
  24038. typedef struct {
  24039. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param */
  24040. A_UINT32 vdev_id;
  24041. /* BDF values of Coex flags.
  24042. * coexflag 0x1 = MWS Coex enabled
  24043. * coexflag 0x3 = MWS Coex enabled + Antenna sharing enabled for WLAN operating in 2.4GHz band.
  24044. */
  24045. A_UINT32 coex_flags;
  24046. /* BDF values of Coex Antenna sharing config
  24047. * coex_config 0x0 = no Antenna sharing
  24048. * coexconfig 0x1 = switched based Antenna sharing
  24049. * coexconfig 0x2 = splitter based Antenna sharing
  24050. */
  24051. A_UINT32 coex_config;
  24052. /* Tx Chain mask value
  24053. * Bit 0: Tx chain-0
  24054. * Bit 1: Tx Chain-1
  24055. * value: 0x1 - Operating in 1X1
  24056. * value: 0x3 - Operating in 2X2
  24057. */
  24058. A_UINT32 tx_chain_mask;
  24059. /* Rx Chain mask value
  24060. * Bit 0: Rx chain-0
  24061. * Bit 1: Rx Chain-1
  24062. * value: 0x1 - Operating in 1X1
  24063. * value: 0x3 - Operating in 2X2
  24064. */
  24065. A_UINT32 rx_chain_mask;
  24066. /* Currently active Rx Spatial streams
  24067. * Bit 0: Rx Spatial Stream-0
  24068. * Bit 1: Rx Spatial Stream-1
  24069. */
  24070. A_UINT32 rx_nss;
  24071. /* Forced MRC policy type
  24072. * BTC_FORCED (0x01)
  24073. * RSSI_FORCED (0x02)
  24074. * MODEM_ACQ_FORCED (0x04)
  24075. */
  24076. A_UINT32 force_mrc;
  24077. /* RSSI value considered for MRC
  24078. * 1: Data RSSI
  24079. * 2: Beacon RSSI
  24080. */
  24081. A_UINT32 rssi_type;
  24082. /* RSSI value measured at Chain-0 in dBm */
  24083. A_INT32 chain0_rssi;
  24084. /* RSSI value measured at Chain-1 in dBm */
  24085. A_INT32 chain1_rssi;
  24086. /* RSSI value of two chains combined in dBm */
  24087. A_INT32 combined_rssi;
  24088. /* Absolute imbalance between two Rx chains in dB */
  24089. A_UINT32 imbalance;
  24090. /* RSSI threshold defined for the above imbalance value in dBm.
  24091. * Based on the degree of imbalance between the rx chains, different
  24092. * RSSI thresholds are used to determine whether MRC (Maximum-Ratio
  24093. * Combining) use of multiple rx chains is suitable.
  24094. * This field shows the RSSI threshold below which MRC is used.
  24095. */
  24096. A_INT32 mrc_threshold;
  24097. /* Antenna grant duration to WLAN, in milliseconds */
  24098. A_UINT32 grant_duration;
  24099. } wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param;
  24100. typedef enum wmi_chip_power_save_failure_reason_code_type {
  24101. WMI_PROTOCOL_POWER_SAVE_FAILURE_REASON,
  24102. WMI_HW_POWER_SAVE_FAILURE_REASON,
  24103. WMI_CSS_LOCKED_POWER_FAILURE_REASON,
  24104. WMI_MAC0_LOCKED_POWER_FAILURE_REASON,
  24105. WMI_MAC1_LOCKED_POWER_FAILURE_REASON,
  24106. WMI_POWER_SAVE_FAILURE_REASON_MAX = 0xf,
  24107. } WMI_POWER_SAVE_FAILURE_REASON_TYPE;
  24108. typedef struct {
  24109. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chip_power_save_failure_detected_fixed_param */
  24110. A_UINT32 power_save_failure_reason_code; /* Chip power save failuire reason as defined in WMI_POWER_SAVE_FAILURE_REASON_TYPE */
  24111. A_UINT32 protocol_wake_lock_bitmap[4]; /* bitmap with bits set for modules (from WLAN_MODULE_ID enum) voting against sleep for prolonged duration */
  24112. } wmi_chip_power_save_failure_detected_fixed_param;
  24113. typedef struct {
  24114. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param */
  24115. A_UINT32 ofdm_level;
  24116. } wmi_ani_ofdm_event_fixed_param;
  24117. /* When a bit is set it specifies the particular WLAN traffic type is high priority.
  24118. * BT low priority traffic has higher priority than WLAN low priority traffic and has
  24119. * lower priority when compared to WLAN high priority traffic.
  24120. * BT high priority traffic has higher priority than WLAN low/high priority traffic.
  24121. */
  24122. #define WMI_PDEV_BE_PRIORITY_BIT (1<<0)
  24123. #define WMI_PDEV_BK_PRIORITY_BIT (1<<1)
  24124. #define WMI_PDEV_VI_PRIORITY_BIT (1<<2)
  24125. #define WMI_PDEV_VO_PRIORITY_BIT (1<<3)
  24126. #define WMI_PDEV_BEACON_PRIORITY_BIT (1<<4)
  24127. #define WMI_PDEV_MGMT_PRIORITY_BIT (1<<5)
  24128. #define WMI_PDEV_IS_BE_PRIORITY_SET(val) ((val) & WMI_PDEV_BE_PRIORITY_BIT)
  24129. #define WMI_PDEV_IS_BK_PRIORITY_SET(val) ((val) & WMI_PDEV_BK_PRIORITY_BIT)
  24130. #define WMI_PDEV_IS_VI_PRIORITY_SET(val) ((val) & WMI_PDEV_VI_PRIORITY_BIT)
  24131. #define WMI_PDEV_IS_VO_PRIORITY_SET(val) ((val) & WMI_PDEV_VO_PRIORITY_BIT)
  24132. #define WMI_PDEV_IS_BEACON_PRIORITY_SET(val) ((val) & WMI_PDEV_BEACON_PRIORITY_BIT)
  24133. #define WMI_PDEV_IS_MGMT_PRIORITY_SET(val) ((val) & WMI_PDEV_MGMT_PRIORITY_BIT)
  24134. typedef enum wmi_coex_algo_type {
  24135. WMI_COEX_ALGO_UNCONS_FREERUN = 0,
  24136. WMI_COEX_ALGO_FREERUN = 1,
  24137. WMI_COEX_ALGO_OCS = 2,
  24138. } WMI_COEX_ALGO_TYPE;
  24139. typedef enum wmi_coex_config_type {
  24140. WMI_COEX_CONFIG_PAGE_P2P_TDM = 1, /* config interval (arg1 BT, arg2 WLAN) for P2P + PAGE */
  24141. WMI_COEX_CONFIG_PAGE_STA_TDM = 2, /* config interval (arg1 BT, arg2 WLAN) for STA + PAGE */
  24142. WMI_COEX_CONFIG_PAGE_SAP_TDM = 3, /* config interval (arg1 BT, arg2 WLAN) for SAP + PAGE */
  24143. WMI_COEX_CONFIG_DURING_WLAN_CONN = 4, /* config during WLAN connection */
  24144. WMI_COEX_CONFIG_BTC_ENABLE = 5, /* config to enable/disable BTC */
  24145. WMI_COEX_CONFIG_COEX_DBG = 6, /* config of COEX debug setting */
  24146. WMI_COEX_CONFIG_PAGE_P2P_STA_TDM = 7, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + STA + PAGE */
  24147. WMI_COEX_CONFIG_INQUIRY_P2P_TDM = 8, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + INQUIRY */
  24148. WMI_COEX_CONFIG_INQUIRY_STA_TDM = 9, /* config interval (ms units) (arg1 BT, arg2 WLAN) for STA + INQUIRY */
  24149. WMI_COEX_CONFIG_INQUIRY_SAP_TDM = 10, /* config interval (ms units) (arg1 BT, arg2 WLAN) for SAP + INQUIRY */
  24150. WMI_COEX_CONFIG_INQUIRY_P2P_STA_TDM = 11, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + STA + INQUIRY */
  24151. WMI_COEX_CONFIG_TX_POWER = 12, /* config wlan total tx power when bt coex (arg1 is wlan_tx_power_limit, in 0.5dbm units) */
  24152. 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) */
  24153. WMI_COEX_CONFIG_AP_TDM = 14, /* config interval (arg1 duty cycle in ms, arg2 WLAN duration in ms) for AP */
  24154. WMI_COEX_CONFIG_WLAN_SCAN_PRIORITY = 15, /* config to set WLAN priority during Off Channel Scan */
  24155. WMI_COEX_CONFIG_WLAN_PKT_PRIORITY = 16, /* config to set WLAN priority for BE/BK/VO/VI/Beacon/Management frame */
  24156. WMI_COEX_CONFIG_PTA_INTERFACE = 17, /* config PTA interface,
  24157. arg1 PTA num,
  24158. arg2 mode (2-wire/3-wire/PTA),
  24159. arg3 first slot time in microsec,
  24160. arg4 BT priority time in microsec,
  24161. arg5 PTA algorithm (WMI_COEX_ALGO_TYPE),
  24162. arg6 PTA priority */
  24163. WMI_COEX_CONFIG_BTC_DUTYCYCLE = 18, /* config interval (ms units) (arg1 WLAN pause duration, arg2 WLAN unpause duration) for WLAN UL + BT Rx */
  24164. WMI_COEX_CONFIG_HANDOVER_RSSI = 19, /* config to set WLAN RSSI (dBm units) at which device switches from Hybrid to TDD coex mode */
  24165. WMI_COEX_CONFIG_PTA_BT_INFO = 20, /* get BT information,
  24166. arg1 BT info type: WMI_COEX_PTA_BT_INFO_TYPE_T, scan/advertise/connection info,
  24167. arg2-arg5: BT information parameters */
  24168. WMI_COEX_CONFIG_SINK_WLAN_TDM = 21, /* config interval (ms units) (arg1 BT, arg2 WLAN) for A2DP SINK + WLAN */
  24169. WMI_COEX_CONFIG_COEX_ENABLE_MCC_TDM = 22, /* config disable/enable COEX TDM for MCC */
  24170. WMI_COEX_CONFIG_LOWRSSI_A2DPOPP_TDM = 23, /* config interval (ms units) (arg1 BT, arg2 WLAN) for STA + A2dp + OPP + LOWRSSI */
  24171. WMI_COEX_CONFIG_BTC_MODE = 24, /* config BTC mode, arg1 mode: 0 TDD/1 FDD/2 Hybrid*/
  24172. WMI_COEX_CONFIG_ANTENNA_ISOLATION = 25, /* config isolation between BT and WLAN chains
  24173. * The arguments are interpreted differently
  24174. * depending on whether the target suppports
  24175. * WMI_SERVICE_COEX_SUPPORT_UNEQUAL_ISOLATION
  24176. * If (not COEX_SUPPORT_UNEQUAL_ISOLATION) or arg2 == 0:
  24177. * arg1 => isolation between BT and WLAN chains,
  24178. * dB units,
  24179. * same isolation for all chains
  24180. * Else:
  24181. * arg1 bits 7:0 - chain 0 isolation, in dB
  24182. * arg1 bits 15:8 - chain 1 isolation, in dB
  24183. * arg1 bits 23:16 - chain 2 isolation, in dB
  24184. * arg1 bits 31:24 - chain 3 isolation, in dB
  24185. * arg2 - 0 => Equal isolation b/w BT and each WLAN chain (default)
  24186. * 1 => Different isolation b/w BT and each WLAN chain
  24187. */
  24188. WMI_COEX_CONFIG_BT_LOW_RSSI_THRESHOLD = 26,/*config BT low rssi threshold (dbm units)*/
  24189. WMI_COEX_CONFIG_BT_INTERFERENCE_LEVEL = 27,/*config bt interference level (dbm units)
  24190. arg1 low - lower limit
  24191. arg2 low - upper limit
  24192. arg3 medium - lower limit
  24193. arg4 medium - upper limit
  24194. arg5 high - lower limit
  24195. arg6 high - upper limit */
  24196. WMI_COEX_CONFIG_WLAN_OVER_ZBLOW = 28, /* config to boost WiFi traffic over 15.4 Low prio traffic */
  24197. 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 */
  24198. WMI_COEX_CONFIG_WLAN_CONN_OVER_LE = 30, /* config to elevate Wifi priority over BLE during WLAN association */
  24199. WMI_COEX_CONFIG_LE_OVER_WLAN_TRAFFIC = 31, /* config to elevate BLE traffic over WiFi traffic */
  24200. WMI_COEX_CONFIG_THREE_WAY_COEX_RESET = 32, /* config to reset the weights to default */
  24201. /* WMI_COEX_CONFIG_THREE_WAY_DELAY_PARA
  24202. * config to T_PRIO T_DELAY parameter for each case
  24203. * arg1 - wlan/bt state
  24204. * 0: beacon tx
  24205. * 1: wlan connecting
  24206. * 2: wlan in dhcp
  24207. * 3: a2dp critical
  24208. * 4: eSCO
  24209. * arg2 - t_prio for low priority traffic (microsecond units)
  24210. * arg3 - t_delay for low priority traffic (microsecond units)
  24211. * arg4 - t_prio for high priority traffic (microsecond units)
  24212. * arg5 - t_delay for high priority traffic (microsecond units)
  24213. */
  24214. WMI_COEX_CONFIG_THREE_WAY_DELAY_PARA = 33,
  24215. /* WMI_COEX_CONFIG_THREE_WAY_COEX_START
  24216. * config to set coex parameters from WLAN host to adjust priorities
  24217. * among wlan/bt/zb
  24218. * arg1 - priority level 1, the serialized coex scenorio ID will be put here
  24219. * arg2 - priority level 2, same parameters rules as arg1
  24220. * arg3 - priority level 3, same parameters rules as arg1
  24221. * arg4 - priority level 4, same parameters rules as arg1
  24222. */
  24223. WMI_COEX_CONFIG_THREE_WAY_COEX_START = 34,
  24224. /* WMI_COEX_CONFIG_MPTA_HELPER_ENABLE
  24225. * config to enable(1)/disable(0) mpta-helper function
  24226. */
  24227. WMI_COEX_CONFIG_MPTA_HELPER_ENABLE = 35,
  24228. /* WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_STATE
  24229. * config zigbee state
  24230. * arg1: zigbee state
  24231. * (idle form-network wait-join join-network network-up HMI)
  24232. */
  24233. WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_STATE = 36,
  24234. /* WMI_COEX_CONFIG_MPTA_HELPER_INT_OCS_PARAMS
  24235. * config ocs wlan/nonwlan params after MPTA interrupt fired
  24236. * arg1: wlan duration (ms units) in Shape-OCS
  24237. * arg2: nonwlan duration (ms units) in Shape-OCS
  24238. */
  24239. WMI_COEX_CONFIG_MPTA_HELPER_INT_OCS_PARAMS = 37,
  24240. /* WMI_COEX_CONFIG_MPTA_HELPER_MON_OCS_PARAMS
  24241. * config ocs wlan/nonwlan params during monitor period after
  24242. * interrupt period finished
  24243. * arg1: wlan duration (ms units) in Shape-OCS
  24244. * arg2: nonwlan duration (ms units) in Shape-OCS
  24245. */
  24246. WMI_COEX_CONFIG_MPTA_HELPER_MON_OCS_PARAMS = 38,
  24247. /* WMI_COEX_CONFIG_MPTA_HELPER_INT_MON_DURATION
  24248. * config ocs duration in interrupt period and monitor period
  24249. * arg1: duration (ms units) in interrupt period
  24250. * arg2: duration (ms units) in monitor period
  24251. */
  24252. WMI_COEX_CONFIG_MPTA_HELPER_INT_MON_DURATION = 39,
  24253. /* WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_CHANNEL
  24254. * config zigbee channel 11 - 26
  24255. */
  24256. WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_CHANNEL = 40,
  24257. /* WMI_COEX_CONFIG_MPTA_HELPER_WLAN_MUTE_DURATION
  24258. * config msw mute duration (ms units) after MPTA interrupt fired
  24259. */
  24260. WMI_COEX_CONFIG_MPTA_HELPER_WLAN_MUTE_DURATION = 41,
  24261. /* WMI_COEX_CONFIG_BT_SCO_ALLOW_WLAN_2G_SCAN
  24262. * allow WLAN scan on 2.4G channel when BT SCO connectivity is alive
  24263. */
  24264. WMI_COEX_CONFIG_BT_SCO_ALLOW_WLAN_2G_SCAN = 42,
  24265. /* WMI_COEX_CONFIG_ENABLE_2ND_HARMONIC_WAR
  24266. * config to enable(1)/disable(0) WAR of BT 2nd harmonic issue function
  24267. */
  24268. WMI_COEX_CONFIG_ENABLE_2ND_HARMONIC_WAR = 43,
  24269. /* WMI_COEX_CONFIG_BTCOEX_SEPARATE_CHAIN_MODE
  24270. * config BTC separate chain mode or shared mode
  24271. */
  24272. WMI_COEX_CONFIG_BTCOEX_SEPARATE_CHAIN_MODE = 44,
  24273. /* WMI_COEX_CONFIG_ENABLE_TPUT_SHAPING
  24274. * enable WLAN throughput shaping while BT scanning
  24275. */
  24276. WMI_COEX_CONFIG_ENABLE_TPUT_SHAPING = 45,
  24277. /* WMI_COEX_CONFIG_ENABLE_TXBF
  24278. * enable WLAN tx beamforming during coex case
  24279. */
  24280. WMI_COEX_CONFIG_ENABLE_TXBF = 46,
  24281. /* WMI_COEX_CONFIG_FORCED_ALGO
  24282. * config to select coex algorithm
  24283. * arg1: select fixed coex algorithm
  24284. */
  24285. WMI_COEX_CONFIG_FORCED_ALGO = 47,
  24286. /* WMI_COEX_CONFIG_LE_SCAN_POLICY
  24287. * BLE scan Coex policy hint
  24288. * 0 to place more emphasis on BLE Scan results
  24289. * 1 to place more emphasis on WLAN performance
  24290. */
  24291. WMI_COEX_CONFIG_LE_SCAN_POLICY = 48,
  24292. } WMI_COEX_CONFIG_TYPE;
  24293. typedef struct {
  24294. A_UINT32 tlv_header;
  24295. A_UINT32 vdev_id;
  24296. A_UINT32 config_type; /* wmi_coex_config_type enum */
  24297. A_UINT32 config_arg1;
  24298. A_UINT32 config_arg2;
  24299. A_UINT32 config_arg3;
  24300. A_UINT32 config_arg4;
  24301. A_UINT32 config_arg5;
  24302. A_UINT32 config_arg6;
  24303. } WMI_COEX_CONFIG_CMD_fixed_param;
  24304. /**
  24305. * This command is sent from WLAN host driver to firmware to
  24306. * request firmware to enable/disable channel avoidance report
  24307. * to host.
  24308. *
  24309. */
  24310. enum {
  24311. WMI_MWSCOEX_CHAN_AVD_RPT_DISALLOW = 0,
  24312. WMI_MWSCOEX_CHAN_AVD_RPT_ALLOW = 1
  24313. };
  24314. typedef struct {
  24315. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param */
  24316. /** Allow/disallow flag - see WMI_MWSCOEX_CHAN_AVD_RPT enum */
  24317. A_UINT32 rpt_allow;
  24318. } WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param;
  24319. /*
  24320. * Periodic channel stats WMI command structure
  24321. * WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID
  24322. */
  24323. typedef struct {
  24324. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_periodic_channel_stats_config_fixed_param */
  24325. /** 1 = enable, 0 = disable */
  24326. A_UINT32 enable;
  24327. /** periodic stats duration (units are milliseconds) */
  24328. A_UINT32 stats_period;
  24329. /** pdev_id for identifying the MAC
  24330. * See macros starting with WMI_PDEV_ID_ for values.
  24331. */
  24332. A_UINT32 pdev_id;
  24333. } wmi_set_periodic_channel_stats_config_fixed_param;
  24334. typedef struct {
  24335. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_wal_power_debug_cmd_fixed_param */
  24336. /** pdev_id for identifying the MAC
  24337. * See macros starting with WMI_PDEV_ID_ for values.
  24338. */
  24339. A_UINT32 pdev_id;
  24340. /* Identify the wlan module */
  24341. A_UINT32 module_id;
  24342. /* Num of elements in the following args[] array */
  24343. A_UINT32 num_args;
  24344. /**
  24345. * Following this structure are the TLVs:
  24346. * A_UINT32 args[];
  24347. **/
  24348. } wmi_pdev_wal_power_debug_cmd_fixed_param;
  24349. typedef struct {
  24350. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_reorder_timeout_val_cmd_fixed_param */
  24351. /**
  24352. * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
  24353. * @details
  24354. * Each WMM access category (voice, video, best-effort, background)
  24355. * will have its own timeout value to dictate how long to wait for
  24356. * missing rx MPDUs to arrive before releasing subsequent MPDUs that
  24357. * have already been received.
  24358. * This parameter specifies the timeout in milliseconds for each
  24359. * access category.
  24360. * The array elements are indexed by the WMI_AC enum to identify
  24361. * which array element corresponds to which AC / traffic type.
  24362. */
  24363. A_UINT32 rx_timeout_pri[WMI_AC_MAX];
  24364. } wmi_pdev_set_reorder_timeout_val_cmd_fixed_param;
  24365. /**
  24366. * wlan stats shall be understood as per period.
  24367. * Generally, it is reported periodically based on the period specified by host.
  24368. * But if the variation of one stats of compared to the
  24369. * pervious notification exceeds a threshold,
  24370. * FW will report the wlan stats immediately.
  24371. * The values of the stats becomes the new reference to compute variations.
  24372. * This threshold can be a global setting or per category.
  24373. * Host can enable/disable the mechanism for any stats per bitmap.
  24374. * TX/RX thresholds (percentage value) are shared across ACs,
  24375. * and TX/RX stats comprisons are processed per AC of each peer.
  24376. * For example, if bit 0 (stand for tx_mpdus) of tx_thresh_bitmap is set to 1,
  24377. * and the detailed tx_mpdus threshold value is set to 10%,
  24378. * suppose tx_mpdus value of BE of peer 0 is 100 in first period,
  24379. * and it reaches 110 during the second period,
  24380. * FW will generate and send out a wlan stats event immediately.
  24381. */
  24382. typedef struct {
  24383. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_stats_threshold_cmd_fixed_param */
  24384. /** Indicate if threshold mechnism is enabled or disabled.
  24385. * It is disabled by default.
  24386. * Host can enable and disable it dynamically.
  24387. */
  24388. A_UINT32 enable_thresh;
  24389. /** use_thresh_bitmap equals 0 means gbl_thresh is used.
  24390. * when use_thresh_bitmap equals 1, ignore gbl_thresh and use stats bitmap indicated thresholds.
  24391. */
  24392. A_UINT32 use_thresh_bitmap;
  24393. /** global threshold, valid when use_thresh_bitmap equals 0.
  24394. * It takes effect for all counters.
  24395. * If use_thresh_bitmap ==0 && gbl_thresh == 0, disable threshold mechanism.
  24396. */
  24397. A_UINT32 gbl_thresh;
  24398. /** Enable/disable bitmap for threshold mechanism of CCA stats */
  24399. A_UINT32 cca_thresh_enable_bitmap;
  24400. /** Enable/disable bitmap for threshold mechanism of signal stats */
  24401. A_UINT32 signal_thresh_enable_bitmap;
  24402. /** Enable/disable bitmap for threshold mechanism of TX stats */
  24403. A_UINT32 tx_thresh_enable_bitmap;
  24404. /** Enable/disable bitmap for threshold mechanism of RX stats */
  24405. A_UINT32 rx_thresh_enable_bitmap;
  24406. /* This TLV is followed by TLVs below:
  24407. * wmi_chan_cca_stats_thresh cca_thresh;
  24408. * wmi_peer_signal_stats_thresh signal_thresh;
  24409. * wmi_tx_stats_thresh tx_thresh;
  24410. * wmi_rx_stats_thresh rx_thresh;
  24411. */
  24412. } wmi_pdev_set_stats_threshold_cmd_fixed_param;
  24413. typedef enum {
  24414. WMI_REQUEST_WLAN_TX_STAT = 0x01,
  24415. WMI_REQUEST_WLAN_RX_STAT = 0x02,
  24416. WMI_REQUEST_WLAN_CCA_STAT = 0x04,
  24417. WMI_REQUEST_WLAN_SIGNAL_STAT = 0x08,
  24418. } wmi_wlan_stats_id;
  24419. typedef struct {
  24420. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlan_stats_cmd_fixed_param */
  24421. wmi_wlan_stats_id stats_id;
  24422. } wmi_request_wlan_stats_cmd_fixed_param;
  24423. typedef enum {
  24424. WMI_REQUEST_ONE_PEER_STATS_INFO = 0x01, /* request stats of one specified peer */
  24425. WMI_REQUEST_VDEV_ALL_PEER_STATS_INFO = 0x02, /* request stats of all peers belong to specified VDEV */
  24426. } wmi_peer_stats_info_request_type;
  24427. /** It is required to issue WMI_PDEV_PARAM_PEER_STATS_INFO_ENABLE
  24428. * (with a non-zero value) before issuing the first REQUEST_PEER_STATS_INFO.
  24429. */
  24430. typedef struct {
  24431. /** TLV tag and len; tag equals
  24432. * WMITLV_TAG_STRUC_wmi_request_peer_stats_info_cmd_fixed_param */
  24433. A_UINT32 tlv_header;
  24434. /** request_type to indicate if only stats of
  24435. * one peer or all peers of the VDEV are requested,
  24436. * see wmi_peer_stats_info_request_type.
  24437. */
  24438. A_UINT32 request_type;
  24439. /** VDEV identifier */
  24440. A_UINT32 vdev_id;
  24441. /** this peer_macaddr is only used if request_type == ONE_PEER_STATS_INFO */
  24442. wmi_mac_addr peer_macaddr;
  24443. /** flag to indicate if FW needs to reset requested peers stats */
  24444. A_UINT32 reset_after_request;
  24445. } wmi_request_peer_stats_info_cmd_fixed_param;
  24446. typedef enum {
  24447. /*
  24448. * Multiple stats type can be requested together, so each value
  24449. * within this enum represents a bit position within a stats bitmap.
  24450. */
  24451. /* bit 0 is currently unused / reserved */
  24452. WMI_REQUEST_CTRL_PATH_PDEV_TX_STAT = 1,
  24453. WMI_REQUEST_CTRL_PATH_VDEV_EXTD_STAT = 2,
  24454. WMI_REQUEST_CTRL_PATH_MEM_STAT = 3,
  24455. WMI_REQUEST_CTRL_PATH_TWT_STAT = 4,
  24456. WMI_REQUEST_CTRL_PATH_CALIBRATION_STAT = 5,
  24457. WMI_REQUEST_CTRL_PATH_DFS_CHANNEL_STAT = 6,
  24458. } wmi_ctrl_path_stats_id;
  24459. typedef enum {
  24460. /*
  24461. * The following stats actions are mutually exclusive.
  24462. * A single stats request message can only specify one action.
  24463. */
  24464. WMI_REQUEST_CTRL_PATH_STAT_GET = 1,
  24465. WMI_REQUEST_CTRL_PATH_STAT_RESET = 2,
  24466. WMI_REQUEST_CTRL_PATH_STAT_START = 3,
  24467. WMI_REQUEST_CTRL_PATH_STAT_STOP = 4,
  24468. } wmi_ctrl_path_stats_action;
  24469. typedef struct {
  24470. /** TLV tag and len; tag equals
  24471. * WMITLV_TAG_STRUC_wmi_request_ctrl_path_stats_cmd_fixed_param */
  24472. A_UINT32 tlv_header;
  24473. /** Bitmask showing which of stats IDs 0-31 have been requested.
  24474. * These stats ids are defined in enum wmi_ctrl_path_stats_id.
  24475. */
  24476. A_UINT32 stats_id_mask;
  24477. /** request ID to store the cookies in wifistats */
  24478. A_UINT32 request_id;
  24479. /** action
  24480. * get/reset/start/stop based on stats id
  24481. * defined as a part of wmi_ctrl_path_stats_action
  24482. **/
  24483. A_UINT32 action; /* refer to wmi_ctrl_path_stats_action */
  24484. /** The below TLV arrays optionally follow this fixed_param TLV structure:
  24485. * 1. A_UINT32 pdev_ids[];
  24486. * If this array is present and non-zero length, stats should only
  24487. * be provided from the pdevs identified in the array.
  24488. * 2. A_UINT32 vdev_ids[];
  24489. * If this array is present and non-zero length, stats should only
  24490. * be provided from the vdevs identified in the array.
  24491. * 3. wmi_mac_addr peer_macaddr[];
  24492. * If this array is present and non-zero length, stats should only
  24493. * be provided from the peers with the MAC addresses specified
  24494. * in the array.
  24495. */
  24496. } wmi_request_ctrl_path_stats_cmd_fixed_param;
  24497. typedef enum {
  24498. WMI_REQUEST_ONE_RADIO_CHAN_STATS = 0x01, /* request stats of one specified channel */
  24499. WMI_REQUEST_ALL_RADIO_CHAN_STATS = 0x02, /* request stats of all channels */
  24500. } wmi_radio_chan_stats_request_type;
  24501. /** It is required to issue WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE
  24502. * (with a non-zero value) before issuing the first REQUEST_RADIO_CHAN_STATS.
  24503. */
  24504. typedef struct {
  24505. /** TLV tag and len; tag equals
  24506. * WMITLV_TAG_STRUC_wmi_request_radio_chan_stats_cmd_fixed_param */
  24507. A_UINT32 tlv_header;
  24508. /** request_type to indicate if only stats of
  24509. * one channel or all channels are requested,
  24510. * see wmi_radio_chan_stats_request_type.
  24511. */
  24512. A_UINT32 request_type;
  24513. /** Frequency of channel whose stats is requested,
  24514. * only used when request_type == WMI_REQUEST_ONE_RADIO_CHAN_STATS
  24515. */
  24516. A_UINT32 chan_mhz;
  24517. /** flag to indicate if FW needs to reset requested stats of specified channel/channels */
  24518. A_UINT32 reset_after_request;
  24519. } wmi_request_radio_chan_stats_cmd_fixed_param;
  24520. typedef struct {
  24521. /** TLV tag and len; tag equals
  24522. * WMITLV_TAG_STRUC_wmi_rmc_set_leader_cmd_fixed_param */
  24523. A_UINT32 tlv_header;
  24524. /* VDEV identifier */
  24525. A_UINT32 vdev_id;
  24526. /* Leader's mac address */
  24527. wmi_mac_addr leader_mac_addr;
  24528. } wmi_rmc_set_leader_cmd_fixed_param;
  24529. typedef struct {
  24530. /** TLV tag and len; tag equals
  24531. * WMITLV_TAG_STRUC_wmi_rmc_manual_leader_event_fixed_param */
  24532. A_UINT32 tlv_header;
  24533. /* VDEV identifier */
  24534. A_UINT32 vdev_id;
  24535. /* 0: success
  24536. * 1: selected leader not found in network, able to find using auto selection
  24537. * -1: error
  24538. * non zero value should be return to userspace in case of failure */
  24539. A_INT32 status;
  24540. /* bssid of new leader */
  24541. wmi_mac_addr leader_mac_addr;
  24542. } wmi_rmc_manual_leader_event_fixed_param;
  24543. typedef struct {
  24544. /** TLV tag and len; tag equals
  24545. * WMITLV_TAG_STRUC_wmi_audio_sync_start_event_fixed_param
  24546. */
  24547. A_UINT32 tlv_header;
  24548. /* VDEV identifier */
  24549. A_UINT32 vdev_id;
  24550. /* periodicity:
  24551. * How frequently (in msec) FW wants host to capture the Q_TIMER.
  24552. * periodicity = 0 indicates to the host to stop capturing the QTIMERs.
  24553. */
  24554. A_UINT32 periodicity;
  24555. /* No of Qtimer captures FW wants */
  24556. A_UINT32 reads_needed;
  24557. /* Lower 32 bits of the mac timer. Value is valid only if periodicity = 0 */
  24558. A_UINT32 mac_timer_l32;
  24559. /* Upper 32 bits of the mac timer. Value is valid only if periodicity = 0 */
  24560. A_UINT32 mac_timer_u32;
  24561. /* Lower 32 bits of the Qtimer. Value is valid only if periodicity = 0 */
  24562. A_UINT32 qtimer_l32;
  24563. /* Upper 32 bits of the Qtimer. Value is valid only if periodicity = 0 */
  24564. A_UINT32 qtimer_u32;
  24565. } wmi_audio_sync_start_stop_event_fixed_param;
  24566. typedef struct {
  24567. /** TLV tag and len; tag equals
  24568. * WMITLV_TAG_STRUC_wmi_audio_sync_q_mac_relation_event_fixed_param */
  24569. A_UINT32 tlv_header;
  24570. /* VDEV identifier */
  24571. A_UINT32 vdev_id;
  24572. /* Lower 32 bits of the offset between Qmaster and Qslave */
  24573. A_UINT32 offset_l32;
  24574. /* Upper 32 bits of the offset between Qmaster and Qslave */
  24575. A_UINT32 offset_u32;
  24576. } wmi_audio_sync_q_master_slave_offset_event_fixed_param;
  24577. typedef struct {
  24578. /** TLV tag and len; tag equals
  24579. * WMITLV_TAG_STRUC_wmi_audio_sync_q_mac_relation_event_fixed_param */
  24580. A_UINT32 tlv_header;
  24581. /* Lower 32 bits of the Qtimer of master */
  24582. A_UINT32 qmaster_l32;
  24583. /* Upper 32 bits of the Qtimer of master */
  24584. A_UINT32 qmaster_u32;
  24585. /* Lower 32 bits of the Qtimer of slave*/
  24586. A_UINT32 qslave_l32;
  24587. /* Upper 32 bits of the Qtimer of slave*/
  24588. A_UINT32 qslave_u32;
  24589. } wmi_audio_sync_q_master_slave_times;
  24590. /** Set Preferred Channel List **/
  24591. typedef struct {
  24592. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_pcl_cmd_fixed_param */
  24593. /** vdev_id */
  24594. A_UINT32 vdev_id;
  24595. /**
  24596. * TLV (tag length value) parameters follow the wmi_vdev_set_pcl_cmd
  24597. * structure. The TLV's are:
  24598. *
  24599. * A_UINT32 channel_weight[];
  24600. * values definied by enum 'wmi_pcl_chan_weight'
  24601. * channel order & size will be as per the list provided in WMI_SCAN_CHAN_LIST_CMDID
  24602. **/
  24603. } wmi_vdev_set_pcl_cmd_fixed_param;
  24604. /** command type for WMI_PDEV_TBTT_OFFSET_SYNC_CMDID */
  24605. enum pdev_tbtt_offset_cmd_type
  24606. {
  24607. WMI_PDEV_GET_TBTT_OFFSET,
  24608. WMI_PDEV_SET_TBTT_OFFSET,
  24609. };
  24610. /** Per neighbour TBTT offset information */
  24611. typedef struct
  24612. {
  24613. /** TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_pdev_tbtt_offset_info */
  24614. A_UINT32 tlv_header;
  24615. /* neighbour bss mac address */
  24616. wmi_mac_addr bss_mac;
  24617. /* neighbour bss beacon interval in TU */
  24618. A_UINT32 beacon_intval;
  24619. /* neighbour bss operating class as defined in Annex E, IEEE80211 standard */
  24620. A_UINT32 opclass;
  24621. /* neighbour bss operating channel index */
  24622. A_UINT32 chan_idx;
  24623. /* neighbour bss next QTIME TBTT high 32 bit value */
  24624. A_UINT32 next_qtime_tbtt_high;
  24625. /* neighbour bss next QTIME TBTT low 32 bit value */
  24626. A_UINT32 next_qtime_tbtt_low;
  24627. } wmi_pdev_rnr_bss_tbtt_info;
  24628. typedef struct {
  24629. /** TLV tag and len; tag equals
  24630. * WMITLV_TAG_STRUC_wmi_pdev_tbtt_offset_sync_cmd_fixed_param */
  24631. A_UINT32 tlv_header;
  24632. /*
  24633. * PDEV identifier. Value WMI_PDEV_ID_SOC implies applicable to all pdevs
  24634. * on SoC else applicable only to specified pdev
  24635. */
  24636. A_UINT32 pdev_id;
  24637. /* command_type from enum pdev_tbtt_offset_cmd_type */
  24638. A_UINT32 cmd_type;
  24639. /*
  24640. * Following this structure is the TLV:
  24641. * struct wmi_pdev_rnr_bss_tbtt_info rnr_tbtt_info[num_rnr_tbtt_info];
  24642. */
  24643. } wmi_pdev_tbtt_offset_sync_cmd_fixed_param;
  24644. typedef enum {
  24645. WLAN_2G_CAPABILITY = 0x1,
  24646. WLAN_5G_CAPABILITY = 0x2,
  24647. } WLAN_BAND_CAPABILITY;
  24648. typedef enum wmi_hw_mode_config_type {
  24649. WMI_HW_MODE_SINGLE = 0, /* Only one PHY is active. */
  24650. WMI_HW_MODE_DBS = 1, /* Both PHYs are active in different bands, PHYB in 2G and PHYA in 5G. */
  24651. WMI_HW_MODE_SBS_PASSIVE = 2, /* Both PHYs are in passive mode (only rx) in same band; no tx allowed. */
  24652. WMI_HW_MODE_SBS = 3, /* Both PHYs are active in the same band.
  24653. * Support for both PHYs within one band is planned for 5G only
  24654. * (as indicated in WMI_MAC_PHY_CAPABILITIES),
  24655. * but could be extended to other bands in the future.
  24656. * The separation of the band between the two PHYs needs to be communicated separately.
  24657. */
  24658. WMI_HW_MODE_DBS_SBS = 4, /* 3 PHYs, with 2 on the same band doing SBS
  24659. * as in WMI_HW_MODE_SBS, and 3rd on the other band
  24660. */
  24661. WMI_HW_MODE_DBS_OR_SBS = 5, /* One PHY is on 5G and the other PHY can be in 2G or 5G. */
  24662. WMI_HW_MODE_DBS_2G_5G = 6, /* Both PHYs are active in different bands. PhyA 2G and PhyB 5G */
  24663. WMI_HW_MODE_2G_PHYB = 7, /* Ony PhyB 2G active */
  24664. } WMI_HW_MODE_CONFIG_TYPE;
  24665. /*
  24666. * Per HW mode MLO capability flags
  24667. * use bits 31:27 of A_UINT32 hw_mode_config_type for Per HW mode MLO
  24668. * capability flags...
  24669. * WMI_MLO_CAP_FLAG_NONE: Do not support MLO for the specific HW mode
  24670. * WMI_MLO_CAP_FLAG_NON_STR_IN_DBS: Support STR MLO when DBS for the specific
  24671. * HW mode
  24672. * WMI_MLO_CAP_FLAG_STR_IN_DBS: Support Non-STR MLO when DBS for the
  24673. * specific HW mode
  24674. * WMI_MLO_CAP_FLAG_NON_STR_IN_SBS: Support STR MLO when SBS for the specific
  24675. * HW mode
  24676. * WMI_MLO_CAP_FLAG_STR_IN_SBS: Support Non-STR MLO when SBS for the
  24677. * specific HW mode
  24678. * WMI_MLO_CAP_FLAG_STR: Support STR for the specific HW mode.
  24679. */
  24680. #define WMI_MLO_CAP_FLAG_NONE 0x00
  24681. #define WMI_MLO_CAP_FLAG_NON_STR_IN_DBS 0x01
  24682. #define WMI_MLO_CAP_FLAG_STR_IN_DBS 0x02
  24683. #define WMI_MLO_CAP_FLAG_NON_STR_IN_SBS 0x04
  24684. #define WMI_MLO_CAP_FLAG_STR_IN_SBS 0x08
  24685. #define WMI_MLO_CAP_FLAG_STR 0x10
  24686. /*
  24687. * hw_mode_config_type sub-fields for chips that support 802.11BE/MLO:
  24688. * bits 26:0 - hw_mode_config
  24689. * bits 31:27 - per HW mode MLO capability flags
  24690. */
  24691. #define WMI_BECAP_PHY_GET_HW_MODE_CFG(hw_mode_config_type) WMI_GET_BITS(hw_mode_config_type, 0, 27)
  24692. #define WMI_BECAP_PHY_SET_HW_MODE_CFG(hw_mode_config_type, value) WMI_SET_BITS(hw_mode_config_type, 0, 27, value)
  24693. #define WMI_BECAP_PHY_GET_MLO_CAP(hw_mode_config_type) WMI_GET_BITS(hw_mode_config_type, 27, 5)
  24694. #define WMI_BECAP_PHY_SET_MLO_CAP(hw_mode_config_type, value) WMI_SET_BITS(hw_mode_config_type, 27, 5, value)
  24695. /*
  24696. * pdev_id sub-fields for chips that support 802.11BE/MLO
  24697. * as part of WMI_MAC_PHY_CAPABILITIES and WMI_MAC_PHY_CAPABILITIES_EXT:
  24698. * bits 16:0 - pdev_id
  24699. * bits 32:16 - Unique link id across SOCs, got as part of QMI handshake.
  24700. */
  24701. #define WMI_PHY_GET_PDEV_ID(pdev_id) WMI_GET_BITS(pdev_id, 0, 16)
  24702. #define WMI_PHY_SET_PDEV_ID(pdev_id, value) WMI_SET_BITS(pdev_id, 0, 16, value)
  24703. #define WMI_PHY_GET_HW_LINK_ID(pdev_id) WMI_GET_BITS(pdev_id, 16, 16)
  24704. #define WMI_PHY_SET_HW_LINK_ID(pdev_id, value) WMI_SET_BITS(pdev_id, 16, 16, value)
  24705. #define WMI_SUPPORT_11B_GET(flags) WMI_GET_BITS(flags, 0, 1)
  24706. #define WMI_SUPPORT_11B_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
  24707. #define WMI_SUPPORT_11G_GET(flags) WMI_GET_BITS(flags, 1, 1)
  24708. #define WMI_SUPPORT_11G_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
  24709. #define WMI_SUPPORT_11A_GET(flags) WMI_GET_BITS(flags, 2, 1)
  24710. #define WMI_SUPPORT_11A_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
  24711. #define WMI_SUPPORT_11N_GET(flags) WMI_GET_BITS(flags, 3, 1)
  24712. #define WMI_SUPPORT_11N_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
  24713. #define WMI_SUPPORT_11AC_GET(flags) WMI_GET_BITS(flags, 4, 1)
  24714. #define WMI_SUPPORT_11AC_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
  24715. #define WMI_SUPPORT_11AX_GET(flags) WMI_GET_BITS(flags, 5, 1)
  24716. #define WMI_SUPPORT_11AX_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
  24717. #define WMI_SUPPORT_11BE_GET(flags) WMI_GET_BITS(flags, 6, 1)
  24718. #define WMI_SUPPORT_11BE_SET(flags, value) WMI_SET_BITS(flags, 6, 1, value)
  24719. #define WMI_MAX_MUBFEE_GET(flags) WMI_GET_BITS(flags, 28, 4)
  24720. #define WMI_MAX_MUBFEE_SET(flags, value) WMI_SET_BITS(flags, 28, 4, value)
  24721. /*
  24722. * +-----------------------------+------------------------------------+
  24723. * | Transmitted VHT Capablities | NSS Support of STA |
  24724. * | Information Field | transmitted VHT Capablites |
  24725. * +---------------+-------------+------+------+------+------+--------+
  24726. * | Supported | Extended | | | | | |
  24727. * | Channel | NSS BW | | | | | |
  24728. * | WidthSet | Suppport |20 Mhz|40 Mhz|80 Mhz|160Mhz|80+80Mhz|
  24729. * +---------------+-------------+------+------+------+------+--------+
  24730. * | 0 | 0 | 1 | 1 | 1 | | |
  24731. * +---------------+-------------+------+------+------+------+--------+
  24732. * | 0 | 1 | 1 | 1 | 1 | 1/2 | |
  24733. * +---------------+-------------+------+------+------+------+--------+
  24734. * | 0 | 2 | 1 | 1 | 1 | 1/2 | 1/2 |
  24735. * +---------------+-------------+------+------+------+------+--------+
  24736. * | 0 | 3 | 1 | 1 | 1 | 3/4 | 3/4 |
  24737. * +---------------+-------------+------+------+------+------+--------+
  24738. * | 1 | 0 | 1 | 1 | 1 | 1 | |
  24739. * +---------------+-------------+------+------+------+------+--------+
  24740. * | 1 | 1 | 1 | 1 | 1 | 1 | 1/2 |
  24741. * +---------------+-------------+------+------+------+------+--------+
  24742. * | 1 | 2 | 1 | 1 | 1 | 1 | 3/4 |
  24743. * +---------------+-------------+------+------+------+------+--------+
  24744. * | 1 | 3 | 2 | 2 | 2 | 2 | 1 |
  24745. * +---------------+-------------+------+------+------+------+--------+
  24746. * | 2 | 0 | 1 | 1 | 1 | 1 | 1 |
  24747. * +---------------+-------------+------+------+------+------+--------+
  24748. * | 2 | 3 | 2 | 2 | 2 | 1 | 1 |
  24749. * +---------------+-------------+------+------+------+------+--------+
  24750. */
  24751. /*
  24752. * [0] : WMI_NSS_RATIO_ENABLE_DISABLE_BITPOS
  24753. * [4:1] : WMI_NSS_RATIO_INFO_BITPOS
  24754. */
  24755. #define WMI_NSS_RATIO_ENABLE_DISABLE_BITPOS 0x0
  24756. #define WMI_NSS_RATIO_INFO_BITPOS 0x1
  24757. /*
  24758. * WMI_NSS_RATIO_ENABLE_DISABLE values:
  24759. * [0] : 0 - WMI_NSS_RATIO_DISABLE
  24760. * [0] : 1 - WMI_NSS_RATIO_ENABLE
  24761. */
  24762. #define WMI_NSS_RATIO_DISABLE 0x0
  24763. #define WMI_NSS_RATIO_ENABLE 0x1
  24764. /*
  24765. * WMI_NSS_RATIO_INFO values:
  24766. * [4:1] : 0000 - WMI_NSS_RATIO_1BY2_NSS
  24767. * [4:1] : 0001 - WMI_NSS_RATIO_3BY4_NSS
  24768. * [4:1] : 0010 - WMI_NSS_RATIO_1_NSS
  24769. * [4:1] : 0011 - WMI_NSS_RATIO_2_NSS
  24770. */
  24771. #define WMI_NSS_RATIO_1BY2_NSS 0x0
  24772. #define WMI_NSS_RATIO_3BY4_NSS 0x1
  24773. #define WMI_NSS_RATIO_1_NSS 0x2
  24774. #define WMI_NSS_RATIO_2_NSS 0x3
  24775. #define WMI_NSS_RATIO_ENABLE_DISABLE_SET(param, value) \
  24776. WMI_SET_BITS(param, WMI_NSS_RATIO_ENABLE_DISABLE_BITPOS, 1, value)
  24777. #define WMI_NSS_RATIO_ENABLE_DISABLE_GET(dword) \
  24778. WMI_GET_BITS(dword, WMI_NSS_RATIO_ENABLE_DISABLE_BITPOS, 1)
  24779. #define WMI_NSS_RATIO_INFO_SET(param, value) \
  24780. WMI_SET_BITS(param, WMI_NSS_RATIO_INFO_BITPOS, 4, value)
  24781. #define WMI_NSS_RATIO_INFO_GET(dword) \
  24782. WMI_GET_BITS(dword, WMI_NSS_RATIO_INFO_BITPOS, 4)
  24783. typedef struct {
  24784. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES */
  24785. /* hw_mode_id - identify a particular set of HW characteristics, as specified
  24786. * by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element must be mapped
  24787. * to its parent WMI_HW_MODE_CAPABILITIES element using hw_mode_id.
  24788. * No particular ordering of WMI_MAC_PHY_CAPABILITIES elements should be assumed,
  24789. * though in practice the elements may always be ordered by hw_mode_id */
  24790. A_UINT32 hw_mode_id;
  24791. /*
  24792. * pdev_id starts with 1. pdev_id 1 => phy_id 0, pdev_id 2 => phy_id 1
  24793. * hw_link_id: Unique link id across SOCs, got as part of QMI handshake.
  24794. * For legacy chips which do not support MLO, these top bits will always
  24795. * be set to 0, so it won't impact the legacy chips which treat pdev_id
  24796. * as 32 bits.
  24797. */
  24798. union {
  24799. struct {
  24800. A_UINT32 pdev_id:16,
  24801. hw_link_id:16;
  24802. } wmi_pdev_to_link_map;
  24803. A_UINT32 pdev_id;
  24804. };
  24805. /* phy id. Starts with 0 */
  24806. A_UINT32 phy_id;
  24807. /* supported modulations and number of MU beamformees */
  24808. union {
  24809. struct {
  24810. A_UINT32 supports_11b:1,
  24811. supports_11g:1,
  24812. supports_11a:1,
  24813. supports_11n:1,
  24814. supports_11ac:1,
  24815. supports_11ax:1,
  24816. supports_11be:1,
  24817. unused: 21,
  24818. max_mubfee: 4; /* max MU beamformees supported per MAC */
  24819. };
  24820. A_UINT32 supported_flags;
  24821. };
  24822. /* supported bands, enum WLAN_BAND_CAPABILITY */
  24823. A_UINT32 supported_bands;
  24824. /* ampdu density 0 for no restriction, 1 for 1/4 us, 2 for 1/2 us,
  24825. * 3 for 1 us,4 for 2 us, 5 for 4 us, 6 for 8 us,7 for 16 us */
  24826. A_UINT32 ampdu_density;
  24827. /* max bw supported 2G, enum wmi_channel_width */
  24828. A_UINT32 max_bw_supported_2G;
  24829. /* WMI HT Capability, WMI_HT_CAP defines */
  24830. A_UINT32 ht_cap_info_2G;
  24831. /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
  24832. A_UINT32 vht_cap_info_2G;
  24833. /* VHT Supported MCS Set field Rx/Tx same
  24834. * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  24835. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  24836. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  24837. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  24838. * - 3 indicates that n spatial streams is not supported
  24839. * - bit [15:0] Each NSS takes 2 bit.
  24840. * - bit [23:16] Indicates support for VHT-MCS 10 and 11 for
  24841. * n spatial streams
  24842. * - bit 16 - for NSS 1
  24843. * - bit 17 - for NSS 2
  24844. * - .
  24845. * - .
  24846. * - bit 23 - for NSS 8
  24847. * - bit 24 - indicate whether the VHT-MCS 10-11 specs in bits 23:16
  24848. * are valid
  24849. * Refer to the WMI_VHT_MAX_MCS_EXT_SS_GET/SET macros.
  24850. */
  24851. A_UINT32 vht_supp_mcs_2G;
  24852. /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
  24853. A_UINT32 he_cap_info_2G;
  24854. /* HE Supported MCS Set field Rx/Tx same
  24855. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  24856. * bit 2-0 indicating max HE MCS of NSS1
  24857. * bit 5-3 indicating max HE MCS of NSS2 and so on
  24858. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  24859. * HE BW less than or equal to 80MHZ is encoded as follows
  24860. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  24861. * - 1 indicates support for VHT-MCS 0-9 for n spatial streams
  24862. * - 2 indicates support for VHT-MCS 0-11 for n spatial streams
  24863. * - 3 indicates that n spatial streams is not supported
  24864. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  24865. */
  24866. A_UINT32 he_supp_mcs_2G;
  24867. /* Valid Transmit chain mask */
  24868. A_UINT32 tx_chain_mask_2G;
  24869. /* Valid Receive chain mask */
  24870. A_UINT32 rx_chain_mask_2G;
  24871. /* max bw supported 5G, enum wmi_channel_width */
  24872. A_UINT32 max_bw_supported_5G;
  24873. /* WMI HT Capability, WMI_HT_CAP defines */
  24874. A_UINT32 ht_cap_info_5G;
  24875. /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
  24876. A_UINT32 vht_cap_info_5G;
  24877. /* VHT Supported MCS Set field Rx/Tx same
  24878. * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  24879. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  24880. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  24881. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  24882. * - 3 indicates that n spatial streams is not supported
  24883. * - bit [15:0] Each NSS takes 2 bit.
  24884. * - bit [23:16] Indicates support for VHT-MCS 10 and 11 for
  24885. * n spatial streams
  24886. * - bit 16 - for NSS 1
  24887. * - bit 17 - for NSS 2
  24888. * - .
  24889. * - .
  24890. * - bit 23 - for NSS 8
  24891. * - bit 24 - indicate whether the VHT-MCS 10-11 specs in bits 23:16
  24892. * are valid
  24893. * Refer to the WMI_VHT_MAX_MCS_EXT_SS_GET/SET macros.
  24894. */
  24895. A_UINT32 vht_supp_mcs_5G;
  24896. /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
  24897. A_UINT32 he_cap_info_5G;
  24898. /* HE Supported MCS Set field Rx/Tx same
  24899. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  24900. * bit 2-0 indicating max HE MCS of NSS1
  24901. * bit 5-3 indicating max HE MCS of NSS2 and so on
  24902. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  24903. * HE BW less than or equal to 80MHZ is encoded as follows
  24904. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  24905. * - 1 indicates support for VHT-MCS 0-9 for n spatial streams
  24906. * - 2 indicates support for VHT-MCS 0-11 for n spatial streams
  24907. * - 3 indicates that n spatial streams is not supported
  24908. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  24909. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  24910. * HE BW equal to 80+80 or 160 MHZ encoding is same as above just the
  24911. * lower 16 bits are used for lower 80MHz NSS-MCS supported combo and
  24912. * upper 16 bits are used for upper 80MHz NSS-MCS supported combo
  24913. */
  24914. A_UINT32 he_supp_mcs_5G;
  24915. /* Valid Transmit chain mask */
  24916. A_UINT32 tx_chain_mask_5G;
  24917. /* Valid Receive chain mask */
  24918. A_UINT32 rx_chain_mask_5G;
  24919. /* HE capability phy field of 802.11ax, WMI_HE_CAP defines */
  24920. A_UINT32 he_cap_phy_info_2G[WMI_MAX_HECAP_PHY_SIZE];
  24921. A_UINT32 he_cap_phy_info_5G[WMI_MAX_HECAP_PHY_SIZE];
  24922. wmi_ppe_threshold he_ppet2G;
  24923. wmi_ppe_threshold he_ppet5G;
  24924. /* chainmask table to be used for the MAC */
  24925. A_UINT32 chainmask_table_id;
  24926. /* PDEV ID to LMAC ID mapping */
  24927. A_UINT32 lmac_id;
  24928. /* 2nd DWORD of HE capability info field of 802.11ax, support Draft 3+ */
  24929. A_UINT32 he_cap_info_2G_ext;
  24930. A_UINT32 he_cap_info_5G_ext;
  24931. /*
  24932. * bit 0 : Indicated support for RX 1xLTF + 0.4us
  24933. * bit 1 : Indicates support for RX 2xLTF + 0.4us
  24934. * bit 2 : Indicates support for 2xLTF in 160/80+80 MHz HE PPDU
  24935. * bit[31:3] : Reserved
  24936. * Refer to WMI_HE_CAP_xx_LTF_xxx_SUPPORT_GET/SET macros
  24937. */
  24938. A_UINT32 he_cap_info_internal;
  24939. A_UINT32 wireless_modes; /* REGDMN MODE, see REGDMN_MODE_ enum */
  24940. A_UINT32 low_2ghz_chan_freq; /* units = MHz */
  24941. A_UINT32 high_2ghz_chan_freq; /* units = MHz */
  24942. A_UINT32 low_5ghz_chan_freq; /* units = MHz */
  24943. A_UINT32 high_5ghz_chan_freq; /* units = MHz */
  24944. /*
  24945. * NSS ratio to be sent to Host during boot-up capabilities negotiation
  24946. *
  24947. * Bit 0 - refer to WMI_NSS_RATIO_ENABLE_DISABLE_ definitions
  24948. * [0] : 0 - WMI_NSS_RATIO_DISABLE
  24949. * [0] : 1 - WMI_NSS_RATIO_ENABLE
  24950. *
  24951. * Bits 4:1 - refer to WMI_NSS_RATIO_INFO_ definitions
  24952. * [4:1] : 0000 - WMI_NSS_RATIO_1BY2_NSS
  24953. * [4:1] : 0001 - WMI_NSS_RATIO_3BY4_NSS
  24954. * [4:1] : 0010 - WMI_NSS_RATIO_1_NSS
  24955. * [4:1] : 0011 - WMI_NSS_RATIO_2_NSS
  24956. *
  24957. * [31:5] : Reserved
  24958. */
  24959. A_UINT32 nss_ratio;
  24960. /**************************************************************************
  24961. * DON'T ADD ANY FURTHER FIELDS HERE -
  24962. * It would cause the size of the READY_EXT message within some targets
  24963. * to exceed the size of the buffer used for the message.
  24964. **************************************************************************/
  24965. } WMI_MAC_PHY_CAPABILITIES;
  24966. typedef struct {
  24967. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES_EXT */
  24968. /* hw_mode_id - identify a particular set of HW characteristics, as specified
  24969. * by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element must be mapped
  24970. * to its parent WMI_HW_MODE_CAPABILITIES element using hw_mode_id.
  24971. * No particular ordering of WMI_MAC_PHY_CAPABILITIES elements should be assumed,
  24972. * though in practice the elements may always be ordered by hw_mode_id */
  24973. A_UINT32 hw_mode_id;
  24974. /*
  24975. * pdev_id starts with 1. pdev_id 1 => phy_id 0, pdev_id 2 => phy_id 1
  24976. * hw_link_id: Unique link id across SOCs, got as part of QMI handshake.
  24977. * For legacy chips which do not support MLO, these top bits will always
  24978. * be set to 0, so it won't impact the legacy chips which treat pdev_id
  24979. * as 32 bits.
  24980. */
  24981. union {
  24982. struct {
  24983. A_UINT32 pdev_id:16,
  24984. hw_link_id:16;
  24985. } wmi_pdev_to_link_map;
  24986. A_UINT32 pdev_id;
  24987. };
  24988. /* phy id. Starts with 0 */
  24989. A_UINT32 phy_id;
  24990. A_UINT32 wireless_modes_ext; /* REGDMN MODE EXT, see REGDMN_MODE_ enum */
  24991. /**************************************************************************
  24992. * following new params for 802.11be, but under development
  24993. **************************************************************************/
  24994. /* EHT capability mac info field of 802.11be */
  24995. A_UINT32 eht_cap_mac_info_2G[WMI_MAX_EHTCAP_MAC_SIZE];
  24996. A_UINT32 eht_cap_mac_info_5G[WMI_MAX_EHTCAP_MAC_SIZE];
  24997. A_UINT32 eht_supp_mcs_2G;
  24998. A_UINT32 eht_supp_mcs_5G;
  24999. /* EHT capability phy field of 802.11be, WMI_EHT_CAP defines */
  25000. A_UINT32 eht_cap_phy_info_2G[WMI_MAX_EHTCAP_PHY_SIZE];
  25001. A_UINT32 eht_cap_phy_info_5G[WMI_MAX_EHTCAP_PHY_SIZE];
  25002. wmi_ppe_threshold eht_ppet2G;
  25003. wmi_ppe_threshold eht_ppet5G;
  25004. A_UINT32 eht_cap_info_internal;
  25005. /**************************************************************************
  25006. * Currently pls do not add any new param after EHT
  25007. * as still under development.
  25008. * We can add new param before it.
  25009. **************************************************************************/
  25010. } WMI_MAC_PHY_CAPABILITIES_EXT;
  25011. typedef struct {
  25012. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HW_MODE_CAPABILITIES */
  25013. /* hw_mode_id - identify a particular set of HW characteristics,
  25014. * as specified by the subsequent fields */
  25015. A_UINT32 hw_mode_id;
  25016. /* BIT0 represents phy_id 0, BIT1 represent phy_id 1 and so on
  25017. * number of bits set in phy_id_map represents number of WMI_MAC_PHY_CAPABILITIES TLV's
  25018. * one for each active PHY for current HW mode identified by hw_mode_id. For example for
  25019. * DBS/SBS mode there will be 2 WMI_MAC_PHY_CAPABILITIES TLVs and for single MAC modes it
  25020. * will be 1 WMI_MAC_PHY_CAPABILITIES TLVs */
  25021. A_UINT32 phy_id_map;
  25022. /* hw_mode_config_type
  25023. * Identify a particular type of HW mode such as SBS, DBS etc.
  25024. * Refer to WMI_HW_MODE_CONFIG_TYPE values.
  25025. *
  25026. * Use bits 31:27 of hw_mode_config_type for Per HW mode MLO capability
  25027. * flags.
  25028. * Refer to WMI_MLO_CAP_FLAG_XXX. For legacy chips which do not support
  25029. * MLO, these top bits will always be set to 0, so it won't impact the
  25030. * legacy chips which treat hw_mode_config_type as 32 bits.
  25031. */
  25032. union {
  25033. struct {
  25034. A_UINT32 hw_mode_config :27,
  25035. mlo_cap_flag :5; /* see WMI_MLO_CAP_FLAG_ defs */
  25036. };
  25037. A_UINT32 hw_mode_config_type;
  25038. };
  25039. /**************************************************************************
  25040. * DON'T ADD ANY FURTHER FIELDS HERE -
  25041. * It would cause the size of the READY_EXT message within some targets
  25042. * to exceed the size of the buffer used for the message.
  25043. **************************************************************************/
  25044. } WMI_HW_MODE_CAPABILITIES;
  25045. /*
  25046. * The following macros are for the bitfields witihin the supported flags field
  25047. * of WMI_MAC_PHY_CHAINMASK_CAPABILITY:
  25048. * Capabilities for the chainmask
  25049. */
  25050. #define WMI_SUPPORT_CHAN_WIDTH_20_GET(flags) WMI_GET_BITS(flags, 0, 1)
  25051. #define WMI_SUPPORT_CHAN_WIDTH_20_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
  25052. #define WMI_SUPPORT_CHAN_WIDTH_40_GET(flags) WMI_GET_BITS(flags, 1, 1)
  25053. #define WMI_SUPPORT_CHAN_WIDTH_40_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
  25054. #define WMI_SUPPORT_CHAN_WIDTH_80_GET(flags) WMI_GET_BITS(flags, 2, 1)
  25055. #define WMI_SUPPORT_CHAN_WIDTH_80_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
  25056. #define WMI_SUPPORT_CHAN_WIDTH_160_GET(flags) WMI_GET_BITS(flags, 3, 1)
  25057. #define WMI_SUPPORT_CHAN_WIDTH_160_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
  25058. #define WMI_SUPPORT_CHAN_WIDTH_80P80_GET(flags) WMI_GET_BITS(flags, 4, 1)
  25059. #define WMI_SUPPORT_CHAN_WIDTH_80P80_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
  25060. #define WMI_SUPPORT_AGILE_SPECTRAL_GET(flags) WMI_GET_BITS(flags, 5, 1)
  25061. #define WMI_SUPPORT_AGILE_SPECTRAL_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
  25062. #define WMI_SUPPORT_AGILE_SPECTRAL_160_GET(flags) WMI_GET_BITS(flags, 6, 1)
  25063. #define WMI_SUPPORT_AGILE_SPECTRAL_160_SET(flags, value) WMI_SET_BITS(flags, 6, 1, value)
  25064. #define WMI_SUPPORT_ADFS_160_GET(flags) WMI_GET_BITS(flags, 7, 1)
  25065. #define WMI_SUPPORT_ADFS_160_SET(flags, value) WMI_SET_BITS(flags, 7, 1, value)
  25066. #define WMI_SUPPORT_CHAN_WIDTH_320_GET(flags) WMI_GET_BITS(flags, 8, 1)
  25067. #define WMI_SUPPORT_CHAN_WIDTH_320_SET(flags, value) WMI_SET_BITS(flags, 8, 1, value)
  25068. #define WMI_SUPPORT_ADFS_320_GET(flags) WMI_GET_BITS(flags, 9, 1)
  25069. #define WMI_SUPPORT_ADFS_320_SET(flags, value) WMI_SET_BITS(flags, 9, 1, value)
  25070. #define WMI_SUPPORT_CHAIN_MASK_2G_GET(flags) WMI_GET_BITS(flags, 27, 1)
  25071. #define WMI_SUPPORT_CHAIN_MASK_2G_SET(flags, value) WMI_SET_BITS(flags, 27, 1, value)
  25072. #define WMI_SUPPORT_CHAIN_MASK_5G_GET(flags) WMI_GET_BITS(flags, 28, 1)
  25073. #define WMI_SUPPORT_CHAIN_MASK_5G_SET(flags, value) WMI_SET_BITS(flags, 28, 1, value)
  25074. #define WMI_SUPPORT_CHAIN_MASK_TX_GET(flags) WMI_GET_BITS(flags, 29, 1)
  25075. #define WMI_SUPPORT_CHAIN_MASK_TX_SET(flags, value) WMI_SET_BITS(flags, 29, 1, value)
  25076. #define WMI_SUPPORT_CHAIN_MASK_RX_GET(flags) WMI_GET_BITS(flags, 30, 1)
  25077. #define WMI_SUPPORT_CHAIN_MASK_RX_SET(flags, value) WMI_SET_BITS(flags, 30, 1, value)
  25078. #define WMI_SUPPORT_CHAIN_MASK_ADFS_GET(flags) WMI_GET_BITS(flags, 31, 1)
  25079. #define WMI_SUPPORT_CHAIN_MASK_ADFS_SET(flags, value) WMI_SET_BITS(flags, 31, 1, value)
  25080. /** Definition of valid chainmask and associated capabilities */
  25081. typedef struct {
  25082. A_UINT32 tlv_header;/* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_CAPABILITY */
  25083. /* supported flags: Capabilities for this chianmask*/
  25084. union {
  25085. struct {
  25086. A_UINT32 supports_chan_width_20:1,
  25087. supports_chan_width_40:1,
  25088. supports_chan_width_80:1,
  25089. supports_chan_width_160:1,
  25090. supports_chan_width_80P80:1,
  25091. supports_agile_spectral:1,
  25092. supports_agile_spectral_160:1,
  25093. supports_aDFS_160:1,
  25094. supports_chan_width_320:1,
  25095. supports_aDFS_320:1,
  25096. reserved:17, /* bits 26:10 */
  25097. chain_mask_2G:1,
  25098. chain_mask_5G:1,
  25099. chain_mask_tx:1,
  25100. chain_mask_rx:1,
  25101. supports_aDFS:1; /* agile DFS */
  25102. };
  25103. A_UINT32 supported_flags;
  25104. };
  25105. A_UINT32 chainmask;
  25106. /**************************************************************************
  25107. * DON'T ADD ANY FURTHER FIELDS HERE -
  25108. * It would cause the size of the READY_EXT message within some targets
  25109. * to exceed the size of the buffer used for the message.
  25110. **************************************************************************/
  25111. } WMI_MAC_PHY_CHAINMASK_CAPABILITY;
  25112. typedef struct {
  25113. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_COMBO */
  25114. A_UINT32 chainmask_table_id;
  25115. /* Number of vaild Chainmask in the table */
  25116. A_UINT32 num_valid_chainmask;
  25117. /**************************************************************************
  25118. * DON'T ADD ANY FURTHER FIELDS HERE -
  25119. * It would cause the size of the READY_EXT message within some targets
  25120. * to exceed the size of the buffer used for the message.
  25121. **************************************************************************/
  25122. /*
  25123. * This TLV is followed by the below TLVs:
  25124. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask]
  25125. */
  25126. } WMI_MAC_PHY_CHAINMASK_COMBO;
  25127. typedef struct {
  25128. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_MAC_PHY_HW_MODE_CAPS */
  25129. /* num HW modes */
  25130. A_UINT32 num_hw_modes;
  25131. /* number of unique chainmask combo tables */
  25132. A_UINT32 num_chainmask_tables;
  25133. /**************************************************************************
  25134. * DON'T ADD ANY FURTHER FIELDS HERE -
  25135. * It would cause the size of the READY_EXT message within some targets
  25136. * to exceed the size of the buffer used for the message.
  25137. **************************************************************************/
  25138. /*
  25139. * This TLV is followed by the below TLVs:
  25140. *
  25141. * WMI_HW_MODE_CAPABILITIES soc_hw_mode_caps[num_hw_modes]
  25142. *
  25143. * (intervening TLVs, e.g. HW_MODE_CAPS, MAC_PHY_CAPS, HAL_REG_CAPS)
  25144. *
  25145. * WMI_MAC_PHY_CHAINMASK_COMBO mac_phy_chainmask_combo[num_chainmask_tables]
  25146. * // number of chainmasks specified in mac_phy_chainmask_combo[0]
  25147. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask0]
  25148. * // number of chainmasks specified in mac_phy_chainmask_combo[1]
  25149. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask1]
  25150. * // number of chainmasks specified in mac_phy_chainmask_combo[2]
  25151. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask2]
  25152. * etc.
  25153. */
  25154. } WMI_SOC_MAC_PHY_HW_MODE_CAPS;
  25155. /*Below are Reg caps per PHY. Please note PHY ID starts with 0.*/
  25156. typedef struct {
  25157. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT */
  25158. /* phy id */
  25159. A_UINT32 phy_id;
  25160. /* regdomain value specified in EEPROM */
  25161. A_UINT32 eeprom_reg_domain;
  25162. /* regdomain */
  25163. A_UINT32 eeprom_reg_domain_ext;
  25164. /* CAP1 capabilities bit map, see REGDMN_CAP1_ defines */
  25165. A_UINT32 regcap1;
  25166. /* REGDMN EEPROM CAP, see REGDMN_EEPROM_EEREGCAP_ defines */
  25167. A_UINT32 regcap2;
  25168. /* REGDMN MODE, see REGDMN_MODE_ enum */
  25169. A_UINT32 wireless_modes;
  25170. A_UINT32 low_2ghz_chan; /* freq in MHz */
  25171. A_UINT32 high_2ghz_chan; /* freq in MHz */
  25172. A_UINT32 low_5ghz_chan; /* freq in MHz */
  25173. A_UINT32 high_5ghz_chan; /* freq in MHz */
  25174. /**************************************************************************
  25175. * DON'T ADD ANY FURTHER FIELDS HERE -
  25176. * It would cause the size of the READY_EXT message within some targets
  25177. * to exceed the size of the buffer used for the message.
  25178. **************************************************************************/
  25179. } WMI_HAL_REG_CAPABILITIES_EXT;
  25180. typedef struct {
  25181. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT2 */
  25182. /* phy id */
  25183. A_UINT32 phy_id;
  25184. /* regdomain value specified in EEPROM */
  25185. A_UINT32 wireless_modes_ext;
  25186. } WMI_HAL_REG_CAPABILITIES_EXT2;
  25187. /*
  25188. * TWT service capability bitmap in wmi_twt_caps_params TLV
  25189. * within WMI_SERVICE_READY_EXT2_EVENTID message
  25190. */
  25191. typedef enum {
  25192. WMI_TWT_STA_SYNC_EVENT_CAP = 1, /* STA TWT: FW internal errors reported using sync WMI_TWT_ACK_EVENTID */
  25193. /* Add new TWT Caps above */
  25194. WMI_TWT_MAX_CAP = 32,
  25195. } WMI_TWT_CAPS_BITMAP;
  25196. typedef struct {
  25197. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_caps_param */
  25198. /* twt_capability_bitmap
  25199. * TWT Capabilities - refer to WMI_TWT_CAPS_BITMAP for the meaning of
  25200. * the bits within the bitmap
  25201. */
  25202. A_UINT32 twt_capability_bitmap;
  25203. } wmi_twt_caps_params;
  25204. /*
  25205. * This TLV used for Scan Radio RDP
  25206. * We have an RDP which supports Multiband-Frequency (2Ghz, 5Ghz and 6Ghz)
  25207. * on a single radio.
  25208. * The AP acts as a special VAP. There will not be WMI_VDEV_UP_CMD.
  25209. * This radio is used only for scanning purpose and to send few MGMT frames.
  25210. * The DFS feature is disabled on this scan radio, since there will not be
  25211. * much TX traffic.
  25212. * The Host has to disable CAC timer because DFS feature not supported here.
  25213. * In order to know about the scan radio RDP and DFS disabled case,
  25214. * the target has to send this information to Host per pdev via
  25215. * WMI_SERVICE_READY_EXT2_EVENT.
  25216. * The target is notified of the special scan VAP by the flags variable
  25217. * in the WMI_CREATE_CMD.
  25218. */
  25219. typedef struct {
  25220. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SCAN_RADIO_CAPABILITIES_EXT2 */
  25221. A_UINT32 phy_id;
  25222. /*
  25223. * Bit 0:
  25224. * 1 - SCAN_RADIO supported 0 - SCAN_RADIO not supported
  25225. * Refer to WMI_SCAN_RADIO_CAP_SCAN_RADIO_FLAG_SET, GET macros
  25226. * Bit 1:
  25227. * 1 - DFS enabled 0 - DFS disabled
  25228. * Refer to WMI_SCAN_RADIO_CAP_DFS_FLAG_SET, GET macros
  25229. * [2:31] reserved
  25230. */
  25231. A_UINT32 flags;
  25232. } WMI_SCAN_RADIO_CAPABILITIES_EXT2;
  25233. #define WMI_SCAN_RADIO_CAP_SCAN_RADIO_FLAG_GET(flag) WMI_GET_BITS(flag, 0, 1)
  25234. #define WMI_SCAN_RADIO_CAP_SCAN_RADIO_FLAG_SET(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  25235. #define WMI_SCAN_RADIO_CAP_DFS_FLAG_GET(flag) WMI_GET_BITS(flag, 1, 1)
  25236. #define WMI_SCAN_RADIO_CAP_DFS_FLAG_SET(flag, val) WMI_SET_BITS(flag, 1, 1, val)
  25237. typedef struct {
  25238. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_HAL_REG_CAPABILITIES */
  25239. A_UINT32 num_phy;
  25240. /* num_phy WMI_HAL_REG_CAPABILITIES_EXT TLV's */
  25241. /**************************************************************************
  25242. * DON'T ADD ANY FURTHER FIELDS HERE -
  25243. * It would cause the size of the READY_EXT message within some targets
  25244. * to exceed the size of the buffer used for the message.
  25245. **************************************************************************/
  25246. } WMI_SOC_HAL_REG_CAPABILITIES;
  25247. typedef struct {
  25248. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_OEM_DMA_RING_CAPABILITIES */
  25249. A_UINT32 pdev_id;
  25250. A_UINT32 min_num_ptr;
  25251. /* Minimum number of pointers in the OEM DMA ring for this pdev */
  25252. A_UINT32 min_buf_size;
  25253. /* Minimum size in bytes of each buffer in the OEM DMA ring */
  25254. A_UINT32 min_buf_align;
  25255. /* Minimum alignment in bytes of each buffer in the OEM DMA ring */
  25256. /**************************************************************************
  25257. * DON'T ADD ANY FURTHER FIELDS HERE -
  25258. * It would cause the size of the READY_EXT message within some targets
  25259. * to exceed the size of the buffer used for the message.
  25260. **************************************************************************/
  25261. } WMI_OEM_DMA_RING_CAPABILITIES;
  25262. typedef struct {
  25263. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SAR_CAPABILITIES*/
  25264. /* sar version in bdf */
  25265. A_UINT32 active_version;
  25266. /**************************************************************************
  25267. * DON'T ADD ANY FURTHER FIELDS HERE -
  25268. * It would cause the size of the READY_EXT message within some targets
  25269. * to exceed the size of the buffer used for the message.
  25270. **************************************************************************/
  25271. } WMI_SAR_CAPABILITIES;
  25272. typedef struct {
  25273. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_parameters_tlv */
  25274. /** global default adaptive dwell mode, used when WMI_SCAN_DWELL_MODE_DEFAULT */
  25275. A_UINT32 default_adaptive_dwell_mode;
  25276. /** the weight to calculate the average low pass filter for channel congestion. 0-100 */
  25277. A_UINT32 adapative_lpf_weight;
  25278. /** interval to monitor passive scan in msec */
  25279. A_UINT32 passive_monitor_interval_ms;
  25280. /** % of wifi activity to switch from passive to active 0-100 */
  25281. A_UINT32 wifi_activity_threshold_pct;
  25282. } wmi_scan_adaptive_dwell_parameters_tlv;
  25283. typedef struct {
  25284. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_config_fixed_param */
  25285. /* globally enable/disable adaptive dwell */
  25286. A_UINT32 enable;
  25287. /** pdev_id for identifying the MAC
  25288. * See macros starting with WMI_PDEV_ID_ for values.
  25289. * In non-DBDC case host should set it to 0
  25290. */
  25291. A_UINT32 pdev_id;
  25292. /**
  25293. * followed by TLV (tag length value) parameters array
  25294. * The TLV's are:
  25295. * wmi_scan_adaptive_dwell_parameters_tlv param[]; (0 or 1 elements)
  25296. */
  25297. } wmi_scan_adaptive_dwell_config_fixed_param;
  25298. typedef struct {
  25299. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_param_tlv */
  25300. /** module_id **/
  25301. A_UINT32 module_id;
  25302. /** number of dbs scans */
  25303. A_UINT32 num_dbs_scans;
  25304. /** number of non-dbs scans */
  25305. A_UINT32 num_non_dbs_scans;
  25306. } wmi_scan_dbs_duty_cycle_tlv_param;
  25307. typedef struct {
  25308. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_fixed_param */
  25309. /* number of scan client dutycycle param elements */
  25310. A_UINT32 num_clients;
  25311. /** pdev_id for identifying the MAC
  25312. * See macros starting with WMI_PDEV_ID_ for values.
  25313. * In non-DBDC case host should set it to 0
  25314. */
  25315. A_UINT32 pdev_id;
  25316. /**
  25317. * followed by TLV (tag length value) parameters array
  25318. * The TLV's are:
  25319. * wmi_scan_selection_duty_cycle_tlv_param[num_clients];
  25320. */
  25321. } wmi_scan_dbs_duty_cycle_fixed_param;
  25322. typedef struct {
  25323. /** TLV tag and len; tag equals
  25324. * WMITLV_TAG_STRUC_wmi_therm_throt_level_config_info */
  25325. A_UINT32 tlv_header;
  25326. /**
  25327. * temperature sensor value in celsius when to exit to lower zone,
  25328. * this value can be lower than HWM of lower zone as zone overlapping
  25329. * is permitted by design to provide hysteresis
  25330. */
  25331. A_UINT32 temp_lwm;
  25332. /**
  25333. * temperature sensor value in celsius when to exit to higher zone,
  25334. * this value can be higher than LWM of higher zone as zone overlapping
  25335. * is permitted by design to provide hysteresis
  25336. */
  25337. A_UINT32 temp_hwm;
  25338. A_UINT32 dc_off_percent; /* duty cycle off percent 0-100. 0 means no off, 100 means no on (shutdown the phy) */
  25339. /** Disable only the transmit queues in firmware that have lower priority than value defined by prio
  25340. * Prioritization:
  25341. * 0 = disable all data tx queues, No Prioritization defined
  25342. * 1 = disable BK tx queue
  25343. * 2 = disable BK+BE tx queues
  25344. * 3 = disable BK+BE+VI tx queues
  25345. */
  25346. A_UINT32 prio;
  25347. } wmi_therm_throt_level_config_info;
  25348. typedef enum {
  25349. WMI_THERMAL_TEMP_RANGE_STATS_NONE = 0,
  25350. WMI_THERMAL_TEMP_RANGE_STATS_INIT,
  25351. WMI_THERMAL_TEMP_RANGE_STATS_REQUEST,
  25352. WMI_THERMAL_TEMP_RANGE_STATS_CLEAR,
  25353. WMI_THERMAL_STATS_CURRENT_ALL_SENSORS_TEMP,
  25354. } wmi_thermal_stats_action;
  25355. typedef struct {
  25356. /** TLV tag and len; tag equals
  25357. * WMITLV_TAG_STRUC_wmi_thermal_stats_cmd_fixed_param
  25358. */
  25359. A_UINT32 tlv_header;
  25360. /*
  25361. * Configure thermal temperature offset value for capturing
  25362. * thermal stats in thermal range.
  25363. * FW already has thermal throttling threshold temperature in BDF.
  25364. * Thermal STATS start capturing from temperature threshold to
  25365. * temperature threshold + offset.
  25366. * If thermal offset is 0 then thermal STATS capture is disabled.
  25367. *
  25368. * Units of thermal_offset are degrees Celsius.
  25369. */
  25370. A_UINT32 thermal_offset;
  25371. A_UINT32 thermal_action; /* refer to enum wmi_thermal_stats_action */
  25372. } wmi_thermal_stats_cmd_fixed_param;
  25373. typedef enum {
  25374. WMI_THERMAL_CLIENT_UNSPECIFIED = 0,
  25375. WMI_THERMAL_CLIENT_APPS = 1,
  25376. WMI_THERMAL_CLIENT_WPSS = 2,
  25377. WMI_THERMAL_CLIENT_FW = 3,
  25378. WMI_THERMAL_CLIENT_MAX
  25379. } WMI_THERMAL_MITIGATION_CLIENTS;
  25380. #define WMI_THERMAL_CLIENT_MAX_PRIORITY 10
  25381. typedef struct {
  25382. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_config_request_fixed_param */
  25383. A_UINT32 pdev_id; /* config for each pdev */
  25384. A_UINT32 enable; /* 0:disable, 1:enable */
  25385. A_UINT32 dc; /* duty cycle in ms */
  25386. A_UINT32 dc_per_event; /* how often (after how many duty cycles) the FW sends stats to host */
  25387. A_UINT32 therm_throt_levels; /* Indicates the number of thermal zone configuration */
  25388. A_UINT32 client_id; /* Indicates the client from whom the request is being forwarded to FW. Refer to WMI_THERMAL_MITIGATION_CLIENTS. */
  25389. A_UINT32 priority; /* Indicates the priority, higher the value, higher the priority. Varies from 1 to WMI_THERMAL_CLIENT_MAX_PRIORITY. */
  25390. /*
  25391. * Following this structure is the TLV:
  25392. * struct wmi_therm_throt_level_config_info therm_throt_level_config_info[therm_throt_levels];
  25393. */
  25394. } wmi_therm_throt_config_request_fixed_param;
  25395. typedef enum {
  25396. /* no throttling */
  25397. WMI_THERMAL_FULLPERF = 0,
  25398. /* throttling tx to do thermal mitigation */
  25399. WMI_THERMAL_MITIGATION = 1,
  25400. /* shut down the tx completely */
  25401. WMI_THERMAL_SHUTOFF = 2,
  25402. /* THERMAL_SHUTDOWN_TGT
  25403. * The target is over the temperature limit even with tx shut off.
  25404. * The target will be shut down entirely to control the temperature.
  25405. */
  25406. WMI_THERMAL_SHUTDOWN_TGT = 3,
  25407. } WMI_THERMAL_THROT_LEVEL;
  25408. #define WMI_THERMAL_STATS_TEMP_THRESH_LEVEL_MAX 5
  25409. /** FW response with the stats event id for every pdev and zones */
  25410. typedef struct {
  25411. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_stats_event_fixed_param */
  25412. A_UINT32 tlv_header;
  25413. A_UINT32 pdev_id; /* stats for corresponding pdev*/
  25414. A_UINT32 temp; /* Temperature reading in celsius */
  25415. A_UINT32 level; /* Current thermal throttling level -
  25416. * contains a WMI_THERMAL_THROT_LEVEL value. */
  25417. A_UINT32 therm_throt_levels; /* number of levels in therm_throt_level_stats_info */
  25418. /* This TLV is followed by another TLV of array of structs
  25419. * wmi_therm_throt_level_stats_info therm_throt_level_stats_info[therm_throt_levels];
  25420. * wmi_thermal_throt_temp_range_stats temp_range_stats[therm_throt_levels];
  25421. */
  25422. } wmi_therm_throt_stats_event_fixed_param;
  25423. typedef struct {
  25424. /** TLV tag and len; tag equals
  25425. * WMITLV_TAG_STRUC_wmi_therm_throt_level_stats_info */
  25426. A_UINT32 tlv_header;
  25427. A_UINT32 level_count; /* count of each time thermal throttling entered this state */
  25428. A_UINT32 dc_count; /* total number of duty cycles spent in this state. */
  25429. /* this number increments by one each time we are in this state and we finish one full duty cycle. */
  25430. } wmi_therm_throt_level_stats_info;
  25431. typedef struct {
  25432. /** TLV tag and len; tag equals
  25433. * WMITLV_TAG_STRUC_wmi_thermal_throt_temp_range_stats
  25434. */
  25435. A_UINT32 tlv_header;
  25436. /**
  25437. * Temperature range to capture thermal stats between start to end
  25438. * temperature level.
  25439. */
  25440. A_UINT32 start_temp_level; /* unit in degC */
  25441. A_UINT32 end_temp_level; /* unit in degC */
  25442. /** Total time spent on each thermal stats level, units are milliseconds. */
  25443. A_UINT32 total_time_ms_lo;
  25444. A_UINT32 total_time_ms_hi;
  25445. /**
  25446. * Thermal stats counter for every time thermal stats level enters
  25447. * this temperature range.
  25448. */
  25449. A_UINT32 num_entry;
  25450. } wmi_thermal_throt_temp_range_stats;
  25451. typedef enum {
  25452. WMI_REG_EXT_FCC_MIDBAND = 0,
  25453. WMI_REG_EXT_JAPAN_MIDBAND = 1,
  25454. WMI_REG_EXT_FCC_DFS_HT40 = 2,
  25455. WMI_REG_EXT_JAPAN_NONDFS_HT40 = 3,
  25456. WMI_REG_EXT_JAPAN_DFS_HT40 = 4,
  25457. WMI_REG_EXT_FCC_CH_144 = 5,
  25458. } WMI_REG_EXT_BITMAP;
  25459. #ifdef WMI_CMD_STRINGS
  25460. static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command)
  25461. {
  25462. switch (wmi_command) {
  25463. /* initialize the wlan sub system */
  25464. WMI_RETURN_STRING(WMI_INIT_CMDID);
  25465. /* Scan specific commands */
  25466. /* start scan request to FW */
  25467. WMI_RETURN_STRING(WMI_START_SCAN_CMDID);
  25468. /* stop scan request to FW */
  25469. WMI_RETURN_STRING(WMI_STOP_SCAN_CMDID);
  25470. /* full list of channels as defined by the regulatory
  25471. * that will be used by scanner */
  25472. WMI_RETURN_STRING(WMI_SCAN_CHAN_LIST_CMDID);
  25473. /* overwrite default priority table in scan scheduler */
  25474. WMI_RETURN_STRING(WMI_SCAN_SCH_PRIO_TBL_CMDID);
  25475. /* This command to adjust the priority and min.max_rest_time
  25476. * of an on ongoing scan request.
  25477. */
  25478. WMI_RETURN_STRING(WMI_SCAN_UPDATE_REQUEST_CMDID);
  25479. /* PDEV(physical device) specific commands */
  25480. /* set regulatorty ctl id used by FW to determine the exact
  25481. * ctl power limits */
  25482. WMI_RETURN_STRING(WMI_PDEV_SET_REGDOMAIN_CMDID);
  25483. /* set channel. mainly used for supporting monitor mode */
  25484. WMI_RETURN_STRING(WMI_PDEV_SET_CHANNEL_CMDID);
  25485. /* set pdev specific parameters */
  25486. WMI_RETURN_STRING(WMI_PDEV_SET_PARAM_CMDID);
  25487. /* enable packet log */
  25488. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_ENABLE_CMDID);
  25489. /* disable packet log*/
  25490. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_DISABLE_CMDID);
  25491. /* set wmm parameters */
  25492. WMI_RETURN_STRING(WMI_PDEV_SET_WMM_PARAMS_CMDID);
  25493. /* set HT cap ie that needs to be carried probe requests
  25494. * HT/VHT channels */
  25495. WMI_RETURN_STRING(WMI_PDEV_SET_HT_CAP_IE_CMDID);
  25496. /* set VHT cap ie that needs to be carried on probe
  25497. * requests on VHT channels */
  25498. WMI_RETURN_STRING(WMI_PDEV_SET_VHT_CAP_IE_CMDID);
  25499. /* Command to send the DSCP-to-TID map to the target */
  25500. WMI_RETURN_STRING(WMI_PDEV_SET_DSCP_TID_MAP_CMDID);
  25501. /* set quiet ie parameters. primarily used in AP mode */
  25502. WMI_RETURN_STRING(WMI_PDEV_SET_QUIET_MODE_CMDID);
  25503. /* Enable/Disable Green AP Power Save */
  25504. WMI_RETURN_STRING(WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID);
  25505. /* get TPC config for the current operating channel */
  25506. WMI_RETURN_STRING(WMI_PDEV_GET_TPC_CONFIG_CMDID);
  25507. /* set the base MAC address for the physical device before
  25508. * a VDEV is created. For firmware that does not support
  25509. * this feature and this command, the pdev MAC address will
  25510. * not be changed. */
  25511. WMI_RETURN_STRING(WMI_PDEV_SET_BASE_MACADDR_CMDID);
  25512. /* eeprom content dump , the same to bdboard data */
  25513. WMI_RETURN_STRING(WMI_PDEV_DUMP_CMDID);
  25514. /* VDEV(virtual device) specific commands */
  25515. /* vdev create */
  25516. WMI_RETURN_STRING(WMI_VDEV_CREATE_CMDID);
  25517. /* vdev delete */
  25518. WMI_RETURN_STRING(WMI_VDEV_DELETE_CMDID);
  25519. /* vdev start request */
  25520. WMI_RETURN_STRING(WMI_VDEV_START_REQUEST_CMDID);
  25521. /* vdev restart request (RX only, NO TX, used for CAC period)*/
  25522. WMI_RETURN_STRING(WMI_VDEV_RESTART_REQUEST_CMDID);
  25523. /* vdev up request */
  25524. WMI_RETURN_STRING(WMI_VDEV_UP_CMDID);
  25525. /* vdev stop request */
  25526. WMI_RETURN_STRING(WMI_VDEV_STOP_CMDID);
  25527. /* vdev down request */
  25528. WMI_RETURN_STRING(WMI_VDEV_DOWN_CMDID);
  25529. /* set a vdev param */
  25530. WMI_RETURN_STRING(WMI_VDEV_SET_PARAM_CMDID);
  25531. /* set a key (used for setting per peer unicast
  25532. * and per vdev multicast) */
  25533. WMI_RETURN_STRING(WMI_VDEV_INSTALL_KEY_CMDID);
  25534. /* Set bss max idle time */
  25535. WMI_RETURN_STRING(WMI_VDEV_BSS_MAX_IDLE_TIME_CMDID);
  25536. /* wnm sleep mode command */
  25537. WMI_RETURN_STRING(WMI_VDEV_WNM_SLEEPMODE_CMDID);
  25538. WMI_RETURN_STRING(WMI_VDEV_WMM_ADDTS_CMDID);
  25539. WMI_RETURN_STRING(WMI_VDEV_WMM_DELTS_CMDID);
  25540. WMI_RETURN_STRING(WMI_VDEV_SET_WMM_PARAMS_CMDID);
  25541. WMI_RETURN_STRING(WMI_VDEV_SET_GTX_PARAMS_CMDID);
  25542. WMI_RETURN_STRING(WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID);
  25543. WMI_RETURN_STRING(WMI_VDEV_PLMREQ_START_CMDID);
  25544. WMI_RETURN_STRING(WMI_VDEV_PLMREQ_STOP_CMDID);
  25545. WMI_RETURN_STRING(WMI_VDEV_TSF_TSTAMP_ACTION_CMDID);
  25546. WMI_RETURN_STRING(WMI_VDEV_SET_IE_CMDID);
  25547. /* peer specific commands */
  25548. /** create a peer */
  25549. WMI_RETURN_STRING(WMI_PEER_CREATE_CMDID);
  25550. /** delete a peer */
  25551. WMI_RETURN_STRING(WMI_PEER_DELETE_CMDID);
  25552. /** delete all peer (excluding bss peer) */
  25553. WMI_RETURN_STRING(WMI_VDEV_DELETE_ALL_PEER_CMDID);
  25554. /** flush specific tid queues of a peer */
  25555. WMI_RETURN_STRING(WMI_PEER_FLUSH_TIDS_CMDID);
  25556. /** set a parameter of a peer */
  25557. WMI_RETURN_STRING(WMI_PEER_SET_PARAM_CMDID);
  25558. /* set peer to associated state. will cary all parameters
  25559. * determined during assocication time */
  25560. WMI_RETURN_STRING(WMI_PEER_ASSOC_CMDID);
  25561. /* add a wds (4 address ) entry. used only for testing
  25562. * WDS feature on AP products */
  25563. WMI_RETURN_STRING(WMI_PEER_ADD_WDS_ENTRY_CMDID);
  25564. /* remove wds (4 address ) entry. used only for testing WDS
  25565. * feature on AP products */
  25566. WMI_RETURN_STRING(WMI_PEER_REMOVE_WDS_ENTRY_CMDID);
  25567. /* set up mcast info for multicast to unicast conversion */
  25568. WMI_RETURN_STRING(WMI_PEER_MCAST_GROUP_CMDID);
  25569. /* request peer info from FW to get PEER_INFO_EVENTID */
  25570. WMI_RETURN_STRING(WMI_PEER_INFO_REQ_CMDID);
  25571. /* unmap response for a peer */
  25572. WMI_RETURN_STRING(WMI_PEER_UNMAP_RESPONSE_CMDID);
  25573. /* beacon/management specific commands */
  25574. /* transmit beacon by reference. used for transmitting beacon
  25575. * on low latency interface like pcie */
  25576. WMI_RETURN_STRING(WMI_BCN_TX_CMDID);
  25577. /* transmit beacon by value */
  25578. WMI_RETURN_STRING(WMI_PDEV_SEND_BCN_CMDID);
  25579. /* set the beacon template. used in beacon offload mode to setup
  25580. * the common beacon template with the FW to be used by FW to
  25581. * generate beacons */
  25582. WMI_RETURN_STRING(WMI_BCN_TMPL_CMDID);
  25583. /* set beacon filter with FW */
  25584. WMI_RETURN_STRING(WMI_BCN_FILTER_RX_CMDID);
  25585. /* enable/disable filtering of probe requests in the firmware */
  25586. WMI_RETURN_STRING(WMI_PRB_REQ_FILTER_RX_CMDID);
  25587. /* transmit management frame by value. will be deprecated */
  25588. WMI_RETURN_STRING(WMI_MGMT_TX_CMDID);
  25589. /* set the probe response template. used in beacon offload mode
  25590. * to setup the common probe response template with the FW to
  25591. * be used by FW to generate probe responses */
  25592. WMI_RETURN_STRING(WMI_PRB_TMPL_CMDID);
  25593. /** set FILS Discovery frame template for FW to generate FD frames */
  25594. WMI_RETURN_STRING(WMI_FD_TMPL_CMDID);
  25595. /* commands to directly control ba negotiation directly from
  25596. * host. only used in test mode */
  25597. /* turn off FW Auto addba mode and let host control addba */
  25598. WMI_RETURN_STRING(WMI_ADDBA_CLEAR_RESP_CMDID);
  25599. /* send add ba request */
  25600. WMI_RETURN_STRING(WMI_ADDBA_SEND_CMDID);
  25601. WMI_RETURN_STRING(WMI_ADDBA_STATUS_CMDID);
  25602. /* send del ba */
  25603. WMI_RETURN_STRING(WMI_DELBA_SEND_CMDID);
  25604. /* set add ba response will be used by FW to generate
  25605. * addba response*/
  25606. WMI_RETURN_STRING(WMI_ADDBA_SET_RESP_CMDID);
  25607. /* send single VHT MPDU with AMSDU */
  25608. WMI_RETURN_STRING(WMI_SEND_SINGLEAMSDU_CMDID);
  25609. /* Station power save specific config */
  25610. /* enable/disable station powersave */
  25611. WMI_RETURN_STRING(WMI_STA_POWERSAVE_MODE_CMDID);
  25612. /* set station power save specific parameter */
  25613. WMI_RETURN_STRING(WMI_STA_POWERSAVE_PARAM_CMDID);
  25614. /* set station mimo powersave mode */
  25615. WMI_RETURN_STRING(WMI_STA_MIMO_PS_MODE_CMDID);
  25616. /* DFS-specific commands */
  25617. /* enable DFS (radar detection)*/
  25618. WMI_RETURN_STRING(WMI_PDEV_DFS_ENABLE_CMDID);
  25619. /* disable DFS (radar detection)*/
  25620. WMI_RETURN_STRING(WMI_PDEV_DFS_DISABLE_CMDID);
  25621. /* enable DFS phyerr/parse filter offload */
  25622. WMI_RETURN_STRING(WMI_DFS_PHYERR_FILTER_ENA_CMDID);
  25623. /* enable DFS phyerr/parse filter offload */
  25624. WMI_RETURN_STRING(WMI_DFS_PHYERR_FILTER_DIS_CMDID);
  25625. /* Roaming specific commands */
  25626. /* set roam scan mode */
  25627. WMI_RETURN_STRING(WMI_ROAM_SCAN_MODE);
  25628. /* set roam scan rssi threshold below which roam
  25629. * scan is enabled */
  25630. WMI_RETURN_STRING(WMI_ROAM_SCAN_RSSI_THRESHOLD);
  25631. /* set roam scan period for periodic roam scan mode */
  25632. WMI_RETURN_STRING(WMI_ROAM_SCAN_PERIOD);
  25633. /* set roam scan trigger rssi change threshold */
  25634. WMI_RETURN_STRING(WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD);
  25635. /* set roam AP profile */
  25636. WMI_RETURN_STRING(WMI_ROAM_AP_PROFILE);
  25637. /* set channel list for roam scans */
  25638. WMI_RETURN_STRING(WMI_ROAM_CHAN_LIST);
  25639. /* offload scan specific commands */
  25640. /* set offload scan AP profile */
  25641. WMI_RETURN_STRING(WMI_OFL_SCAN_ADD_AP_PROFILE);
  25642. /* remove offload scan AP profile */
  25643. WMI_RETURN_STRING(WMI_OFL_SCAN_REMOVE_AP_PROFILE);
  25644. /* set offload scan period */
  25645. WMI_RETURN_STRING(WMI_OFL_SCAN_PERIOD);
  25646. /* P2P specific commands */
  25647. /* set P2P device info. FW will used by FW to create P2P IE
  25648. * to be carried in probe response generated during p2p listen
  25649. * and for p2p discoverability */
  25650. WMI_RETURN_STRING(WMI_P2P_DEV_SET_DEVICE_INFO);
  25651. /* enable/disable p2p discoverability on STA/AP VDEVs */
  25652. WMI_RETURN_STRING(WMI_P2P_DEV_SET_DISCOVERABILITY);
  25653. /* set p2p ie to be carried in beacons generated by FW for GO */
  25654. WMI_RETURN_STRING(WMI_P2P_GO_SET_BEACON_IE);
  25655. /* set p2p ie to be carried in probe response frames generated
  25656. * by FW for GO */
  25657. WMI_RETURN_STRING(WMI_P2P_GO_SET_PROBE_RESP_IE);
  25658. /* set the vendor specific p2p ie data.
  25659. * FW will use this to parse the P2P NoA
  25660. * attribute in the beacons/probe responses received.
  25661. */
  25662. WMI_RETURN_STRING(WMI_P2P_SET_VENDOR_IE_DATA_CMDID);
  25663. /* set the configure of p2p find offload */
  25664. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID);
  25665. /* set the vendor specific p2p ie data for p2p find offload */
  25666. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_APPIE_CMDID);
  25667. /* set the BSSID/device name pattern of p2p find offload */
  25668. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID);
  25669. /* set OppPS related parameters **/
  25670. WMI_RETURN_STRING(WMI_P2P_SET_OPPPS_PARAM_CMDID);
  25671. /* AP power save specific config
  25672. * set AP power save specific param */
  25673. WMI_RETURN_STRING(WMI_AP_PS_PEER_PARAM_CMDID);
  25674. /* set AP UAPSD coex specific param */
  25675. WMI_RETURN_STRING(WMI_AP_PS_PEER_UAPSD_COEX_CMDID);
  25676. /* Rate-control specific commands */
  25677. WMI_RETURN_STRING(WMI_PEER_RATE_RETRY_SCHED_CMDID);
  25678. /* WLAN Profiling commands. */
  25679. WMI_RETURN_STRING(WMI_WLAN_PROFILE_TRIGGER_CMDID);
  25680. WMI_RETURN_STRING(WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID);
  25681. WMI_RETURN_STRING(WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID);
  25682. WMI_RETURN_STRING(WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID);
  25683. WMI_RETURN_STRING(WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID);
  25684. /* Suspend resume command Ids */
  25685. WMI_RETURN_STRING(WMI_PDEV_SUSPEND_CMDID);
  25686. WMI_RETURN_STRING(WMI_PDEV_RESUME_CMDID);
  25687. /* Beacon filter commands */
  25688. /* add a beacon filter */
  25689. WMI_RETURN_STRING(WMI_ADD_BCN_FILTER_CMDID);
  25690. /* remove a beacon filter */
  25691. WMI_RETURN_STRING(WMI_RMV_BCN_FILTER_CMDID);
  25692. /* WOW Specific WMI commands */
  25693. /* add pattern for awake */
  25694. WMI_RETURN_STRING(WMI_WOW_ADD_WAKE_PATTERN_CMDID);
  25695. /* deleta a wake pattern */
  25696. WMI_RETURN_STRING(WMI_WOW_DEL_WAKE_PATTERN_CMDID);
  25697. /* enable/deisable wake event */
  25698. WMI_RETURN_STRING(WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID);
  25699. /* enable WOW */
  25700. WMI_RETURN_STRING(WMI_WOW_ENABLE_CMDID);
  25701. /* host woke up from sleep event to FW. Generated in response
  25702. * to WOW Hardware event */
  25703. WMI_RETURN_STRING(WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID);
  25704. /* RTT measurement related cmd */
  25705. /* reques to make an RTT measurement */
  25706. WMI_RETURN_STRING(WMI_RTT_MEASREQ_CMDID);
  25707. /* reques to report a tsf measurement */
  25708. WMI_RETURN_STRING(WMI_RTT_TSF_CMDID);
  25709. /* spectral scan command */
  25710. /* configure spectral scan */
  25711. WMI_RETURN_STRING(WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID);
  25712. /* enable/disable spectral scan and trigger */
  25713. WMI_RETURN_STRING(WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID);
  25714. /* F/W stats */
  25715. /* one time request for stats */
  25716. WMI_RETURN_STRING(WMI_REQUEST_STATS_CMDID);
  25717. /* Push MCC Adaptive Scheduler Stats to Firmware */
  25718. WMI_RETURN_STRING(WMI_MCC_SCHED_TRAFFIC_STATS_CMDID);
  25719. /* ARP OFFLOAD REQUEST*/
  25720. WMI_RETURN_STRING(WMI_SET_ARP_NS_OFFLOAD_CMDID);
  25721. /* Proactive ARP Response Add Pattern Command*/
  25722. WMI_RETURN_STRING(WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID);
  25723. /* Proactive ARP Response Del Pattern Command*/
  25724. WMI_RETURN_STRING(WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID);
  25725. /* NS offload confid*/
  25726. WMI_RETURN_STRING(WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID);
  25727. /* GTK offload Specific WMI commands */
  25728. WMI_RETURN_STRING(WMI_GTK_OFFLOAD_CMDID);
  25729. /* CSA offload Specific WMI commands */
  25730. /* csa offload enable */
  25731. WMI_RETURN_STRING(WMI_CSA_OFFLOAD_ENABLE_CMDID);
  25732. /* chan switch command */
  25733. WMI_RETURN_STRING(WMI_CSA_OFFLOAD_CHANSWITCH_CMDID);
  25734. /* Chatter commands */
  25735. /* Change chatter mode of operation */
  25736. WMI_RETURN_STRING(WMI_CHATTER_SET_MODE_CMDID);
  25737. /* chatter add coalescing filter command */
  25738. WMI_RETURN_STRING(WMI_CHATTER_ADD_COALESCING_FILTER_CMDID);
  25739. /* chatter delete coalescing filter command */
  25740. WMI_RETURN_STRING(WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID);
  25741. /* chatter coalecing query command */
  25742. WMI_RETURN_STRING(WMI_CHATTER_COALESCING_QUERY_CMDID);
  25743. /* addba specific commands */
  25744. /* start the aggregation on this TID */
  25745. WMI_RETURN_STRING(WMI_PEER_TID_ADDBA_CMDID);
  25746. /* stop the aggregation on this TID */
  25747. WMI_RETURN_STRING(WMI_PEER_TID_DELBA_CMDID);
  25748. /* set station mimo powersave method */
  25749. WMI_RETURN_STRING(WMI_STA_DTIM_PS_METHOD_CMDID);
  25750. /* Configure the Station UAPSD AC Auto Trigger Parameters */
  25751. WMI_RETURN_STRING(WMI_STA_UAPSD_AUTO_TRIG_CMDID);
  25752. /* Configure the Keep Alive Parameters */
  25753. WMI_RETURN_STRING(WMI_STA_KEEPALIVE_CMDID);
  25754. /* Request ssn from target for a sta/tid pair */
  25755. WMI_RETURN_STRING(WMI_BA_REQ_SSN_CMDID);
  25756. /* misc command group */
  25757. /* echo command mainly used for testing */
  25758. WMI_RETURN_STRING(WMI_ECHO_CMDID);
  25759. /* !!IMPORTANT!!
  25760. * If you need to add a new WMI command to the
  25761. * WMI_RETURN_STRING(WMI_GRP_MISC) sub-group,
  25762. * please make sure you add it BEHIND
  25763. * WMI_RETURN_STRING(WMI_PDEV_UTF_CMDID);
  25764. * as we MUST have a fixed value here to maintain compatibility between
  25765. * UTF and the ART2 driver
  25766. */
  25767. /* UTF WMI commands */
  25768. WMI_RETURN_STRING(WMI_PDEV_UTF_CMDID);
  25769. /* set debug log config */
  25770. WMI_RETURN_STRING(WMI_DBGLOG_CFG_CMDID);
  25771. /* QVIT specific command id */
  25772. WMI_RETURN_STRING(WMI_PDEV_QVIT_CMDID);
  25773. /* Factory Testing Mode request command
  25774. * used for integrated chipsets */
  25775. WMI_RETURN_STRING(WMI_PDEV_FTM_INTG_CMDID);
  25776. /* set and get keepalive parameters command */
  25777. WMI_RETURN_STRING(WMI_VDEV_SET_KEEPALIVE_CMDID);
  25778. WMI_RETURN_STRING(WMI_VDEV_GET_KEEPALIVE_CMDID);
  25779. /* For fw recovery test command */
  25780. WMI_RETURN_STRING(WMI_FORCE_FW_HANG_CMDID);
  25781. /* Set Mcast/Bdcast filter */
  25782. WMI_RETURN_STRING(WMI_SET_MCASTBCAST_FILTER_CMDID);
  25783. /* set thermal management params */
  25784. WMI_RETURN_STRING(WMI_THERMAL_MGMT_CMDID);
  25785. WMI_RETURN_STRING(WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID);
  25786. WMI_RETURN_STRING(WMI_LRO_CONFIG_CMDID);
  25787. WMI_RETURN_STRING(WMI_TRANSFER_DATA_TO_FLASH_CMDID);
  25788. WMI_RETURN_STRING(WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID);
  25789. WMI_RETURN_STRING(WMI_VDEV_WISA_CMDID);
  25790. WMI_RETURN_STRING(WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID);
  25791. WMI_RETURN_STRING(WMI_WOW_SET_ACTION_WAKE_UP_CMDID);
  25792. WMI_RETURN_STRING(WMI_MAWC_SENSOR_REPORT_IND_CMDID);
  25793. WMI_RETURN_STRING(WMI_ROAM_CONFIGURE_MAWC_CMDID);
  25794. WMI_RETURN_STRING(WMI_NLO_CONFIGURE_MAWC_CMDID);
  25795. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_MAWC_CMDID);
  25796. /* GPIO Configuration */
  25797. WMI_RETURN_STRING(WMI_GPIO_CONFIG_CMDID);
  25798. WMI_RETURN_STRING(WMI_GPIO_OUTPUT_CMDID);
  25799. /* Txbf configuration command */
  25800. WMI_RETURN_STRING(WMI_TXBF_CMDID);
  25801. /* FWTEST Commands */
  25802. WMI_RETURN_STRING(WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID);
  25803. /* set NoA descs */
  25804. WMI_RETURN_STRING(WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID);
  25805. /* TDLS Configuration */
  25806. /* enable/disable TDLS */
  25807. WMI_RETURN_STRING(WMI_TDLS_SET_STATE_CMDID);
  25808. /* set tdls peer state */
  25809. WMI_RETURN_STRING(WMI_TDLS_PEER_UPDATE_CMDID);
  25810. /* Resmgr Configuration */
  25811. /* Adaptive OCS is enabled by default in the FW.
  25812. * This command is used to disable FW based adaptive OCS.
  25813. */
  25814. WMI_RETURN_STRING
  25815. (WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID);
  25816. /* set the requested channel time quota for the home channels */
  25817. WMI_RETURN_STRING(WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID);
  25818. /* set the requested latency for the home channels */
  25819. WMI_RETURN_STRING(WMI_RESMGR_SET_CHAN_LATENCY_CMDID);
  25820. /* STA SMPS Configuration */
  25821. /* force SMPS mode */
  25822. WMI_RETURN_STRING(WMI_STA_SMPS_FORCE_MODE_CMDID);
  25823. /* set SMPS parameters */
  25824. WMI_RETURN_STRING(WMI_STA_SMPS_PARAM_CMDID);
  25825. /* Wlan HB commands */
  25826. /* enalbe/disable wlan HB */
  25827. WMI_RETURN_STRING(WMI_HB_SET_ENABLE_CMDID);
  25828. /* set tcp parameters for wlan HB */
  25829. WMI_RETURN_STRING(WMI_HB_SET_TCP_PARAMS_CMDID);
  25830. /* set tcp pkt filter for wlan HB */
  25831. WMI_RETURN_STRING(WMI_HB_SET_TCP_PKT_FILTER_CMDID);
  25832. /* set udp parameters for wlan HB */
  25833. WMI_RETURN_STRING(WMI_HB_SET_UDP_PARAMS_CMDID);
  25834. /* set udp pkt filter for wlan HB */
  25835. WMI_RETURN_STRING(WMI_HB_SET_UDP_PKT_FILTER_CMDID);
  25836. /* Wlan RMC commands*/
  25837. /* enable/disable RMC */
  25838. WMI_RETURN_STRING(WMI_RMC_SET_MODE_CMDID);
  25839. /* configure action frame period */
  25840. WMI_RETURN_STRING(WMI_RMC_SET_ACTION_PERIOD_CMDID);
  25841. /* For debug/future enhancement purposes only,
  25842. * configures/finetunes RMC algorithms */
  25843. WMI_RETURN_STRING(WMI_RMC_CONFIG_CMDID);
  25844. /* WLAN MHF offload commands */
  25845. /* enable/disable MHF offload */
  25846. WMI_RETURN_STRING(WMI_MHF_OFFLOAD_SET_MODE_CMDID);
  25847. /* Plumb routing table for MHF offload */
  25848. WMI_RETURN_STRING(WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID);
  25849. /* location scan commands */
  25850. /* start batch scan */
  25851. WMI_RETURN_STRING(WMI_BATCH_SCAN_ENABLE_CMDID);
  25852. /* stop batch scan */
  25853. WMI_RETURN_STRING(WMI_BATCH_SCAN_DISABLE_CMDID);
  25854. /* get batch scan result */
  25855. WMI_RETURN_STRING(WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID);
  25856. /* OEM related cmd */
  25857. WMI_RETURN_STRING(WMI_OEM_REQ_CMDID);
  25858. WMI_RETURN_STRING(WMI_OEM_REQUEST_CMDID);
  25859. /* NAN request cmd */
  25860. WMI_RETURN_STRING(WMI_NAN_CMDID);
  25861. /* Modem power state cmd */
  25862. WMI_RETURN_STRING(WMI_MODEM_POWER_STATE_CMDID);
  25863. WMI_RETURN_STRING(WMI_REQUEST_STATS_EXT_CMDID);
  25864. WMI_RETURN_STRING(WMI_OBSS_SCAN_ENABLE_CMDID);
  25865. WMI_RETURN_STRING(WMI_OBSS_SCAN_DISABLE_CMDID);
  25866. WMI_RETURN_STRING(WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID);
  25867. WMI_RETURN_STRING(WMI_ROAM_SCAN_CMD);
  25868. WMI_RETURN_STRING(WMI_PDEV_SET_LED_CONFIG_CMDID);
  25869. WMI_RETURN_STRING(WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID);
  25870. WMI_RETURN_STRING(WMI_CHAN_AVOID_UPDATE_CMDID);
  25871. WMI_RETURN_STRING(WMI_COEX_CONFIG_CMDID);
  25872. WMI_RETURN_STRING(WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID);
  25873. WMI_RETURN_STRING(WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID);
  25874. WMI_RETURN_STRING(WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID);
  25875. WMI_RETURN_STRING(WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID);
  25876. WMI_RETURN_STRING(WMI_REQUEST_LINK_STATS_CMDID);
  25877. WMI_RETURN_STRING(WMI_START_LINK_STATS_CMDID);
  25878. WMI_RETURN_STRING(WMI_CLEAR_LINK_STATS_CMDID);
  25879. WMI_RETURN_STRING(WMI_GET_FW_MEM_DUMP_CMDID);
  25880. WMI_RETURN_STRING(WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID);
  25881. WMI_RETURN_STRING(WMI_LPI_START_SCAN_CMDID);
  25882. WMI_RETURN_STRING(WMI_LPI_STOP_SCAN_CMDID);
  25883. WMI_RETURN_STRING(WMI_EXTSCAN_START_CMDID);
  25884. WMI_RETURN_STRING(WMI_EXTSCAN_STOP_CMDID);
  25885. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID);
  25886. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID);
  25887. WMI_RETURN_STRING(WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID);
  25888. WMI_RETURN_STRING(WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID);
  25889. WMI_RETURN_STRING(WMI_EXTSCAN_SET_CAPABILITIES_CMDID);
  25890. WMI_RETURN_STRING(WMI_EXTSCAN_GET_CAPABILITIES_CMDID);
  25891. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID);
  25892. WMI_RETURN_STRING(WMI_ROAM_SYNCH_COMPLETE);
  25893. WMI_RETURN_STRING(WMI_D0_WOW_ENABLE_DISABLE_CMDID);
  25894. WMI_RETURN_STRING(WMI_EXTWOW_ENABLE_CMDID);
  25895. WMI_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID);
  25896. WMI_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID);
  25897. WMI_RETURN_STRING(WMI_UNIT_TEST_CMDID);
  25898. WMI_RETURN_STRING(WMI_ROAM_SET_RIC_REQUEST_CMDID);
  25899. WMI_RETURN_STRING(WMI_PDEV_GET_TEMPERATURE_CMDID);
  25900. WMI_RETURN_STRING(WMI_SET_DHCP_SERVER_OFFLOAD_CMDID);
  25901. WMI_RETURN_STRING(WMI_TPC_CHAINMASK_CONFIG_CMDID);
  25902. WMI_RETURN_STRING(WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID);
  25903. WMI_RETURN_STRING(WMI_SCAN_PROB_REQ_OUI_CMDID);
  25904. WMI_RETURN_STRING(WMI_TDLS_SET_OFFCHAN_MODE_CMDID);
  25905. WMI_RETURN_STRING(WMI_PDEV_SET_LED_FLASHING_CMDID);
  25906. WMI_RETURN_STRING(WMI_MDNS_OFFLOAD_ENABLE_CMDID);
  25907. WMI_RETURN_STRING(WMI_MDNS_SET_FQDN_CMDID);
  25908. WMI_RETURN_STRING(WMI_MDNS_SET_RESPONSE_CMDID);
  25909. WMI_RETURN_STRING(WMI_MDNS_GET_STATS_CMDID);
  25910. WMI_RETURN_STRING(WMI_MDNS_SET_STAIP_CMDID);
  25911. WMI_RETURN_STRING(WMI_ROAM_INVOKE_CMDID);
  25912. WMI_RETURN_STRING(WMI_SET_ANTENNA_DIVERSITY_CMDID);
  25913. WMI_RETURN_STRING(WMI_SAP_OFL_ENABLE_CMDID);
  25914. WMI_RETURN_STRING(WMI_APFIND_CMDID);
  25915. WMI_RETURN_STRING(WMI_PASSPOINT_LIST_CONFIG_CMDID);
  25916. WMI_RETURN_STRING(WMI_OCB_SET_SCHED_CMDID);
  25917. WMI_RETURN_STRING(WMI_OCB_SET_CONFIG_CMDID);
  25918. WMI_RETURN_STRING(WMI_OCB_SET_UTC_TIME_CMDID);
  25919. WMI_RETURN_STRING(WMI_OCB_START_TIMING_ADVERT_CMDID);
  25920. WMI_RETURN_STRING(WMI_OCB_STOP_TIMING_ADVERT_CMDID);
  25921. WMI_RETURN_STRING(WMI_OCB_GET_TSF_TIMER_CMDID);
  25922. WMI_RETURN_STRING(WMI_DCC_GET_STATS_CMDID);
  25923. WMI_RETURN_STRING(WMI_DCC_CLEAR_STATS_CMDID);
  25924. WMI_RETURN_STRING(WMI_DCC_UPDATE_NDL_CMDID);
  25925. WMI_RETURN_STRING(WMI_ROAM_FILTER_CMDID);
  25926. WMI_RETURN_STRING(WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID);
  25927. WMI_RETURN_STRING(WMI_DEBUG_MESG_FLUSH_CMDID);
  25928. WMI_RETURN_STRING(WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID);
  25929. WMI_RETURN_STRING(WMI_SOC_SET_PCL_CMDID);
  25930. WMI_RETURN_STRING(WMI_SOC_SET_HW_MODE_CMDID);
  25931. WMI_RETURN_STRING(WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID);
  25932. WMI_RETURN_STRING(WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID);
  25933. WMI_RETURN_STRING(WMI_DIAG_EVENT_LOG_CONFIG_CMDID);
  25934. WMI_RETURN_STRING(WMI_PACKET_FILTER_CONFIG_CMDID);
  25935. WMI_RETURN_STRING(WMI_PACKET_FILTER_ENABLE_CMDID);
  25936. WMI_RETURN_STRING(WMI_SAP_SET_BLACKLIST_PARAM_CMDID);
  25937. WMI_RETURN_STRING(WMI_WOW_UDP_SVC_OFLD_CMDID);
  25938. WMI_RETURN_STRING(WMI_MGMT_TX_SEND_CMDID);
  25939. WMI_RETURN_STRING(WMI_SOC_SET_ANTENNA_MODE_CMDID);
  25940. WMI_RETURN_STRING(WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID);
  25941. WMI_RETURN_STRING(WMI_AP_PS_EGAP_PARAM_CMDID);
  25942. WMI_RETURN_STRING(WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID);
  25943. WMI_RETURN_STRING(WMI_BPF_GET_CAPABILITY_CMDID);
  25944. WMI_RETURN_STRING(WMI_BPF_GET_VDEV_STATS_CMDID);
  25945. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID);
  25946. WMI_RETURN_STRING(WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID);
  25947. WMI_RETURN_STRING(WMI_NDI_GET_CAP_REQ_CMDID);
  25948. WMI_RETURN_STRING(WMI_NDP_INITIATOR_REQ_CMDID);
  25949. WMI_RETURN_STRING(WMI_NDP_RESPONDER_REQ_CMDID);
  25950. WMI_RETURN_STRING(WMI_NDP_END_REQ_CMDID);
  25951. WMI_RETURN_STRING(WMI_PEER_UPDATE_WDS_ENTRY_CMDID);
  25952. WMI_RETURN_STRING(WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID);
  25953. WMI_RETURN_STRING(WMI_PDEV_FIPS_CMDID);
  25954. WMI_RETURN_STRING(WMI_PDEV_SMART_ANT_ENABLE_CMDID);
  25955. WMI_RETURN_STRING(WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID);
  25956. WMI_RETURN_STRING(WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID);
  25957. WMI_RETURN_STRING(WMI_PDEV_SET_CTL_TABLE_CMDID);
  25958. WMI_RETURN_STRING(WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID);
  25959. WMI_RETURN_STRING(WMI_PDEV_GET_TPC_CMDID);
  25960. WMI_RETURN_STRING(WMI_MIB_STATS_ENABLE_CMDID);
  25961. WMI_RETURN_STRING(WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID);
  25962. WMI_RETURN_STRING(WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID);
  25963. WMI_RETURN_STRING(WMI_VDEV_RATEMASK_CMDID);
  25964. WMI_RETURN_STRING(WMI_VDEV_ATF_REQUEST_CMDID);
  25965. WMI_RETURN_STRING(WMI_VDEV_SET_DSCP_TID_MAP_CMDID);
  25966. WMI_RETURN_STRING(WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID);
  25967. WMI_RETURN_STRING(WMI_VDEV_SET_QUIET_MODE_CMDID);
  25968. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID);
  25969. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID);
  25970. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID);
  25971. WMI_RETURN_STRING(WMI_PEER_ATF_REQUEST_CMDID);
  25972. WMI_RETURN_STRING(WMI_FWTEST_CMDID);
  25973. WMI_RETURN_STRING(WMI_QBOOST_CFG_CMDID);
  25974. WMI_RETURN_STRING(WMI_PDEV_GET_NFCAL_POWER_CMDID);
  25975. WMI_RETURN_STRING(WMI_PDEV_SET_PCL_CMDID);
  25976. WMI_RETURN_STRING(WMI_PDEV_SET_HW_MODE_CMDID);
  25977. WMI_RETURN_STRING(WMI_PDEV_SET_MAC_CONFIG_CMDID);
  25978. WMI_RETURN_STRING(WMI_PDEV_SET_ANTENNA_MODE_CMDID);
  25979. WMI_RETURN_STRING(WMI_ROAM_SET_MBO_PARAM_CMDID);
  25980. WMI_RETURN_STRING(WMI_CHAN_AVOID_RPT_ALLOW_CMDID);
  25981. WMI_RETURN_STRING(WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID);
  25982. WMI_RETURN_STRING(WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID);
  25983. WMI_RETURN_STRING(WMI_PDEV_WAL_POWER_DEBUG_CMDID);
  25984. WMI_RETURN_STRING(WMI_PEER_BWF_REQUEST_CMDID);
  25985. WMI_RETURN_STRING(WMI_DBGLOG_TIME_STAMP_SYNC_CMDID);
  25986. WMI_RETURN_STRING(WMI_P2P_LISTEN_OFFLOAD_START_CMDID);
  25987. WMI_RETURN_STRING(WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID);
  25988. WMI_RETURN_STRING(WMI_PEER_REORDER_QUEUE_SETUP_CMDID);
  25989. WMI_RETURN_STRING(WMI_PEER_REORDER_QUEUE_REMOVE_CMDID);
  25990. WMI_RETURN_STRING(WMI_SET_MULTIPLE_MCAST_FILTER_CMDID);
  25991. WMI_RETURN_STRING(WMI_READ_DATA_FROM_FLASH_CMDID);
  25992. WMI_RETURN_STRING(WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID);
  25993. WMI_RETURN_STRING(WMI_PEER_SET_RX_BLOCKSIZE_CMDID);
  25994. WMI_RETURN_STRING(WMI_PDEV_SET_WAKEUP_CONFIG_CMDID);
  25995. WMI_RETURN_STRING(WMI_PDEV_GET_ANTDIV_STATUS_CMDID);
  25996. WMI_RETURN_STRING(WMI_PEER_ANTDIV_INFO_REQ_CMDID);
  25997. WMI_RETURN_STRING(WMI_MNT_FILTER_CMDID);
  25998. WMI_RETURN_STRING(WMI_PDEV_GET_CHIP_POWER_STATS_CMDID);
  25999. WMI_RETURN_STRING(WMI_COEX_GET_ANTENNA_ISOLATION_CMDID);
  26000. WMI_RETURN_STRING(WMI_PDEV_SET_STATS_THRESHOLD_CMDID);
  26001. WMI_RETURN_STRING(WMI_REQUEST_WLAN_STATS_CMDID);
  26002. WMI_RETURN_STRING(WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID);
  26003. WMI_RETURN_STRING(WMI_REQUEST_PEER_STATS_INFO_CMDID);
  26004. WMI_RETURN_STRING(WMI_REQUEST_RADIO_CHAN_STATS_CMDID);
  26005. WMI_RETURN_STRING(WMI_ROAM_PER_CONFIG_CMDID);
  26006. WMI_RETURN_STRING(WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID);
  26007. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID);
  26008. WMI_RETURN_STRING(WMI_HW_DATA_FILTER_CMDID);
  26009. WMI_RETURN_STRING(WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID);
  26010. WMI_RETURN_STRING(WMI_LPI_OEM_REQ_CMDID);
  26011. WMI_RETURN_STRING(WMI_PDEV_UPDATE_PKT_ROUTING_CMDID);
  26012. WMI_RETURN_STRING(WMI_PDEV_CHECK_CAL_VERSION_CMDID);
  26013. WMI_RETURN_STRING(WMI_PDEV_SET_DIVERSITY_GAIN_CMDID);
  26014. WMI_RETURN_STRING(WMI_VDEV_SET_ARP_STAT_CMDID);
  26015. WMI_RETURN_STRING(WMI_VDEV_GET_ARP_STAT_CMDID);
  26016. WMI_RETURN_STRING(WMI_VDEV_GET_TX_POWER_CMDID);
  26017. WMI_RETURN_STRING(WMI_OFFCHAN_DATA_TX_SEND_CMDID);
  26018. WMI_RETURN_STRING(WMI_SET_INIT_COUNTRY_CMDID);
  26019. WMI_RETURN_STRING(WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID);
  26020. WMI_RETURN_STRING(WMI_THERM_THROT_SET_CONF_CMDID);
  26021. WMI_RETURN_STRING(WMI_OEM_DMA_RING_CFG_REQ_CMDID);
  26022. WMI_RETURN_STRING(WMI_PDEV_BSS_CHAN_INFO_REQUEST_CMDID);
  26023. WMI_RETURN_STRING(WMI_VDEV_LIMIT_OFFCHAN_CMDID);
  26024. WMI_RETURN_STRING(WMI_ROAM_BTM_CONFIG_CMDID);
  26025. WMI_RETURN_STRING(WMI_WLM_CONFIG_CMDID);
  26026. WMI_RETURN_STRING(WMI_PDEV_UPDATE_CTLTABLE_REQUEST_CMDID);
  26027. WMI_RETURN_STRING(WMI_PDEV_CONFIG_VENDOR_OUI_ACTION_CMDID);
  26028. WMI_RETURN_STRING(WMI_PDEV_SEND_FD_CMDID);
  26029. WMI_RETURN_STRING(WMI_ENABLE_FILS_CMDID);
  26030. WMI_RETURN_STRING(WMI_PDEV_SET_AC_TX_QUEUE_OPTIMIZED_CMDID);
  26031. WMI_RETURN_STRING(WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID);
  26032. WMI_RETURN_STRING(WMI_PDEV_SET_RX_FILTER_PROMISCUOUS_CMDID);
  26033. WMI_RETURN_STRING(WMI_SAP_OBSS_DETECTION_CFG_CMDID);
  26034. WMI_RETURN_STRING(WMI_PDEV_DMA_RING_CFG_REQ_CMDID);
  26035. WMI_RETURN_STRING(WMI_11K_OFFLOAD_REPORT_CMDID);
  26036. WMI_RETURN_STRING(WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID);
  26037. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_ENABLE_CMDID);
  26038. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_WORK_MEMORY_CMDID);
  26039. WMI_RETURN_STRING(WMI_BPF_GET_VDEV_WORK_MEMORY_CMDID);
  26040. WMI_RETURN_STRING(WMI_BSS_COLOR_CHANGE_ENABLE_CMDID);
  26041. WMI_RETURN_STRING(WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID);
  26042. WMI_RETURN_STRING(WMI_RUNTIME_DPD_RECAL_CMDID);
  26043. WMI_RETURN_STRING(WMI_TWT_ENABLE_CMDID);
  26044. WMI_RETURN_STRING(WMI_TWT_DISABLE_CMDID);
  26045. WMI_RETURN_STRING(WMI_TWT_ADD_DIALOG_CMDID);
  26046. WMI_RETURN_STRING(WMI_TWT_DEL_DIALOG_CMDID);
  26047. WMI_RETURN_STRING(WMI_TWT_PAUSE_DIALOG_CMDID);
  26048. WMI_RETURN_STRING(WMI_TWT_RESUME_DIALOG_CMDID);
  26049. WMI_RETURN_STRING(WMI_REQUEST_ROAM_SCAN_STATS_CMDID);
  26050. WMI_RETURN_STRING(WMI_PEER_TID_CONFIGURATIONS_CMDID);
  26051. WMI_RETURN_STRING(WMI_VDEV_SET_CUSTOM_SW_RETRY_TH_CMDID);
  26052. WMI_RETURN_STRING(WMI_GET_TPC_POWER_CMDID);
  26053. WMI_RETURN_STRING(WMI_MOTION_DET_CONFIG_PARAM_CMDID);
  26054. WMI_RETURN_STRING(WMI_MOTION_DET_BASE_LINE_CONFIG_PARAM_CMDID);
  26055. WMI_RETURN_STRING(WMI_MOTION_DET_START_STOP_CMDID);
  26056. WMI_RETURN_STRING(WMI_MOTION_DET_BASE_LINE_START_STOP_CMDID);
  26057. WMI_RETURN_STRING(WMI_SAR_LIMITS_CMDID);
  26058. WMI_RETURN_STRING(WMI_SAR_GET_LIMITS_CMDID);
  26059. WMI_RETURN_STRING(WMI_PEER_CHAN_WIDTH_SWITCH_CMDID);
  26060. WMI_RETURN_STRING(WMI_PDEV_OBSS_PD_SPATIAL_REUSE_SET_DEF_OBSS_THRESH_CMDID);
  26061. WMI_RETURN_STRING(WMI_PDEV_HE_TB_ACTION_FRM_CMDID);
  26062. WMI_RETURN_STRING(WMI_HPCS_PULSE_START_CMDID);
  26063. WMI_RETURN_STRING(WMI_VDEV_CHAINMASK_CONFIG_CMDID);
  26064. WMI_RETURN_STRING(WMI_VDEV_BCN_OFFLOAD_QUIET_CONFIG_CMDID);
  26065. WMI_RETURN_STRING(WMI_NDP_CMDID);
  26066. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_FILTER_CMDID);
  26067. WMI_RETURN_STRING(WMI_SET_CURRENT_COUNTRY_CMDID);
  26068. WMI_RETURN_STRING(WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID);
  26069. WMI_RETURN_STRING(WMI_PEER_TX_PN_REQUEST_CMDID);
  26070. WMI_RETURN_STRING(WMI_ROAM_BSS_LOAD_CONFIG_CMDID);
  26071. WMI_RETURN_STRING(WMI_VDEV_GET_MWS_COEX_INFO_CMDID);
  26072. WMI_RETURN_STRING(WMI_REQUEST_WLM_STATS_CMDID);
  26073. WMI_RETURN_STRING(WMI_PDEV_SET_RAP_CONFIG_CMDID);
  26074. WMI_RETURN_STRING(WMI_STA_TDCC_CONFIG_CMDID);
  26075. WMI_RETURN_STRING(WMI_ROAM_DEAUTH_CONFIG_CMDID);
  26076. WMI_RETURN_STRING(WMI_ROAM_IDLE_CONFIG_CMDID);
  26077. WMI_RETURN_STRING(WMI_IDLE_TRIGGER_MONITOR_CMDID);
  26078. WMI_RETURN_STRING(WMI_PDEV_DSM_FILTER_CMDID);
  26079. WMI_RETURN_STRING(WMI_TWT_BTWT_INVITE_STA_CMDID);
  26080. WMI_RETURN_STRING(WMI_TWT_BTWT_REMOVE_STA_CMDID);
  26081. WMI_RETURN_STRING(WMI_OEM_DATA_CMDID);
  26082. WMI_RETURN_STRING(WMI_ROAM_PREAUTH_STATUS_CMDID);
  26083. WMI_RETURN_STRING(WMI_SET_ELNA_BYPASS_CMDID);
  26084. WMI_RETURN_STRING(WMI_GET_ELNA_BYPASS_CMDID);
  26085. WMI_RETURN_STRING(WMI_AUDIO_AGGR_ENABLE_CMDID);
  26086. WMI_RETURN_STRING(WMI_AUDIO_AGGR_ADD_GROUP_CMDID);
  26087. WMI_RETURN_STRING(WMI_AUDIO_AGGR_DEL_GROUP_CMDID);
  26088. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_RATE_CMDID);
  26089. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_RETRY_CMDID);
  26090. WMI_RETURN_STRING(WMI_AUDIO_AGGR_UPDATE_STA_GROUP_INFO_CMDID);
  26091. WMI_RETURN_STRING(WMI_CFR_CAPTURE_FILTER_CMDID);
  26092. WMI_RETURN_STRING(WMI_ATF_SSID_GROUPING_REQUEST_CMDID);
  26093. WMI_RETURN_STRING(WMI_ATF_GROUP_WMM_AC_CONFIG_REQUEST_CMDID);
  26094. WMI_RETURN_STRING(WMI_PEER_ATF_EXT_REQUEST_CMDID);
  26095. WMI_RETURN_STRING(WMI_GET_CHANNEL_ANI_CMDID);
  26096. WMI_RETURN_STRING(WMI_SET_OCL_CMDID);
  26097. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_AUTO_RATE_CMDID);
  26098. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_PROBE_CMDID);
  26099. WMI_RETURN_STRING(WMI_VDEV_AUDIO_SYNC_TRIGGER_CMDID);
  26100. WMI_RETURN_STRING(WMI_VDEV_AUDIO_SYNC_QTIMER_CMDID);
  26101. WMI_RETURN_STRING(WMI_ROAM_GET_SCAN_CHANNEL_LIST_CMDID);
  26102. WMI_RETURN_STRING(WMI_VDEV_GET_BIG_DATA_CMDID);
  26103. WMI_RETURN_STRING(WMI_PDEV_FRAME_INJECT_CMDID);
  26104. WMI_RETURN_STRING(WMI_PDEV_TBTT_OFFSET_SYNC_CMDID);
  26105. WMI_RETURN_STRING(WMI_VDEV_GET_BIG_DATA_P2_CMDID);
  26106. WMI_RETURN_STRING(WMI_AUDIO_AGGR_GET_STATISTICS_CMDID);
  26107. WMI_RETURN_STRING(WMI_AUDIO_AGGR_RESET_STATISTICS_CMDID);
  26108. WMI_RETURN_STRING(WMI_ANT_CONTROLLER_CMDID);
  26109. WMI_RETURN_STRING(WMI_SIMULATION_TEST_CMDID);
  26110. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_RTSCTS_CONFIG_CMDID);
  26111. WMI_RETURN_STRING(WMI_REQUEST_CTRL_PATH_STATS_CMDID);
  26112. WMI_RETURN_STRING(WMI_PDEV_GET_TPC_STATS_CMDID);
  26113. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_SCHED_METHOD_CMDID);
  26114. WMI_RETURN_STRING(WMI_AUDIO_AGGR_GET_SCHED_METHOD_CMDID);
  26115. WMI_RETURN_STRING(WMI_REQUEST_UNIFIED_LL_GET_STA_CMDID);
  26116. WMI_RETURN_STRING(WMI_QOS_NULL_FRAME_TX_SEND_CMDID);
  26117. WMI_RETURN_STRING(WMI_PDEV_ENABLE_DURATION_BASED_TX_MODE_SELECTION_CMDID);
  26118. WMI_RETURN_STRING(WMI_TWT_NUDGE_DIALOG_CMDID);
  26119. WMI_RETURN_STRING(WMI_VDEV_SET_TPC_POWER_CMDID);
  26120. WMI_RETURN_STRING(WMI_VDEV_TID_LATENCY_CONFIG_CMDID);
  26121. WMI_RETURN_STRING(WMI_PEER_TID_LATENCY_CONFIG_CMDID);
  26122. WMI_RETURN_STRING(WMI_MLO_LINK_SET_ACTIVE_CMDID);
  26123. WMI_RETURN_STRING(WMI_PDEV_GET_DPD_STATUS_CMDID);
  26124. WMI_RETURN_STRING(WMI_MLO_SETUP_CMDID);
  26125. WMI_RETURN_STRING(WMI_MLO_READY_CMDID);
  26126. WMI_RETURN_STRING(WMI_MLO_TEARDOWN_CMDID);
  26127. WMI_RETURN_STRING(WMI_VDEV_IGMP_OFFLOAD_CMDID);
  26128. WMI_RETURN_STRING(WMI_MGMT_RX_REO_FILTER_CONFIGURATION_CMDID);
  26129. WMI_RETURN_STRING(WMI_PDEV_SET_BIOS_SAR_TABLE_CMDID);
  26130. WMI_RETURN_STRING(WMI_PDEV_SET_BIOS_GEO_TABLE_CMDID);
  26131. WMI_RETURN_STRING(WMI_PDEV_GET_HALPHY_CAL_STATUS_CMDID);
  26132. WMI_RETURN_STRING(WMI_PDEV_SET_HALPHY_CAL_BMAP_CMDID);
  26133. WMI_RETURN_STRING(WMI_AFC_CMDID);
  26134. WMI_RETURN_STRING(WMI_PDEV_MULTIPLE_VDEV_SET_PARAM_CMDID);
  26135. WMI_RETURN_STRING(WMI_PDEV_MEC_AGING_TIMER_CONFIG_CMDID);
  26136. WMI_RETURN_STRING(WMI_PEER_CONFIG_PPE_DS_CMDID);
  26137. WMI_RETURN_STRING(WMI_VDEV_ENABLE_DISABLE_INTRA_BSS_CMDID);
  26138. WMI_RETURN_STRING(WMI_PEER_ENABLE_DISABLE_INTRA_BSS_CMDID);
  26139. WMI_RETURN_STRING(WMI_ROAM_MLO_CONFIG_CMDID);
  26140. WMI_RETURN_STRING(WMI_REQUEST_THERMAL_STATS_CMDID);
  26141. }
  26142. return "Invalid WMI cmd";
  26143. }
  26144. #endif /* WMI_CMD_STRINGS */
  26145. /** WMI commands/events for the regulatory offload */
  26146. /** Host indicating current country code to FW */
  26147. typedef struct {
  26148. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_current_country_cmd_fixed_param */
  26149. A_UINT32 pdev_id;
  26150. A_UINT32 new_alpha2; /** alpha2 characters representing the country code */
  26151. } wmi_set_current_country_cmd_fixed_param;
  26152. typedef enum {
  26153. WMI_COUNTRYCODE_ALPHA2,
  26154. WMI_COUNTRYCODE_COUNTRY_ID,
  26155. WMI_COUNTRYCODE_DOMAIN_CODE,
  26156. } WMI_COUNTRYCODE_TYPE;
  26157. typedef struct {
  26158. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_init_country_cmd_fixed_param */
  26159. A_UINT32 pdev_id;
  26160. A_UINT32 countrycode_type; /* WMI_COUNTRYCODE_TYPE */
  26161. union {
  26162. struct {
  26163. /* Three character for alpha2. The first two is ISO name for country the last one
  26164. present if it is indoor and out door. First char in bits 7:0 and second char in bits 15:8 ... */
  26165. A_UINT32 alpha2:24,
  26166. unused:8;
  26167. };
  26168. A_UINT32 country_id; /* Country ID */
  26169. A_UINT32 domain_code; /* Domain code */
  26170. } country_code;
  26171. } wmi_set_init_country_cmd_fixed_param;
  26172. typedef enum {
  26173. /**
  26174. * serv_resp_format_type will indicate the format in which afc_serv data
  26175. * is written into host/target shared memory
  26176. * This type can be expanded in future as per requirements.
  26177. */
  26178. AFC_SERV_RESP_FORMAT_JSON = 0,
  26179. AFC_SERV_RESP_FORMAT_BINARY = 1,
  26180. } WMI_AFC_SERV_RESP_FORMAT_TYPE;
  26181. typedef enum {
  26182. /**
  26183. * wmi_afc_cmd_type will indicate type of AFC command sent to FW.
  26184. * Once AFC server writes data at TZ memory location SERV_RESP_READY
  26185. * type command is sent to FW.
  26186. * This type can be expanded in future as per requirements.
  26187. */
  26188. WMI_AFC_CMD_SERV_RESP_READY = 1,
  26189. } WMI_AFC_CMD_TYPE;
  26190. /** Host indicating AFC info availability to FW */
  26191. typedef struct {
  26192. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_afc_cmd_fixed_param */
  26193. A_UINT32 pdev_id;
  26194. A_UINT32 cmd_type; /* refer WMI_AFC_CMD_TYPE */
  26195. A_UINT32 serv_resp_format; /* refer WMI_AFC_SERV_RESP_FORMAT_TYPE */
  26196. } wmi_afc_cmd_fixed_param;
  26197. /** Host indicates AFC info availability to FW using WMI_AFC_CMD
  26198. * This AFC info is written by AFC application/ server in host/target
  26199. * shared memory reserved during bootup.
  26200. * The structure is placeholder, indicating way afc_serv_resp is written in FW.
  26201. * This structure will not be attach as input to WMI command.
  26202. * This structure will be common to both host and FW.
  26203. * The structure of this WMI AFC info is as follows.
  26204. */
  26205. typedef struct {
  26206. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_afc_serv_resp_struct */
  26207. A_UINT32 status; /* validity flag to be updated by TZ/ PF stub layer,
  26208. * to indicate if payload is valid or not.
  26209. * status = 1 will indicate payload is valid. */
  26210. A_UINT32 time_to_live; /* Total time for which this AFC info is valid in seconds */
  26211. A_UINT32 length; /* length of the payload, in bytes */
  26212. A_UINT32 payload_format; /* The format of payload written in FW memory:
  26213. * 0 -> JSON format
  26214. * 1 -> Binary format
  26215. * Refer to WMI_AFC_SERV_RESP_FORMAT_TYPE.
  26216. */
  26217. /*
  26218. * The structure above is followed by array of char which will have
  26219. * JSON string or binary data, as specified by the payload_format field.
  26220. * A_CHAR bufp[]; AFC payload (JSON string or binary data)
  26221. */
  26222. } wmi_afc_serv_resp_struct;
  26223. /*
  26224. * The following structures define the format used for AFC binary data objects
  26225. * shared by the host SW and target FW.
  26226. * FW expects these structures to be written in shared memory in little-endian
  26227. * format. If the host/AFC app uses big endian format, Host/APP needs to
  26228. * byteswap the data, so FW will get data in the expected little-endian format.
  26229. */
  26230. typedef struct {
  26231. A_UINT32 freq_info; /* bits 15:0 = u16 start_freq,
  26232. * bits 31:16 = u16 end_freq
  26233. * both in MHz units
  26234. */
  26235. A_INT32 max_psd; /* Maximum PSD in dBm/MHz, value is stored in 0.01 dBm/MHz steps */
  26236. } afc_freq_info;
  26237. typedef struct {
  26238. A_UINT32 channel_cfi; /* channel center frequency index */
  26239. A_UINT32 max_eirp_pwr; /* maximum permissible EIRP available for above CFI in dBm, value is stored in 0.01 dBm steps */
  26240. } afc_eirp_info;
  26241. typedef struct {
  26242. A_UINT32 global_operating_class;
  26243. A_UINT32 num_channels; /* num of valid channels for above global operating class */
  26244. /* This structure is followed by (num_channels*sizeof(afc_eirp_info))
  26245. * bytes array:
  26246. * afc_eirp_info eirp_info[num_channels];
  26247. * List of channel cfi and eirp power values,
  26248. * Total size will be num_channels * sizeof(afc_eirp_info)
  26249. */
  26250. } afc_channel_info;
  26251. /*
  26252. * For case of afc_server_resp containing binary payload, the buf pointer
  26253. * in wmi_afc_serv_resp_struct will be poiniting to binary format payload
  26254. * which is in the format defined below.
  26255. */
  26256. typedef struct {
  26257. A_UINT32 local_error_code; /* Internal error code between AFC app and target success = 0, General failure = 1 */
  26258. A_UINT32 version; /* Internal version between AFC app and Target for structure pattern */
  26259. A_UINT32 afc_wfa_version; /* Version defined in AFC spec document. bits 15:0 -- minor version & bits 31:16 -- major version */
  26260. A_UINT32 request_id; /* AFC unique request ID */
  26261. A_UINT32 avail_exp_time_d; /* avail_exp_time_d and avail_exp_time_t are in UTC
  26262. * Availability expiry time date format: YYYY-MM-DD,
  26263. * bits 7:0 -DD - Day (expected values 1-31)
  26264. * bits 15:8 -MM - Month (expected values 1-12)
  26265. * bits 31:16 -YYYY - Year
  26266. */
  26267. A_UINT32 avail_exp_time_t; /* Availability expiry time format HH-MM-SS
  26268. * bits 7:0 -SS - Time in Sec (expected values 0-59)
  26269. * bits 15:8 -MM - Minute (expected values 0-59)
  26270. * bits 23:16 -HH - Hour (expected values 0-23)
  26271. * bits 31:24 -reserved
  26272. */
  26273. A_INT32 afc_serv_resp_code; /* response code defined in afc wfa document, refer WMI_AFC_SERV_RESP_CODE */
  26274. A_UINT32 num_frequency_obj; /* Total number of frequency objects */
  26275. A_UINT32 num_channel_obj; /* Total number of frequency objects */
  26276. char shortdesc[64]; /* This field represents a short description related to the result indicated by the response_code
  26277. * field. End of description will be indicated by 0 */
  26278. A_UINT32 reserved[2]; /* reserve space for future fields - needs to be set to 0x0 */
  26279. /*
  26280. * This structure is followed by an array of frequency info and
  26281. * channel info array:
  26282. * - afc_freq_info freq_info[num_frequency_obj];
  26283. * List of frequency power values, total size will be
  26284. * num_frequency_obj * sizeof(afc_freq_info)
  26285. * - afc_channel_info chan_info[num_channel_obj];
  26286. * List of channel power values, total size will be
  26287. * num_channel_obj * sizeof(afc_channel_info)
  26288. */
  26289. } afc_spectrum_inquiry_resp_bin_type;
  26290. typedef struct {
  26291. /** TLV tag and len; tag equals
  26292. * WMITLV_TAG_STRUC_wmi_vdev_enable_disable_intra_bss_cmd_fixed_param
  26293. */
  26294. A_UINT32 tlv_header;
  26295. /** The corresponding vdev_id.
  26296. */
  26297. A_UINT32 vdev_id;
  26298. /* Enable/Disable intra_bss.
  26299. */
  26300. A_UINT32 enable;
  26301. } wmi_vdev_enable_disable_intra_bss_cmd_fixed_param;
  26302. typedef struct {
  26303. /** TLV tag and len; tag equals
  26304. * WMITLV_TAG_STRUC_wmi_peer_enable_disable_intra_bss_cmd_fixed_param
  26305. */
  26306. A_UINT32 tlv_header;
  26307. /** Mac Address of the peer.
  26308. */
  26309. wmi_mac_addr mac_addr;
  26310. /** The corresponding vdev_id.
  26311. */
  26312. A_UINT32 vdev_id;
  26313. /* Enable/Disable intra_bss.
  26314. */
  26315. A_UINT32 enable;
  26316. } wmi_peer_enable_disable_intra_bss_cmd_fixed_param;
  26317. /* Freq units in MHz */
  26318. #define WMI_REG_RULE_START_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 0, 16)
  26319. #define WMI_REG_RULE_START_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 0, 16, value)
  26320. #define WMI_REG_RULE_END_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 16, 16)
  26321. #define WMI_REG_RULE_END_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 16, 16, value)
  26322. /* BW in MHz */
  26323. #define WMI_REG_RULE_MAX_BW_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 0, 16)
  26324. #define WMI_REG_RULE_MAX_BW_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 0, 16, value)
  26325. /* regpower in dBm */
  26326. #define WMI_REG_RULE_REG_POWER_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 16, 8)
  26327. #define WMI_REG_RULE_REG_POWER_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 16, 8, value)
  26328. /* antenna gain */
  26329. #define WMI_REG_RULE_ANTENNA_GAIN_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 24, 8)
  26330. #define WMI_REG_RULE_ANTENNA_GAIN_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 24, 8, value)
  26331. typedef enum {
  26332. WMI_REG_FLAG_CHAN_NO_IR = 0x0001, /* passive channel */
  26333. WMI_REG_FLAG_CHAN_RADAR = 0x0002, /* dfs channel */
  26334. WMI_REG_FLAG_CHAN_NO_OFDM = 0x0004, /* no ofdm channel */
  26335. WMI_REG_FLAG_CHAN_INDOOR_ONLY = 0x0008, /* indoor only channel */
  26336. } WMI_REGULATORY_FLAGS;
  26337. #define WMI_REG_RULE_FLAGS_GET(flag_info) WMI_GET_BITS(flag_info, 0, 16)
  26338. #define WMI_REG_RULE_FLAGS_SET(flag_info, value) WMI_SET_BITS(flag_info, 0, 16, value)
  26339. typedef struct {
  26340. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_rule_struct */
  26341. A_UINT32 freq_info; /* bits 15:0 = u16 start_freq,
  26342. * bits 31:16 = u16 end_freq
  26343. * (both in MHz units) */
  26344. A_UINT32 bw_pwr_info; /* bits 15:0 = u16 max_bw (MHz units),
  26345. bits 23:16 = u8 reg_power (dBm units),
  26346. bits 31:24 = u8 ant_gain (dB units) */
  26347. A_UINT32 flag_info; /* bits 15:0 = u16 flags,
  26348. bits 31:16 reserved */
  26349. } wmi_regulatory_rule_struct;
  26350. #define WMI_REG_RULE_PSD_FLAG_GET(psd_power_info) \
  26351. WMI_GET_BITS(psd_power_info, 0, 1)
  26352. #define WMI_REG_RULE_PSD_FLAG_SET(psd_power_info, value) \
  26353. WMI_SET_BITS(psd_power_info, 0, 1, value)
  26354. #define WMI_REG_RULE_PSD_EIRP_GET(psd_power_info) \
  26355. WMI_GET_BITS(psd_power_info, 16, 16)
  26356. #define WMI_REG_RULE_PSD_EIRP_SET(psd_power_info, value) \
  26357. WMI_SET_BITS(psd_power_info, 16, 16, value)
  26358. typedef struct {
  26359. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_rule_ext_struct */
  26360. A_UINT32 freq_info; /* bits 15:0 = u16 start_freq,
  26361. bits 31:16 = u16 end_freq
  26362. (both in MHz units)
  26363. use same MACRO as wmi_regulatory_rule_struct
  26364. */
  26365. A_UINT32 bw_pwr_info; /* bits 15:0 = u16 max_bw (MHz units),
  26366. bits 23:16 = u8 reg_power (dBm units),
  26367. bits 31:24 = u8 ant_gain (dB units)
  26368. use same MACRO as wmi_regulatory_rule_struct
  26369. */
  26370. A_UINT32 flag_info; /* bits 15:0 = u16 flags,
  26371. bits 31:16 reserved
  26372. use same MACRO as wmi_regulatory_rule_struct
  26373. */
  26374. A_UINT32 psd_power_info; /* bits 0 - whether PSD power,
  26375. bits 15:1 - reserved
  26376. bits 31:16 - maximum PSD EIRP (dB/MHz)
  26377. */
  26378. } wmi_regulatory_rule_ext_struct;
  26379. typedef enum {
  26380. WMI_REG_DFS_UNINIT_REGION = 0,
  26381. WMI_REG_DFS_FCC_REGION = 1,
  26382. WMI_REG_DFS_ETSI_REGION = 2,
  26383. WMI_REG_DFS_MKK_REGION = 3,
  26384. WMI_REG_DFS_CN_REGION = 4,
  26385. WMI_REG_DFS_KR_REGION = 5,
  26386. /* Add new items above */
  26387. WMI_REG_DFS_UNDEF_REGION = 0xFFFF,
  26388. } WMI_REG_DFS_REGION;
  26389. typedef enum {
  26390. WMI_REGULATORY_PHYMODE_NO11A = 0x0001, /* NO 11A */
  26391. WMI_REGULATORY_PHYMODE_NO11B = 0x0002, /* NO 11B */
  26392. WMI_REGULATORY_PHYMODE_NO11G = 0x0004, /* NO 11G */
  26393. WMI_REGULATORY_PHYMODE_NO11N = 0x0008, /* NO 11N */
  26394. WMI_REGULATORY_PHYMODE_NO11AC = 0x0010, /* NO 11AC */
  26395. WMI_REGULATORY_PHYMODE_NO11AX = 0x0020, /* NO 11AX */
  26396. WMI_REGULATORY_PHYMODE_NO11BE = 0x0040, /* NO 11BE */
  26397. } WMI_REGULATORY_PHYBITMAP;
  26398. typedef enum {
  26399. WMI_REG_SET_CC_STATUS_PASS = 0,
  26400. WMI_REG_CURRENT_ALPHA2_NOT_FOUND = 1,
  26401. WMI_REG_INIT_ALPHA2_NOT_FOUND = 2,
  26402. WMI_REG_SET_CC_CHANGE_NOT_ALLOWED = 3,
  26403. WMI_REG_SET_CC_STATUS_NO_MEMORY = 4,
  26404. WMI_REG_SET_CC_STATUS_FAIL = 5,
  26405. } WMI_REG_SET_CC_STATUS_CODE;
  26406. typedef struct {
  26407. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_event_fixed_param */
  26408. A_UINT32 status_code; /* WMI_REG_SET_CC_STATUS_CODE */
  26409. A_UINT32 phy_id;
  26410. A_UINT32 alpha2;
  26411. A_UINT32 num_phy;
  26412. A_UINT32 country_id;
  26413. A_UINT32 domain_code;
  26414. A_UINT32 dfs_region; /* WMI_REG_DFS_REGION */
  26415. A_UINT32 phybitmap; /* WMI_REGULATORY_PHYBITMAP */
  26416. A_UINT32 min_bw_2g; /* BW in MHz */
  26417. A_UINT32 max_bw_2g; /* BW in MHz */
  26418. A_UINT32 min_bw_5g; /* BW in MHz */
  26419. A_UINT32 max_bw_5g; /* BW in MHz */
  26420. A_UINT32 num_2g_reg_rules;
  26421. A_UINT32 num_5g_reg_rules;
  26422. /* followed by wmi_regulatory_rule_struct TLV array. First 2G and then 5G */
  26423. } wmi_reg_chan_list_cc_event_fixed_param;
  26424. typedef enum {
  26425. WMI_REG_CLIENT_REGULAR = 0,
  26426. WMI_REG_CLIENT_SUBORDINATE = 1,
  26427. /* 2 and 3 are reserved for future growth */
  26428. WMI_REG_CLIENT_MAX = 4, /* can't expand, b/c used as array length below */
  26429. } wmi_reg_client_type;
  26430. typedef struct {
  26431. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_event_ext_fixed_param */
  26432. A_UINT32 status_code; /* WMI_REG_SET_CC_STATUS_CODE */
  26433. A_UINT32 phy_id;
  26434. A_UINT32 alpha2;
  26435. A_UINT32 num_phy;
  26436. A_UINT32 country_id; /* uses CountryCode enum values */
  26437. A_UINT32 domain_code; /* used EnumRd enum values */
  26438. A_UINT32 dfs_region; /* WMI_REG_DFS_REGION */
  26439. A_UINT32 phybitmap; /* WMI_REGULATORY_PHYBITMAP */
  26440. A_UINT32 min_bw_2g; /* BW in MHz */
  26441. A_UINT32 max_bw_2g; /* BW in MHz */
  26442. A_UINT32 min_bw_5g; /* BW in MHz */
  26443. A_UINT32 max_bw_5g; /* BW in MHz */
  26444. A_UINT32 num_2g_reg_rules;
  26445. A_UINT32 num_5g_reg_rules;
  26446. A_UINT32 client_type; /* populated if device can function as client */
  26447. A_UINT32 rnr_tpe_usable; /* If RNR TPE Octet usable for that country */
  26448. A_UINT32 unspecified_ap_usable; /* If unspecified AP usable for that country */
  26449. A_UINT32 domain_code_6g_ap_lpi;
  26450. A_UINT32 domain_code_6g_ap_sp;
  26451. A_UINT32 domain_code_6g_ap_vlp;
  26452. A_UINT32 domain_code_6g_client_lpi[WMI_REG_CLIENT_MAX];
  26453. A_UINT32 domain_code_6g_client_sp[WMI_REG_CLIENT_MAX];
  26454. A_UINT32 domain_code_6g_client_vlp[WMI_REG_CLIENT_MAX];
  26455. A_UINT32 domain_code_6g_super_id;
  26456. A_UINT32 min_bw_6g_ap_sp; /* MHz */
  26457. A_UINT32 max_bw_6g_ap_sp;
  26458. A_UINT32 min_bw_6g_ap_lpi;
  26459. A_UINT32 max_bw_6g_ap_lpi;
  26460. A_UINT32 min_bw_6g_ap_vlp;
  26461. A_UINT32 max_bw_6g_ap_vlp;
  26462. A_UINT32 min_bw_6g_client_sp[WMI_REG_CLIENT_MAX];
  26463. A_UINT32 max_bw_6g_client_sp[WMI_REG_CLIENT_MAX];
  26464. A_UINT32 min_bw_6g_client_lpi[WMI_REG_CLIENT_MAX];
  26465. A_UINT32 max_bw_6g_client_lpi[WMI_REG_CLIENT_MAX];
  26466. A_UINT32 min_bw_6g_client_vlp[WMI_REG_CLIENT_MAX];
  26467. A_UINT32 max_bw_6g_client_vlp[WMI_REG_CLIENT_MAX];
  26468. A_UINT32 num_6g_reg_rules_ap_sp;
  26469. A_UINT32 num_6g_reg_rules_ap_lpi;
  26470. A_UINT32 num_6g_reg_rules_ap_vlp;
  26471. A_UINT32 num_6g_reg_rules_client_sp[WMI_REG_CLIENT_MAX];
  26472. A_UINT32 num_6g_reg_rules_client_lpi[WMI_REG_CLIENT_MAX];
  26473. A_UINT32 num_6g_reg_rules_client_vlp[WMI_REG_CLIENT_MAX];
  26474. /*
  26475. * This fixed_param TLV is followed by wmi_regulatory_rule_ext struct TLV array.
  26476. * Within the reg rule ext TLV array, the 2G elements occur first,
  26477. * then the 5G elements, then the 6G elements (AP SG, AP LPI, AP VLP,
  26478. * client SP x4, client LPI x4, client vlp x4).
  26479. */
  26480. } wmi_reg_chan_list_cc_event_ext_fixed_param;
  26481. /* WFA AFC Version */
  26482. #define WMI_AFC_WFA_MINOR_VERSION_GET(afc_wfa_version) WMI_GET_BITS(afc_wfa_version, 0, 16)
  26483. #define WMI_AFC_WFA_MINOR_VERSION_SET(afc_wfa_version, value) WMI_SET_BITS(afc_wfa_version, 0, 16, value)
  26484. #define WMI_AFC_WFA_MAJOR_VERSION_GET(afc_wfa_version) WMI_GET_BITS(afc_wfa_version, 16, 16)
  26485. #define WMI_AFC_WFA_MAJOR_VERSION_SET(afc_wfa_version, value) WMI_SET_BITS(afc_wfa_version, 16, 16, value)
  26486. /* avail_exp_time_d time is expected as YYYY-MM-DD */
  26487. #define WMI_AVAIL_EXPIRY_TIME_DAY_GET(avail_exp_time_d) WMI_GET_BITS(avail_exp_time_d, 0, 8)
  26488. #define WMI_AVAIL_EXPIRY_TIME_DAY_SET(avail_exp_time_d, value) WMI_SET_BITS(avail_exp_time_d, 0, 8, value)
  26489. #define WMI_AVAIL_EXPIRY_TIME_MONTH_GET(avail_exp_time_d) WMI_GET_BITS(avail_exp_time_d, 8, 8)
  26490. #define WMI_AVAIL_EXPIRY_TIME_MONTH_SET(avail_exp_time_d, value) WMI_SET_BITS(avail_exp_time_d, 8, 8, value)
  26491. #define WMI_AVAIL_EXPIRY_TIME_YEAR_GET(avail_exp_time_d) WMI_GET_BITS(avail_exp_time_d, 16, 16)
  26492. #define WMI_AVAIL_EXPIRY_TIME_YEAR_SET(avail_exp_time_d, value) WMI_SET_BITS(avail_exp_time_d, 16, 16, value)
  26493. /* avail_exp_time_t time is expected as HH-MM-SS */
  26494. #define WMI_AVAIL_EXPIRY_TIME_SEC_GET(avail_exp_time_t) WMI_GET_BITS(avail_exp_time_t, 0, 8)
  26495. #define WMI_AVAIL_EXPIRY_TIME_SEC_SET(avail_exp_time_t, value) WMI_SET_BITS(avail_exp_time_t, 0, 8, value)
  26496. #define WMI_AVAIL_EXPIRY_TIME_MINUTE_GET(avail_exp_time_t) WMI_GET_BITS(avail_exp_time_t, 8, 8)
  26497. #define WMI_AVAIL_EXPIRY_TIME_MINUTE_SET(avail_exp_time_t, value) WMI_SET_BITS(avail_exp_time_t, 8, 8, value)
  26498. #define WMI_AVAIL_EXPIRY_TIME_HOUR_GET(avail_exp_time_t) WMI_GET_BITS(avail_exp_time_t, 16, 8)
  26499. #define WMI_AVAIL_EXPIRY_TIME_HOUR_SET(avail_exp_time_t, value) WMI_SET_BITS(avail_exp_time_t, 16, 8, value)
  26500. typedef enum {
  26501. /**
  26502. * The following event type is mutually exclusive.
  26503. * afc_event_type will indicate type of AFC event sent from FW to host.
  26504. * 1. For sending Power Info WMI_AFC_EVENT_POWER_INFO event is used.
  26505. * 2. For sending AFC expiry use WMI_AFC_EVENT_TIMER_EXPIRY
  26506. * This type can be expanded in future as per requirements.
  26507. */
  26508. WMI_AFC_EVENT_POWER_INFO = 1,
  26509. WMI_AFC_EVENT_TIMER_EXPIRY = 2,
  26510. } WMI_AFC_EVENT_TYPE;
  26511. typedef enum {
  26512. /**
  26513. * The following afc_expiry_event_subtype is mutually exclusive
  26514. * and is a part of expiry event.
  26515. * 1. At boot up AFC expiry will contain AFC start.
  26516. * 2. If AFC timer expires AFC_RENEW status code will be sent to host
  26517. * with expiry event.
  26518. * 3. If AFC server is not responding to FW in specified time, FW will
  26519. * indicate host to switch to LPI.
  26520. */
  26521. WMI_AFC_EXPIRY_EVENT_START = 1,
  26522. WMI_AFC_EXPIRY_EVENT_RENEW = 2,
  26523. WMI_AFC_EXPIRY_EVENT_SWITCH_TO_LPI = 3,
  26524. } WMI_AFC_EXPIRY_EVENT_SUBTYPE;
  26525. typedef enum {
  26526. /**
  26527. * The following fw_status_code is mutually exclusive
  26528. * and is used in power event.
  26529. * 0. AFC power event is success.
  26530. * 1. If Host does not indicate AFC indication cmd within certain time
  26531. * of AFC expiry FW_AFC_POWER_EVENT_RESP_NOT_RECEIVED will be used.
  26532. * 2. If FW is not able to parse afc_info, parsing_failure will be
  26533. * indicated using WMI_FW_AFC_POWER_EVENT_RESP_NOT_RECEIVED.
  26534. * 3. If due to some local reason AFC event is failed, AFC event failure
  26535. * is indicated using WMI_FW_AFC_POWER_EVENT_FAILURE.
  26536. */
  26537. WMI_FW_AFC_POWER_EVENT_SUCCESS = 0,
  26538. WMI_FW_AFC_POWER_EVENT_RESP_NOT_RECEIVED = 1,
  26539. WMI_FW_AFC_POWER_EVENT_RESP_PARSING_FAILURE = 2,
  26540. WMI_FW_AFC_POWER_EVENT_FAILURE = 3,
  26541. } WMI_FW_AFC_POWER_EVENT_STATUS_CODE;
  26542. typedef enum {
  26543. /**
  26544. * The following afc_server_resp_code is mutually exclusive.
  26545. * This response code will be indicated to AFC server.
  26546. * These codes are defined in WIFI spec doc for AFC as follows
  26547. * -1: General Failure
  26548. * 0: Success
  26549. * 100 - 199: General errors related to the protocol
  26550. * 300 - 399: Error events specific to message exchange for the
  26551. * Available Spectrum Inquiry
  26552. */
  26553. WMI_AFC_SERV_RESP_GENERAL_FAILURE = -1,
  26554. WMI_AFC_SERV_RESP_SUCCESS = 0,
  26555. WMI_AFC_SERV_RESP_VERSION_NOT_SUPPORTED = 100,
  26556. WMI_AFC_SERV_RESP_DEVICE_UNALLOWED = 101,
  26557. WMI_AFC_SERV_RESP_MISSING_PARAM = 102,
  26558. WMI_AFC_SERV_RESP_INVALID_VALUE = 103,
  26559. WMI_AFC_SERV_RESP_UNEXPECTED_PARAM = 106,
  26560. WMI_AFC_SERV_RESP_UNSUPPORTED_SPECTRUM = 300,
  26561. } WMI_AFC_SERV_RESP_CODE;
  26562. typedef struct {
  26563. /** TLV tag and len;
  26564. * tag equals WMITLV_TAG_STRUC_wmi_afc_event_fixed_param */
  26565. A_UINT32 tlv_header;
  26566. A_UINT32 phy_id;
  26567. A_UINT32 event_type; /* refer to WMI_AFC_EVENT_TYPE */
  26568. /** This TLV is (optionally) followed by TLV and TLV arrays containing
  26569. * different afc_event:
  26570. * 1. wmi_afc_expiry_event_param expiry_evt;
  26571. * This TLV contains afc_expiry_event_param of fixed size.
  26572. * 2. wmi_reg_afc_power_event_param afc_power_event;
  26573. * This TLV contains afc_power_info_param of fixed size.
  26574. * 3. wmi_6g_afc_frequency_info freq_info[]
  26575. * This TLV array contains zero or more TLVs of freq_info,
  26576. * which contain freq range and PSD.
  26577. * 4. wmi_6g_afc_channel_info channel_info[]
  26578. * This TLV array contains zero or more TLVs of global_operating
  26579. * class and number of channel
  26580. * in each global operating class
  26581. * 5. wmi_afc_chan_eirp_power_info chan_eirp_power_info[]
  26582. * This TLV array contains zero or more TLVs of channel CFI and
  26583. * EIRP power values for each of the total number of channels
  26584. * per global operating class.
  26585. */
  26586. } wmi_afc_event_fixed_param;
  26587. typedef struct {
  26588. /** TLV tag and len;
  26589. * tag equals WMITLV_TAG_STRUC_wmi_afc_expiry_event_param.
  26590. */
  26591. A_UINT32 tlv_header;
  26592. A_UINT32 request_id; /* AFC unique Request ID for AFC expiry event, This is Nonce generated by FW for freshness */
  26593. A_UINT32 event_subtype; /* refer to WMI_AFC_EXPIRY_EVENT_SUBTYPE */
  26594. A_UINT32 afc_wfa_version; /* bits 15:0 -- minor version
  26595. * bits 31:16 -- major version
  26596. * WMI_AFC_WFA_MINOR_VERSION_GET &
  26597. * WMI_AFC_WFA_MAJOR_VERSION_GET
  26598. */
  26599. } wmi_afc_expiry_event_param;
  26600. typedef struct {
  26601. /** TLV tag and len;
  26602. *tag equals WMITLV_TAG_STRUC_wmi_afc_power_event_param */
  26603. A_UINT32 tlv_header;
  26604. A_UINT32 fw_status_code; /* refer WMI_FW_AFC_POWER_EVENT_STATUS_CODE */
  26605. 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. */
  26606. 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. */
  26607. A_UINT32 afc_wfa_version; /* bits 15:0 -- minor version
  26608. * bits 31:16 -- major version
  26609. * WMI_AFC_WFA_MINOR_VERSION_GET &
  26610. * WMI_AFC_WFA_MAJOR_VERSION_GET
  26611. */
  26612. A_UINT32 avail_exp_time_d; /* avail_exp_time_d and avail_exp_time_t are
  26613. * in UTC
  26614. * Availability expiry time date format:
  26615. * YYYY-MM-DD,
  26616. * bits 7:0 -DD - Day (expected values 1-31)
  26617. * bits 15:8 -MM - Month (expected values 1-12)
  26618. * bits 31:16 -YYYY - Year
  26619. */
  26620. A_UINT32 avail_exp_time_t; /* Availability expiry time format HH-MM-SS
  26621. * bits 7:0 -SS - Time in Sec (expected values 0-59)
  26622. * bits 15:8 -MM - Minute (expected values 0-59)
  26623. * bits 23:16 -HH - Hour (expected values 0-23)
  26624. * bits 31:24 -reserved
  26625. */
  26626. } wmi_afc_power_event_param;
  26627. typedef struct {
  26628. /** TLV tag and len;
  26629. * tag equals WMITLV_TAG_STRUC_wmi_6g_afc_frequency_info */
  26630. A_UINT32 tlv_header;
  26631. A_UINT32 freq_info; /* bits 15:0 = u16 start_freq,
  26632. * bits 31:16 = u16 end_freq
  26633. * (both in MHz units)
  26634. * use MACRO as WMI_REG_RULE_START_FREQ_GET &
  26635. * WMI_REG_RULE_START_FREQ_SET
  26636. */
  26637. A_INT32 psd_power_info; /* Maximum PSD in dBm/MHz, value is stored in 0.01 dBm/MHz steps */
  26638. } wmi_6g_afc_frequency_info;
  26639. typedef struct {
  26640. /** TLV tag and len;
  26641. * tag equals WMITLV_TAG_STRUC_wmi_6g_afc_channel_info */
  26642. A_UINT32 tlv_header;
  26643. A_UINT32 global_operating_class;
  26644. A_UINT32 num_channels; /* num of valid channels for above global operating class */
  26645. /* This TLV will be followed by array of
  26646. * num_channels times wmi_afc_chan_eirp_power_info
  26647. * wmi_afc_chan_eirp_power_info power_info[]
  26648. * EIRP power array has chunks of elements corresponding to each channel
  26649. * in the channel array.
  26650. * i.e. the EIRP power array will contain
  26651. * (suppose N1 and N2 are number of valid channels from channel_info[0]
  26652. * and channel_info[1] respectively)
  26653. * eirp_power[0] power for channel 0 from channel_info[0]
  26654. * eirp_power[1] power for channel 1 from channel_info[0]
  26655. * ...
  26656. * eirp_power[N1-1] power for channel N1-1 from channel_info[0]
  26657. * eirp_power[N1] power for channel 0 from channel_info[1]
  26658. * eirp_power[N1+1] power for channel 1 from channel_info[1]
  26659. * ...
  26660. * eirp_power[N1+N2-1] power for channel N2-1 channel_info[1]
  26661. * ...
  26662. */
  26663. } wmi_6g_afc_channel_info;
  26664. typedef struct {
  26665. /** TLV tag and len;
  26666. * tag equals WMITLV_TAG_STRUC_wmi_afc_chan_eirp_power_info */
  26667. A_UINT32 tlv_header ;
  26668. A_UINT32 channel_cfi; /* channel center frequency indices */
  26669. A_UINT32 eirp_pwr; /* maximum permissible EIRP available for above CFI in dBm, value is stored in 0.01 dBm steps */
  26670. } wmi_afc_chan_eirp_power_info;
  26671. typedef struct {
  26672. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_start_cmd_fixed_param */
  26673. A_UINT32 vdev_id;
  26674. A_UINT32 scan_period_msec; /** scan duration in milli-seconds */
  26675. A_UINT32 start_interval_msec; /** offset duration to start the scan in milli-seconds */
  26676. } wmi_11d_scan_start_cmd_fixed_param;
  26677. typedef struct {
  26678. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_stop_cmd_fixed_param */
  26679. A_UINT32 vdev_id;
  26680. } wmi_11d_scan_stop_cmd_fixed_param;
  26681. /** FW indicating new current country code to Host */
  26682. typedef struct {
  26683. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_new_country_event_fixed_param */
  26684. A_UINT32 new_alpha2; /** alpha2 characters representing the country code */
  26685. } wmi_11d_new_country_event_fixed_param;
  26686. typedef struct {
  26687. /** TLV tag and len; tag equals
  26688. * WMITLV_TAG_STRUC_wmi_coex_get_antenna_isolation_cmd_fixed_param */
  26689. A_UINT32 tlv_header;
  26690. /* Currently there are no parameters for this message. */
  26691. } wmi_coex_get_antenna_isolation_cmd_fixed_param;
  26692. typedef struct {
  26693. /** TLV tag and len; tag equals
  26694. * WMITLV_TAG_STRUC_wmi_pdev_get_nfcal_power_fixed_param */
  26695. A_UINT32 tlv_header;
  26696. /** pdev_id for identifying the MAC
  26697. * See macros starting with WMI_PDEV_ID_ for values.
  26698. */
  26699. A_UINT32 pdev_id;
  26700. } wmi_pdev_get_nfcal_power_fixed_param;
  26701. typedef struct {
  26702. /** TLV tag and len; tag equals
  26703. * WMITLV_TAG_STRUC_wmi_coex_report_isolation_event_fixed_param */
  26704. A_UINT32 tlv_header;
  26705. /** 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.
  26706. * Currently the HW descriptor only supports 4 chains at most.
  26707. * Further isolation_chainX elements can be added in the future
  26708. * for additional chains, if needed.
  26709. */
  26710. A_UINT32 isolation_chain0:8, /* [7:0], isolation value for chain 0 */
  26711. isolation_chain1:8, /* [15:8], isolation value for chain 1 */
  26712. isolation_chain2:8, /* [23:16], isolation value for chain 2 */
  26713. isolation_chain3:8; /* [31:24], isolation value for chain 3 */
  26714. } wmi_coex_report_isolation_event_fixed_param;
  26715. typedef enum {
  26716. WMI_RCPI_MEASUREMENT_TYPE_AVG_MGMT = 1,
  26717. WMI_RCPI_MEASUREMENT_TYPE_AVG_DATA = 2,
  26718. WMI_RCPI_MEASUREMENT_TYPE_LAST_MGMT = 3,
  26719. WMI_RCPI_MEASUREMENT_TYPE_LAST_DATA = 4,
  26720. } wmi_rcpi_measurement_type;
  26721. typedef struct {
  26722. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_rcpi_cmd_fixed_param */
  26723. A_UINT32 tlv_header;
  26724. /* VDEV identifier */
  26725. A_UINT32 vdev_id;
  26726. /* peer MAC address */
  26727. wmi_mac_addr peer_macaddr;
  26728. /* measurement type - defined in enum wmi_rcpi_measurement_type */
  26729. A_UINT32 measurement_type;
  26730. } wmi_request_rcpi_cmd_fixed_param;
  26731. typedef struct {
  26732. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_rcpi_event_fixed_param */
  26733. A_UINT32 tlv_header;
  26734. /* VDEV identifier */
  26735. A_UINT32 vdev_id;
  26736. /* peer MAC address */
  26737. wmi_mac_addr peer_macaddr;
  26738. /* measurement type - defined in enum wmi_rcpi_measurement_type */
  26739. A_UINT32 measurement_type;
  26740. /* Measured RCPI in dBm of the peer requested by host */
  26741. A_INT32 rcpi;
  26742. /** status
  26743. * 0 - Requested peer RCPI available
  26744. * 1 - Requested peer RCPI not available
  26745. */
  26746. A_UINT32 status;
  26747. } wmi_update_rcpi_event_fixed_param;
  26748. /* Definition of mask for various package id */
  26749. #define WMI_PKGID_MASK_AUTO 0x00000080
  26750. typedef struct {
  26751. /** TLV tag and len; tag equals*/
  26752. A_UINT32 tlv_header;
  26753. /**
  26754. * The value field is filled with WMI_PKGID_MASK values.
  26755. * Currently, the only flag used within values is
  26756. * WMI_PKGID_MASK_AUTO, where bit7=1 for automotive systems.
  26757. */
  26758. A_UINT32 value;
  26759. } wmi_pkgid_event_fixed_param;
  26760. typedef struct {
  26761. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_params */
  26762. A_UINT32 vdev_id; /* vdev id whose mac to be randomized */
  26763. /* enable is set to 1 if mac randomization to be enabled */
  26764. A_UINT32 enable;
  26765. /* randomization mac address if randomization is enabled */
  26766. wmi_mac_addr mac_addr;
  26767. /* To get the PMAC from freq param */
  26768. A_UINT32 freq; /* units in MHz */
  26769. } wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_param;
  26770. typedef struct {
  26771. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_event_fixed_params */
  26772. A_UINT32 vdev_id; /* vdev of id whose mac address was randomized */
  26773. A_UINT32 status; /* status is 1 if success and 0 if failed */
  26774. } wmi_vdev_add_mac_addr_to_rx_filter_status_event_fixed_param;
  26775. /* Definition of HW data filtering */
  26776. typedef enum {
  26777. WMI_HW_DATA_FILTER_DROP_NON_ARP_BC = 0x01,
  26778. WMI_HW_DATA_FILTER_DROP_NON_ICMPV6_MC = 0x02,
  26779. } WMI_HW_DATA_FILTER_BITMAP_TYPE;
  26780. typedef struct {
  26781. A_UINT32 tlv_header;
  26782. A_UINT32 vdev_id;
  26783. A_UINT32 enable; /* 1 . enable, 0- disable */
  26784. A_UINT32 hw_filter_bitmap; /* see WMI_HW_DATA_FILTER_BITMAP_TYPE */
  26785. } wmi_hw_data_filter_cmd_fixed_param;
  26786. /** values for multiple_vdev_restart_request flags */
  26787. /* Host is expecting consolidated Multiple Vdev Restart Response(MVRR) event. */
  26788. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_IS_MVRR_EVENT_SUPPORT(flag) WMI_GET_BITS(flag, 0, 1)
  26789. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_SET_MVRR_EVENT_SUPPORT(flag,val) WMI_SET_BITS(flag, 0, 1, val)
  26790. /* Host is sending phymode_list for each vdev. */
  26791. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_IS_PHYMODE_PRESENT(flag) WMI_GET_BITS(flag, 1, 1)
  26792. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_SET_PHYMODE_PRESENT(flag,val) WMI_SET_BITS(flag, 1, 1, val)
  26793. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_GET_PHYMODE(phymode) WMI_GET_BITS(phymode, 0, 6)
  26794. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_SET_PHYMODE(phymode, val) WMI_SET_BITS(phymode, 0, 6, val)
  26795. /* This command is used whenever host wants to restart multiple
  26796. * VDEVs using single command and the VDEV that are restarted will
  26797. * need to have same properties they had before restart except for the
  26798. * operating channel
  26799. */
  26800. typedef struct {
  26801. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_multiple_vdev_restart_request_cmd_fixed_param */
  26802. /** pdev_id for identifying the MAC
  26803. * See macros starting with WMI_PDEV_ID_ for values.
  26804. * In non-DBDC case host should set it to 0
  26805. */
  26806. A_UINT32 pdev_id;
  26807. /** unique id identifying the module, generated by the caller */
  26808. A_UINT32 requestor_id;
  26809. /** Disable H/W ack.
  26810. * During CAC, Our HW shouldn't ack directed frames
  26811. */
  26812. A_UINT32 disable_hw_ack;
  26813. /* Determine the duration of CAC on the given channel 'chan' */
  26814. A_UINT32 cac_duration_ms;
  26815. A_UINT32 num_vdevs;
  26816. /*
  26817. * Flags to indicate which parameters are sent as part of the request.
  26818. * This field is filled with the bitwise combination of the flag values
  26819. * defined by WMI_MULTIPLE_VDEV_RESTART_FLAG_xxx
  26820. */
  26821. A_UINT32 flags;
  26822. A_UINT32 puncture_20mhz_bitmap; /* each bit indicates one 20 MHz BW punctured */
  26823. /* The TLVs follows this structure:
  26824. * A_UINT32 vdev_ids[]; <--- Array of VDEV ids.
  26825. * wmi_channel chan; <------ WMI channel
  26826. * A_UINT32 phymode_list[]; <-- Array of Phymode list, with
  26827. * each phymode value stored in bits 5:0 of the A_UINT32.
  26828. * Use the WMI_MULTIPLE_VDEV_RESTART_FLAG_GET/SET_PHYMODE macros
  26829. * to access the phymode value from within each A_UINT32 element.
  26830. * A_UINT32 preferred_tx_streams[]; <-- Array of preferred_tx_streams
  26831. * with vdev ID as index.
  26832. * A_UINT32 preferred_rx_streams[]; <-- Array of preferred_rx_streams
  26833. * with vdev ID as index.
  26834. */
  26835. } wmi_pdev_multiple_vdev_restart_request_cmd_fixed_param;
  26836. typedef struct {
  26837. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_csa_switch_count_status_event_fixed_param */
  26838. A_UINT32 tlv_header;
  26839. /** pdev_id for identifying the MAC
  26840. * See macros starting with WMI_PDEV_ID_ for values.
  26841. * In non-DBDC case host should set it to 0
  26842. */
  26843. A_UINT32 pdev_id;
  26844. /** CSA switch count value in the last transmitted beacon */
  26845. A_UINT32 current_switch_count;
  26846. A_UINT32 num_vdevs;
  26847. /* The TLVs follows this structure:
  26848. * A_UINT32 vdev_ids[]; <--- Array of VDEV ids.
  26849. */
  26850. } wmi_pdev_csa_switch_count_status_event_fixed_param;
  26851. typedef struct {
  26852. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csc_vdev_list */
  26853. A_UINT32 vdev_id;
  26854. A_UINT32 current_switch_count; /** CSC switch count value in the last transmitted beacon */
  26855. } wmi_csc_vdev_list;
  26856. typedef struct {
  26857. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_csc_switch_count_status_event_fixed_param */
  26858. A_UINT32 tlv_header;
  26859. /** pdev_id for identifying the MAC
  26860. * See macros starting with WMI_PDEV_ID_ for values.
  26861. * In non-DBDC case host should set it to 0
  26862. */
  26863. A_UINT32 pdev_id;
  26864. /** CSC switch count value in the last transmitted beacon */
  26865. A_UINT32 current_switch_count;
  26866. /* The TLVs follows this structure:
  26867. * struct wmi_csc_vdev_list vdev_info[]; // IDs of vdevs and their current switch countdown values
  26868. */
  26869. } wmi_pdev_csc_switch_count_status_event_fixed_param;
  26870. /* Operation types for packet routing command */
  26871. typedef enum {
  26872. WMI_PDEV_ADD_PKT_ROUTING,
  26873. WMI_PDEV_DEL_PKT_ROUTING,
  26874. } wmi_pdev_pkt_routing_op_code;
  26875. /* Packet routing types based on specific data types */
  26876. typedef enum {
  26877. WMI_PDEV_ROUTING_TYPE_ARP_IPV4,
  26878. WMI_PDEV_ROUTING_TYPE_NS_IPV6,
  26879. WMI_PDEV_ROUTING_TYPE_IGMP_IPV4,
  26880. WMI_PDEV_ROUTING_TYPE_MLD_IPV6,
  26881. WMI_PDEV_ROUTING_TYPE_DHCP_IPV4,
  26882. WMI_PDEV_ROUTING_TYPE_DHCP_IPV6,
  26883. WMI_PDEV_ROUTING_TYPE_DNS_TCP_IPV4,
  26884. WMI_PDEV_ROUTING_TYPE_DNS_TCP_IPV6,
  26885. WMI_PDEV_ROUTING_TYPE_DNS_UDP_IPV4,
  26886. WMI_PDEV_ROUTING_TYPE_DNS_UDP_IPV6,
  26887. WMI_PDEV_ROUTING_TYPE_ICMP_IPV4,
  26888. WMI_PDEV_ROUTING_TYPE_ICMP_IPV6,
  26889. WMI_PDEV_ROUTING_TYPE_TCP_IPV4,
  26890. WMI_PDEV_ROUTING_TYPE_TCP_IPV6,
  26891. WMI_PDEV_ROUTING_TYPE_UDP_IPV4,
  26892. WMI_PDEV_ROUTING_TYPE_UDP_IPV6,
  26893. WMI_PDEV_ROUTING_TYPE_IPV4,
  26894. WMI_PDEV_ROUTING_TYPE_IPV6,
  26895. WMI_PDEV_ROUTING_TYPE_EAP,
  26896. } wmi_pdev_pkt_routing_type;
  26897. typedef enum {
  26898. WMI_PDEV_WIFIRXCCE_USE_CCE_E = 0,
  26899. WMI_PDEV_WIFIRXCCE_USE_ASPT_E = 1,
  26900. WMI_PDEV_WIFIRXCCE_USE_FT_E = 2,
  26901. WMI_PDEV_WIFIRXCCE_USE_CCE2_E = 3,
  26902. } wmi_pdev_dest_ring_handler_type;
  26903. /* This command shall be sent only when no VDEV is up. If the command is sent after any VDEV is up, target will ignore the command */
  26904. typedef struct {
  26905. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_update_pkt_routing_cmd_fixed_param */
  26906. A_UINT32 tlv_header;
  26907. /** Identifies pdev on which routing needs to be applied */
  26908. A_UINT32 pdev_id;
  26909. /** Indicates the routing operation type: add/delete */
  26910. A_UINT32 op_code; /* wmi_pdev_pkt_routing_op_code */
  26911. /** Bitmap of multiple pkt routing types for a given destination ring and meta data */
  26912. A_UINT32 routing_type_bitmap; /* see wmi_pdev_pkt_routing_type */
  26913. /** 5 bits [4:0] are used to specify the destination ring where the CCE matched
  26914. * packet needs to be routed.
  26915. */
  26916. A_UINT32 dest_ring;
  26917. /** 16 bits [15:0] meta data can be passed to CCE. When the superrule matches,
  26918. * CCE copies this back in RX_MSDU_END_TLV.
  26919. */
  26920. A_UINT32 meta_data;
  26921. /**
  26922. * Indicates the dest ring handler type: CCE, APST, FT, CCE2
  26923. * Refer to wmi_pdev_dest_ring_handler_type / WMI_PDEV_WIFIRXCCE_USE_xxx
  26924. */
  26925. A_UINT32 dest_ring_handler;
  26926. } wmi_pdev_update_pkt_routing_cmd_fixed_param;
  26927. typedef enum {
  26928. WMI_CALIBRATION_NO_FEATURE = 0, /* The board was calibrated with a meta which did not have this feature */
  26929. WMI_CALIBRATION_OK, /* The calibration status is OK */
  26930. WMI_CALIBRATION_NOT_OK, /* The calibration status is NOT OK */
  26931. } WMI_CALIBRATION_STATUS;
  26932. #define WMI_BOARD_MCN_STRING_MAX_SIZE 19
  26933. /**
  26934. * WMI_BOARD_MCN_STRING_BUF_SIZE : represents the number of elements in board_mcn_detail.
  26935. * Since board_mcn_detail is of type A_UINT8, the value of WMI_BOARD_MCN_STRING_BUF_SIZE
  26936. * should be multiple of 4 for alignement reason. And the last byte byte is reserved for
  26937. * null-terminator
  26938. */
  26939. #define WMI_BOARD_MCN_STRING_BUF_SIZE (WMI_BOARD_MCN_STRING_MAX_SIZE+1) /* null-terminator */
  26940. typedef struct {
  26941. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_event_fixed_param */
  26942. A_UINT32 software_cal_version; /* Current software level calibration data version */
  26943. A_UINT32 board_cal_version; /* Calibration data version programmed on chip */
  26944. A_UINT32 cal_status; /* filled with WMI_CALIBRATION_STATUS enum value */
  26945. /* board_mcn_detail:
  26946. * Provides board's MCN (Material Control Number) information for the host
  26947. * to display. This is used to track the Hardware level revisions/versions.
  26948. * This array carries the ASCII values of the MCN to the host. And host
  26949. * would just print this in a string format whenever user requests.
  26950. * Note: On a big-endian host, the 4 bytes within each A_UINT32 portion
  26951. * of a WMI message will be automatically byteswapped by the copy engine
  26952. * as the messages are transferred between host and target, to convert
  26953. * between the target's little-endianness and the host's big-endianness.
  26954. * Consequently, a big-endian host will have to manually unswap the bytes
  26955. * within the board_mcn_detail string buffer to get the bytes back into
  26956. * the desired natural order.
  26957. */
  26958. A_UINT8 board_mcn_detail[WMI_BOARD_MCN_STRING_BUF_SIZE];
  26959. /** pdev_id for identifying the MAC
  26960. * See macros starting with WMI_PDEV_ID_ for values.
  26961. */
  26962. A_UINT32 pdev_id;
  26963. } wmi_pdev_check_cal_version_event_fixed_param;
  26964. typedef struct {
  26965. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_cmd_fixed_param */
  26966. /** pdev_id for identifying the MAC
  26967. * See macros starting with WMI_PDEV_ID_ for values.
  26968. */
  26969. A_UINT32 pdev_id;
  26970. } wmi_pdev_check_cal_version_cmd_fixed_param;
  26971. typedef struct {
  26972. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_diversity_gain_cmd_fixed_param */
  26973. /** Identifies pdev on which diversity gain to be applied */
  26974. A_UINT32 pdev_id;
  26975. /** The number of spatial stream */
  26976. A_UINT32 nss;
  26977. /** The number of gains */
  26978. A_UINT32 num_gains;
  26979. /*
  26980. * This fixed_param TLV is followed by other TLVs:
  26981. * A_UINT8 diversity_gains[num_gains]; (gain is in dB units)
  26982. */
  26983. } wmi_pdev_set_diversity_gain_cmd_fixed_param;
  26984. /* flags for unit_test_event */
  26985. #define WMI_UNIT_TEST_EVENT_FLAG_STATUS 0 /* 0 = success, 1 = fail */
  26986. #define WMI_UNIT_TEST_EVENT_FLAG_DONE 1 /* 0 = not done, 1 = done */
  26987. /* from bit 2 to bit 31 are reserved */
  26988. #define WMI_SET_UNIT_TEST_EVENT_FLAG_STATUS_SUCCESS(flag) do { \
  26989. (flag) |= (1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS); \
  26990. } while (0)
  26991. #define WMI_SET_UNIT_TEST_EVENT_FLAG_STATUS_FAIL(flag) do { \
  26992. (flag) &= ~(1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS); \
  26993. } while (0)
  26994. #define WMI_GET_UNIT_TEST_EVENT_FLAG_STSTUS(flag) \
  26995. ((flag) & (1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS))
  26996. #define WMI_SET_UNIT_TEST_EVENT_FLAG_DONE(flag) do { \
  26997. (flag) |= (1 << WMI_UNIT_TEST_EVENT_FLAG_DONE); \
  26998. } while (0)
  26999. #define WMI_CLR_UNIT_TEST_EVENT_FLAG_DONE(flag) do { \
  27000. (flag) &= ~(1 << WMI_UNIT_TEST_EVENT_FLAG_DONE); \
  27001. } while (0)
  27002. #define WMI_GET_UNIT_TEST_EVENT_FLAG_DONE(flag) \
  27003. ((flag) & (1 << WMI_UNIT_TEST_EVENT_FLAG_DONE))
  27004. typedef struct {
  27005. /* TLV tag and len; tag equals WMI_UNIT_TEST_EVENTID */
  27006. A_UINT32 tlv_header;
  27007. /* unique id identifying the VDEV, generated by the caller */
  27008. A_UINT32 vdev_id;
  27009. /* Identify the wlan module */
  27010. A_UINT32 module_id;
  27011. /* unique id identifying the unit test cmd, generated by the caller */
  27012. A_UINT32 diag_token;
  27013. /* flag for the status of the unit_test_cmd */
  27014. A_UINT32 flag;
  27015. /* data length number of bytes for current dump */
  27016. A_UINT32 payload_len;
  27017. /* TLV/Payload after this structure is sent in little endian
  27018. * format for the length mentioned in this structure.
  27019. * A_UINT8 payload[1];
  27020. */
  27021. } wmi_unit_test_event_fixed_param;
  27022. /* Definition of latency levels */
  27023. typedef enum {
  27024. WMI_WLM_LL_NORMAL = 0x0,
  27025. WMI_WLM_LL_MODERATE = 0x1,
  27026. WMI_WLM_LL_LOW = 0x2,
  27027. WMI_WLM_LL_ULTRA_LOW = 0x3,
  27028. } WMI_WLM_LATENCY_LEVEL;
  27029. /*
  27030. * Lay out of flags in wmi_wlm_config_cmd_fixed_param
  27031. *
  27032. * |31 19| 18 | 17|16 14| 13 | 12| 11 | 10 | 9 | 8 |7 6|5 4|3 2| 1 | 0 |
  27033. * +-----+-----+---+-----+----+---+----+----+-----+----+----+----+----+---+---+
  27034. * | RSVD|SRATE|RTS| NSS |EDCA|TRY|SSLP|CSLP|DBMPS|RSVD|Roam|RSVD|DWLT|DFS|SUP|
  27035. * +------------------------------+---------------+---------+-----------------+
  27036. * | WAL | PS | Roam | Scan |
  27037. *
  27038. * Flag values:
  27039. * TRY: (1) enable short limit for retrying unacked tx, where the limit is
  27040. * based on the traffic's latency level
  27041. * (0) default tx retry behavior
  27042. * EDCA: (1) Apply VO parameters on BE
  27043. * (0) default behavior
  27044. * NSS: (0) no Nss limits, other than those negotiatied during association
  27045. * (1) during 2-chain operation, tx only a single spatial stream
  27046. * (2) - (7) reserved / invalid
  27047. * RTS: (0) default protection
  27048. * (1) always enable RTS/CTS protection
  27049. * SRATE: (0) default secondary rate policy
  27050. * (1) disable secondary rate
  27051. */
  27052. /* bit 0-3 of flags is used for scan operation */
  27053. /* bit 0: Avoid scan request from HLOS if bit is set */
  27054. #define WLM_FLAGS_SCAN_SUPPRESS 1 /* suppress all scan request */
  27055. /* bit 1: WLM_FLAGS_SCAN_SKIP_DFS, skip dfs channel if bit is set */
  27056. #define WLM_FLAGS_SCAN_SKIP_DFS 1 /* skip dfs channel operation */
  27057. /* bit 2-3: define policy of dwell time/duration of each foreign channel
  27058. (b3 b2)
  27059. (0 0 ): Default dwell time
  27060. (0 1 ): WLM_FLAGS_STICK_SCAN_DWELL_TIME : Stick to original active/passive dwell time, but split
  27061. foreign channel dwell times into fitting into min (dl_latency, ul_latency). Note it can increase
  27062. overall scan duration.
  27063. (1 0 ): WLM_FLAGS_SHRINK_SCAN_DWELL_TIME: Shrink active/passive dwell time to
  27064. min(dl_latency, ul_latency, dwell_time). It may reduce overall scan duration, but it may decrease
  27065. the accuracy of scan result.
  27066. (1 1 ): reserved
  27067. */
  27068. #define WLM_FLAGS_DEFAULT_SCAN_DWELL_TIME 0 /* Default scan dwell time */
  27069. #define WLM_FLAGS_STICK_SCAN_DWELL_TIME 1 /* Shrink off channel time but extend overall scan duration */
  27070. #define WLM_FLAGS_SHRINK_SCAN_DWELL_TIME 2 /* Shrink scan off channel time */
  27071. /* bit 4-5: reserved for scan */
  27072. /* bit 6-7 of flags is used for roaming operation */
  27073. /* bit 6-7: define roaming policy:
  27074. (b7 b6)
  27075. (0 0 ): WLM_FLAGS_ROAM_ALLOW: Default behavior, allow roaming in all scenarios
  27076. (0 1 ): WLM_FLAGS_ROAM_SUPPRESS: Disallow all roaming
  27077. (1 0 ): WLM_FLAGS_ALLOW_FINAL_BMISS_ROAM: Allow final bmiss roaming only
  27078. (1 1 ): reserved
  27079. */
  27080. #define WLM_FLAGS_ROAM_ALLOW 0
  27081. #define WLM_FLAGS_ROAM_SUPPRESS 1
  27082. #define WLM_FLAGS_ALLOW_FINAL_BMISS_ROAM 2
  27083. /* bit 8: reserved for roaming */
  27084. /* bit 9-11 of flags is used for powersave operation */
  27085. /* bit 9: WLM_FLAGS_PS_DISABLE_BMPS, disable BMPS if bit is set */
  27086. #define WLM_FLAGS_PS_DISABLE_BMPS 1 /* disable BMPS */
  27087. /* bit 10: WLM_FLAGS_PS_DISABLE_CSS_COLLAPSE, disable css power collapse if bit is set */
  27088. #define WLM_FLAGS_PS_DISABLE_CSS_COLLAPSE 1 /* disable css power collapse */
  27089. /* bit 11: WLM_FLAGS_PS_DISABLE_SYS_SLEEP, disable sys sleep if bit is set */
  27090. #define WLM_FLAGS_PS_DISABLE_SYS_SLEEP 1 /* disable sys sleep */
  27091. /* bit 17-31 of flags is reserved for powersave and WAL */
  27092. #define WLM_FLAGS_SCAN_IS_SUPPRESS(flag) WMI_GET_BITS(flag, 0, 1)
  27093. #define WLM_FLAGS_SCAN_SET_SUPPRESS(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  27094. #define WLM_FLAGS_SCAN_IS_SKIP_DFS(flag) WMI_GET_BITS(flag, 1, 1)
  27095. #define WLM_FLAGS_SCAN_SET_SKIP_DFS(flag, val) WMI_SET_BITS(flag, 1, 1, val)
  27096. #define WLM_FLAGS_SCAN_GET_DWELL_TIME_POLICY(flag) WMI_GET_BITS(flag, 2, 2)
  27097. #define WLM_FLAGS_SCAN_SET_DWELL_TIME_POLICY(flag, val) WMI_SET_BITS(flag, 2, 2, val)
  27098. #define WLM_FLAGS_TSF_LATENCY_COMPENSATE_ENABLED_GET(flag) WMI_GET_BITS(flag, 4, 1)
  27099. #define WLM_FLAGS_TSF_LATENCY_COMPENSATE_ENABLED_SET(flag) WMI_SET_BITS(flag, 4, 1, val)
  27100. #define WLM_FLAGS_ROAM_GET_POLICY(flag) WMI_GET_BITS(flag, 6, 2)
  27101. #define WLM_FLAGS_ROAM_SET_POLICY(flag, val) WMI_SET_BITS(flag, 6, 2, val)
  27102. #define WLM_FLAGS_PS_IS_BMPS_DISABLED(flag) WMI_GET_BITS(flag, 9, 1)
  27103. #define WLM_FLAGS_PS_IS_CSS_CLPS_DISABLED(flag) WMI_GET_BITS(flag, 10, 1)
  27104. #define WLM_FLAGS_PS_SET_CSS_CLPS_DISABLE(flag, val) WMI_SET_BITS(flag, 10, 1, val)
  27105. #define WLM_FLAGS_PS_IS_SYS_SLP_DISABLED(flag) WMI_GET_BITS(flag, 11, 1)
  27106. #define WLM_FLAGS_PS_SET_SYS_SLP_DISABLE(flag, val) WMI_SET_BITS(flag, 11, 1, val)
  27107. #define WLM_FLAGS_WAL_LIMIT_TRY_ENABLED(flag) WMI_GET_BITS(flag, 12, 1)
  27108. #define WLM_FLAGS_WAL_LIMIT_TRY_SET(flag, val) WMI_SET_BITS(flag, 12, 1, val)
  27109. #define WLM_FLAGS_WAL_ADJUST_EDCA_ENABLED(flag) WMI_GET_BITS(flag, 13, 1)
  27110. #define WLM_FLAGS_WAL_ADJUST_EDCA_SET(flag, val) WMI_SET_BITS(flag, 13, 1, val)
  27111. #define WLM_FLAGS_WAL_1NSS_ENABLED(flag) (WMI_GET_BITS(flag, 14, 3) & 0x1)
  27112. #define WLM_FLAGS_WAL_NSS_SET(flag, val) WMI_SET_BITS(flag, 14, 3, val)
  27113. #define WLM_FLAGS_WAL_ALWAYS_RTS_PROTECTION(flag) WMI_GET_BITS(flag, 17, 1)
  27114. #define WLM_FLAGS_WAL_RTS_PROTECTION_SET(flag, val) WMI_SET_BITS(flag, 17, 1, val)
  27115. #define WLM_FLAGS_WAL_DISABLE_SECONDARY_RATE(flag) WMI_GET_BITS(flag, 18, 1)
  27116. #define WLM_FLAGS_WAL_SECONDARY_RATE_SET(flag, val) WMI_SET_BITS(flag, 18, 1, val)
  27117. #define WLM_FLAGS_PS_IS_PCIE_L11_ENABLED(flag) WMI_GET_BITS(flag, 19, 1)
  27118. #define WLM_FLAGS_PS_SET_PCIE_L11_ENABLE(flag, val) WMI_SET_BITS(flag, 19, 1, val)
  27119. #define WLM_FLAGS_PS_IS_PHYRF_PS_ENABLED(flag) WMI_GET_BITS(flag, 20, 1)
  27120. #define WLM_FLAGS_PS_SET_PHYRF_PS_ENABLE(flag, val) WMI_SET_BITS(flag, 20, 1, val)
  27121. #define WLM_FLAGS_SCAN_IS_SPLIT_PAS_CH_ENABLED(flag) WMI_GET_BITS(flag, 21, 1)
  27122. #define WLM_FLAGS_SCAN_SET_SPLIT_PAS_CH_ENABLE(flag, val) WMI_SET_BITS(flag, 21, 1, val)
  27123. #define WLM_FLAGS_SCAN_IS_ADAPT_SCAN_ENABLED(flag) WMI_GET_BITS(flag, 22, 1)
  27124. #define WLM_FLAGS_SCAN_SET_ADAPT_SCAN_ENABLE(flag, val) WMI_SET_BITS(flag, 22, 1, val)
  27125. typedef struct {
  27126. /** TLV tag and len; tag equals
  27127. * WMI_WLM_CONFIG_CMD_fixed_param */
  27128. A_UINT32 tlv_header;
  27129. /* VDEV identifier */
  27130. A_UINT32 vdev_id;
  27131. /* Refer to WMI_WLM_LATENCY_LEVEL
  27132. * Once latency change detected, WLM will notify modules e.g. STAPS or SCAN/ROAM,
  27133. * who subscribed this event. And subscribers, like SCAN, may disable/cutoff offchan
  27134. * operation to support lower latency of WLAN.
  27135. */
  27136. A_UINT32 latency_level;
  27137. /* represent uplink latency in ms
  27138. * This parameter will be used by STAPS module to decide timing parameters, like
  27139. * ITO or SPEC wakeup interval. For SCAN/ROAM, it may used to calculate offchan
  27140. * durations.
  27141. */
  27142. A_UINT32 ul_latency;
  27143. /* represent downlink latency in ms
  27144. * Similar usage as ul_latency
  27145. */
  27146. A_UINT32 dl_latency;
  27147. /* flags for each client of WLM, refer to WLM_FLAGS_ definitions above */
  27148. A_UINT32 flags;
  27149. } wmi_wlm_config_cmd_fixed_param;
  27150. /* Broadcast TWT enable/disable for both REQUESTER and RESPONDER */
  27151. #define TWT_EN_DIS_FLAGS_GET_BTWT(flag) WMI_GET_BITS(flag, 0, 1)
  27152. #define TWT_EN_DIS_FLAGS_SET_BTWT(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  27153. /* legacy MBSSID enable/disable */
  27154. #define TWT_EN_DIS_FLAGS_GET_L_MBSSID(flag) WMI_GET_BITS(flag, 1, 1)
  27155. #define TWT_EN_DIS_FLAGS_SET_L_MBSSID(flag, val) WMI_SET_BITS(flag, 1, 1, val)
  27156. /* 11ax MBSSID enable/disable */
  27157. #define TWT_EN_DIS_FLAGS_GET_AX_MBSSID(flag) WMI_GET_BITS(flag, 2, 1)
  27158. #define TWT_EN_DIS_FLAGS_SET_AX_MBSSID(flag, val) WMI_SET_BITS(flag, 2, 1, val)
  27159. /* Configuration of TWT Modes,
  27160. * If this BIT is set BIT4/5 will be used in FW, else BIT4/5 will be ignored.
  27161. * Which means when we receive WMI_TWT_ENABLE_CMDID command from host,
  27162. * without BIT3 set we will enable both REQUESTER/RESPONDER.
  27163. *
  27164. * Same interpretation is used in WMI_TWT_DISABLE_CMDID, if BIT3 is not set
  27165. * we will disable both REQUESTER and RESPONDER.
  27166. */
  27167. #define TWT_EN_DIS_FLAGS_GET_SPLIT_CONFIG(flag) WMI_GET_BITS(flag, 3, 1)
  27168. #define TWT_EN_DIS_FLAGS_SET_SPLIT_CONFIG(flag, val) WMI_SET_BITS(flag, 3, 1, val)
  27169. /*
  27170. * The flags are used both in WMI_TWT_ENABLE_CMDID and WMI_TWT_DISABLE_CMDID.
  27171. *
  27172. * BIT4 represents whether the it is for REQUESTER or RESPONDER.
  27173. * BIT5 represents whether it is invidual or broadcast mode.
  27174. *
  27175. * For instance, in WMI_TWT_ENABLE_CMDID if BIT4=0 and BIT5=0, then we will
  27176. * enable only Requester, we will not change any configuration of RESPONDER.
  27177. *
  27178. * Same way in WMI_TWT_DISABLE_CMDID if BIT4=0 and BIT5=0, then we will only
  27179. * disable Individual and Broadcast REQUESTER, we will not alter any RESPONDER
  27180. * configuration.
  27181. *
  27182. * If host is enabling or disabling both REQUESTER and RESPONDER host will
  27183. * send two WMI commands, one for REQUESTER and one for RESPONDER.
  27184. *
  27185. * WMI_TWT_ENABLE_CMDID command flags description,
  27186. * |----------------------------------------------------------------------|
  27187. * |BIT4=0, BIT5=0 | Enable Individual TWT requester |
  27188. * |----------------------------------------------------------------------|
  27189. * |BIT4=0, BIT5=1 | Enable both Individual and Broadcast TWT requester |
  27190. * |----------------------------------------------------------------------|
  27191. * |BIT4=1, BIT5=0 | Enable Individual TWT responder |
  27192. * |----------------------------------------------------------------------|
  27193. * |BIT4=1, BIT5=1 | Enable both Individual and Broadcast TWT responder |
  27194. * |----------------------------------------------------------------------|
  27195. *
  27196. *
  27197. * WMI_TWT_DISABLE_CMDID command flags description,
  27198. * |----------------------------------------------------------------------|
  27199. * |BIT4=0, BIT5=0 | Disable both Individual and Broadcast TWT requester |
  27200. * |----------------------------------------------------------------------|
  27201. * |BIT4=0, BIT5=1 | Disable Broadcast TWT requester |
  27202. * |----------------------------------------------------------------------|
  27203. * |BIT4=1, BIT5=0 | Disable both Individual and broadcast TWT responder |
  27204. * |----------------------------------------------------------------------|
  27205. * |BIT4=1, BIT5=1 | Disable Broadcast TWT responder |
  27206. * |----------------------------------------------------------------------|
  27207. *
  27208. * If user has enabled only individual requester at any point and after
  27209. * sometime if user wants to enable broadcast requester then user cannot
  27210. * directly send another WMI_TWT_ENABLE_CMDID with broadcast configuration,
  27211. * user has to disable TWT requester first and then enable both individual
  27212. * requester and broadcast requester. Same way for RESPONDER.
  27213. *
  27214. */
  27215. #define TWT_EN_DIS_FLAGS_GET_REQ_RESP(flag) WMI_GET_BITS(flag, 4, 1)
  27216. #define TWT_EN_DIS_FLAGS_SET_REQ_RESP(flag, val) WMI_SET_BITS(flag, 4, 1, val)
  27217. #define TWT_EN_DIS_FLAGS_GET_I_B_TWT(flag) WMI_GET_BITS(flag, 5, 1)
  27218. #define TWT_EN_DIS_FLAGS_SET_I_B_TWT(flag, val) WMI_SET_BITS(flag, 5, 1, val)
  27219. typedef struct {
  27220. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_enable_cmd_fixed_param */
  27221. /** 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
  27222. */
  27223. A_UINT32 pdev_id;
  27224. A_UINT32 sta_cong_timer_ms; /* STA TWT congestion timer TO value in terms of ms */
  27225. A_UINT32 mbss_support; /* Reserved */
  27226. A_UINT32 default_slot_size; /* This is the default value for the TWT slot setup by AP (units = microseconds) */
  27227. A_UINT32 congestion_thresh_setup; /* Minimum congestion required to start setting up TWT sessions */
  27228. /*
  27229. * The congestion parameters below are in percent of occupied airtime.
  27230. */
  27231. A_UINT32 congestion_thresh_teardown; /* Minimum congestion below which TWT will be torn down */
  27232. A_UINT32 congestion_thresh_critical; /* Threshold above which TWT will not be active */
  27233. /*
  27234. * The interference parameters below use an abstract method of evaluating
  27235. * interference. The parameters are in percent, ranging from 0 for no
  27236. * interference, to 100 for interference extreme enough to completely
  27237. * block the signal of interest.
  27238. */
  27239. A_UINT32 interference_thresh_teardown; /* Minimum interference above that TWT will not be active */
  27240. A_UINT32 interference_thresh_setup; /* Minimum interference below that TWT session can be setup */
  27241. A_UINT32 min_no_sta_setup; /* Minimum no of STA required to start TWT setup */
  27242. A_UINT32 min_no_sta_teardown; /* Minimum no of STA below which TWT will be torn down */
  27243. A_UINT32 no_of_bcast_mcast_slots; /* Number of default slot sizes reserved for BCAST/MCAST delivery */
  27244. A_UINT32 min_no_twt_slots; /* Minimum no of available slots for TWT to be operational */
  27245. 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) */
  27246. /*
  27247. * The below interval parameters have units of milliseconds.
  27248. */
  27249. A_UINT32 mode_check_interval; /* Interval between two successive check to decide the mode of TWT */
  27250. A_UINT32 add_sta_slot_interval; /* Interval between decisions making to create TWT slots for STAs */
  27251. A_UINT32 remove_sta_slot_interval; /* Interval between decisions making to remove TWT slot of STAs */
  27252. A_UINT32 flags; /* enable/disable flags, refer to MACROs TWT_EN_DIS_FLAGS_* (TWT_EN_DIS_FLAGS_GET_BTWT etc.) */
  27253. } wmi_twt_enable_cmd_fixed_param;
  27254. /* status code of enabling TWT */
  27255. typedef enum _WMI_ENABLE_TWT_STATUS_T {
  27256. WMI_ENABLE_TWT_STATUS_OK, /* enabling TWT successfully completed */
  27257. WMI_ENABLE_TWT_STATUS_ALREADY_ENABLED, /* TWT already enabled */
  27258. WMI_ENABLE_TWT_STATUS_NOT_READY, /* FW not ready for enabling TWT */
  27259. WMI_ENABLE_TWT_INVALID_PARAM, /* invalid parameters */
  27260. WMI_ENABLE_TWT_STATUS_UNKNOWN_ERROR, /* enabling TWT failed with an unknown reason */
  27261. } WMI_ENABLE_TWT_STATUS_T;
  27262. typedef struct {
  27263. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_enable_complete_event_fixed_param */
  27264. /** 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 */
  27265. A_UINT32 pdev_id;
  27266. A_UINT32 status; /* WMI_ENABLE_TWT_STATUS_T */
  27267. } wmi_twt_enable_complete_event_fixed_param;
  27268. typedef struct {
  27269. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_disable_cmd_fixed_param */
  27270. /** 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 */
  27271. A_UINT32 pdev_id; /* host should never set it to WMI_PDEV_ID_SOC */
  27272. A_UINT32 flags; /* enable/disable flags, refer to MACROs TWT_EN_DIS_FLAGS_* (TWT_EN_DIS_FLAGS_GET_BTWT etc.) */
  27273. } wmi_twt_disable_cmd_fixed_param;
  27274. typedef struct {
  27275. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_disable_complete_event_fixed_param */
  27276. A_UINT32 pdev_id;
  27277. A_UINT32 status; /* refer to WMI_DISABLE_TWT_STATUS_T enum */
  27278. } wmi_twt_disable_complete_event_fixed_param;
  27279. /* status code of TWT Disable */
  27280. typedef enum _WMI_DISABLE_TWT_STATUS_T {
  27281. WMI_DISABLE_TWT_STATUS_OK, /* Disabling TWT successfully completed */
  27282. WMI_DISABLE_TWT_STATUS_ROAM_IN_PROGRESS, /* Roaming in progress */
  27283. WMI_DISABLE_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
  27284. WMI_DISABLE_TWT_STATUS_SCAN_IN_PROGRESS, /* Scan in progress */
  27285. } WMI_DISABLE_TWT_STATUS_T;
  27286. typedef struct {
  27287. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_notify_event_fixed_param */
  27288. A_UINT32 vdev_id; /* vdev id of TWT notify event */
  27289. } wmi_twt_notify_event_fixed_param;
  27290. /* from IEEE 802.11ah section 9.4.2.200 */
  27291. typedef enum _WMI_TWT_COMMAND_T {
  27292. WMI_TWT_COMMAND_REQUEST_TWT = 0,
  27293. WMI_TWT_COMMAND_SUGGEST_TWT = 1,
  27294. WMI_TWT_COMMAND_DEMAND_TWT = 2,
  27295. WMI_TWT_COMMAND_TWT_GROUPING = 3,
  27296. WMI_TWT_COMMAND_ACCEPT_TWT = 4,
  27297. WMI_TWT_COMMAND_ALTERNATE_TWT = 5,
  27298. WMI_TWT_COMMAND_DICTATE_TWT = 6,
  27299. WMI_TWT_COMMAND_REJECT_TWT = 7,
  27300. } WMI_TWT_COMMAND_T;
  27301. /* TWT command, refer to WMI_TWT_COMMAND_T */
  27302. #define TWT_FLAGS_GET_CMD(flag) WMI_GET_BITS(flag, 0, 8)
  27303. #define TWT_FLAGS_SET_CMD(flag, val) WMI_SET_BITS(flag, 0, 8, val)
  27304. /* 0 means Individual TWT, 1 means Broadcast TWT */
  27305. #define TWT_FLAGS_GET_BROADCAST(flag) WMI_GET_BITS(flag, 8, 1)
  27306. #define TWT_FLAGS_SET_BROADCAST(flag, val) WMI_SET_BITS(flag, 8, 1, val)
  27307. /* 0 means non-Trigger-enabled TWT, 1 means means Trigger-enabled TWT */
  27308. #define TWT_FLAGS_GET_TRIGGER(flag) WMI_GET_BITS(flag, 9, 1)
  27309. #define TWT_FLAGS_SET_TRIGGER(flag, val) WMI_SET_BITS(flag, 9, 1, val)
  27310. /* flow type 0 means announced TWT, 1 means un-announced TWT */
  27311. #define TWT_FLAGS_GET_FLOW_TYPE(flag) WMI_GET_BITS(flag, 10, 1)
  27312. #define TWT_FLAGS_SET_FLOW_TYPE(flag, val) WMI_SET_BITS(flag, 10, 1, val)
  27313. /* 0 means TWT protection is required, 1 means TWT protection is not required */
  27314. #define TWT_FLAGS_GET_PROTECTION(flag) WMI_GET_BITS(flag, 11, 1)
  27315. #define TWT_FLAGS_SET_PROTECTION(flag, val) WMI_SET_BITS(flag, 11, 1, val)
  27316. /* B-TWT ID 0: 0 means non-0 B-TWT ID or I-TWT, 1 means B-TWT ID 0 */
  27317. #define TWT_FLAGS_GET_BTWT_ID0(flag) WMI_GET_BITS(flag, 12, 1)
  27318. #define TWT_FLAGS_SET_BTWT_ID0(flag, val) WMI_SET_BITS(flag, 12, 1, val)
  27319. /* 0 means TWT Information frame is enabled, 1 means TWT Information frame is disabled */
  27320. #define TWT_FLAGS_GET_TWT_INFO_FRAME_DISABLED(flag) WMI_GET_BITS(flag, 13, 1)
  27321. #define TWT_FLAGS_SET_TWT_INFO_FRAME_DISABLED(flag, val) WMI_SET_BITS(flag, 13, 1, val)
  27322. /*
  27323. * 1 means PM_RESPONDER_MODE information sent in BIT15 is valid, 0 means it is not valid.
  27324. * Will be used for backward compatibility if host uses older FW versions
  27325. * then value will be 0 so host will not consider the BIT15 value.
  27326. */
  27327. #define TWT_FLAGS_GET_PM_RESPONDER_MODE_VALID(flag) WMI_GET_BITS(flag, 14, 1)
  27328. #define TWT_FLAGS_SET_PM_RESPONDER_MODE_VALID(flag, val) WMI_SET_BITS(flag, 14, 1, val)
  27329. /* 1 means PM_RESPONDER_MODE supported, 0 means not supported */
  27330. #define TWT_FLAGS_GET_PM_RESPONDER_MODE(flag) WMI_GET_BITS(flag, 15, 1)
  27331. #define TWT_FLAGS_SET_PM_RESPONDER_MODE(flag, val) WMI_SET_BITS(flag, 15, 1, val)
  27332. typedef struct {
  27333. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_ack_event_fixed_param */
  27334. A_UINT32 vdev_id; /* VDEV identifier */
  27335. wmi_mac_addr peer_macaddr; /* peer MAC address */
  27336. A_UINT32 dialog_id; /* TWT dialog ID */
  27337. A_UINT32 twt_cmd; /* TWT command for which this ack is sent */
  27338. A_UINT32 status; /* Status code corresponding to twt_cmd.
  27339. * This status field contains a value from the
  27340. * status enum corresponding to the twt_cmd type
  27341. * (WMI_ADD_TWT_STATUS_T, WMI_DEL_TWT_STATUS_T,
  27342. * WMI_PAUSE_TWT_STATUS_T, etc.)
  27343. */
  27344. } wmi_twt_ack_event_fixed_param;
  27345. typedef struct {
  27346. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_cmd_fixed_param */
  27347. A_UINT32 vdev_id; /* VDEV identifier */
  27348. wmi_mac_addr peer_macaddr; /* peer MAC address */
  27349. A_UINT32 dialog_id; /* TWT dialog_id (< 0xFF) is per peer, I-TWT & B-TWT use different diaglog ID */
  27350. /* 1. wake_intvl_mantis must be <= 0xFFFF
  27351. * 2. wake_intvl_us must be divided evenly by wake_intvl_mantis,
  27352. * i.e., wake_intvl_us % wake_intvl_mantis == 0
  27353. * 3. the quotient of wake_intvl_us/wake_intvl_mantis must be 2 to N-th(0<=N<=31) power,
  27354. * i.e., wake_intvl_us/wake_intvl_mantis == 2^N, 0<=N<=31
  27355. */
  27356. A_UINT32 wake_intvl_us; /* TWT Wake Interval in units of us */
  27357. A_UINT32 wake_intvl_mantis; /* TWT Wake Interval Mantissa */
  27358. /* wake_dura_us must be divided evenly by 256, i.e., wake_dura_us % 256 == 0 */
  27359. A_UINT32 wake_dura_us; /* TWT Wake Duration in units of us, must be <= 65280 (0xFF00) */
  27360. A_UINT32 sp_offset_us; /* this long time after TWT setup the 1st SP will start */
  27361. A_UINT32 flags; /* TWT flags, refer to MACROs TWT_FLAGS_*(TWT_FLAGS_GET_CMD etc) */
  27362. /* Broadcast TWT(B-TWT) Persistence, when used in Add/update Dialog,
  27363. * indicates for how long(in units of TBTTs) current B-TWT session
  27364. * parameters will not be changed.
  27365. * Refer to 11ax spec session "9.4.2.199 TWT element" for more info.
  27366. */
  27367. A_UINT32 b_twt_persistence;
  27368. /* Broadcast TWT(B-TWT) Recommendation, refer to section
  27369. * "9.4.2.199 TWT element" of latest 11ax draft
  27370. */
  27371. A_UINT32 b_twt_recommendation;
  27372. /* Min tolerance limit of wake interval.
  27373. * If this variable is set to 0 by host, FW will ignore it.
  27374. */
  27375. A_UINT32 min_wake_intvl_us;
  27376. /* Max tolerance limit of wake interval.
  27377. * If this variable is set to 0 by host, FW will ignore it.
  27378. */
  27379. A_UINT32 max_wake_intvl_us;
  27380. /* Min tolerance limit of wake duration.
  27381. * If this variable is set to 0 by host, FW will ignore it.
  27382. */
  27383. A_UINT32 min_wake_dura_us;
  27384. /* Max tolerance limit of wake duration.
  27385. * If this variable is set to 0 by host, FW will ignore it.
  27386. */
  27387. A_UINT32 max_wake_dura_us;
  27388. /*
  27389. * Service period start TSF (absolute)
  27390. * If sp_start_tsf_lo == sp_start_tsf_hi == 0, the specification
  27391. * is invalid, and shall be ignored.
  27392. */
  27393. A_UINT32 sp_start_tsf_lo; /* bits 31:0 */
  27394. A_UINT32 sp_start_tsf_hi; /* bits 63:32 */
  27395. } wmi_twt_add_dialog_cmd_fixed_param;
  27396. /* status code of adding TWT dialog */
  27397. typedef enum _WMI_ADD_TWT_STATUS_T {
  27398. WMI_ADD_TWT_STATUS_OK, /* adding TWT dialog successfully completed */
  27399. WMI_ADD_TWT_STATUS_TWT_NOT_ENABLED, /* TWT not enabled */
  27400. WMI_ADD_TWT_STATUS_USED_DIALOG_ID, /* TWT dialog ID is already used */
  27401. WMI_ADD_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  27402. WMI_ADD_TWT_STATUS_NOT_READY, /* FW not ready */
  27403. WMI_ADD_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  27404. WMI_ADD_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  27405. WMI_ADD_TWT_STATUS_NO_RESPONSE, /* peer AP did not send the response frame */
  27406. WMI_ADD_TWT_STATUS_DENIED, /* AP did not accept the request */
  27407. WMI_ADD_TWT_STATUS_UNKNOWN_ERROR, /* adding TWT dialog failed with an unknown reason */
  27408. WMI_ADD_TWT_STATUS_AP_PARAMS_NOT_IN_RANGE, /* peer AP wake interval, duration not in range */
  27409. WMI_ADD_TWT_STATUS_AP_IE_VALIDATION_FAILED, /* peer AP IE Validation Failed */
  27410. WMI_ADD_TWT_STATUS_ROAM_IN_PROGRESS, /* Roaming in progress */
  27411. WMI_ADD_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
  27412. WMI_ADD_TWT_STATUS_SCAN_IN_PROGRESS, /* Scan in progress */
  27413. WMI_ADD_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  27414. } WMI_ADD_TWT_STATUS_T;
  27415. typedef struct {
  27416. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_additional_params */
  27417. A_UINT32 flags; /* TWT flags, refer to MACROs TWT_FLAGS_*(TWT_FLAGS_GET_CMD etc) */
  27418. A_UINT32 wake_dur_us; /* Wake duration in uS */
  27419. A_UINT32 wake_intvl_us; /* Wake Interval in uS */
  27420. A_UINT32 sp_offset_us; /* SP Starting Offset */
  27421. A_UINT32 sp_tsf_us_lo; /* SP start TSF bits 31:0 */
  27422. A_UINT32 sp_tsf_us_hi; /* SP start TSF bits 63:32 */
  27423. } wmi_twt_add_dialog_additional_params;
  27424. typedef struct {
  27425. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_complete_event_fixed_param */
  27426. A_UINT32 vdev_id; /* VDEV identifier */
  27427. wmi_mac_addr peer_macaddr; /* peer MAC address */
  27428. A_UINT32 dialog_id; /* TWT dialog ID */
  27429. A_UINT32 status; /* refer to WMI_ADD_TWT_STATUS_T */
  27430. /*
  27431. * This fixed_param TLV is followed by the below TLVs:
  27432. * wmi_twt_add_dialog_additional_params twt_params[]; // TWT params received
  27433. * // from peer
  27434. */
  27435. } wmi_twt_add_dialog_complete_event_fixed_param;
  27436. typedef struct {
  27437. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_del_dialog_cmd_fixed_param */
  27438. A_UINT32 vdev_id; /* VDEV identifier */
  27439. wmi_mac_addr peer_macaddr; /* peer MAC address */
  27440. A_UINT32 dialog_id; /* TWT dialog ID */
  27441. /* Broadcast TWT(B-TWT) Persistence, when used in Del Dialog,
  27442. * indicates for how long(in units of TBTTs) current B-TWT session
  27443. * parameters will be present.
  27444. * Refer to 11ax spec session "9.4.2.199 TWT element" for more info.
  27445. */
  27446. A_UINT32 b_twt_persistence;
  27447. A_UINT32 is_bcast_twt;
  27448. } wmi_twt_del_dialog_cmd_fixed_param;
  27449. /* status code of deleting TWT dialog */
  27450. typedef enum _WMI_DEL_TWT_STATUS_T {
  27451. WMI_DEL_TWT_STATUS_OK, /* deleting TWT dialog successfully completed */
  27452. WMI_DEL_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  27453. WMI_DEL_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  27454. WMI_DEL_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  27455. WMI_DEL_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  27456. WMI_DEL_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  27457. WMI_DEL_TWT_STATUS_UNKNOWN_ERROR, /* deleting TWT dialog failed with an unknown reason */
  27458. WMI_DEL_TWT_STATUS_PEER_INIT_TEARDOWN, /* Peer Initiated Teardown */
  27459. WMI_DEL_TWT_STATUS_ROAMING, /* Reason Roaming Start*/
  27460. WMI_DEL_TWT_STATUS_CONCURRENCY, /* Teardown due to concurrency */
  27461. WMI_DEL_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
  27462. WMI_DEL_TWT_STATUS_SCAN_IN_PROGRESS, /* Reason Scan in progress */
  27463. } WMI_DEL_TWT_STATUS_T;
  27464. typedef struct {
  27465. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_del_dialog_complete_event_fixed_param */
  27466. A_UINT32 vdev_id; /* VDEV identifier */
  27467. wmi_mac_addr peer_macaddr; /* peer MAC address */
  27468. A_UINT32 dialog_id; /* TWT dialog ID */
  27469. A_UINT32 status; /* refer to WMI_DEL_TWT_STATUS_T */
  27470. } wmi_twt_del_dialog_complete_event_fixed_param;
  27471. typedef struct {
  27472. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_pause_dialog_cmd_fixed_param */
  27473. A_UINT32 vdev_id; /* VDEV identifier */
  27474. wmi_mac_addr peer_macaddr; /* peer MAC address */
  27475. A_UINT32 dialog_id; /* TWT dialog ID */
  27476. } wmi_twt_pause_dialog_cmd_fixed_param;
  27477. /* status code of pausing TWT dialog */
  27478. typedef enum _WMI_PAUSE_TWT_STATUS_T {
  27479. WMI_PAUSE_TWT_STATUS_OK, /* pausing TWT dialog successfully completed */
  27480. WMI_PAUSE_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  27481. WMI_PAUSE_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  27482. WMI_PAUSE_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  27483. WMI_PAUSE_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  27484. WMI_PAUSE_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  27485. WMI_PAUSE_TWT_STATUS_UNKNOWN_ERROR, /* pausing TWT dialog failed with an unknown reason */
  27486. WMI_PAUSE_TWT_STATUS_ALREADY_PAUSED, /* The TWT dialog is already paused */
  27487. WMI_PAUSE_TWT_STATUS_TWT_INFO_FRM_NOT_SUPPORTED, /* TWT information frame is not supported by AP */
  27488. WMI_PAUSE_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
  27489. WMI_PAUSE_TWT_STATUS_ROAM_IN_PROGRESS, /* Roam in progress */
  27490. WMI_PAUSE_TWT_STATUS_SCAN_IN_PROGRESS, /* Scan in progress */
  27491. } WMI_PAUSE_TWT_STATUS_T;
  27492. typedef struct {
  27493. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_pause_dialog_complete_event_fixed_param */
  27494. A_UINT32 vdev_id; /* VDEV identifier */
  27495. wmi_mac_addr peer_macaddr; /* peer MAC address */
  27496. A_UINT32 dialog_id; /* TWT dialog ID */
  27497. A_UINT32 status; /* refer to WMI_PAUSE_TWT_STATUS_T */
  27498. } wmi_twt_pause_dialog_complete_event_fixed_param;
  27499. typedef struct {
  27500. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_resume_dialog_cmd_fixed_param */
  27501. A_UINT32 vdev_id; /* VDEV identifier */
  27502. wmi_mac_addr peer_macaddr; /* peer MAC address */
  27503. A_UINT32 dialog_id; /* TWT dialog ID */
  27504. A_UINT32 sp_offset_us; /* this long time after TWT resumed the 1st SP will start */
  27505. A_UINT32 next_twt_size; /* Next TWT subfield Size, refer to IEEE 802.11ax section "9.4.1.60 TWT Information field" */
  27506. } wmi_twt_resume_dialog_cmd_fixed_param;
  27507. /* status code of resuming TWT dialog */
  27508. typedef enum _WMI_RESUME_TWT_STATUS_T {
  27509. WMI_RESUME_TWT_STATUS_OK, /* resuming TWT dialog successfully completed */
  27510. WMI_RESUME_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  27511. WMI_RESUME_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  27512. WMI_RESUME_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  27513. WMI_RESUME_TWT_STATUS_NOT_PAUSED, /* dialog not paused currently */
  27514. WMI_RESUME_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  27515. WMI_RESUME_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  27516. WMI_RESUME_TWT_STATUS_UNKNOWN_ERROR, /* resuming TWT dialog failed with an unknown reason */
  27517. WMI_RESUME_TWT_STATUS_TWT_INFO_FRM_NOT_SUPPORTED, /* TWT information frame is not supported by AP */
  27518. WMI_RESUME_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
  27519. WMI_RESUME_TWT_STATUS_ROAM_IN_PROGRESS, /* Roam in progress */
  27520. WMI_RESUME_TWT_STATUS_SCAN_IN_PROGRESS, /* Scan in progress */
  27521. } WMI_RESUME_TWT_STATUS_T;
  27522. typedef struct {
  27523. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_resume_dialog_complete_event_fixed_param */
  27524. A_UINT32 vdev_id; /* VDEV identifier */
  27525. wmi_mac_addr peer_macaddr; /* peer MAC address */
  27526. A_UINT32 dialog_id; /* TWT dialog ID */
  27527. A_UINT32 status; /* refer to WMI_RESUME_TWT_STATUS_T */
  27528. } wmi_twt_resume_dialog_complete_event_fixed_param;
  27529. typedef struct {
  27530. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_nudge_dialog_cmd_fixed_param */
  27531. A_UINT32 vdev_id; /* VDEV identifier */
  27532. wmi_mac_addr peer_macaddr; /* peer MAC address */
  27533. A_UINT32 dialog_id; /* TWT dialog ID */
  27534. A_UINT32 suspend_duration_ms; /* this long time after TWT paused the 1st SP will start (millisecond) */
  27535. A_UINT32 next_twt_size; /* Next TWT subfield Size, refer to IEEE 802.11ax section "9.4.1.60 TWT Information field" */
  27536. } wmi_twt_nudge_dialog_cmd_fixed_param;
  27537. /* status code of nudging TWT dialog */
  27538. typedef enum _WMI_TWT_NUDGE_STATUS_T {
  27539. WMI_NUDGE_TWT_STATUS_OK, /* nudging TWT dialog successfully completed */
  27540. WMI_NUDGE_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID doesn't exist */
  27541. WMI_NUDGE_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  27542. WMI_NUDGE_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  27543. WMI_NUDGE_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  27544. WMI_NUDGE_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  27545. WMI_NUDGE_TWT_STATUS_UNKNOWN_ERROR, /* nudging TWT dialog failed with an unknown reason */
  27546. WMI_NUDGE_TWT_STATUS_ALREADY_PAUSED, /* The TWT dialog is already paused */
  27547. WMI_NUDGE_TWT_STATUS_TWT_INFO_FRM_NOT_SUPPORTED, /* TWT information frame is not supported by AP */
  27548. WMI_NUDGE_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
  27549. WMI_NUDGE_TWT_STATUS_ROAM_IN_PROGRESS, /* Roam in progress */
  27550. WMI_NUDGE_TWT_STATUS_SCAN_IN_PROGRESS, /* Scan in progress */
  27551. } WMI_TWT_NUDGE_STATUS_T;
  27552. typedef struct {
  27553. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_nudge_dialog_complete_event_fixed_param */
  27554. A_UINT32 vdev_id; /* VDEV identifier */
  27555. wmi_mac_addr peer_macaddr; /* peer MAC address */
  27556. A_UINT32 dialog_id; /* TWT dialog ID */
  27557. A_UINT32 status; /* refer to WMI_NUDGE_TWT_STATUS_T */
  27558. A_UINT32 sp_tsf_us_lo; /* SP resume TSF bits 31:0 */
  27559. A_UINT32 sp_tsf_us_hi; /* SP resume TSF bits 63:32 */
  27560. } wmi_twt_nudge_dialog_complete_event_fixed_param;
  27561. typedef struct {
  27562. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_btwt_invite_sta_cmd_fixed_param */
  27563. A_UINT32 vdev_id; /* VDEV identifier */
  27564. wmi_mac_addr peer_macaddr; /* peer MAC address */
  27565. A_UINT32 dialog_id; /* TWT dialog ID */
  27566. } wmi_twt_btwt_invite_sta_cmd_fixed_param;
  27567. /* status code of inviting STA to B-TWT dialog */
  27568. typedef enum _WMI_TWT_BTWT_INVITE_STA_STATUS_T {
  27569. WMI_TWT_BTWT_INVITE_STA_STATUS_OK, /* inviting STA to B-TWT successfully completed */
  27570. WMI_TWT_BTWT_INVITE_STA_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  27571. WMI_TWT_BTWT_INVITE_STA_STATUS_INVALID_PARAM, /* invalid parameters */
  27572. WMI_TWT_BTWT_INVITE_STA_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  27573. WMI_TWT_BTWT_INVITE_STA_STATUS_ALREADY_JOINED, /* peer STA already joined the session */
  27574. WMI_TWT_BTWT_INVITE_STA_STATUS_NO_RESOURCE, /* FW resource exhausted */
  27575. WMI_TWT_BTWT_INVITE_STA_STATUS_NO_ACK, /* peer STA did not ACK the request/response frame */
  27576. WMI_TWT_BTWT_INVITE_STA_STATUS_UNKNOWN_ERROR, /* failed with an unknown reason */
  27577. } WMI_TWT_BTWT_INVITE_STA_STATUS_T;
  27578. typedef struct {
  27579. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_twt_btwt_invite_sta_complete_event_fixed_param */
  27580. A_UINT32 vdev_id; /* VDEV identifier */
  27581. wmi_mac_addr peer_macaddr; /* peer MAC address */
  27582. A_UINT32 dialog_id; /* TWT dialog ID */
  27583. A_UINT32 status; /* refer to WMI_TWT_BTWT_INVITE_STA_STATUS_T */
  27584. } wmi_twt_btwt_invite_sta_complete_event_fixed_param;
  27585. typedef struct {
  27586. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_twt_btwt_remove_sta_cmd_fixed_param */
  27587. A_UINT32 vdev_id; /* VDEV identifier */
  27588. wmi_mac_addr peer_macaddr; /* peer MAC address */
  27589. A_UINT32 dialog_id; /* TWT dialog ID */
  27590. } wmi_twt_btwt_remove_sta_cmd_fixed_param;
  27591. /* status code of removing STA from B-TWT dialog */
  27592. typedef enum _WMI_TWT_BTWT_REMOVE_STA_STATUS_T {
  27593. WMI_TWT_BTWT_REMOVE_STA_STATUS_OK, /* removing STA from B-TWT successfully completed */
  27594. WMI_TWT_BTWT_REMOVE_STA_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  27595. WMI_TWT_BTWT_REMOVE_STA_STATUS_INVALID_PARAM, /* invalid parameters */
  27596. WMI_TWT_BTWT_REMOVE_STA_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  27597. WMI_TWT_BTWT_REMOVE_STA_STATUS_NOT_JOINED, /* peer STA not joined yet */
  27598. WMI_TWT_BTWT_REMOVE_STA_STATUS_NO_RESOURCE, /* FW resource exhausted */
  27599. WMI_TWT_BTWT_REMOVE_STA_STATUS_NO_ACK, /* peer STA did not ACK the request/response frame */
  27600. WMI_TWT_BTWT_REMOVE_STA_STATUS_UNKNOWN_ERROR, /* failed with an unknown reason */
  27601. } WMI_TWT_BTWT_REMOVE_STA_STATUS_T;
  27602. typedef struct {
  27603. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_twt_btwt_remove_sta_complete_event_fixed_param */
  27604. A_UINT32 vdev_id; /* VDEV identifier */
  27605. wmi_mac_addr peer_macaddr; /* peer MAC address */
  27606. A_UINT32 dialog_id; /* TWT dialog ID */
  27607. A_UINT32 status; /* refer to WMI_TWT_BTWT_REMOVE_STA_STATUS_T */
  27608. } wmi_twt_btwt_remove_sta_complete_event_fixed_param;
  27609. typedef enum {
  27610. WMI_DMA_RING_CONFIG_MODULE_SPECTRAL,
  27611. WMI_DMA_RING_CONFIG_MODULE_RTT,
  27612. } WMI_DMA_RING_SUPPORTED_MODULE;
  27613. typedef struct {
  27614. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_DMA_RING_CAPABILITIES */
  27615. A_UINT32 pdev_id;
  27616. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  27617. A_UINT32 ring_elems_min; /* minimum spaces in the DMA ring for this pdev */
  27618. A_UINT32 min_buf_size; /* minimum size in bytes of each buffer in the DMA ring */
  27619. A_UINT32 min_buf_align; /* minimum alignment in bytes of each buffer in the DMA ring */
  27620. /**************************************************************************
  27621. * DON'T ADD ANY FURTHER FIELDS HERE -
  27622. * It would cause the size of the READY_EXT message within some targets
  27623. * to exceed the size of the buffer used for the message.
  27624. **************************************************************************/
  27625. } WMI_DMA_RING_CAPABILITIES;
  27626. typedef struct {
  27627. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_ wmi_chan_rf_characterization_info */
  27628. /**
  27629. * [7:0] : channel metric - 0 = unusable, 1 = worst, 100 = best
  27630. * [11:8] : channel BW - This bit-field uses values compatible with
  27631. * enum definitions used internally within the target's
  27632. * halphy code. This bit field uses wmi_channel_width.
  27633. * [15:12]: Reserved
  27634. * [31:16]: Frequency - Center frequency of the channel for which
  27635. * the RF characterisation info applies (MHz)
  27636. */
  27637. A_UINT32 freq_info;
  27638. /**************************************************************************
  27639. * DON'T ADD ANY FURTHER FIELDS HERE -
  27640. * It would cause the size of the READY_EXT message within some targets
  27641. * to exceed the size of the buffer used for the message.
  27642. **************************************************************************/
  27643. } WMI_CHAN_RF_CHARACTERIZATION_INFO;
  27644. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC 0x000000ff
  27645. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC_S 0
  27646. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW 0x00000f00
  27647. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW_S 8
  27648. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ 0xffff0000
  27649. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ_S 16
  27650. #define WMI_CHAN_RF_CHARACTERIZATION_CHAN_METRIC_SET(dword,val) \
  27651. WMI_F_RMW((dword)->freq_info,(val), \
  27652. WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC)
  27653. #define WMI_CHAN_RF_CHARACTERIZATION_CHAN_METRIC_GET(dword) \
  27654. WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC)
  27655. #define WMI_CHAN_RF_CHARACTERIZATION_BW_SET(dword, val) \
  27656. WMI_F_RMW((dword)->freq_info,(val), \
  27657. WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW)
  27658. #define WMI_CHAN_RF_CHARACTERIZATION_BW_GET(dword) \
  27659. WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW)
  27660. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_SET(dword, val) \
  27661. WMI_F_RMW((dword)->freq_info,(val), \
  27662. WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ)
  27663. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_GET(dword) \
  27664. WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ)
  27665. #define WMI_DMA_RING_PADDR_LO_S 0
  27666. #define WMI_DMA_RING_PADDR_LO 0xffffffff
  27667. #define WMI_DMA_RING_BASE_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  27668. #define WMI_DMA_RING_BASE_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  27669. #define WMI_DMA_RING_HEAD_IDX_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  27670. #define WMI_DMA_RING_HEAD_IDX_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  27671. #define WMI_DMA_RING_TAIL_IDX_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  27672. #define WMI_DMA_RING_TAIL_IDX_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  27673. #define WMI_DMA_RING_PADDR_HI_S 0
  27674. #define WMI_DMA_RING_PADDR_HI 0xffff
  27675. #define WMI_DMA_RING_BASE_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  27676. #define WMI_DMA_RING_BASE_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  27677. #define WMI_DMA_RING_HEAD_IDX_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  27678. #define WMI_DMA_RING_HEAD_IDX_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  27679. #define WMI_DMA_RING_TAIL_IDX_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  27680. #define WMI_DMA_RING_TAIL_IDX_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  27681. typedef struct {
  27682. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_ring_cfg_req_fixed_param */
  27683. A_UINT32 pdev_id;
  27684. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  27685. /**
  27686. * Bits 31:0: base address of ring [31:0]
  27687. */
  27688. A_UINT32 base_paddr_lo;
  27689. /**
  27690. * Bits 15:0: base address of ring [47:32]
  27691. * Bits 31:16: reserved (set to 0x0)
  27692. */
  27693. A_UINT32 base_paddr_hi;
  27694. /**
  27695. * Bits 31:0: address of head index [31:0]
  27696. */
  27697. A_UINT32 head_idx_paddr_lo;
  27698. /**
  27699. * Bits 15:0: address of head index [47:32]
  27700. * Bits 31:16: reserved (set to 0x0)
  27701. */
  27702. A_UINT32 head_idx_paddr_hi;
  27703. /**
  27704. * Bits 31:0: address of tail index [31:0]
  27705. */
  27706. A_UINT32 tail_idx_paddr_lo;
  27707. /**
  27708. * Bits 15:0: address of tail index [47:32]
  27709. * Bits 31:16: reserved (set to 0x0)
  27710. */
  27711. A_UINT32 tail_idx_paddr_hi;
  27712. A_UINT32 num_elems; /** Number of elems in the ring */
  27713. A_UINT32 buf_size; /** size of allocated buffer in bytes */
  27714. A_UINT32 num_resp_per_event; /** Number of wmi_dma_buf_release_entry packed together */
  27715. /**
  27716. * This parameter specifies the timeout in milliseconds.
  27717. * Target should timeout and send whatever resp it has if this time expires.
  27718. */
  27719. A_UINT32 event_timeout_ms;
  27720. } wmi_dma_ring_cfg_req_fixed_param;
  27721. typedef struct {
  27722. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_ring_cfg_rsp_fixed_param */
  27723. A_UINT32 pdev_id;
  27724. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  27725. A_UINT32 cfg_status; /** Configuration status; see A_STATUS */
  27726. } wmi_dma_ring_cfg_rsp_fixed_param;
  27727. typedef struct {
  27728. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_fixed_param */
  27729. A_UINT32 pdev_id; /** ID of pdev whose DMA ring produced the data */
  27730. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  27731. A_UINT32 num_buf_release_entry;
  27732. A_UINT32 num_meta_data_entry;
  27733. /* This TLV is followed by another TLV of array of structs.
  27734. * wmi_dma_buf_release_entry entries[num_buf_release_entry];
  27735. * wmi_dma_buf_release_spectral_meta_data meta_datat[num_meta_data_entry];
  27736. */
  27737. } wmi_dma_buf_release_fixed_param;
  27738. typedef struct {
  27739. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_entry */
  27740. /**
  27741. * Bits 31:0: address of data [31:0]
  27742. */
  27743. A_UINT32 paddr_lo;
  27744. /**
  27745. * Bits 11:0: address of data [43:32]
  27746. * Bits 31:12: host context data [19:0]
  27747. */
  27748. A_UINT32 paddr_hi;
  27749. } wmi_dma_buf_release_entry;
  27750. typedef struct {
  27751. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_spectral_meta_data */
  27752. /**
  27753. * meta data information.
  27754. * Host uses the noise floor values as one of the major parameter
  27755. * to classify the spectral data.
  27756. * This information will not be provided by ucode unlike the fft reports
  27757. * which gets DMAed to DDR buffer.
  27758. * Hence sending the NF values in dBm units as meta data information.
  27759. */
  27760. A_INT32 noise_floor[WMI_MAX_CHAINS];
  27761. /**
  27762. * The time taken by target in micro seconds to complete the reset routine
  27763. * and re-initiate the spectral scan.
  27764. * If the delay is 0, the WAR to bookkeep the timestamp wont be exercised
  27765. * in HOST.
  27766. */
  27767. A_UINT32 reset_delay;
  27768. /**
  27769. * Current center freq1 (MHz units)
  27770. */
  27771. A_UINT32 freq1;
  27772. /**
  27773. * Current center freq2 (MHz units)
  27774. */
  27775. A_UINT32 freq2;
  27776. /**
  27777. * Channel Width (MHz units)
  27778. */
  27779. A_UINT32 ch_width;
  27780. } wmi_dma_buf_release_spectral_meta_data;
  27781. typedef enum {
  27782. NO_SCALING = 0, /* No bin scaling*/
  27783. /**
  27784. * scaled_bin_mag = bin_mag *
  27785. * sqrt(10^(max(legacy_max_gain - default_agc_max_gain + low_level_offset - RSSI_corr,
  27786. * (agc_total_gain_db < default_agc_max_gain) * high_level_offset)/10)) *
  27787. * 2^(DET{0,1,2}_SPECTRAL_SCAN_BIN_SCALE - legacy_spectral_scan_bin_scale)
  27788. */
  27789. AGC_GAIN_RSSI_CORR_BASED = 1,
  27790. } WMI_SPECTRAL_SCALING_FORMULA_ID;
  27791. typedef struct {
  27792. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_spectral_bin_scaling_params */
  27793. A_UINT32 pdev_id; /* ID of pdev to which the scaling parameters are to be applied */
  27794. WMI_SPECTRAL_SCALING_FORMULA_ID formula_id; /* Represets the formula to be used */
  27795. A_UINT32 low_level_offset; /* low level offset for fine tuning the scaling factor based on RSSI and AGC gain */
  27796. A_UINT32 high_level_offset; /* high level offset for fine tuning the scaling factor based on RSSI and AGC gain */
  27797. A_UINT32 rssi_thr; /* RSSI threshold to be used to adjust the inband power of the given spectral report */
  27798. A_UINT32 default_agc_max_gain;/* DEFAULT AGC MAX GAIN used. Fetched from register RXTD_RADAR_SBS_CTRL_1_L bits20:13 */
  27799. /**************************************************************************
  27800. * DON'T ADD ANY FURTHER FIELDS HERE -
  27801. * It would cause the size of the READY_EXT message within some targets
  27802. * to exceed the size of the buffer used for the message.
  27803. **************************************************************************/
  27804. } wmi_spectral_bin_scaling_params;
  27805. typedef struct {
  27806. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_ctl_failsafe_event_params */
  27807. A_UINT32 pdev_id; /* ID of pdev to which ctl failsafe status is sent */
  27808. A_UINT32 ctl_FailsafeStatus; /* To indicate if Failsafe value is imposed on CTL. 0- Success, 1- Failsafe imposed */
  27809. } wmi_pdev_ctl_failsafe_check_fixed_param;
  27810. typedef struct {
  27811. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_runtime_dpd_recal_cmd_fixed_param */
  27812. A_UINT32 enable; /* Enable/disable */
  27813. /* Thermal Thresholds,
  27814. * DPD recalibration will be triggered, when current temperature is
  27815. * either greater than (tmpt_base_c + dlt_tmpt_c_h),
  27816. * or less than (tmpt_base_c + dlt_tmpt_c_l).
  27817. * Here tmpt_base_c is the temperature in centigrade when first run dpd calibration.
  27818. */
  27819. A_UINT32 dlt_tmpt_c_h;
  27820. A_UINT32 dlt_tmpt_c_l;
  27821. /* cooling_time_ms
  27822. * The time (in milliseconds) expected to be needed for the unit
  27823. * to cool from dlt_tmpt_c_h to dlt_tmpt_c_l.
  27824. */
  27825. A_UINT32 cooling_time_ms;
  27826. /* Max duration for dpd re-cal. Unit: ms */
  27827. A_UINT32 dpd_dur_max_ms;
  27828. } wmi_runtime_dpd_recal_cmd_fixed_param;
  27829. typedef enum {
  27830. WMI_ROAM_TRIGGER_REASON_NONE = 0,
  27831. WMI_ROAM_TRIGGER_REASON_PER,
  27832. WMI_ROAM_TRIGGER_REASON_BMISS,
  27833. WMI_ROAM_TRIGGER_REASON_LOW_RSSI,
  27834. WMI_ROAM_TRIGGER_REASON_HIGH_RSSI,
  27835. WMI_ROAM_TRIGGER_REASON_PERIODIC,
  27836. WMI_ROAM_TRIGGER_REASON_MAWC,
  27837. WMI_ROAM_TRIGGER_REASON_DENSE,
  27838. WMI_ROAM_TRIGGER_REASON_BACKGROUND,
  27839. WMI_ROAM_TRIGGER_REASON_FORCED,
  27840. WMI_ROAM_TRIGGER_REASON_BTM,
  27841. WMI_ROAM_TRIGGER_REASON_UNIT_TEST,
  27842. WMI_ROAM_TRIGGER_REASON_BSS_LOAD,
  27843. WMI_ROAM_TRIGGER_REASON_DEAUTH,
  27844. WMI_ROAM_TRIGGER_REASON_IDLE,
  27845. /*
  27846. * NOTE: don't add any more ROAM_TRIGGER_REASON values here.
  27847. * There are checks in the FW that require the value of
  27848. * WMI_ROAM_TRIGGER_REASON_MAX to be < 16.
  27849. * Add new ROAM_TRIGGER_REASON values below, inside the
  27850. * WMI_ROAM_TRIGGER_EXT_REASON_ID enum.
  27851. */
  27852. WMI_ROAM_TRIGGER_REASON_MAX,
  27853. } WMI_ROAM_TRIGGER_REASON_ID;
  27854. /*
  27855. * The WMI_ROAM_TRIGGER_REASON_ID enum cannot be expanded with new values,
  27856. * due to checks in the FW that require WMI_ROAM_TRIGGER_REASON_MAX to be
  27857. * less than 16.
  27858. * The WMI_ROAM_TRIGGER_EXT_REASON_ID enum is used to hold further roam
  27859. * trigger reasons.
  27860. */
  27861. typedef enum {
  27862. WMI_ROAM_TRIGGER_REASON_STA_KICKOUT = WMI_ROAM_TRIGGER_REASON_MAX,
  27863. WMI_ROAM_TRIGGER_REASON_ESS_RSSI,
  27864. WMI_ROAM_TRIGGER_REASON_WTC_BTM,
  27865. WMI_ROAM_TRIGGER_REASON_PMK_TIMEOUT,
  27866. WMI_ROAM_TRIGGER_REASON_BTC,
  27867. WMI_ROAM_TRIGGER_EXT_REASON_MAX
  27868. } WMI_ROAM_TRIGGER_EXT_REASON_ID;
  27869. /* value for DENSE roam trigger */
  27870. #define WMI_RX_TRAFFIC_ABOVE_THRESHOLD 0x1
  27871. #define WMI_TX_TRAFFIC_ABOVE_THRESHOLD 0x2
  27872. typedef struct {
  27873. A_UINT32 trigger_id; /* id from WMI_ROAM_TRIGGER_REASON_ID */
  27874. /* interpretation of trigger value is as follows, for different trigger IDs
  27875. * ID = PER -> value = PER percentage
  27876. * ID = LOW_RSSI -> value = rssi in dB wrt noise floor,
  27877. * ID = HIGH_RSSI -> value = rssi in dB wrt to noise floor,
  27878. * ID = DENSE -> value = specification if it is tx or rx traffic threshold,
  27879. * (see WMI_[RX,TX]_TRAFFIC_ABOVE_THRESHOLD)
  27880. * ID = PERIODIC -> value = periodicity in ms
  27881. *
  27882. * for other IDs trigger_value would be 0 (invalid)
  27883. */
  27884. A_UINT32 trigger_value;
  27885. } wmi_roam_scan_trigger_reason;
  27886. typedef struct {
  27887. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_roam_scan_stats_cmd_fixed_param */
  27888. A_UINT32 vdev_id;
  27889. } wmi_request_roam_scan_stats_cmd_fixed_param;
  27890. /** BSS load configuration parameters for roam trigger */
  27891. typedef struct {
  27892. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bss_load_cmd_fixed_param */
  27893. A_UINT32 vdev_id;
  27894. /** Minimum number of beacons to be consider for calculating average AP BSS load within time monitor_time_window */
  27895. A_UINT32 beacons_min_count;
  27896. /** Monitor time window in seconds */
  27897. A_UINT32 monitor_time_window;
  27898. /** BSS load threshold after which roam scan should trigger */
  27899. A_UINT32 bss_load_threshold;
  27900. /** rssi_2g_threshold
  27901. * If connected AP is in 2.4Ghz, then consider bss load roam triggered
  27902. * only if load % > bss_load_threshold && connected AP rssi is worse
  27903. * than rssi_2g_threshold.
  27904. */
  27905. A_INT32 rssi_2g_threshold; /* units = dbm */
  27906. /** rssi_5g_threshold
  27907. * If connected AP is in 5Ghz, then consider bss load roam triggered
  27908. * only if load % > bss_load_threshold && connected AP rssi is worse
  27909. * than rssi_5g_threshold.
  27910. */
  27911. A_INT32 rssi_5g_threshold; /* units = dbm */
  27912. /** rssi_6g_threshold
  27913. * If connected AP is in 6Ghz, then consider bss load roam triggered
  27914. * only if load % > bss_load_threshold && connected AP rssi is worse
  27915. * than rssi_6g_threshold. If rssi_6g_threshold is 0, it should be ignored.
  27916. */
  27917. A_INT32 rssi_6g_threshold; /* units = dbm */
  27918. } wmi_roam_bss_load_config_cmd_fixed_param;
  27919. /** Deauth roam trigger parameters */
  27920. typedef struct {
  27921. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_deauth_config_cmd_fixed_param */
  27922. A_UINT32 vdev_id;
  27923. /* 1-Enable, 0-Disable */
  27924. A_UINT32 enable;
  27925. } wmi_roam_deauth_config_cmd_fixed_param;
  27926. /** IDLE roam trigger parameters */
  27927. typedef struct {
  27928. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_idle_config_cmd_fixed_param */
  27929. A_UINT32 vdev_id;
  27930. /* 1-Enable, 0-Disable */
  27931. A_UINT32 enable;
  27932. /* Connected AP band. 0 - Any Band, 1 - 2.4Ghz Band, 2 - 5Ghz Band */
  27933. A_UINT32 band;
  27934. /* Trigger Idle roaming only if rssi change of connected AP is within rssi_delta during idle time */
  27935. A_UINT32 rssi_delta; /* units = dB */
  27936. /* Trigger idle roam only if connected RSSI is better than min_rssi */
  27937. A_INT32 min_rssi; /* units = dBm */
  27938. /* Inactive/Idle time duration
  27939. * After screen is OFF (or whatever condition is suitable in a given
  27940. * system as an indication that the system is likely idle)
  27941. * and if below conditions are met then idle roaming will be triggered.
  27942. * 1. Connected AP band is matching with band value configured
  27943. * 2. No TX/RX data for more than idle_time configured
  27944. * or TX/RX data packets count is less than data_packet_count
  27945. * during idle_time
  27946. * 3. Connected AP rssi change is not more than rssi_delta
  27947. * 4. Connected AP rssi is better than min_rssi.
  27948. * The purpose of this trigger for idle scan is to issue the scan
  27949. * even if (moreover, particularly if) the connection to the
  27950. * existing AP is still good, to keep the STA from getting locked
  27951. * onto the current good AP and thus missing out on an available
  27952. * even better AP. This min_rssi threshold can be used to adjust
  27953. * the connection quality level at which the STA considers doing an
  27954. * idle scan.
  27955. */
  27956. A_UINT32 idle_time; /* units = seconds */
  27957. /* Maximum allowed data packets count during idle time */
  27958. A_UINT32 data_packet_count;
  27959. } wmi_roam_idle_config_cmd_fixed_param;
  27960. /** trigger to start/stop monitoring if system is idle command parameters */
  27961. typedef struct {
  27962. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_idle_trigger_monitor_cmd_fixed_param */
  27963. /* idle_trigger_monitor values are from WMI_IDLE_TRIGGER_MONITOR_ID */
  27964. A_UINT32 idle_trigger_monitor;
  27965. } wmi_idle_trigger_monitor_cmd_fixed_param;
  27966. typedef enum {
  27967. WMI_IDLE_TRIGGER_MONITOR_NONE = 0, /* no-op */
  27968. /* IDLE_TRIGGER_MONITOR_ON
  27969. * The host's screen has turned off (or some other event indicating that
  27970. * the system is likely idle) -
  27971. * start monitoring to check if the system is idle.
  27972. */
  27973. WMI_IDLE_TRIGGER_MONITOR_ON,
  27974. /* IDLE_TRIGGER_MONITOR_OFF
  27975. * The host's screen has turned on (or some other event indicating that
  27976. * the system is not idle)
  27977. */
  27978. WMI_IDLE_TRIGGER_MONITOR_OFF,
  27979. } WMI_SCREEN_STATUS_NOTIFY_ID;
  27980. typedef struct {
  27981. /** TLV tag and len; tag equals wmi_pdev_dsm_filter_fixed_param */
  27982. A_UINT32 tlv_header;
  27983. /**
  27984. * TLV (tag length value) parameter's following pdev_dsm_filter_cmd are,
  27985. *
  27986. * wmi_pdev_bssid_disallow_list_config_param bssid_disallow_list[];
  27987. * i.e array containing all disallow AP filter lists including
  27988. * the new DSM lists (avoidlist / driver_blacklist) and existing
  27989. * lists (supplicant_blacklist / rssi_rejectlist etc.)
  27990. */
  27991. } wmi_pdev_dsm_filter_fixed_param;
  27992. typedef struct {
  27993. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_bssid_disallow_list_config_param */
  27994. A_UINT32 tlv_header;
  27995. /** bssid type i.e whether bssid falls in avoid list or driver_blacklist etc.
  27996. see WMI_BSSID_DISALLOW_LIST_TYPE **/
  27997. A_UINT32 bssid_type;
  27998. /** mac address of disallow BSSID */
  27999. wmi_mac_addr bssid;
  28000. /** Disallow AP for certain duration, in units of milliseconds */
  28001. A_UINT32 remaining_disallow_duration;
  28002. /** AP will be allowed for candidate, when AP RSSI better than expected RSSI units in dBm */
  28003. A_INT32 expected_rssi;
  28004. /* Blacklist reason from WMI_BLACKLIST_REASON_ID */
  28005. A_UINT32 reason;
  28006. /* Source of adding AP to BL from WMI_BLACKLIST_SOURCE_ID */
  28007. A_UINT32 source;
  28008. /*
  28009. * timestamp is the absolute time w.r.t host timer which is synchronized
  28010. * between the host and target.
  28011. * This timestamp indicates the time when AP added to blacklist.
  28012. */
  28013. A_UINT32 timestamp;
  28014. /* Original timeout value in milli seconds when AP added to BL */
  28015. A_UINT32 original_timeout;
  28016. } wmi_pdev_bssid_disallow_list_config_param;
  28017. typedef enum {
  28018. /* USER_SPACE_BLACK_LIST
  28019. * Black Listed AP's by host's user space
  28020. */
  28021. WMI_BSSID_DISALLOW_USER_SPACE_BLACK_LIST = 1,
  28022. /* DRIVER_BLACK_LIST
  28023. * Black Listed AP's by host driver
  28024. * used for data stall migitation
  28025. */
  28026. WMI_BSSID_DISALLOW_DRIVER_BLACK_LIST,
  28027. /* USER_SPACE_AVOID_LIST
  28028. * Avoid List AP's by host's user space
  28029. * used for data stall migitation
  28030. */
  28031. WMI_BSSID_DISALLOW_USER_SPACE_AVOID_LIST,
  28032. /* DRIVER_AVOID_LIST
  28033. * Avoid List AP's by host driver
  28034. * used for data stall migitation
  28035. */
  28036. WMI_BSSID_DISALLOW_DRIVER_AVOID_LIST,
  28037. /* RSSI_REJECT_LIST
  28038. * OCE AP's
  28039. */
  28040. WMI_BSSID_DISALLOW_RSSI_REJECT_LIST,
  28041. } WMI_BSSID_DISALLOW_LIST_TYPE;
  28042. /* WLAN_PDEV_MAX_NUM_BSSID_DISALLOW_LIST:
  28043. * Maximum number of BSSID disallow entries which host is allowed to send
  28044. * to firmware within the WMI_PDEV_DSM_FILTER_CMDID message.
  28045. */
  28046. #define WLAN_PDEV_MAX_NUM_BSSID_DISALLOW_LIST 28
  28047. /** Roam Pre-Authentication completion status */
  28048. typedef struct {
  28049. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_preauth_status_cmd_fixed_param */
  28050. A_UINT32 vdev_id;
  28051. /* preauth_status, 0 - Success, Non Zero - Failure
  28052. * Refer to IEEE Std 802.11-2016 Table 9-46 for meaning of status values.
  28053. */
  28054. A_UINT32 preauth_status;
  28055. /* AP BSSID for which pre-authentication is completed */
  28056. wmi_mac_addr candidate_ap_bssid;
  28057. /**
  28058. * This fixed_param TLV is followed by the below TLVs:
  28059. *
  28060. * PMKID computed after successful pre-authentication. This is valid only if preauth_status is success
  28061. * A_UINT8 pmkid[];
  28062. *
  28063. * PMK computed after successful pre-authentication. This is valid only if preauth_status is success
  28064. * A_UINT8 pmk[];
  28065. */
  28066. } wmi_roam_preauth_status_cmd_fixed_param;
  28067. /** Roam Pre-Authentication start event */
  28068. typedef struct {
  28069. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_preauth_start_event_fixed_param */
  28070. A_UINT32 vdev_id;
  28071. /* AP BSSID for which host needs to start pre-authentication */
  28072. wmi_mac_addr candidate_ap_bssid;
  28073. } wmi_roam_preauth_start_event_fixed_param;
  28074. typedef struct {
  28075. /*
  28076. * The timestamp is in units of ticks of a 19.2MHz clock.
  28077. * The timestamp is taken at roam scan start.
  28078. */
  28079. A_UINT32 lower32bit;
  28080. A_UINT32 upper32bit;
  28081. } wmi_roaming_timestamp;
  28082. typedef struct {
  28083. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_stats_event_fixed_param */
  28084. A_UINT32 vdev_id;
  28085. /* number of roam scans */
  28086. A_UINT32 num_roam_scans;
  28087. /* This TLV is followed by TLV's:
  28088. * A_UINT32 client_id[num_roam_scans]; based on WMI_SCAN_CLIENT_ID
  28089. * wmi_roaming_timestamp timestamp[num_roam_scans]; clock ticks at the time of scan start
  28090. * A_UINT32 num_channels[num_roam_scans]; number of channels that are scanned
  28091. * A_UINT32 chan_info[]; channel frequencies (MHz) in each scan
  28092. * The num_channels[] elements specify how many elements there are
  28093. * within chan_info[] for each scan.
  28094. * For example, if num_channels = [2, 3] then chan_info will have 5
  28095. * elements, with the first 2 elements from the first scan, and
  28096. * the last 3 elements from the second scan.
  28097. * wmi_mac_addr old_bssid[num_roam_scans]; bssid we are connected to at the time of roaming
  28098. * A_UINT32 is_roaming_success[num_roam_scans]; value is 1 if roaming is successful, 0 if roaming failed
  28099. * wmi_mac_addr new_bssid[num_roam_scans]; bssid after roaming
  28100. * A_UINT32 num_of_roam_candidates[num_roam_scans]; number of candidates found in each roam scan
  28101. * roam_scan_trigger_reason roam_reason[num_roam_scans]; reason for each roam scan
  28102. * wmi_mac_addr bssid[]; bssids of candidates in each roam scan
  28103. * The num_of_roam_candidates[] elements specify how many elements
  28104. * there are within bssid[] for each scan.
  28105. * For example, if num_of_roam_candidates = [2, 3] then bssid will
  28106. * have 5 elements, with the first 2 elements from the first scan,
  28107. * and the last 3 elements from the second scan.
  28108. * A_UINT32 score[]; score of candidates in each roam scan
  28109. * The num_of_roam_candidates[] elements specify how many elements
  28110. * there are within score[] for each scan.
  28111. * For example, if num_of_roam_candidates = [2, 3] then score will
  28112. * have 5 elements, with the first 2 elements from the first scan,
  28113. * and the last 3 elements from the second scan.
  28114. * A_UINT32 channel[]; channel frequency (MHz) of candidates in each roam scan
  28115. * The num_of_roam_candidates[] elements specify how many elements
  28116. * there are within channel[] for each scan.
  28117. * For example, if num_of_roam_candidates = [2, 3] then channel will
  28118. * have 5 elements, with the first 2 elements from the first scan,
  28119. * and the last 3 elements from the second scan.
  28120. * A_UINT32 rssi[]; rssi in dB w.r.t. noise floor of candidates
  28121. * in each roam scan.
  28122. * The num_of_roam_candidates[] elements specify how many elements
  28123. * there are within rssi[] for each scan.
  28124. * For example, if num_of_roam_candidates = [2, 3] then rssi will
  28125. * have 5 elements, with the first 2 elements from the first scan,
  28126. * and the last 3 elements from the second scan.
  28127. */
  28128. } wmi_roam_scan_stats_event_fixed_param;
  28129. typedef enum {
  28130. WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER = 1, /* Roam scan triggered due to periodic timer expiry */
  28131. WMI_ROAM_TRIGGER_SUB_REASON_INACTIVITY_TIMER, /* Roam scan triggered due to inactivity detection */
  28132. /* INACTIVITY_TIMER_LOW_RSSI - alias for INACTIVITY_TIMER */
  28133. WMI_ROAM_TRIGGER_SUB_REASON_INACTIVITY_TIMER_LOW_RSSI =
  28134. WMI_ROAM_TRIGGER_SUB_REASON_INACTIVITY_TIMER,
  28135. WMI_ROAM_TRIGGER_SUB_REASON_BTM_DI_TIMER, /* Roam scan triggered due to BTM Disassoc Imminent timeout */
  28136. WMI_ROAM_TRIGGER_SUB_REASON_FULL_SCAN, /* Roam scan triggered due to partial scan failure */
  28137. WMI_ROAM_TRIGGER_SUB_REASON_LOW_RSSI_PERIODIC, /* Roam scan triggered due to Low rssi periodic timer */
  28138. WMI_ROAM_TRIGGER_SUB_REASON_CU_PERIODIC, /* Roam scan triggered due to CU periodic timer */
  28139. /* PERIODIC_TIMER_AFTER_INACTIVITY:
  28140. * Roam scan triggered due to periodic timer after device in
  28141. * inactivity state.
  28142. * This timer is enabled/used for roaming in a vendor-specific manner.
  28143. */
  28144. WMI_ROAM_TRIGGER_SUB_REASCON_PERIODIC_TIMER_AFTER_INACTIVITY,
  28145. WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY =
  28146. WMI_ROAM_TRIGGER_SUB_REASCON_PERIODIC_TIMER_AFTER_INACTIVITY,
  28147. /*
  28148. * PERIODIC_TIMER_AFTER_INACTIVITY_LOW_RSSI - alias for
  28149. * PERIODIC_TIMER_AFTER_INACTIVITY
  28150. */
  28151. WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY_LOW_RSSI =
  28152. WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY,
  28153. WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY_CU,
  28154. WMI_ROAM_TRIGGER_SUB_REASON_INACTIVITY_TIMER_CU,
  28155. } WMI_ROAM_TRIGGER_SUB_REASON_ID;
  28156. typedef enum wmi_roam_invoke_status_error {
  28157. WMI_ROAM_INVOKE_STATUS_SUCCESS = 0,
  28158. WMI_ROAM_INVOKE_STATUS_VDEV_INVALID = 0x11, /* Invalid VDEV */
  28159. WMI_ROAM_INVOKE_STATUS_BSS_INVALID, /* Invalid VDEV BSS */
  28160. WMI_ROAM_INVOKE_STATUS_VDEV_DOWN, /* VDEV is not UP */
  28161. WMI_ROAM_INVOKE_STATUS_ROAM_HANDLE_INVALID, /* VDEV ROAM handle is invalid */
  28162. WMI_ROAM_INVOKE_STATUS_OFFLOAD_DISABLE, /* Roam offload is not enabled */
  28163. WMI_ROAM_INVOKE_STATUS_AP_SSID_LENGTH_INVALID, /* Connected AP profile SSID length is zero */
  28164. WMI_ROAM_INVOKE_STATUS_HO_DISALLOW, /* Already FW internal roaming is in progress */
  28165. WMI_ROAM_INVOKE_STATUS_ALREADY_RUNNING, /* Roam Invoke already in progress either from internal FW BTM request or from host*/
  28166. WMI_ROAM_INVOKE_STATUS_NON_ROAMABLE_AP, /* Roam HO is not triggered due to non roamable AP */
  28167. WMI_ROAM_INVOKE_STATUS_HO_INTERNAL_FAIL, /* Candidate AP save failed */
  28168. WMI_ROAM_INVOKE_STATUS_DISALLOW, /* Roam invoke trigger is not enabled */
  28169. WMI_ROAM_INVOKE_STATUS_SCAN_FAIL, /* Scan start fail */
  28170. WMI_ROAM_INVOKE_STATUS_START_HO_FAIL, /* Roam HO start fail */
  28171. WMI_ROAM_INVOKE_STATUS_INVALID_PARAMS, /* Roam invoke params are invalid */
  28172. WMI_ROAM_INVOKE_STATUS_INVALID_SCAN_MODE, /* Roam scan mode is invalid */
  28173. WMI_ROAM_INVOKE_STATUS_NO_CAND_AP, /* No candidate AP found to roam to */
  28174. WMI_ROAM_INVOKE_STATUS_HO_FAIL, /* handoff failed */
  28175. } wmi_roam_invoke_status_error_t;
  28176. typedef struct {
  28177. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_reason_tlv_param */
  28178. /*
  28179. * timestamp is the absolute time w.r.t host timer which is synchronized
  28180. * between the host and target.
  28181. * This timestamp indicates the time when roam trigger happened.
  28182. */
  28183. A_UINT32 timestamp; /* Timestamp in milli seconds */
  28184. /* trigger_reason:
  28185. * Roam trigger reason from WMI_ROAM_TRIGGER_REASON_ID
  28186. */
  28187. A_UINT32 trigger_reason;
  28188. /* trigger_sub_reason:
  28189. * Reason for each roam scan from WMI_ROAM_TRIGGER_SUB_REASON_ID,
  28190. * if multiple scans are triggered for a single roam trigger.
  28191. */
  28192. A_UINT32 trigger_sub_reason;
  28193. A_UINT32 current_rssi; /* Connected AP rssi in dBm */
  28194. /* roam_rssi_threshold:
  28195. * RSSI threshold value in dBm for low RSSI roam trigger.
  28196. */
  28197. A_UINT32 roam_rssi_threshold;
  28198. A_UINT32 cu_load; /* Connected AP CU load percentage (0-100) */
  28199. /* deauth_type:
  28200. * 1 -> De-authentication
  28201. * 2 -> Disassociation
  28202. */
  28203. A_UINT32 deauth_type;
  28204. /* deauth_reason:
  28205. * De-authentication or disassociation reason.
  28206. * De-authentication / disassociation Values are enumerated in the
  28207. * 802.11 spec.
  28208. */
  28209. A_UINT32 deauth_reason;
  28210. /* btm_request_mode:
  28211. * Mode Values are enumerated in the 802.11 spec.
  28212. */
  28213. A_UINT32 btm_request_mode;
  28214. A_UINT32 disassoc_imminent_timer; /* in Milli seconds */
  28215. /* validity_internal:
  28216. * Preferred candidate list validity interval in Milli seconds.
  28217. */
  28218. A_UINT32 validity_internal;
  28219. /* candidate_list_count:
  28220. * Number of preferred candidates from BTM request.
  28221. */
  28222. A_UINT32 candidate_list_count;
  28223. /* btm_response_status_code:
  28224. * Response status Values are enumerated in the 802.11 spec.
  28225. */
  28226. A_UINT32 btm_response_status_code;
  28227. union {
  28228. /*
  28229. * If a definition of these vendor-specific files has been provided,
  28230. * use the vendor-specific names for these fields as an alias for
  28231. */
  28232. #ifdef WMI_ROAM_TRIGGER_REASON_VENDOR_SPECIFIC1
  28233. WMI_ROAM_TRIGGER_REASON_VENDOR_SPECIFIC1;
  28234. #endif
  28235. struct {
  28236. /* opaque space reservation for vendor-specific fields */
  28237. A_UINT32 vendor_specific1[7];
  28238. };
  28239. };
  28240. /* BTM BSS termination timeout value in milli seconds */
  28241. A_UINT32 btm_bss_termination_timeout;
  28242. /* BTM MBO assoc retry timeout value in milli seconds */
  28243. A_UINT32 btm_mbo_assoc_retry_timeout;
  28244. union {
  28245. /*
  28246. * If a definition of these vendor-specific files has been provided,
  28247. * use the vendor-specific names for these fields as an alias for
  28248. */
  28249. #ifdef WMI_ROAM_TRIGGER_REASON_VENDOR_SPECIFIC2
  28250. WMI_ROAM_TRIGGER_REASON_VENDOR_SPECIFIC2;
  28251. #endif
  28252. struct {
  28253. /* opaque space reservation for vendor-specific fields */
  28254. A_UINT32 vendor_specific2[4];
  28255. };
  28256. };
  28257. /* btm_req_dialog_token: dialog token number in BTM request frame */
  28258. A_UINT32 btm_req_dialog_token;
  28259. } wmi_roam_trigger_reason;
  28260. typedef struct {
  28261. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_info_tlv_param */
  28262. /* roam_scan_type:
  28263. * 0 -> Partial roam scan
  28264. * 1 -> Full roam scan
  28265. */
  28266. A_UINT32 roam_scan_type;
  28267. /* next_rssi_trigger_threshold:
  28268. * Updated RSSI threshold value in dBm for next roam trigger.
  28269. */
  28270. A_UINT32 next_rssi_trigger_threshold;
  28271. A_UINT32 roam_scan_channel_count; /* Number of channels scanned during roam scan */
  28272. A_UINT32 roam_ap_count; /* Number of roamable APs */
  28273. A_UINT32 frame_info_count; /* Number of frame info */
  28274. /*
  28275. * scan_complete_timestamp is the absolute time w.r.t host timer
  28276. * which is synchronized between the host and target.
  28277. * This timestamp indicates the time when roam scan finished.
  28278. */
  28279. A_UINT32 scan_complete_timestamp; /* milli second units */
  28280. } wmi_roam_scan_info;
  28281. typedef struct {
  28282. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_channel_info_tlv_param */
  28283. A_UINT32 channel; /* Channel frequency in MHz */
  28284. } wmi_roam_scan_channel_info;
  28285. typedef struct {
  28286. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_info_tlv_param */
  28287. /*
  28288. * timestamp is the absolute time w.r.t host timer which is synchronized
  28289. * between the host and target.
  28290. * This timestamp indicates the time when candidate AP is found
  28291. * during roam scan.
  28292. */
  28293. A_UINT32 timestamp; /* Timestamp in milli seconds */
  28294. A_UINT32 candidate_type; /* 0 - Candidate AP, 1 - Connected AP */
  28295. wmi_mac_addr bssid; /* AP MAC address */
  28296. A_UINT32 channel; /* AP channel frequency in MHz */
  28297. A_UINT32 rssi; /* AP current rssi in dBm */
  28298. A_UINT32 cu_load; /* AP current cu load percentage (0-100) */
  28299. /*
  28300. * The score fields below don't have a pre-determined range,
  28301. * but use the sense that a higher score indicates a better
  28302. * roam candidate.
  28303. */
  28304. A_UINT32 rssi_score; /* AP current rssi score */
  28305. A_UINT32 cu_score; /* AP current cu score */
  28306. A_UINT32 total_score; /* AP total score */
  28307. A_UINT32 etp; /* AP Estimated Throughput (ETP) value in mbps */
  28308. /* Blacklist reason from WMI_BLACKLIST_REASON_ID */
  28309. A_UINT32 bl_reason;
  28310. /* Source of adding AP to BL from WMI_BLACKLIST_SOURCE_ID */
  28311. A_UINT32 bl_source;
  28312. /*
  28313. * timestamp is the absolute time w.r.t host timer which is synchronized
  28314. * between the host and target.
  28315. * This timestamp indicates the time when AP added to blacklist.
  28316. */
  28317. A_UINT32 bl_timestamp;
  28318. /* Original timeout value in milli seconds when AP added to BL */
  28319. A_UINT32 bl_original_timeout;
  28320. } wmi_roam_ap_info;
  28321. typedef enum {
  28322. /* Failures reasons for not triggering roaming */
  28323. WMI_ROAM_FAIL_REASON_NO_SCAN_START = 1, /* Roam scan not started */
  28324. WMI_ROAM_FAIL_REASON_SCAN_NOT_ALLOWED = WMI_ROAM_FAIL_REASON_NO_SCAN_START, /* Roam scan is not allowed to start */
  28325. WMI_ROAM_FAIL_REASON_NO_AP_FOUND, /* No roamable APs found during roam scan */
  28326. WMI_ROAM_FAIL_REASON_NO_CAND_AP_FOUND, /* No candidate APs found during roam scan */
  28327. /* Failure reasons after roaming is triggered */
  28328. WMI_ROAM_FAIL_REASON_HOST, /* Roam fail due to VDEV STOP issued from Host */
  28329. WMI_ROAM_FAIL_REASON_AUTH_SEND, /* Unable to send auth request frame */
  28330. WMI_ROAM_FAIL_REASON_AUTH_RECV, /* Received auth response with error status code */
  28331. WMI_ROAM_FAIL_REASON_NO_AUTH_RESP, /* Not receiving auth response frame */
  28332. WMI_ROAM_FAIL_REASON_REASSOC_SEND, /* Unable to send reassoc request frame */
  28333. WMI_ROAM_FAIL_REASON_REASSOC_RECV, /* Received reassoc response with error status code */
  28334. WMI_ROAM_FAIL_REASON_NO_REASSOC_RESP, /* Not receiving reassoc response frame */
  28335. WMI_ROAM_FAIL_REASON_EAPOL_TIMEOUT, /* EAPOL TIMEOUT */
  28336. WMI_ROAM_FAIL_REASON_EAPOL_M1_TIMEOUT = WMI_ROAM_FAIL_REASON_EAPOL_TIMEOUT, /* EAPOL M1 is not received */
  28337. WMI_ROAM_FAIL_REASON_MLME, /* MLME internal error */
  28338. WMI_ROAM_FAIL_REASON_INTERNAL_ABORT, /* Internal abort */
  28339. WMI_ROAM_FAIL_REASON_SCAN_START, /* Unable to start roam scan */
  28340. WMI_ROAM_FAIL_REASON_AUTH_NO_ACK, /* No ACK is received for Auth request */
  28341. WMI_ROAM_FAIL_REASON_AUTH_INTERNAL_DROP, /* Auth request is dropped internally */
  28342. WMI_ROAM_FAIL_REASON_REASSOC_NO_ACK, /* No ACK is received for Reassoc request */
  28343. WMI_ROAM_FAIL_REASON_REASSOC_INTERNAL_DROP, /* Reassoc request is dropped internally */
  28344. WMI_ROAM_FAIL_REASON_EAPOL_M2_SEND, /* Unable to send EAPOL M2 frame */
  28345. WMI_ROAM_FAIL_REASON_EAPOL_M2_INTERNAL_DROP, /* EAPOL M2 frame dropped internally */
  28346. WMI_ROAM_FAIL_REASON_EAPOL_M2_NO_ACK, /* No Ack is recieved for EAPOL M2 frame */
  28347. WMI_ROAM_FAIL_REASON_EAPOL_M3_TIMEOUT, /* M3 is not received */
  28348. WMI_ROAM_FAIL_REASON_EAPOL_M4_SEND, /* Unable to send EAPOL M4 frame */
  28349. WMI_ROAM_FAIL_REASON_EAPOL_M4_INTERNAL_DROP, /* EAPOL M4 frame dropped internally */
  28350. WMI_ROAM_FAIL_REASON_EAPOL_M4_NO_ACK, /* No Ack is recieved for EAPOL M4 frame */
  28351. WMI_ROAM_FAIL_REASON_NO_SCAN_FOR_FINAL_BMISS, /* Roam scan is not started for Final Bmiss case */
  28352. WMI_ROAM_FAIL_REASON_DISCONNECT, /* Deauth or Disassoc received from AP during roaming handoff */
  28353. WMI_ROAM_FAIL_REASON_SYNC, /* when host wakes-up during roaming in-progress, abort current roaming if previous sync is pending */
  28354. WMI_ROAM_FAIL_REASON_SAE_INVALID_PMKID, /* WPA3-SAE invalid PMKID */
  28355. WMI_ROAM_FAIL_REASON_SAE_PREAUTH_TIMEOUT, /* WPA3-SAE pre-authentication timeout */
  28356. WMI_ROAM_FAIL_REASON_SAE_PREAUTH_FAIL, /* WPA3-SAE pre-authentication failed */
  28357. WMI_ROAM_FAIL_REASON_UNABLE_TO_START_ROAM_HO, /* Roam HO is not started due to FW internal issue */
  28358. WMI_ROAM_FAIL_REASON_UNKNOWN = 255,
  28359. } WMI_ROAM_FAIL_REASON_ID;
  28360. typedef struct {
  28361. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_result_tlv_param */
  28362. /*
  28363. * timestamp is the absolute time w.r.t host timer which is synchronized
  28364. * between the host and target.
  28365. * This timestamp indicates the time when roaming is completed.
  28366. */
  28367. A_UINT32 timestamp; /* Timestamp in milli seconds */
  28368. A_UINT32 roam_status; /* 0 - Roaming is success, 1 - Roaming is failed */
  28369. A_UINT32 roam_fail_reason; /* from WMI_ROAM_FAIL_REASON_ID */
  28370. } wmi_roam_result;
  28371. typedef struct {
  28372. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_neighbor_report_info_tlv_param */
  28373. /* request_type:
  28374. * 1 -> BTM query
  28375. * 2 -> 11K neighbor report request
  28376. */
  28377. A_UINT32 request_type;
  28378. /* neighbor_report_request_timestamp:
  28379. * timestamp is the absolute time w.r.t host timer which is synchronized
  28380. * between the host and target.
  28381. * This timestamp indicates the time when neighbor report request
  28382. * is received.
  28383. */
  28384. A_UINT32 neighbor_report_request_timestamp; /* in milli seconds */
  28385. /* neighbor_report_response_timestamp:
  28386. * This timestamp indicates the time when neighbor report response is sent.
  28387. */
  28388. A_UINT32 neighbor_report_response_timestamp; /* in milli seconds */
  28389. A_UINT32 neighbor_report_channel_count; /* Number of channels received in neighbor report response */
  28390. A_UINT32 btm_query_token; /* btm query dialog token */
  28391. /* btm_query_reason_code:
  28392. * Transition Query Reasons are enumerated in table 7-43x
  28393. * of the 802.11v spec.
  28394. */
  28395. A_UINT32 btm_query_reason_code;
  28396. } wmi_roam_neighbor_report_info;
  28397. typedef struct {
  28398. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_btm_response_info_tlv_param */
  28399. /*enum STATUS_CODE_WNM_BTM defined in ieee80211_defs.h*/
  28400. A_UINT32 btm_status;
  28401. /* AP MAC address */
  28402. wmi_mac_addr target_bssid;
  28403. /* vsie_reason value:
  28404. * 0x00 Will move to Cellular
  28405. * 0x01 Unspecified
  28406. * 0x02 Not supported
  28407. * 0x03 No Cellular Network
  28408. * 0x04 Controlled by framework
  28409. * 0x05 Roam to better AP
  28410. * 0x06 Suspend mode
  28411. * 0x07 RSSI is strong enough
  28412. * 0x08-0xFF TBD
  28413. */
  28414. A_UINT32 vsie_reason;
  28415. /*
  28416. * timestamp is the absolute time w.r.t host timer which is synchronized
  28417. * between the host and target.
  28418. * This timestamp indicates the time when btm response is sent.
  28419. */
  28420. A_UINT32 timestamp; /* milli second units */
  28421. A_UINT32 btm_resp_dialog_token; /* dialog_token in btm response frame */
  28422. /* btm_resp_bss_termination_delay:
  28423. * bss_termination_delay in btm response frame is the number of minutes
  28424. * that the responding STA requests the BSS to delay termination.
  28425. */
  28426. A_UINT32 btm_resp_bss_termination_delay;
  28427. } wmi_roam_btm_response_info;
  28428. typedef struct {
  28429. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_btm_request_candidate_info_tlv_param */
  28430. wmi_mac_addr btm_candidate_bssid; /* BTM candidate MAC address */
  28431. A_UINT32 preference; /* preference in Preference IE */
  28432. } wmi_roam_btm_request_candidate_info;
  28433. typedef struct {
  28434. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_neighbor_report_channel_info_tlv_param */
  28435. A_UINT32 channel; /* Channel frequency in MHz */
  28436. } wmi_roam_neighbor_report_channel_info;
  28437. typedef struct {
  28438. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_frame_info_tlv_param */
  28439. /* timestamp is the absolute time w.r.t host timer which is synchronized between the host and target */
  28440. A_UINT32 timestamp; /* Timestamp when frame is sent or received */
  28441. /*
  28442. * frame_info = frame_type | (frame_subtype << 2) | (request_or_response << 6)| (seq_num << 16)
  28443. * frame_type(2 bits), frame_subtype(4 bits) are from 802.11 spec.
  28444. * If frame_type is WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT, frame_subtype
  28445. * should be one of value in WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE.
  28446. * request_or_response(1 bit) - Valid if frame_subtype is authentication.
  28447. * 0 - Authentication request 1 - Authentication response
  28448. * seq_num(16 bits) - frame sequence number
  28449. */
  28450. A_UINT32 frame_info;
  28451. /* status_code:
  28452. * For Rx frames : Status code from 802.11 spec, section 9.4.1.9
  28453. * For Rx frames (deauth / disassoc) : Reason code from 802.11 spec,
  28454. * section 9.4.1.7
  28455. * For Tx frames : Status_code should be one of value in
  28456. * WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS
  28457. */
  28458. A_UINT32 status_code;
  28459. /*
  28460. * rssi_dbm_abs
  28461. * Last known RSSI of the current BSSID at the moment when the frame
  28462. * was sent and received.
  28463. * This rssi value is valid for deauth / disassoc frame only.
  28464. * The rssi_dbm_abs value is the absolute value of the RSSI in dBm units.
  28465. * For example, if the RSSI is -40 dBm, rssi_dbm_abs will be 40.
  28466. */
  28467. A_UINT32 rssi_dbm_abs;
  28468. /* retry_count
  28469. * To show how many times the same frame (but with different
  28470. * sequence number) is retransmitted, in protocol level.
  28471. */
  28472. A_UINT32 retry_count;
  28473. } wmi_roam_frame_info;
  28474. typedef enum {
  28475. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT = 3,
  28476. } WMI_ROAM_FRAME_INFO_FRAME_TYPE;
  28477. typedef enum {
  28478. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_M1 = 1,
  28479. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_M2,
  28480. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_M3,
  28481. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_M4,
  28482. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_GTK_M1,
  28483. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_GTK_M2,
  28484. } WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE;
  28485. typedef enum {
  28486. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS_ACK = 0,
  28487. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS_NO_ACK,
  28488. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS_TX_FAIL,
  28489. } WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS;
  28490. typedef struct {
  28491. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_initial_info_tlv_param */
  28492. /* count of full scan */
  28493. A_UINT32 roam_full_scan_count;
  28494. A_INT32 rssi_th; /* unit: dBm */
  28495. A_UINT32 cu_th; /* channel utilization threhold: uses units of percent */
  28496. /* timer_canceled:
  28497. * bit0: timer1 canceled
  28498. * bit1: timer2 canceled
  28499. * bit2: inactive timer canceled
  28500. */
  28501. A_UINT32 timer_canceled;
  28502. } wmi_roam_initial_info;
  28503. typedef enum {
  28504. WMI_ROAM_MSG_RSSI_RECOVERED = 1, /* Connected AP RSSI is recovered to good region */
  28505. } WMI_ROAM_MSG_ID;
  28506. typedef struct {
  28507. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_msg_info_tlv_param */
  28508. /*
  28509. * timestamp is the absolute time (in milliseconds) w.r.t host timer
  28510. * which is synchronized between the host and target
  28511. */
  28512. A_UINT32 timestamp;
  28513. A_UINT32 msg_id; /* Message ID from WMI_ROAM_MSG_ID */
  28514. /* msg_param values are interpreted differently for different msg_id values.
  28515. * if msg_id == WMI_ROAM_MSG_RSSI_RECOVERED:
  28516. * msg_param1 contains current AP RSSI in dBm
  28517. * (unsigned -> signed conversion is required)
  28518. * msg_param2 contains next trigger RSSI threshold in dBm
  28519. * (unsigned -> signed conversion is required)
  28520. */
  28521. A_UINT32 msg_param1;
  28522. A_UINT32 msg_param2;
  28523. } wmi_roam_msg_info;
  28524. typedef struct {
  28525. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_stats_event_fixed_param */
  28526. A_UINT32 vdev_id;
  28527. A_UINT32 roam_scan_trigger_count; /* Number of roam scans triggered */
  28528. } wmi_roam_stats_event_fixed_param;
  28529. typedef struct {
  28530. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_get_scan_channel_list_cmd_fixed_param */
  28531. A_UINT32 vdev_id;
  28532. } wmi_roam_get_scan_channel_list_cmd_fixed_param;
  28533. typedef struct {
  28534. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_channel_list_event_fixed_param */
  28535. A_UINT32 vdev_id;
  28536. wmi_ssid ssid; /* SSID of connected AP */
  28537. /*
  28538. * This event can be sent as a response to
  28539. * WMI_ROAM_GET_SCAN_CHANNEL_LIST_CMDID or
  28540. * can be sent asynchronously during disconnection.
  28541. * command_response = 1, when it is sent as a response to
  28542. * WMI_ROAM_GET_SCAN_CHANNEL_LIST_CMDID
  28543. * = 0, for other cases
  28544. */
  28545. A_UINT32 command_response;
  28546. /*
  28547. * This fixed_param TLV is followed by the below TLVs:
  28548. *
  28549. * List of roam scan channel frequencies in MHz
  28550. * A_UINT32 channel_list[];
  28551. */
  28552. } wmi_roam_scan_channel_list_event_fixed_param;
  28553. typedef enum {
  28554. WMI_ROAM_CND_RSSI_SCORING = 0x00000001, /* FW considers RSSI scoring */
  28555. WMI_ROAM_CND_HT_SCORING = 0x00000002, /* FW considers HT scoring */
  28556. WMI_ROAM_CND_VHT_SCORING = 0x00000004, /* FW considers VHT scoring */
  28557. WMI_ROAM_CND_HE_SCORING = 0x00000008, /* FW considers 11ax scoring */
  28558. WMI_ROAM_CND_BW_SCORING = 0x00000010, /* FW considers Bandwidth scoring */
  28559. WMI_ROAM_CND_BAND_SCORING = 0x00000020, /* FW considers Band(2G/5G) scoring */
  28560. WMI_ROAM_CND_NSS_SCORING = 0x00000040, /* FW considers NSS(1x1 / 2x2) scoring */
  28561. WMI_ROAM_CND_CHAN_CONGESTION_SCORING = 0x00000080, /* FW considers ESP/QBSS scoring */
  28562. WMI_ROAM_CND_BEAMFORMING_SCORING = 0x00000100, /* FW considers Beamforming scoring */
  28563. WMI_ROAM_CND_PCL_SCORING = 0x00000200, /* FW considers PCL scoring */
  28564. WMI_ROAM_CND_OCE_WAN_SCORING = 0x00000400, /* FW considers OCE WAN metrics scoring */
  28565. WMI_ROAM_CND_OCE_AP_TX_PWR_SCORING = 0x00000800, /* FW considers OCE AP Tx power scoring */
  28566. WMI_ROAM_CND_OCE_AP_SUBNET_ID_SCORING = 0x00001000, /* FW considers OCE AP subnet id scoring */
  28567. WMI_ROAM_CND_SAE_PK_AP_SCORING = 0x00002000, /* FW considers SAE-PK enabled AP scoring */
  28568. } WMI_ROAM_CND_SCORING_PARAMS;
  28569. typedef struct {
  28570. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_capability_report_event_fixed_param */
  28571. /*
  28572. * This event is sent asynchronously during FW init.
  28573. * It indicates FW roam related capabilites to host.
  28574. *
  28575. * scoring_capability_bitmap = Indicates firmware candidate scoring
  28576. * capabilities. It's a bitmap of values
  28577. * from enum WMI_ROAM_CND_SCORING_PARAMS.
  28578. */
  28579. A_UINT32 scoring_capability_bitmap;
  28580. } wmi_roam_capability_report_event_fixed_param;
  28581. typedef struct {
  28582. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_mlo_config_cmd_fixed_param */
  28583. wmi_mac_addr partner_link_addr; /* Assigned link address which can be used as self link addr when vdev is not created */
  28584. } wmi_roam_mlo_config_cmd_fixed_param;
  28585. typedef struct {
  28586. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_big_data_cmd_fixed_param */
  28587. A_UINT32 vdev_id;
  28588. } wmi_vdev_get_big_data_cmd_fixed_param;
  28589. typedef struct {
  28590. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_send_big_data_event_fixed_param */
  28591. A_UINT32 vdev_id;
  28592. /** param list **/
  28593. /* Target power (dBm units) - 2.4G/5G */
  28594. A_UINT32 target_power_2g_dsss;
  28595. A_UINT32 target_power_2g_ofdm;
  28596. A_UINT32 target_power_2g_mcs0;
  28597. A_UINT32 target_power_5g_ofdm;
  28598. A_UINT32 target_power_5g_mcs0;
  28599. /* ANI level from hal-phy */
  28600. A_UINT32 ani_level;
  28601. /* Number of probe requests sent while roaming after BMISS */
  28602. A_UINT32 tx_probe_req;
  28603. /* Number of probe responses received while roaming after BMISS */
  28604. A_UINT32 rx_probe_response;
  28605. /*
  28606. * Number of retries (both by HW and FW) for tx data MPDUs sent by this vdev
  28607. */
  28608. A_UINT32 num_data_retries;
  28609. /* Number of tx data MPDUs dropped from this vdev due to tx retry limit */
  28610. A_UINT32 num_tx_data_fail;
  28611. /* Number of aggregated unicast tx expecting response ppdu */
  28612. A_UINT32 data_tx_ppdu_count;
  28613. /* Number of aggregated unicast tx expecting response mpdu */
  28614. A_UINT32 data_tx_mpdu_count;
  28615. /* number of rx frames with good PCLP */
  28616. A_UINT32 rx_frame_good_pclp_count;
  28617. /* Number of occasions that no valid delimiter is detected by ampdu parser */
  28618. A_UINT32 invalid_delimiter_count;
  28619. /* Number of frames for which the CRC check failed in the MAC */
  28620. A_UINT32 rx_crc_check_fail_count;
  28621. /* tx fifo overflows count for transmissions by this vdev */
  28622. A_UINT32 txpcu_fifo_overflows_count;
  28623. /* Number of ucast ACKS received good FCS (doesn't include block acks) */
  28624. A_UINT32 successful_acks_count;
  28625. /*
  28626. * RX BlockACK Counts
  28627. * Note that this counts the number of block acks received by this vdev,
  28628. * not the number of MPDUs acked by block acks.
  28629. */
  28630. A_UINT32 rx_block_ack_count;
  28631. /* Beacons received from member of BSS */
  28632. A_UINT32 member_bss_beacon_count;
  28633. /* Beacons received from other BSS */
  28634. A_UINT32 non_bss_beacon_count;
  28635. /* Number of RX Data multicast frames dropped by the HW */
  28636. A_UINT32 rx_data_mc_frame_filtered_count;
  28637. } wmi_vdev_send_big_data_event_fixed_param;
  28638. typedef struct {
  28639. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_big_data_p2_cmd_fixed_param */
  28640. A_UINT32 vdev_id;
  28641. } wmi_vdev_get_big_data_p2_cmd_fixed_param;
  28642. typedef struct {
  28643. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_send_big_data_p2_event_fixed_param */
  28644. A_UINT32 vdev_id;
  28645. /** param list **/
  28646. /* total number of TSF out of sync */
  28647. A_UINT32 tsf_out_of_sync;
  28648. /**
  28649. * ANI (noise interference) level corresponding to the channel.
  28650. * The range of values is different for chips of different target
  28651. * architectures. Helium values range from 0 to 9, while Lithium
  28652. * and Beryllium values range from -5 to 15.
  28653. * In all cases, higher values indicate more noise interference.
  28654. */
  28655. A_INT32 ani_level;
  28656. /*
  28657. * This fixed_param TLV is followed by the below TLVs:
  28658. * List of datapath big data stats. This stat is not interpreted by
  28659. * host. This gets directly updated on big data server and later FW
  28660. * team will analyze this data.
  28661. *
  28662. * A_UINT32 bd_datapath_stats[]; // DEPRECATED
  28663. * wmi_big_data_dp_stats_tlv_param big_data_dp_stats[];
  28664. */
  28665. } wmi_vdev_send_big_data_p2_event_fixed_param;
  28666. typedef struct {
  28667. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bd_datapath_stats_tlv_param */
  28668. A_UINT32 tlv_header;
  28669. /* Tx power before disconnection.
  28670. * The units of the following tx power fields are 0.5 dBm for Helium
  28671. * architecture target (e.g. a value of 1 means tx power = 0.5 dBm),
  28672. * and are 0.25 dBm for subsequent target architectures.
  28673. */
  28674. A_UINT32 last_data_tx_pwr;
  28675. A_UINT32 target_power_dsss;
  28676. A_UINT32 target_power_ofdm;
  28677. /* Rate index of last data frame before disconnection */
  28678. A_UINT32 last_tx_data_rix;
  28679. /* Tx rate (in kbps) of last data frame before disconnection */
  28680. A_UINT32 last_tx_data_rate_kbps;
  28681. } wmi_big_data_dp_stats_tlv_param;
  28682. typedef enum {
  28683. WMI_6GHZ_REG_LPI = 0,
  28684. WMI_6GHZ_REG_VLP = 1,
  28685. WMI_6GHZ_REG_SP = 2,
  28686. WMI_6GHZ_REG_MAX = 5, /* Can't expand, b/c used as array length below */
  28687. } WMI_6GHZ_REG_TYPE;
  28688. typedef struct {
  28689. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_tpc_power_fixed_param */
  28690. A_UINT32 vdev_id;
  28691. A_UINT32 psd_power; /* Value: 0 or 1, is PSD power or not */
  28692. A_UINT32 eirp_power; /* Maximum EIRP power (dDm units), valid only if power is PSD */
  28693. A_UINT32 power_type_6ghz; /* Type: WMI_6GHZ_REG_TYPE, used for halphy CTL lookup */
  28694. /*
  28695. * This fixed_param TLV is followed by the below TLVs:
  28696. * num_pwr_levels of wmi_vdev_set_tpc_power_atomic_fixed_param
  28697. * For PSD power, it is the PSD/EIRP power of the frequency (20MHz chunks).
  28698. * For non-psd power, the power values are for 20, 40, and till
  28699. * BSS BW power levels.
  28700. * The num_pwr_levels will be checked by sw how many elements present
  28701. * in the variable-length array.
  28702. *
  28703. * wmi_vdev_set_tpc_power_atomic_fixed_param;
  28704. */
  28705. } wmi_vdev_set_tpc_power_fixed_param;
  28706. typedef struct {
  28707. A_UINT32 tlv_header;
  28708. A_UINT32 chan_cfreq; /* Channel center frequency (MHz) */
  28709. A_UINT32 tx_power; /* Unit: dBm, either PSD/EIRP power for this frequency or incremental for non-PSD BW */
  28710. } wmi_vdev_ch_power_info;
  28711. typedef struct {
  28712. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_txpower_query_cmd_fixed_param */
  28713. A_UINT32 request_id; /* unique request ID to distinguish the command / event set */
  28714. /* The mode value has the following meaning :
  28715. * 0 : 11a
  28716. * 1 : 11bg
  28717. * 2 : 11b
  28718. * 3 : 11g only
  28719. * 4 : 11a HT20
  28720. * 5 : 11g HT20
  28721. * 6 : 11a HT40
  28722. * 7 : 11g HT40
  28723. * 8 : 11a VHT20
  28724. * 9 : 11a VHT40
  28725. * 10 : 11a VHT80
  28726. * 11 : 11g VHT20
  28727. * 12 : 11g VHT40
  28728. * 13 : 11g VHT80
  28729. * 14 : unknown
  28730. */
  28731. A_UINT32 mode;
  28732. A_UINT32 rate; /* rate index */
  28733. A_UINT32 nss; /* number of spatial stream */
  28734. A_UINT32 beamforming; /* beamforming parameter 0:disabled, 1:enabled */
  28735. A_UINT32 chain_mask; /* mask for the antenna set to get power */
  28736. A_UINT32 chain_index; /* index for the antenna */
  28737. } wmi_get_tpc_power_cmd_fixed_param;
  28738. typedef struct {
  28739. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_tpc_power_evt_fixed_param */
  28740. A_UINT32 request_id; /* request ID set by the command */
  28741. A_INT32 tx_power; /* TX power for the specified HALPHY parameters in half dBm unit */
  28742. } wmi_get_tpc_power_evt_fixed_param;
  28743. typedef struct {
  28744. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_dpd_status_cmd_fixed_param */
  28745. A_UINT32 pdev_id; /* PDEV ID set by the command */
  28746. } wmi_pdev_get_dpd_status_cmd_fixed_param;
  28747. typedef enum {
  28748. WMI_DPD_STATUS_DISABLE = 0,
  28749. WMI_DPD_STATUS_ENABLE = 1,
  28750. WMI_DPD_STATUS_INVALID = 2,
  28751. } WMI_DPD_STATUS;
  28752. typedef struct {
  28753. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_dpd_status_evt_fixed_param */
  28754. A_UINT32 pdev_id; /* PDEV Id set by the command */
  28755. A_UINT32 dpd_status; /* DPD status obtained from HALPHY, refer to WMI_DPD_STATUS */
  28756. } wmi_pdev_get_dpd_status_evt_fixed_param;
  28757. typedef struct {
  28758. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_halphy_cal_status_cmd_fixed_param */
  28759. A_UINT32 pdev_id; /* PDEV ID set by the command */
  28760. } wmi_pdev_get_halphy_cal_status_cmd_fixed_param;
  28761. typedef struct {
  28762. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_aoa_phasedelta_evt_fixed_param */
  28763. A_UINT32 pdev_id; /* PDEV Id set by the command */
  28764. A_UINT32 freq; /* Current channel in MHz */
  28765. /*
  28766. * Chain Info
  28767. * LSB 16 bits - Max chain supported,
  28768. * MSB 16 bits - Chain pair which has phase values:
  28769. * 0x0003 - chain 0 and 1
  28770. * 0x000c - chain 2 and 3
  28771. * 0x0030 - chain 4 and 5
  28772. * 0x00c0 - chain 6 and 7
  28773. */
  28774. A_UINT32 chainInfo;
  28775. /*
  28776. * Phase Delta values:
  28777. * Two phase delta values are packed into each A_UINT32 word
  28778. * LSB 16-bit is 1st value and MSB 16-bit is 2nd value
  28779. * Phasedelta values will be 0-1023 (mapped to 0-360 degree)
  28780. * Each gain from 0 to 61 has a phasedelta value, e.g.
  28781. * gain 0's phase delta occupies bits 15:0 of phasedelta[chain][0],
  28782. * gain 1's phase delta occupies bits 31:16 of phasedelta[chain][0],
  28783. * gain 2's phase delta occupies bits 15:0 of phasedelta[chain][1], etc.
  28784. */
  28785. A_UINT32 phasedelta[WMI_MAX_CHAINS_FOR_AOA_RCC][MAX_AOA_PHASEDELTA];
  28786. /*
  28787. * IBF cal values:
  28788. * Used for final AoA calculation
  28789. * [AoAPhase = ( PhaseDeltaValue + IBFcalValue ) % 1024]
  28790. */
  28791. A_UINT32 perChainIbfCalVal[WMI_MAX_CHAINS_FOR_AOA_RCC];
  28792. } wmi_pdev_aoa_phasedelta_evt_fixed_param;
  28793. /* WMI_HALPHY_CAL_LIST:
  28794. *
  28795. * Below is the list of HALPHY online CAL currently enabled in
  28796. * WIN chipsets
  28797. */
  28798. typedef enum {
  28799. WMI_HALPHY_CAL_ADC = 0,
  28800. WMI_HALPHY_CAL_BWFILTER,
  28801. WMI_HALPHY_CAL_PDET_AND_PAL,
  28802. WMI_HALPHY_CAL_RXDCO,
  28803. WMI_HALPHY_CAL_COMB_TXLO_TXIQ_RXIQ,
  28804. WMI_HALPHY_CAL_IBF,
  28805. WMI_HALPHY_CAL_PA_DROOP,
  28806. WMI_HALPHY_CAL_DAC,
  28807. WMI_HALPHY_CAL_ANI,
  28808. WMI_HALPHY_CAL_NOISE_FLOOR,
  28809. WMI_HALPHY_CAL_MAX_CAL_LIST
  28810. } WMI_HALPHY_CAL_LIST;
  28811. /* WMI_HALPHY_CAL_VALID_BITMAP_STATUS
  28812. *
  28813. * In WMI wmi_pdev_get_halphy_cal_status_evt_fixed_param
  28814. * (halphy_cal_valid_bmap member), below enum list must be used
  28815. * to get which calibration status indication is sent by FW to HOST.
  28816. * Only if that particular bit it set, corresponding bit of the
  28817. * halphy_cal_status variable will be valid.
  28818. */
  28819. typedef enum {
  28820. WMI_HALPHY_CAL_ADC_BMAP = (1 << WMI_HALPHY_CAL_ADC),
  28821. WMI_HALPHY_CAL_BWFILTER_BMAP = (1 << WMI_HALPHY_CAL_BWFILTER),
  28822. WMI_HALPHY_CAL_PDET_AND_PAL_BMAP = (1 << WMI_HALPHY_CAL_PDET_AND_PAL),
  28823. WMI_HALPHY_CAL_RXDCO_BMAP = (1 << WMI_HALPHY_CAL_RXDCO),
  28824. WMI_HALPHY_CAL_COMB_TXLO_TXIQ_RXIQ_BMAP = (1 << WMI_HALPHY_CAL_COMB_TXLO_TXIQ_RXIQ),
  28825. WMI_HALPHY_CAL_IBF_BMAP = (1 << WMI_HALPHY_CAL_IBF),
  28826. WMI_HALPHY_CAL_PA_DROOP_BMAP = (1 << WMI_HALPHY_CAL_PA_DROOP),
  28827. WMI_HALPHY_CAL_DAC_BMAP = (1 << WMI_HALPHY_CAL_DAC),
  28828. WMI_HALPHY_CAL_ANI_BMAP = (1 << WMI_HALPHY_CAL_ANI),
  28829. WMI_HALPHY_CAL_NOISE_FLOOR_BMAP = (1 << WMI_HALPHY_CAL_NOISE_FLOOR),
  28830. } WMI_HALPHY_CAL_VALID_BITMAP_STATUS;
  28831. typedef struct {
  28832. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_halphy_cal_status_evt_fixed_param */
  28833. A_UINT32 pdev_id; /* PDEV Id set by the command */
  28834. /*
  28835. * Calibration valid bitmap from HALPHY, refer to
  28836. * WMI_HALPHY_CAL_VALID_BITMAP_STATUS.
  28837. * Only if this particular bit it set, corresponding bit of the
  28838. * halphy_cal_status variable will be valid.
  28839. */
  28840. A_UINT32 halphy_cal_valid_bmap;
  28841. /* Calibration result status bitmap from HALPHY.
  28842. * The WMI_HALPHY_CAL_VALID_BITMAP_STATUS enum identifies which bit
  28843. * in the bitmap corresponds to which cal type.
  28844. * Each valid bit uses the following settings:
  28845. * 1 - SUCCESS
  28846. * 0 - FAILURE
  28847. */
  28848. A_UINT32 halphy_cal_status;
  28849. } wmi_pdev_get_halphy_cal_status_evt_fixed_param;
  28850. typedef struct {
  28851. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_halphy_cal_bmap_cmd_fixed_param */
  28852. A_UINT32 pdev_id; /* PDEV ID set by the command */
  28853. /*
  28854. * Calibration valid bitmap from HOST, refer to
  28855. * WMI_HALPHY_CAL_VALID_BITMAP_STATUS.
  28856. * Based on the bitmap value, HALPHY will set corresponding mask values
  28857. * to each of the online calibrations
  28858. */
  28859. A_UINT32 online_halphy_cals_bmap;
  28860. /* Calibration enable/disable support for home/scan channel
  28861. * 0 - home channel
  28862. * 1 - scan channel
  28863. * 2 - both home and scan channel
  28864. */
  28865. A_UINT32 home_scan_channel;
  28866. } wmi_pdev_set_halphy_cal_bmap_cmd_fixed_param;
  28867. typedef struct {
  28868. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_halphy_cal_bmap_evt_fixed_param */
  28869. A_UINT32 pdev_id; /* PDEV Id set by the command */
  28870. /* Status indication for calibration
  28871. * 0 - SUCCESS
  28872. * 1 - FAIL
  28873. * This WMI command will by sent from HOST dynamically but only one
  28874. * at a time. So no need of cookie/request handshake.
  28875. */
  28876. A_UINT32 status;
  28877. } wmi_pdev_set_halphy_cal_bmap_evt_fixed_param;
  28878. /* below structures are related to Motion Detection. */
  28879. typedef struct {
  28880. /** TLV tag and len; tag equals
  28881. * WMITLV_TAG_STRUC_wmi_motion_det_config_params_cmd_fixed_param */
  28882. A_UINT32 tlv_header; /** TLV Header */
  28883. A_UINT32 vdev_id; /** Vdev ID */
  28884. A_UINT32 time_t1; /** Time gap of successive bursts of
  28885. * measurement frames during coarse
  28886. * motion detection (in ms) */
  28887. A_UINT32 time_t2; /** Time gap of successive bursts of
  28888. * measurement frames during fine
  28889. * motion detection (in ms) */
  28890. A_UINT32 n1; /** number of measurement frames in one
  28891. * burst, for coarse detection */
  28892. A_UINT32 n2; /** number of measurement frames in one
  28893. * burst, for fine detection */
  28894. A_UINT32 time_t1_gap; /** gap between measurement frames in
  28895. * course detection (in ms) */
  28896. A_UINT32 time_t2_gap; /** gap between measurement frames in
  28897. * fine detection (in ms) */
  28898. A_UINT32 coarse_K; /** number of times motion detection has to
  28899. * be performed for coarse detection */
  28900. A_UINT32 fine_K; /** number of times motion detection has to
  28901. * be performed for fine detection */
  28902. A_UINT32 coarse_Q; /** number of times motion is expected
  28903. * to be detected for success case in
  28904. * coarse detection */
  28905. A_UINT32 fine_Q; /** number of times motion is expected
  28906. * to be detected for success case in
  28907. * fine detection */
  28908. A_UINT32 md_coarse_thr_high; /** higher threshold value (in percent)
  28909. * from host to FW, which will be used in
  28910. * coarse detection phase of motion detection.
  28911. * This is the threshold for the correlation
  28912. * of the old RF local-scattering environment
  28913. * with the current RF local-scattering
  28914. * environment. A value of 100(%) indicates
  28915. * that neither the transceiver nor any
  28916. * nearby objects have changed position. */
  28917. A_UINT32 md_fine_thr_high; /** higher threshold value (in percent)
  28918. * from host to FW, which will be used in
  28919. * fine detection phase of motion detection.
  28920. * This is the threshold for correlation
  28921. * between the old and current RF environments,
  28922. * as explained above. */
  28923. A_UINT32 md_coarse_thr_low; /** lower threshold value (in percent)
  28924. * for immediate detection of motion in
  28925. * coarse detection phase.
  28926. * This is the threshold for correlation
  28927. * between the old and current RF environments,
  28928. * as explained above. */
  28929. A_UINT32 md_fine_thr_low; /** lower threshold value (in percent)
  28930. * for immediate detection of motion in
  28931. * fine detection phase.
  28932. * This is the threshold for correlation
  28933. * between the old and current RF environments,
  28934. * as explained above. */
  28935. } wmi_motion_det_config_params_cmd_fixed_param;
  28936. typedef struct {
  28937. /** TLV tag and len; tag equals
  28938. * WMITLV_TAG_STRUC_wmi_motion_det_base_line_config_params_cmd_fixed_param */
  28939. A_UINT32 tlv_header; /** TLV Header */
  28940. A_UINT32 vdev_id; /** Vdev ID */
  28941. A_UINT32 bl_time_t; /** time T for baseline (in ms)
  28942. * Every bl_time_t, bl_n packets are sent */
  28943. A_UINT32 bl_packet_gap; /** gap between measurement frames for baseline
  28944. * (in ms) */
  28945. A_UINT32 bl_n; /** number of measurement frames to be sent
  28946. * during one baseline */
  28947. A_UINT32 bl_num_meas; /** number of times the baseline measurement
  28948. * to be done */
  28949. } wmi_motion_det_base_line_config_params_cmd_fixed_param;
  28950. typedef struct {
  28951. /** TLV tag and len; tag equals
  28952. * WMITLV_TAG_STRUC_wmi_motion_det_start_stop_cmd_fixed_param */
  28953. A_UINT32 tlv_header; /** TLV Header */
  28954. A_UINT32 vdev_id; /** Vdev ID */
  28955. A_UINT32 enable; /** start = 1, stop =0 */
  28956. } wmi_motion_det_start_stop_cmd_fixed_param;
  28957. typedef struct {
  28958. /** TLV tag and len; tag equals
  28959. * WMITLV_TAG_STRUC_wmi_motion_det_base_line_start_stop_cmd_fixed_param */
  28960. A_UINT32 tlv_header; /** TLV Header */
  28961. A_UINT32 vdev_id; /** Vdev ID */
  28962. A_UINT32 enable; /** start = 1, stop =0 */
  28963. } wmi_motion_det_base_line_start_stop_cmd_fixed_param;
  28964. typedef struct {
  28965. /** TLV tag and len; tag equals
  28966. * WMITLV_TAG_STRUC_wmi_motion_det_event */
  28967. A_UINT32 tlv_header; /** TLV Header */
  28968. A_UINT32 vdev_id; /** Vdev ID */
  28969. A_UINT32 status; /** status = 1 -> motion detected */
  28970. } wmi_motion_det_event;
  28971. typedef struct {
  28972. /** TLV tag and len; tag equals
  28973. * WMITLV_TAG_STRUC_wmi_motion_det_base_line_event */
  28974. A_UINT32 tlv_header; /** TLV Header */
  28975. A_UINT32 vdev_id; /** Vdev ID */
  28976. A_UINT32 bl_baseline_value; /** baseline correlation value calculated
  28977. * during baselining phase (in %) */
  28978. A_UINT32 bl_max_corr_reserved; /** max corr value obtained during baselining
  28979. * phase (in %); reserved for future */
  28980. A_UINT32 bl_min_corr_reserved; /** min corr value obtained during baselining
  28981. * phase (in %); reserved for future */
  28982. } wmi_motion_det_base_line_event;
  28983. /* Below structures are related to OBSS_PD_SPATIAL Reuse */
  28984. typedef struct {
  28985. /** TLV tag and len; tag equals
  28986. * WMITLV_TAG_STRUC_wmi_obss_set_cmd_fixed_param */
  28987. A_UINT32 tlv_header;
  28988. /** Enable/Disable Spatial Reuse */
  28989. A_UINT32 enable;
  28990. /*
  28991. * In the below fields, "OBSS level" refers to the power of the
  28992. * signals received from "Other BSS".
  28993. * Spatial reuse will only be permitted if the Other BSS's signal power
  28994. * is witin the min to max range specified by the below fields.
  28995. */
  28996. /** Minimum OBSS level to use */
  28997. A_INT32 obss_min; /* RSSI in dBm */
  28998. /** Maximum OBSS level to use */
  28999. A_INT32 obss_max; /* RSSI in dBm */
  29000. /** Vdev id*/
  29001. A_UINT32 vdev_id;
  29002. } wmi_obss_spatial_reuse_set_cmd_fixed_param;
  29003. /*
  29004. * Below structure is related to WMI CMD that configures the default
  29005. * mimimum (OBSS_MIN) and maximum (OBSS_MAX) Other BSS levels (RSSI in dbm)
  29006. * for VDEV of a give type (STA or AP). These thresholds are configured
  29007. * within the Host and passed down to the FW. FW will use these
  29008. * default OBSS_MIN and OBSS_MAX values during roaming if the assoc response
  29009. * from the AP does not include spatial reuse parameter set Info Element.
  29010. */
  29011. typedef struct {
  29012. /** TLV tag and len; tag equals
  29013. * WMITLV_TAG_STRUC_wmi_obss_spatial_reuse_set_def_obss_thresh_cmd_fixed_param
  29014. */
  29015. A_UINT32 tlv_header;
  29016. /*
  29017. * In the below fields, "OBSS level" refers to the power of the
  29018. * signals received from "Other BSS".
  29019. * Spatial reuse will only be permitted if the Other BSS's signal power
  29020. * is witin the min to max range specified by the below fields.
  29021. */
  29022. /** Minimum OBSS level to use */
  29023. A_INT32 obss_min; /* RSSI in dBm */
  29024. /** Maximum OBSS level to use */
  29025. A_INT32 obss_max; /* RSSI in dBm */
  29026. /** Type of VDEV for which these threshold are applicable.
  29027. * vdev_type should be one of WMI_VDEV_TYPE_STA or WMI_VDEV_TYPE_AP
  29028. */
  29029. A_UINT32 vdev_type;
  29030. } wmi_obss_spatial_reuse_set_def_obss_thresh_cmd_fixed_param;
  29031. typedef struct {
  29032. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_wmi_chan_width_peer_list */
  29033. wmi_mac_addr peer_macaddr;
  29034. A_UINT32 chan_width; /* wmi_channel_width */
  29035. } wmi_chan_width_peer_list;
  29036. #define WMI_PEER_CHAN_WIDTH_SWITCH_SET_VALID_VDEV_ID(comp) WMI_SET_BITS(comp, 31,1, 1)
  29037. #define WMI_PEER_CHAN_WIDTH_SWITCH_GET_VALID_VDEV_ID(comp) WMI_GET_BITS(comp, 31, 1)
  29038. #define WMI_PEER_CHAN_WIDTH_SWITCH_SET_VDEV_ID(comp, value) WMI_SET_BITS(comp, 0, 8, value)
  29039. #define WMI_PEER_CHAN_WIDTH_SWITCH_GET_VDEV_ID(comp) WMI_GET_BITS(comp, 0, 8)
  29040. typedef struct {
  29041. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_chan_width_switch_cmd_fixed_param */
  29042. A_UINT32 num_peers;
  29043. /* vdev_var:
  29044. * The MSb (bit 31) indicates that the vdev_id is valid.
  29045. * The LSB is used to infer the actual vdev_id.
  29046. * The other bits can be used for future enhancements.
  29047. */
  29048. A_UINT32 vdev_var;
  29049. /*
  29050. * Following this structure is the TLV:
  29051. * struct wmi_chan_width_peer_list chan_width_peer_info[num_peers];
  29052. */
  29053. } wmi_peer_chan_width_switch_cmd_fixed_param;
  29054. typedef struct {
  29055. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_he_tb_action_frm_cmd_fixed_param */
  29056. A_UINT32 tlv_header;
  29057. /* enable or disable HE TB Action frame */
  29058. A_UINT32 enable;
  29059. /* length of action frame body in bytes */
  29060. A_UINT32 data_len;
  29061. /* This TLV is followed by another TLV of array of bytes
  29062. * A_UINT8 data[];
  29063. * This data array contains the action frame raw data
  29064. */
  29065. } wmi_pdev_he_tb_action_frm_cmd_fixed_param;
  29066. typedef struct {
  29067. /** TLV tag and len; tag equals
  29068. * WMITLV_TAG_STRUC_wmi_hpcs_pulse_start_cmd_fixed_param */
  29069. A_UINT32 tlv_header; /** TLV Header */
  29070. A_UINT32 vdev_id; /** Vdev ID */
  29071. A_UINT32 start; /** Start/Stop */
  29072. A_UINT32 sync_time; /** Lower 32-bit of the TSF at which the
  29073. * pulse should be synced. */
  29074. A_UINT32 pulse_interval; /** Periodicity of pulses in micro seconds */
  29075. A_UINT32 active_sync_period; /** Number of beacons to sync before generating
  29076. * pulse in units of beacon interval.
  29077. * Valid for clock slaves only. */
  29078. A_UINT32 gpio_pin; /** GPIO Pin number to be used */
  29079. A_UINT32 pulse_width; /** Duration of pulse in micro seconds */
  29080. } wmi_hpcs_pulse_start_cmd_fixed_param;
  29081. typedef struct {
  29082. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_muedca_params_config_event_fixed_param */
  29083. A_UINT32 tlv_header; /** TLV Header */
  29084. A_UINT32 pdev_id;
  29085. /*
  29086. * The following per-AC arrays are indexed using the
  29087. * WMI_AC_xxx / wmi_traffic_ac enum values.
  29088. */
  29089. /* aifsn
  29090. * Arbitration inter frame spacing number (AIFSN)
  29091. * Values are integers used for back off computation.
  29092. */
  29093. A_UINT32 aifsn[WMI_AC_MAX];
  29094. /* ecwmin
  29095. * Exponent form of ContentionWindow min (ECWmin)
  29096. * Values are integers used for back off computation.
  29097. */
  29098. A_UINT32 ecwmin[WMI_AC_MAX];
  29099. /* ecwmax
  29100. * Exponent form of ContentionWindow max (ECWmax)
  29101. * Values are integers used for back off computation.
  29102. */
  29103. A_UINT32 ecwmax[WMI_AC_MAX];
  29104. /* muedca_expiration_time
  29105. * MU EDCA Expiration time refers to the length of time after the most
  29106. * recent UL trigger time. The MU EDCA Timer field indicates the time
  29107. * limit, in units of 8 TUs
  29108. */
  29109. A_UINT32 muedca_expiration_time[WMI_AC_MAX];
  29110. } wmi_muedca_params_config_event_fixed_param;
  29111. /* Default PE Duration subfield indicates the PE duration in units of 4 us */
  29112. #define WMI_HEOPS_DEFPE_GET_D3(he_ops) WMI_GET_BITS(he_ops, 0, 3)
  29113. #define WMI_HEOPS_DEFPE_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 0, 3, value)
  29114. /* TWT required */
  29115. #define WMI_HEOPS_TWT_REQUIRED_GET_D3(he_ops) WMI_GET_BITS(he_ops, 3, 1)
  29116. #define WMI_HEOPS_TWT_REQUIRED_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 3, 1, value)
  29117. /* RTS threshold in units of 32 us,0 - always use RTS 1023 - this is disabled */
  29118. #define WMI_HEOPS_RTSTHLD_GET_D3(he_ops) WMI_GET_BITS(he_ops, 4, 10)
  29119. #define WMI_HEOPS_RTSTHLD_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 4, 10, value)
  29120. /* VHT Operation Information Present */
  29121. #define WMI_HEOPS_VHTOPSPRSNT_GET_D3(he_ops) WMI_GET_BITS(he_ops, 14, 1)
  29122. #define WMI_HEOPS_VHTOPSPRSNT_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 14, 1, value)
  29123. /* Co-Located BSS */
  29124. #define WMI_HEOPS_COLOCBSS_GET_D3(he_ops) WMI_GET_BITS(he_ops, 15, 1)
  29125. #define WMI_HEOPS_COLOCBSS_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 15, 1, value)
  29126. /* ER SU Disable */
  29127. #define WMI_HEOPS_ERSUDIS_GET_D3(he_ops) WMI_GET_BITS(he_ops, 16, 1)
  29128. #define WMI_HEOPS_ERSUDIS_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 16, 1, value)
  29129. /* bit17 - bit23 are reserved */
  29130. /* BSS color */
  29131. #define WMI_HEOPS_COLOR_GET_D3(he_ops) WMI_GET_BITS(he_ops, 24, 6)
  29132. #define WMI_HEOPS_COLOR_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 24, 6, value)
  29133. /* Partial BSS Color field indicates whether BSS applies an AID assignment rule using partial BSS color bits */
  29134. #define WMI_HEOPS_PARTBSSCOLOR_GET_D3(he_ops) WMI_GET_BITS(he_ops, 30, 1)
  29135. #define WMI_HEOPS_PARTBSSCOLOR_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 30, 1, value)
  29136. /* when set to 1 disables use of BSS color */
  29137. #define WMI_HEOPS_BSSCOLORDISABLE_GET_D3(he_ops) WMI_GET_BITS(he_ops, 31, 1)
  29138. #define WMI_HEOPS_BSSCOLORDISABLE_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 31, 1, value)
  29139. /* PHY Capabilities Information field */
  29140. /* bit 0 reserved */
  29141. /*
  29142. * B0: Indicates STA support 40 MHz channel width in 2.4 GHz
  29143. * B1: Indicates STA support 40 MHz and 80 MHz channel width in 5 GHz
  29144. * B2: Indicates STA supports 160 MHz channel width in 5 GHz
  29145. * B3: Indicates STA supports 160/80+80 MHz channel width in 5 GHz
  29146. * B4: If B1 is set to 0, then B5 indicates support of 242/106/52/26-tone
  29147. * RU mapping in 40 MHz channel width in 2.4 GHz. Otherwise Reserved.
  29148. * B5: If B2, B3, and B4 are set to 0, then B6 indicates support of
  29149. * 242-tone RU mapping in 40 MHz and 80
  29150. * MHz channel width in 5 GHz. Otherwise Reserved.
  29151. * B6: Reserved
  29152. */
  29153. #define WMI_HECAP_PHY_CBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 1, 7)
  29154. #define WMI_HECAP_PHY_CBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 1, 7, value)
  29155. /*
  29156. * B0: Indicates STA supports reception of preamble puncturing in 80 MHz,
  29157. * where in the preamble only the secondary 20 MHz is punctured
  29158. * B1: Indicates STA supports reception of preamble puncturing in 80 MHz,
  29159. * where in the preamble only one of the two 20 MHz sub-channels in the
  29160. * secondary 40 MHz is punctured
  29161. * B2: Indicates STA supports reception of preamble puncturing in 160 MHz
  29162. * or 80+80 MHz, where in the primary 80 MHz of the preamble only the
  29163. * secondary 20 MHz is punctured
  29164. * B3: Indicates STA supports reception of preamble puncturing in 160 MHz
  29165. * or 80+80 MHz, where in the primary 80 MHz of the preamble, the
  29166. * primary 40 MHz is present
  29167. */
  29168. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 8, 4)
  29169. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 8, 4, value)
  29170. /* Indicates transmitting STA is a Class A (1) or a Class B (0) device */
  29171. #define WMI_HECAP_PHY_COD_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 12, 1)
  29172. #define WMI_HECAP_PHY_COD_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 12, 1, value)
  29173. /* Indicates support of transmission and reception of LDPC encoded packets */
  29174. #define WMI_HECAP_PHY_LDPC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 13, 1)
  29175. #define WMI_HECAP_PHY_LDPC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 13, 1, value)
  29176. /*
  29177. * B0: Indicates support of reception of 1x LTF and 0.8us guard interval duration for HE SU PPDUs.
  29178. */
  29179. #define WMI_HECAP_PHY_LTFGIFORHE_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 14, 1)
  29180. #define WMI_HECAP_PHY_LTFGIFORHE_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 14, 1, value)
  29181. /*
  29182. * If the Doppler Rx subfield is 1, indicates the maximum number of space-time streams supported for reception
  29183. * when a midamble is present in the Data field.
  29184. * If the Doppler Tx subfield is 1, indicates the maximum number of space-time streams supported for transmission
  29185. * when a midamble is present in the Data field.
  29186. * If both Doppler Rx and Doppler Tx subfields are 1, indicates the maximum number of space-time streams
  29187. * supported for transmission and reception when a midamble is present in the Data field.
  29188. */
  29189. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 15, 2)
  29190. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 15, 2, value)
  29191. /*
  29192. * B0: For a transmitting STA acting as beamformee, it indicates support of
  29193. * NDP reception using 4x LTF and 3.2 us guard interval duration
  29194. */
  29195. #define WMI_HECAP_PHY_LTFGIFORNDP_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 17, 1)
  29196. #define WMI_HECAP_PHY_LTFGIFORNDP_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 17, 1, value)
  29197. /*
  29198. * indicates support for the transmission of an HE TB PPDU that has a
  29199. * bandwidth less than or equal to 80 MHz and is using STBC and with
  29200. * one spatial stream
  29201. */
  29202. #define WMI_HECAP_PHY_TXSTBC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 18, 1)
  29203. #define WMI_HECAP_PHY_TXSTBC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 18, 1, value)
  29204. /* indicates support for the reception of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx */
  29205. #define WMI_HECAP_PHY_RXSTBC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 19, 1)
  29206. #define WMI_HECAP_PHY_RXSTBC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 19, 1, value)
  29207. /* indicates transmitting STA supports transmitting HE PPDUs with Doppler procedure */
  29208. #define WMI_HECAP_PHY_TXDOPPLER_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 20, 1)
  29209. #define WMI_HECAP_PHY_TXDOPPLER_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 20, 1, value)
  29210. /* indicates transmitting STA supports receiving HE PPDUs with Doppler procedure */
  29211. #define WMI_HECAP_PHY_RXDOPPLER_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 21, 1)
  29212. #define WMI_HECAP_PHY_RXDOPPLER_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 21, 1, value)
  29213. /*
  29214. * If the transmitting STA is an AP:
  29215. * indicates STA supports of reception of full bandwidth UL MU-MIMO
  29216. * transmission.
  29217. * If the transmitting STA is a non-AP STA:
  29218. * indicates STA supports of transmission of full bandwidth UL MU-MIMO
  29219. * transmission.
  29220. */
  29221. #define WMI_HECAP_PHY_UL_MU_MIMO_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 22, 1)
  29222. #define WMI_HECAP_PHY_UL_MU_MIMO_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 22, 1, value)
  29223. /*
  29224. * If the transmitting STA is an AP:
  29225. * indicates STA supports of reception of UL MUMIMO transmission on an
  29226. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  29227. * If the transmitting STA is a non-AP STA:
  29228. * indicates STA supports of transmission of UL MU-MIMO transmission on an
  29229. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  29230. */
  29231. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 23, 1)
  29232. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 23, 1, value)
  29233. /* Tx DCM
  29234. * B0:B1
  29235. * 00: Does not support DCM
  29236. * 01: BPSK
  29237. * 10: QPSK
  29238. * 11: 16-QAM
  29239. * B2 signals maximum number of spatial streams with DCM
  29240. * 0: 1 spatial stream
  29241. * 1: 2 spatial streams
  29242. */
  29243. #define WMI_HECAP_PHY_DCMTX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 24, 3)
  29244. #define WMI_HECAP_PHY_DCMTX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 24, 3, value)
  29245. /* Rx DCM
  29246. * B0:B1
  29247. * 00: Does not support DCM
  29248. * 01: BPSK
  29249. * 10: QPSK
  29250. * 11: 16-QAM
  29251. * B2 signals maximum number of spatial streams with DCM
  29252. * 0: 1 spatial stream
  29253. * 1: 2 spatial streams
  29254. */
  29255. #define WMI_HECAP_PHY_DCMRX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 27, 3)
  29256. #define WMI_HECAP_PHY_DCMRX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 27, 3, value)
  29257. /*
  29258. * Indicates that the STA supports the reception of an HE MU PPDU payload
  29259. * over full bandwidth and partial bandwidth (106-tone RU within 20 MHz).
  29260. */
  29261. #define WMI_HECAP_PHY_ULHEMU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 30, 1)
  29262. #define WMI_HECAP_PHY_ULHEMU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 30, 1, value)
  29263. /* Indicates support for operation as an SU beamformer */
  29264. #define WMI_HECAP_PHY_SUBFMR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 31, 1)
  29265. #define WMI_HECAP_PHY_SUBFMR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 31, 1, value)
  29266. /* Indicates support for operation as an SU beamformee */
  29267. #define WMI_HECAP_PHY_SUBFME_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 0, 1)
  29268. #define WMI_HECAP_PHY_SUBFME_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 0, 1, value)
  29269. /* Indicates support for operation as an MU Beamformer */
  29270. #define WMI_HECAP_PHY_MUBFMR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 1, 1)
  29271. #define WMI_HECAP_PHY_MUBFMR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 1, 1, value)
  29272. /*
  29273. * Num STS -1 for <= 80MHz (min val 3)
  29274. * The maximum number of space-time streams minus 1 that the STA can
  29275. * receive in an HE NDP
  29276. */
  29277. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 2, 3)
  29278. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 2, 3, value)
  29279. /*
  29280. * Num STS -1 for > 80MHz (min val 3)
  29281. * The maximum number of space-time streams minus 1 that the STA can
  29282. * receive in an HE NDP
  29283. */
  29284. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  29285. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  29286. /*
  29287. * Number Of Sounding Dimensions For <= 80 MHz
  29288. * If SU beamformer capable, set to the maximum supported value of the
  29289. * TXVECTOR parameter NUM_STS minus 1.
  29290. * Otherwise, reserved.
  29291. */
  29292. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  29293. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  29294. /*
  29295. * Number Of Sounding Dimensions For > 80 MHz
  29296. * If SU beamformer capable, set to the maximum supported value of the
  29297. * TXVECTOR parameter NUM_STS minus 1.
  29298. * Otherwise, reserved.
  29299. */
  29300. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 11, 3)
  29301. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 11, 3, value)
  29302. /*
  29303. * Indicates if the HE beamformee is capable of feedback with tone
  29304. * grouping of 16 in the HE Compressed Beamforming Report field for
  29305. * a SU-type feedback.
  29306. */
  29307. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 14, 1)
  29308. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 14, 1, value)
  29309. /*
  29310. * Indicates if the HE beamformee is capable of feedback with tone
  29311. * grouping of 16 in the HE Compressed Beamforming Report field for
  29312. * a MU-type feedback.
  29313. */
  29314. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 15, 1)
  29315. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 15, 1, value)
  29316. /*
  29317. * Indicates if HE beamformee is capable of feedback with codebook
  29318. * size {4, 2} in the HECompressed Beamforming Report field for
  29319. * a SU-type feedback.
  29320. */
  29321. #define WMI_HECAP_PHY_CODBK42SU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 16, 1)
  29322. #define WMI_HECAP_PHY_CODBK42SU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 16, 1, value)
  29323. /*
  29324. * Indicates if HE beamformee is capable of feedback with codebook
  29325. * size {7, 5} in the HE Compressed Beamforming Report field for
  29326. * a MU-type feedback.
  29327. */
  29328. #define WMI_HECAP_PHY_CODBK75MU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 17, 1)
  29329. #define WMI_HECAP_PHY_CODBK75MU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 17, 1, value)
  29330. /*
  29331. * Beamforming Feedback With Trigger Frame
  29332. * If the transmitting STA is an AP STA:
  29333. * B0: indicates support of reception of SU-Type partial(1) and full bandwidth feedback(0)
  29334. * B1: indicates support of reception of MU-Type partial(1) bandwidth feedback
  29335. * B2: indicates support of reception of CQI-Only partial and full bandwidth feedback
  29336. * If the transmitting STA is a non-AP STA:
  29337. * B0: indicates support of transmission of SU-Type partial(1) and full bandwidth(0) feedback
  29338. * B1: indicates support of transmission of MU-Type partial(1) bandwidth feedback
  29339. * B2: indicates support of transmission of CQI-Onlypartial (1)and full bandwidth feedback
  29340. */
  29341. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 18, 3)
  29342. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 18, 3, value)
  29343. /* Indicates the support of transmission and reception of an HE extended range SU PPDU payload transmitted
  29344. * over the right 106-tone RU or partial BW ER
  29345. */
  29346. #define WMI_HECAP_PHY_HEERSU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 21, 1)
  29347. #define WMI_HECAP_PHY_HEERSU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 21, 1, value)
  29348. /* Indicates that the non-AP STA supports reception of a DL MU-MIMO transmission on an RU in an HE MU PPDU
  29349. * where the RU does not span the entire PPDU bandwidth.
  29350. */
  29351. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 22, 1)
  29352. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 22, 1, value)
  29353. /* Indicates whether or not the PPE Threshold field is present */
  29354. #define WMI_HECAP_PHY_PETHRESPRESENT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 23, 1)
  29355. #define WMI_HECAP_PHY_PETHRESPRESENT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 23, 1, value)
  29356. /* Indicates that the STA supports SRP-based SR operation */
  29357. #define WMI_HECAP_PHY_SRPSPRESENT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 24, 1)
  29358. #define WMI_HECAP_PHY_SRPPRESENT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 24, 1, value)
  29359. /* Indicates that the STA supports a power boost factor ar for the r-th RU in the range [0.5, 2] */
  29360. #define WMI_HECAP_PHY_PWRBOOSTAR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 25, 1)
  29361. #define WMI_HECAP_PHY_PWRBOOSTAR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 25, 1, value)
  29362. /* Indicates support for the reception of 4x LTF and 0.8us guard interval duration for HE SU PPDUs. */
  29363. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 26, 1)
  29364. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 26, 1, value)
  29365. /* For a transmitting STA acting as a beamformee, it indicates the maximum Nc for beamforming sounding
  29366. * feedback supported If SU beamformee capable, then set to the maximum Nc for beamforming sounding feedback
  29367. * minus 1. Otherwise, reserved.
  29368. */
  29369. #define WMI_HECAP_PHY_MAXNC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 27, 3)
  29370. #define WMI_HECAP_PHY_MAXNC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 27, 3, value)
  29371. /* Indicates support for the transmission of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  29372. * STBC with one spatial stream
  29373. */
  29374. #define WMI_HECAP_PHY_STBCTXGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 30, 1)
  29375. #define WMI_HECAP_PHY_STBCTXGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 30, 1, value)
  29376. /* Indicates support for the reception of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  29377. * STBC with one spatial stream
  29378. */
  29379. #define WMI_HECAP_PHY_STBCRXGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 31, 1)
  29380. #define WMI_HECAP_PHY_STBCRXGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 31, 1, value)
  29381. /* Indicates support for the reception of an HE ER SU PPDU with 4x LTF and 0.8 us guard interval duration */
  29382. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 0, 1)
  29383. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 0, 1, value)
  29384. /*
  29385. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  29386. * 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.
  29387. */
  29388. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 1, 1)
  29389. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 1, 1, value)
  29390. /*
  29391. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  29392. * 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.
  29393. */
  29394. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 2, 1)
  29395. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 2, 1, value)
  29396. /*
  29397. * Indicates supports of 160 MHz OFDMA for a non-AP HE STA that sets bit B1 of Channel Width Set to 1, and
  29398. * sets B2 and B3 of Channel Width Set each to 0, when operating with 80 MHz channel width. The capability
  29399. * bit is applicable while receiving a 80+80 MHz or a 160 MHz HE MU PPDU, or transmitting a 80+80 MHz or a
  29400. * 160 MHz HE TB PPDU.
  29401. */
  29402. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 3, 1)
  29403. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 3, 1, value)
  29404. /* Indicates support for the reception of an HE ER SU PPDU with 1x LTF and 0.8 us guard interval duration */
  29405. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 4, 1)
  29406. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 4, 1, value)
  29407. /*
  29408. * If the Doppler Rx subfield is 1, indicates support for receiving midambles with 2x HE-LTF, 1x HE-LTF in
  29409. * 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
  29410. * HE ER SU PPDU if the HE ER SU PPDU With 1x HELTF And 0.8 s GI subfield is set to 1.
  29411. *
  29412. * If the Doppler Tx subfield is 1, indicates support for transmitting midambles with 2x HE-LTF, 1x HE-LTF
  29413. * in HE TB PPDU when allowed.
  29414. * If both the Doppler Rx and Doppler Tx subfields are 1, indicates support for receiving midambles with 2x HELTF,
  29415. * 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
  29416. * 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
  29417. * to 1; and also support for transmitting midambles with 2x HE-LTF, 1x HE-LTF in HE TB PPDU when allowed.
  29418. */
  29419. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 5, 1)
  29420. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 5, 1, value)
  29421. /*
  29422. * If the DCM Max Constellation Tx subfield is greater than 0, then the DCM Max BW subfield indicates the
  29423. * maximum bandwidth of a PPDU that the STA might transmit with DCM applied.
  29424. *
  29425. * If the DCM Max Constellation Rx subfield is greater than 0, then the DCM Max BW subfield indicates the
  29426. * maximum bandwidth of a PPDU with DCM applied that the STA can receive.
  29427. *
  29428. * If both the DCM Max Constellation Tx subfield and DCM Max Constellation Rx subfield are 0, then this
  29429. * subfield is reserved.
  29430. *
  29431. * 0=20MHz, 1=40Mhz, 2=80Mhz, 3=160Mhz or 80+80Mhz
  29432. */
  29433. #define WMI_HECAP_PHY_DCMMAXBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 6, 2)
  29434. #define WMI_HECAP_PHY_DCMMAXBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 6, 2, value)
  29435. /*
  29436. * For a non-AP STA, indicates support for receiving a DL HE MU PPDU where the number of OFDM symbols
  29437. * in the HE SIG-B field is greater than 16.
  29438. */
  29439. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 8, 1)
  29440. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 8, 1, value)
  29441. /*
  29442. * For an AP, indicates support for the reception of full bandwidth non-triggered CQI-only feedback.
  29443. * For a non-AP STA, indicates support for the transmission of full bandwidth non-triggered CQI-only feedback.
  29444. */
  29445. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 9, 1)
  29446. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 9, 1, value)
  29447. /*
  29448. * For a non-AP STA, indicates support for the transmission of 1024-QAM on a 26-, 52-, and 106-tone RU.
  29449. * Reserved for an AP.
  29450. */
  29451. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 10, 1)
  29452. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 10, 1, value)
  29453. /*
  29454. * Indicates support for the reception of 1024-QAM on a 26-, 52-, and 106-tone RU.
  29455. */
  29456. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 11, 1)
  29457. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 11, 1, value)
  29458. /*
  29459. * Indicates support for reception of an HE MU PPDU with an RU spanning the entire PPDU bandwidth and a
  29460. * compressed HE-SIG-B format.
  29461. */
  29462. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 12, 1)
  29463. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 12, 1, value)
  29464. /*
  29465. * Indicates support for reception of an HE MU PPDU with a bandwidth less than or equal to 80 MHz, an RU
  29466. * spanning the entire PPDU bandwidth and a non-compressed HE-SIG-B format.
  29467. */
  29468. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 13, 1)
  29469. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 13, 1, value)
  29470. /* HE MAC Capabilities Information field format */
  29471. /* HTC + HE Support Set to 1 if STA supports reception of HE Variant HT control Field */
  29472. #define WMI_HECAP_MAC_HECTRL_GET_D3(he_cap) WMI_GET_BITS(he_cap, 0, 1)
  29473. #define WMI_HECAP_MAC_HECTRL_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 0, 1, value)
  29474. /* set to 1 to for TWT Requestor support */
  29475. #define WMI_HECAP_MAC_TWTREQ_GET_D3(he_cap) WMI_GET_BITS(he_cap, 1, 1)
  29476. #define WMI_HECAP_MAC_TWTREQ_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 1, 1, value)
  29477. /* set to 1 to for TWT Responder support */
  29478. #define WMI_HECAP_MAC_TWTRSP_GET_D3(he_cap) WMI_GET_BITS(he_cap, 2, 1)
  29479. #define WMI_HECAP_MAC_TWTRSP_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 2, 1, value)
  29480. /* Level of frag support
  29481. Set to 0 for no support for dynamic fragmentation.
  29482. Set to 1 for support for dynamic fragments that are contained within a S-MPDU
  29483. Set to 2 for support for dynamic fragments that are contained within a Single MPDU and support for up to
  29484. one dynamic fragment for each MSDU and each MMPDU within an A-MPDU or multi-TID A-MPDU.
  29485. Set to 3 for support for dynamic fragments that are contained within a Single MPDU and support for multiple
  29486. dynamic fragments for each MSDU within an AMPDU or multi-TID AMPDU and up to one dynamic fragment
  29487. for each MMPDU in a multi-TID A-MPDU that is not a Single MPDU
  29488. */
  29489. #define WMI_HECAP_MAC_HEFRAG_GET_D3(he_cap) WMI_GET_BITS(he_cap, 3, 2)
  29490. #define WMI_HECAP_MAC_HEFRAG_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 3, 2, value)
  29491. /* The maximum number of fragmented MSDUs, Nmax,defined by this field is Nmax = 2 Maximum Number Of FMPDUs */
  29492. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET_D3(he_cap) WMI_GET_BITS(he_cap, 5, 3)
  29493. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 5, 3, value)
  29494. /* 0 = no restriction on the minimum payload , 1 = 128 octets min, 2 = 256 octets min, 3 = 512 octets min */
  29495. #define WMI_HECAP_MAC_MINFRAGSZ_GET_D3(he_cap) WMI_GET_BITS(he_cap, 8, 2)
  29496. #define WMI_HECAP_MAC_MINFRAGSZ_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 8, 2, value)
  29497. /*0 = no additional processing time, 1 = 8us,2 = 16us */
  29498. #define WMI_HECAP_MAC_TRIGPADDUR_GET_D3(he_cap) WMI_GET_BITS(he_cap, 10, 2)
  29499. #define WMI_HECAP_MAC_TRIGPADDUR_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 10, 2, value)
  29500. /* Indicates the number of TIDs of QoS Data frames that an HE STA can receive in a multi-TID AMPDU */
  29501. #define WMI_HECAP_MAC_MTID_RX_GET_D3(he_cap) WMI_GET_BITS(he_cap, 12, 3)
  29502. #define WMI_HECAP_MAC_MTID_RX_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 12, 3, value)
  29503. /* Indicates support for link adaptation using the HLA Control subfield. */
  29504. #define WMI_HECAP_MAC_HELINK_ADPT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 15, 2)
  29505. #define WMI_HECAP_MAC_HELINK_ADPT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 15, 2, value)
  29506. /* Set to 1 for reception of AllAck support */
  29507. #define WMI_HECAP_MAC_AACK_GET_D3(he_cap) WMI_GET_BITS(he_cap, 17, 1)
  29508. #define WMI_HECAP_MAC_AACK_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 17, 1, value)
  29509. /* Set to 1 if the STA supports reception of the UL MU Response Scheduling A-Control field */
  29510. #define WMI_HECAP_MAC_TRS_GET_D3(he_cap) WMI_GET_BITS(he_cap, 18, 1)
  29511. #define WMI_HECAP_MAC_TRS_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 18, 1, value)
  29512. /* Set to 1 if the STA supports the BSR A-Control field functionality.*/
  29513. #define WMI_HECAP_MAC_BSR_GET_D3(he_cap) WMI_GET_BITS(he_cap, 19, 1)
  29514. #define WMI_HECAP_MAC_BSR_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 19, 1, value)
  29515. /* Set to 1 when the STA supports broadcast TWT functionality.*/
  29516. #define WMI_HECAP_MAC_BCSTTWT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 20, 1)
  29517. #define WMI_HECAP_MAC_BCSTTWT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 20, 1, value)
  29518. /* Set to 1 if STA supports rx of Multi-STA BA that has 32-bit Block Ack Bitmap */
  29519. #define WMI_HECAP_MAC_32BITBA_GET_D3(he_cap) WMI_GET_BITS(he_cap, 21, 1)
  29520. #define WMI_HECAP_MAC_32BITBA_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 21, 1, value)
  29521. /* Set to 1 if the STA supports MU cascading operation */
  29522. #define WMI_HECAP_MAC_MUCASCADE_GET_D3(he_cap) WMI_GET_BITS(he_cap, 22, 1)
  29523. #define WMI_HECAP_MAC_MUCASCADE_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 22, 1, value)
  29524. /* Set to 1 when the STA supports reception of this multi-TID A-MPDU format */
  29525. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D3(he_cap) WMI_GET_BITS(he_cap, 23, 1)
  29526. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 23, 1, value)
  29527. /* bit 24 - reserved */
  29528. /* Set to 1 if the STA supports reception of the OMI A-Control field */
  29529. #define WMI_HECAP_MAC_OMI_GET_D3(he_cap) WMI_GET_BITS(he_cap, 25, 1)
  29530. #define WMI_HECAP_MAC_OMI_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 25, 1, value)
  29531. /*1 if OFDMA Random Access Supported */
  29532. #define WMI_HECAP_MAC_OFDMARA_GET_D3(he_cap) WMI_GET_BITS(he_cap, 26, 1)
  29533. #define WMI_HECAP_MAC_OFDMARA_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 26, 1, value)
  29534. /* Maximum AMPDU Length Exponent.
  29535. * If the HE STA includes a VHT Capabilities element, the Maximum A-MPDU Length Exponent subfield in
  29536. * HE Capabilities element combined with the Maximum A-MPDU Length Exponent subfield in VHT
  29537. * Capabilities element indicate the maximum length of A-MPDU that the STA can Receive where EOF
  29538. * padding is not included in this limit.
  29539. */
  29540. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D3(he_cap) WMI_GET_BITS(he_cap, 27, 2)
  29541. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 27, 2, value)
  29542. /* A-MSDU Fragmentation Support */
  29543. #define WMI_HECAP_MAC_AMSDUFRAG_GET_D3(he_cap) WMI_GET_BITS(he_cap, 29, 1)
  29544. #define WMI_HECAP_MAC_AMSDUFRAG_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 29, 1, value)
  29545. /* Flexible TWT Schedule Support */
  29546. #define WMI_HECAP_MAC_FLEXTWT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 30, 1)
  29547. #define WMI_HECAP_MAC_FLEXTWT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 30, 1, value)
  29548. /* Rx Control Frame to MultiBSS */
  29549. #define WMI_HECAP_MAC_MBSS_GET_D3(he_cap) WMI_GET_BITS(he_cap, 31, 1)
  29550. #define WMI_HECAP_MAC_MBSS_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 31, 1, value)
  29551. /* 2nd DWORD of HE MAC Capabilities */
  29552. /* BSRP A-MPDU Aggregation
  29553. * maintaining compatability since we dont support this now so not wasting memory
  29554. */
  29555. #define WMI_HECAP_MAC_BSRPAMPDU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 0, 1)
  29556. #define WMI_HECAP_MAC_BSRPAMPDU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 0, 1, value)
  29557. /* Quiet Time Period (QTP) operation
  29558. * maintaining compatability since we dont support this now so not wasting memory
  29559. */
  29560. #define WMI_HECAP_MAC_QTP_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 1, 1)
  29561. #define WMI_HECAP_MAC_QTP_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 1, 1, value)
  29562. /* support by an AP for receiving an (A-)MPDU that contains a BQR in the
  29563. * A-Control subfield and support by a non-AP STA for generating an (A-)MPDU
  29564. * that contains a BQR in the A-Control subfield
  29565. * maintaining compatability since we dont support this now so not wasting memory
  29566. */
  29567. #define WMI_HECAP_MAC_ABQR_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 2, 1)
  29568. #define WMI_HECAP_MAC_ABQR_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 2, 1, value)
  29569. /* Indicates support by the STA for the role of SRP Responder.*/
  29570. #define WMI_HECAP_MAC_SRPRESP_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 3, 1)
  29571. #define WMI_HECAP_MAC_SRPRESP_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 3, 1, value)
  29572. /* Indicates support for a non-AP STA to follow the NDP feedback report procedure and respond to
  29573. * the NDP Feedback Report Poll Trigger frame.
  29574. */
  29575. #define WMI_HECAP_MAC_NDPFDBKRPT_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 4, 1)
  29576. #define WMI_HECAP_MAC_NDPFDBKRPT_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 4, 1, value)
  29577. /* Indicates support for an AP to encode OPS information to TIM element of the FILS Discovery
  29578. * frames or TIM frames as described in AP operation for opportunistic power save.
  29579. * Indicates support for a non-AP STA to receive the opportunistic power save encoded TIM elements
  29580. */
  29581. #define WMI_HECAP_MAC_OPS_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 5, 1)
  29582. #define WMI_HECAP_MAC_OPS_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 5, 1, value)
  29583. /* Indicates support by a STA to receive an ack-enabled A-MPDU in which an A-MSDU is carried in
  29584. * a QoS Data frame for which no block ack agreement exists.
  29585. */
  29586. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 6, 1)
  29587. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 6, 1, value)
  29588. /* Indicates the number of TIDs of QoS Data frames that an HE STA can transmit in a multi-TID AMPDU */
  29589. #define WMI_HECAP_MAC_MTID_TX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 7, 3)
  29590. #define WMI_HECAP_MAC_MTID_TX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 7, 3, value)
  29591. /* Indicates whether an HE STA supports an HE subchannel selective transmission operation */
  29592. #define WMI_HECAP_MAC_SUBCHANSELTX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 10, 1)
  29593. #define WMI_HECAP_MAC_SUBCHANSELTX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 10, 1, value)
  29594. /* Indicates support by a STA to receive a TRS Control subfield or a Trigger frame with a User Info
  29595. * field addressed to the STA with the RU Allocation subfield of the TRS Control subfield or the User
  29596. * Info field indicating 2x996-tone.
  29597. */
  29598. #define WMI_HECAP_MAC_UL2X996RU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 11, 1)
  29599. #define WMI_HECAP_MAC_UL2X996RU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 11, 1, value)
  29600. /* Indicates whether an AP supports interpretation of the UL MU Data Disable subfield of the OM Control subfield */
  29601. #define WMI_HECAP_MAC_OMCULMUDDIS_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 12, 1)
  29602. #define WMI_HECAP_MAC_OMCULMUDDIS_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 12, 1, value)
  29603. /* Indicates the spatial multiplexing power save mode after receiving a
  29604. * Trigger frame that is in operation immediately after (re)association.
  29605. */
  29606. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 13, 1)
  29607. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 13, 1, value)
  29608. /* Indicates support for Punctured Sounding */
  29609. #define WMI_HECAP_MAC_PUNCSOUNDING_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 14, 1)
  29610. #define WMI_HECAP_MAC_PUNCSOUNDING_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 14, 1, value)
  29611. /* Indicates support for receiving a Trigger frame in an HT PPDU and
  29612. * receiving a Trigger frame in a VHT PPDU
  29613. */
  29614. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 15, 1)
  29615. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 15, 1, value)
  29616. /*
  29617. * The following conditionally-defined macros can be used in systems
  29618. * which only support either 802.11ax draft 2 or 802.11ax draft 3,
  29619. * but not both, and which make this D2 vs. D3 selection at build time.
  29620. */
  29621. #ifdef SUPPORT_11AX_D3
  29622. #define WMI_HEOPS_COLOR_GET WMI_HEOPS_COLOR_GET_D3
  29623. #define WMI_HEOPS_COLOR_SET WMI_HEOPS_COLOR_SET_D3
  29624. #define WMI_HEOPS_DEFPE_GET WMI_HEOPS_DEFPE_GET_D3
  29625. #define WMI_HEOPS_DEFPE_SET WMI_HEOPS_DEFPE_SET_D3
  29626. #define WMI_HEOPS_TWT_REQUIRED_GET WMI_HEOPS_TWT_REQUIRED_GET_D3
  29627. #define WMI_HEOPS_TWT_REQUIRED_SET WMI_HEOPS_TWT_REQUIRED_SET_D3
  29628. #define WMI_HEOPS_TWT_GET WMI_HEOPS_TWT_REQUIRED_GET_D3 /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_GET */
  29629. #define WMI_HEOPS_TWT_SET WMI_HEOPS_TWT_REQUIRED_SET_D3 /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_SET */
  29630. #define WMI_HEOPS_RTSTHLD_GET WMI_HEOPS_RTSTHLD_GET_D3
  29631. #define WMI_HEOPS_RTSTHLD_SET WMI_HEOPS_RTSTHLD_SET_D3
  29632. #define WMI_HEOPS_PARTBSSCOLOR_GET WMI_HEOPS_PARTBSSCOLOR_GET_D3
  29633. #define WMI_HEOPS_PARTBSSCOLOR_SET WMI_HEOPS_PARTBSSCOLOR_SET_D3
  29634. #define WMI_HEOPS_COLOCBSS_GET WMI_HEOPS_COLOCBSS_GET_D3
  29635. #define WMI_HEOPS_COLOCBSS_SET WMI_HEOPS_COLOCBSS_SET_D3
  29636. #define WMI_HEOPS_VHTOPSPRSNT_GET WMI_HEOPS_VHTOPSPRSNT_GET_D3
  29637. #define WMI_HEOPS_VHTOPSPRSNT_SET WMI_HEOPS_VHTOPSPRSNT_SET_D3
  29638. #define WMI_HEOPS_ERSUDIS_GET WMI_HEOPS_ERSUDIS_GET_D3
  29639. #define WMI_HEOPS_ERSUDIS_SET WMI_HEOPS_ERSUDIS_SET_D3
  29640. #define WMI_HEOPS_BSSCOLORDISABLE_GET WMI_HEOPS_BSSCOLORDISABLE_GET_D3
  29641. #define WMI_HEOPS_BSSCOLORDISABLE_SET WMI_HEOPS_BSSCOLORDISABLE_SET_D3
  29642. #define WMI_HEOPS_TXBSSID_GET(he_ops) (0) /* DEPRECATED - DO NOT USE */
  29643. #define WMI_HEOPS_TXBSSID_SET(he_ops, value) /* DEPRECATED - DO NOT USE */
  29644. #define WMI_HECAP_PHY_CBW_GET WMI_HECAP_PHY_CBW_GET_D3
  29645. #define WMI_HECAP_PHY_CBW_SET WMI_HECAP_PHY_CBW_SET_D3
  29646. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D3
  29647. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D3
  29648. #define WMI_HECAP_PHY_COD_GET WMI_HECAP_PHY_COD_GET_D3
  29649. #define WMI_HECAP_PHY_COD_SET WMI_HECAP_PHY_COD_SET_D3
  29650. #define WMI_HECAP_PHY_LDPC_GET WMI_HECAP_PHY_LDPC_GET_D3
  29651. #define WMI_HECAP_PHY_LDPC_SET WMI_HECAP_PHY_LDPC_SET_D3
  29652. #define WMI_HECAP_PHY_TXLDPC_GET WMI_HECAP_PHY_LDPC_GET /* Deprecated use WMI_HECAP_PHY_LDPC */
  29653. #define WMI_HECAP_PHY_TXLDPC_SET WMI_HECAP_PHY_LDPC_SET /* Deprecated use WMI_HECAP_PHY_LDPC */
  29654. #define WMI_HECAP_PHY_RXLDPC_GET WMI_HECAP_PHY_LDPC_GET /* Deprecated use WMI_HECAP_PHY_LDPC */
  29655. #define WMI_HECAP_PHY_RXLDPC_SET WMI_HECAP_PHY_LDPC_SET /* Deprecated use WMI_HECAP_PHY_LDPC */
  29656. #define WMI_HECAP_PHY_LTFGIFORHE_GET WMI_HECAP_PHY_LTFGIFORHE_GET_D3
  29657. #define WMI_HECAP_PHY_LTFGIFORHE_SET WMI_HECAP_PHY_LTFGIFORHE_SET_D3
  29658. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3
  29659. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3
  29660. #define WMI_HECAP_PHY_LTFGIFORNDP_GET WMI_HECAP_PHY_LTFGIFORNDP_GET_D3
  29661. #define WMI_HECAP_PHY_LTFGIFORNDP_SET WMI_HECAP_PHY_LTFGIFORNDP_SET_D3
  29662. #define WMI_HECAP_PHY_TXSTBC_GET WMI_HECAP_PHY_TXSTBC_GET_D3
  29663. #define WMI_HECAP_PHY_TXSTBC_SET WMI_HECAP_PHY_TXSTBC_SET_D3
  29664. #define WMI_HECAP_PHY_RXSTBC_GET WMI_HECAP_PHY_RXSTBC_GET_D3
  29665. #define WMI_HECAP_PHY_RXSTBC_SET WMI_HECAP_PHY_RXSTBC_SET_D3
  29666. #define WMI_HECAP_PHY_TXDOPPLER WMI_HECAP_PHY_TXDOPPLER_GET_D3
  29667. #define WMI_HECAP_PHY_TXDOPPLER_SET WMI_HECAP_PHY_TXDOPPLER_SET_D3
  29668. #define WMI_HECAP_PHY_RXDOPPLER_GET WMI_HECAP_PHY_RXDOPPLER_GET_D3
  29669. #define WMI_HECAP_PHY_RXDOPPLER_SET WMI_HECAP_PHY_RXDOPPLER_SET_D3
  29670. #define WMI_HECAP_PHY_UL_MU_MIMO_GET WMI_HECAP_PHY_UL_MU_MIMO_GET_D3
  29671. #define WMI_HECAP_PHY_UL_MU_MIMO_SET WMI_HECAP_PHY_UL_MU_MIMO_SET_D3
  29672. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D3
  29673. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D3
  29674. #define WMI_HECAP_PHY_DCMTX_GET WMI_HECAP_PHY_DCMTX_GET_D3
  29675. #define WMI_HECAP_PHY_DCMTX_SET WMI_HECAP_PHY_DCMTX_SET_D3
  29676. #define WMI_HECAP_PHY_DCMRX_GET WMI_HECAP_PHY_DCMRX_GET_D3
  29677. #define WMI_HECAP_PHY_DCMRX_SET WMI_HECAP_PHY_DCMRX_SET_D3
  29678. /* DEPRECATED - use WMI_HECAP_PHY_DCMRX or WMI_HECAP_PHY_DCMTX */
  29679. #define WMI_HECAP_PHY_DCM_GET WMI_HECAP_PHY_DCMRX_GET_D3
  29680. #define WMI_HECAP_PHY_DCM_SET WMI_HECAP_PHY_DCMRX_SET_D3
  29681. #define WMI_HECAP_PHY_ULHEMU_GET WMI_HECAP_PHY_ULHEMU_GET_D3
  29682. #define WMI_HECAP_PHY_ULHEMU_SET WMI_HECAP_PHY_ULHEMU_SET_D3
  29683. #define WMI_HECAP_PHY_SUBFMR_GET WMI_HECAP_PHY_SUBFMR_GET_D3
  29684. #define WMI_HECAP_PHY_SUBFMR_SET WMI_HECAP_PHY_SUBFMR_SET_D3
  29685. #define WMI_HECAP_PHY_SUBFME_GET WMI_HECAP_PHY_SUBFME_GET_D3
  29686. #define WMI_HECAP_PHY_SUBFME_SET WMI_HECAP_PHY_SUBFME_SET_D3
  29687. #define WMI_HECAP_PHY_MUBFMR_GET WMI_HECAP_PHY_MUBFMR_GET_D3
  29688. #define WMI_HECAP_PHY_MUBFMR_SET WMI_HECAP_PHY_MUBFMR_SET_D3
  29689. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3
  29690. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3
  29691. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3
  29692. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3
  29693. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3
  29694. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3
  29695. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3
  29696. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3
  29697. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D3
  29698. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D3
  29699. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D3
  29700. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D3
  29701. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D3
  29702. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D3
  29703. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D3
  29704. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D3
  29705. #define WMI_HECAP_PHY_CODBK42SU_GET WMI_HECAP_PHY_CODBK42SU_GET_D3
  29706. #define WMI_HECAP_PHY_CODBK42SU_SET WMI_HECAP_PHY_CODBK42SU_SET_D3
  29707. #define WMI_HECAP_PHY_CODBK75MU_GET WMI_HECAP_PHY_CODBK75MU_GET_D3
  29708. #define WMI_HECAP_PHY_CODBK75MU_SET WMI_HECAP_PHY_CODBK75MU_SET_D3
  29709. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D3
  29710. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D3
  29711. #define WMI_HECAP_PHY_HEERSU_GET WMI_HECAP_PHY_HEERSU_GET_D3
  29712. #define WMI_HECAP_PHY_HEERSU_SET WMI_HECAP_PHY_HEERSU_SET_D3
  29713. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D3
  29714. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D3
  29715. #define WMI_HECAP_PHY_PETHRESPRESENT_GET WMI_HECAP_PHY_PETHRESPRESENT_GET_D3
  29716. #define WMI_HECAP_PHY_PETHRESPRESENT_SET WMI_HECAP_PHY_PETHRESPRESENT_SET_D3
  29717. #define WMI_HECAP_PHY_SRPSPRESENT_GET WMI_HECAP_PHY_SRPSPRESENT_GET_D3
  29718. #define WMI_HECAP_PHY_SRPPRESENT_SET WMI_HECAP_PHY_SRPPRESENT_SET_D3
  29719. #define WMI_HECAP_PHY_PWRBOOSTAR_GET WMI_HECAP_PHY_PWRBOOSTAR_GET_D3
  29720. #define WMI_HECAP_PHY_PWRBOOSTAR_SET WMI_HECAP_PHY_PWRBOOSTAR_SET_D3
  29721. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D3
  29722. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D3
  29723. #define WMI_HECAP_PHY_MAXNC_GET WMI_HECAP_PHY_MAXNC_GET_D3
  29724. #define WMI_HECAP_PHY_MAXNC_SET WMI_HECAP_PHY_MAXNC_SET_D3
  29725. #define WMI_HECAP_PHY_STBCTXGT80_GET WMI_HECAP_PHY_STBCTXGT80_GET_D3
  29726. #define WMI_HECAP_PHY_STBCTXGT80_SET WMI_HECAP_PHY_STBCTXGT80_SET_D3
  29727. #define WMI_HECAP_PHY_STBCRXGT80_GET WMI_HECAP_PHY_STBCRXGT80_GET_D3
  29728. #define WMI_HECAP_PHY_STBCRXGT80_SET WMI_HECAP_PHY_STBCRXGT80_SET_D3
  29729. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D3
  29730. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D3
  29731. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D3
  29732. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D3
  29733. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D3
  29734. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D3
  29735. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D3
  29736. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D3
  29737. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D3
  29738. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D3
  29739. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET_D3
  29740. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET_D3
  29741. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET /* DEPRECATED */
  29742. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET /* DEPRECATED */
  29743. #define WMI_HECAP_PHY_DCMMAXBW_GET WMI_HECAP_PHY_DCMMAXBW_GET_D3
  29744. #define WMI_HECAP_PHY_DCMMAXBW_SET WMI_HECAP_PHY_DCMMAXBW_SET_D3
  29745. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET_D3
  29746. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET_D3
  29747. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET_D3
  29748. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET_D3
  29749. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET_D3
  29750. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET_D3
  29751. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET_D3
  29752. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET_D3
  29753. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET_D3
  29754. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET_D3
  29755. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET_D3
  29756. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET_D3
  29757. #define WMI_HECAP_PHY_DB_GET(he_phy_cap) (0) /* DEPRECATED - DO NOT USE */
  29758. #define WMI_HECAP_PHY_DB_SET(he_phy_cap, value) /* DEPRECATED - DO NOT USE */
  29759. #define WMI_HECAP_MAC_HECTRL_GET WMI_HECAP_MAC_HECTRL_GET_D3
  29760. #define WMI_HECAP_MAC_HECTRL_SET WMI_HECAP_MAC_HECTRL_SET_D3
  29761. #define WMI_HECAP_MAC_TWTREQ_GET WMI_HECAP_MAC_TWTREQ_GET_D3
  29762. #define WMI_HECAP_MAC_TWTREQ_SET WMI_HECAP_MAC_TWTREQ_SET_D3
  29763. #define WMI_HECAP_MAC_TWTRSP_GET WMI_HECAP_MAC_TWTRSP_GET_D3
  29764. #define WMI_HECAP_MAC_TWTRSP_SET WMI_HECAP_MAC_TWTRSP_SET_D3
  29765. #define WMI_HECAP_MAC_HEFRAG_GET WMI_HECAP_MAC_HEFRAG_GET_D3
  29766. #define WMI_HECAP_MAC_HEFRAG_SET WMI_HECAP_MAC_HEFRAG_SET_D3
  29767. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET WMI_HECAP_MAC_MAXFRAGMSDU_GET_D3
  29768. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET WMI_HECAP_MAC_MAXFRAGMSDU_SET_D3
  29769. #define WMI_HECAP_MAC_MINFRAGSZ_GET WMI_HECAP_MAC_MINFRAGSZ_GET_D3
  29770. #define WMI_HECAP_MAC_MINFRAGSZ_SET WMI_HECAP_MAC_MINFRAGSZ_SET_D3
  29771. #define WMI_HECAP_MAC_TRIGPADDUR_GET WMI_HECAP_MAC_TRIGPADDUR_GET_D3
  29772. #define WMI_HECAP_MAC_TRIGPADDUR_SET WMI_HECAP_MAC_TRIGPADDUR_SET_D3
  29773. #define WMI_HECAP_MAC_MTID_RX_GET WMI_HECAP_MAC_MTID_RX_GET_D3
  29774. #define WMI_HECAP_MAC_MTID_RX_SET WMI_HECAP_MAC_MTID_RX_SET_D3
  29775. #define WMI_HECAP_MAC_HELINK_ADPT_GET WMI_HECAP_MAC_HELINK_ADPT_GET_D3
  29776. #define WMI_HECAP_MAC_HELINK_ADPT_SET WMI_HECAP_MAC_HELINK_ADPT_SET_D3
  29777. #define WMI_HECAP_MAC_AACK_GET WMI_HECAP_MAC_AACK_GET_D3
  29778. #define WMI_HECAP_MAC_AACK_SET WMI_HECAP_MAC_AACK_SET_D3
  29779. #define WMI_HECAP_MAC_TRS_GET WMI_HECAP_MAC_TRS_GET_D3
  29780. #define WMI_HECAP_MAC_TRS_SET WMI_HECAP_MAC_TRS_SET_D3
  29781. #define WMI_HECAP_MAC_ULMURSP_GET(he_cap) (0) /* DEPRECATED, DO NOT USE */
  29782. #define WMI_HECAP_MAC_ULMURSP_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
  29783. #define WMI_HECAP_MAC_BSR_GET WMI_HECAP_MAC_BSR_GET_D3
  29784. #define WMI_HECAP_MAC_BSR_SET WMI_HECAP_MAC_BSR_SET_D3
  29785. #define WMI_HECAP_MAC_BCSTTWT_GET WMI_HECAP_MAC_BCSTTWT_GET_D3
  29786. #define WMI_HECAP_MAC_BCSTTWT_SET WMI_HECAP_MAC_BCSTTWT_SET_D3
  29787. #define WMI_HECAP_MAC_32BITBA_GET WMI_HECAP_MAC_32BITBA_GET_D3
  29788. #define WMI_HECAP_MAC_32BITBA_SET WMI_HECAP_MAC_32BITBA_SET_D3
  29789. #define WMI_HECAP_MAC_MUCASCADE_GET WMI_HECAP_MAC_MUCASCADE_GET_D3
  29790. #define WMI_HECAP_MAC_MUCASCADE_SET WMI_HECAP_MAC_MUCASCADE_SET_D3
  29791. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D3
  29792. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D3
  29793. #define WMI_HECAP_MAC_GROUPMSTABA_GET(he_cap) (0) /* DEPRECATED, DO NOT USE */
  29794. #define WMI_HECAP_MAC_GROUPMSTABA_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
  29795. #define WMI_HECAP_MAC_OMI_GET WMI_HECAP_MAC_OMI_GET_D3
  29796. #define WMI_HECAP_MAC_OMI_SET WMI_HECAP_MAC_OMI_SET_D3
  29797. #define WMI_HECAP_MAC_OFDMARA_GET WMI_HECAP_MAC_OFDMARA_GET_D3
  29798. #define WMI_HECAP_MAC_OFDMARA_SET WMI_HECAP_MAC_OFDMARA_SET_D3
  29799. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D3
  29800. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D3
  29801. #define WMI_HECAP_MAC_AMSDUFRAG_GET WMI_HECAP_MAC_AMSDUFRAG_GET_D3
  29802. #define WMI_HECAP_MAC_AMSDUFRAG_SET WMI_HECAP_MAC_AMSDUFRAG_SET_D3
  29803. #define WMI_HECAP_MAC_FLEXTWT_GET WMI_HECAP_MAC_FLEXTWT_GET_D3
  29804. #define WMI_HECAP_MAC_FLEXTWT_SET WMI_HECAP_MAC_FLEXTWT_SET_D3
  29805. #define WMI_HECAP_MAC_MBSS_GET WMI_HECAP_MAC_MBSS_GET_D3
  29806. #define WMI_HECAP_MAC_MBSS_SET WMI_HECAP_MAC_MBSS_SET_D3
  29807. #define WMI_HECAP_MAC_BSRPAMPDU_GET WMI_HECAP_MAC_BSRPAMPDU_GET_D3
  29808. #define WMI_HECAP_MAC_BSRPAMPDU_SET WMI_HECAP_MAC_BSRPAMPDU_SET_D3
  29809. #define WMI_HECAP_MAC_QTP_GET WMI_HECAP_MAC_QTP_GET_D3
  29810. #define WMI_HECAP_MAC_QTP_SET WMI_HECAP_MAC_QTP_SET_D3
  29811. #define WMI_HECAP_MAC_ABQR_GET WMI_HECAP_MAC_ABQR_GET_D3
  29812. #define WMI_HECAP_MAC_ABQR_SET WMI_HECAP_MAC_ABQR_SET_D3
  29813. #define WMI_HECAP_MAC_SRPRESP_GET WMI_HECAP_MAC_SRPRESP_GET_D3
  29814. #define WMI_HECAP_MAC_SRPRESP_SET WMI_HECAP_MAC_SRPRESP_SET_D3
  29815. #define WMI_HECAP_MAC_SRRESP_GET(he_cap2) (0) /* DEPRECATED, DO NOT USE */
  29816. #define WMI_HECAP_MAC_SRRESP_SET(he_cap2, value) /* DEPRECATED, DO NOT USE */
  29817. #define WMI_HECAP_MAC_NDPFDBKRPT_GET WMI_HECAP_MAC_NDPFDBKRPT_GET_D3
  29818. #define WMI_HECAP_MAC_NDPFDBKRPT_SET WMI_HECAP_MAC_NDPFDBKRPT_SET_D3
  29819. #define WMI_HECAP_MAC_OPS_GET WMI_HECAP_MAC_OPS_GET_D3
  29820. #define WMI_HECAP_MAC_OPS_SET WMI_HECAP_MAC_OPS_SET_D3
  29821. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET WMI_HECAP_MAC_AMSDUINAMPDU_GET_D3
  29822. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET WMI_HECAP_MAC_AMSDUINAMPDU_SET_D3
  29823. #define WMI_HECAP_MAC_MTID_TX_GET WMI_HECAP_MAC_MTID_TX_GET_D3
  29824. #define WMI_HECAP_MAC_MTID_TX_SET WMI_HECAP_MAC_MTID_TX_SET_D3
  29825. #define WMI_HECAP_MAC_SUBCHANSELTX_GET WMI_HECAP_MAC_SUBCHANSELTX_GET_D3
  29826. #define WMI_HECAP_MAC_SUBCHANSELTX_SET WMI_HECAP_MAC_SUBCHANSELTX_SET_D3
  29827. #define WMI_HECAP_MAC_UL2X996RU_GET WMI_HECAP_MAC_UL2X996RU_GET_D3
  29828. #define WMI_HECAP_MAC_UL2X996RU_SET WMI_HECAP_MAC_UL2X996RU_SET_D3
  29829. #define WMI_HECAP_MAC_OMCULMUDDIS_GET WMI_HECAP_MAC_OMCULMUDDIS_GET_D3
  29830. #define WMI_HECAP_MAC_OMCULMUDDIS_SET WMI_HECAP_MAC_OMCULMUDDIS_SET_D3
  29831. #define WMI_HECAP_MAC_HELKAD_GET(he_cap) (0) /* DEPRECATED, DO NOT USE */
  29832. #define WMI_HECAP_MAC_HELKAD_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
  29833. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3 /* DEPRECATED - DO NOT USE */
  29834. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3 /* DEPRECATED - DO NOT USE */
  29835. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D3
  29836. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D3
  29837. #define WMI_HECAP_MAC_PUNCSOUNDING_GET WMI_HECAP_MAC_PUNCSOUNDING_GET_D3
  29838. #define WMI_HECAP_MAC_PUNCSOUNDING_SET WMI_HECAP_MAC_PUNCSOUNDING_SET_D3
  29839. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET WMI_HECAP_MAC_HTVHTTRIGRX_GET_D3
  29840. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET WMI_HECAP_MAC_HTVHTTRIGRX_SET_D3
  29841. #else /* SUPPORT_11AX_D3 vs. D2 */
  29842. /* D2 and D2- */
  29843. #define WMI_HEOPS_COLOR_GET WMI_HEOPS_COLOR_GET_D2
  29844. #define WMI_HEOPS_COLOR_SET WMI_HEOPS_COLOR_SET_D2
  29845. #define WMI_HEOPS_DEFPE_GET WMI_HEOPS_DEFPE_GET_D2
  29846. #define WMI_HEOPS_DEFPE_SET WMI_HEOPS_DEFPE_SET_D2
  29847. #define WMI_HEOPS_TWT_REQUIRED_GET WMI_HEOPS_TWT_REQUIRED_GET_D2
  29848. #define WMI_HEOPS_TWT_REQUIRED_SET WMI_HEOPS_TWT_REQUIRED_SET_D2
  29849. #define WMI_HEOPS_TWT_GET WMI_HEOPS_TWT_GET_D2 /* Deprecated */
  29850. #define WMI_HEOPS_TWT_SET WMI_HEOPS_TWT_SET_D2 /* Deprecated */
  29851. #define WMI_HEOPS_RTSTHLD_GET WMI_HEOPS_RTSTHLD_GET_D2
  29852. #define WMI_HEOPS_RTSTHLD_SET WMI_HEOPS_RTSTHLD_SET_D2
  29853. #define WMI_HEOPS_PARTBSSCOLOR_GET WMI_HEOPS_PARTBSSCOLOR_GET_D2
  29854. #define WMI_HEOPS_PARTBSSCOLOR_SET WMI_HEOPS_PARTBSSCOLOR_SET_D2
  29855. #define WMI_HEOPS_MAXBSSID_GET WMI_HEOPS_MAXBSSID_GET_D2
  29856. #define WMI_HEOPS_MAXBSSID_SET WMI_HEOPS_MAXBSSID_SET_D2
  29857. #define WMI_HEOPS_TXBSSID_GET WMI_HEOPS_TXBSSID_GET_D2
  29858. #define WMI_HEOPS_TXBSSID_SET WMI_HEOPS_TXBSSID_SET_D2
  29859. #define WMI_HEOPS_BSSCOLORDISABLE_GET WMI_HEOPS_BSSCOLORDISABLE_GET_D2
  29860. #define WMI_HEOPS_BSSCOLORDISABLE_SET WMI_HEOPS_BSSCOLORDISABLE_SET_D2
  29861. #define WMI_HEOPS_DUALBEACON_GET WMI_HEOPS_DUALBEACON_GET_D2
  29862. #define WMI_HEOPS_DUALBEACON_SET WMI_HEOPS_DUALBEACON_SET_D2
  29863. #define WMI_HECAP_PHY_DB_GET WMI_HECAP_PHY_DB_GET_D2
  29864. #define WMI_HECAP_PHY_DB_SET WMI_HECAP_PHY_DB_SET_D2
  29865. #define WMI_HECAP_PHY_CBW_GET WMI_HECAP_PHY_CBW_GET_D2
  29866. #define WMI_HECAP_PHY_CBW_SET WMI_HECAP_PHY_CBW_SET_D2
  29867. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D2
  29868. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D2
  29869. #define WMI_HECAP_PHY_COD_GET WMI_HECAP_PHY_COD_GET_D2
  29870. #define WMI_HECAP_PHY_COD_SET WMI_HECAP_PHY_COD_SET_D2
  29871. #define WMI_HECAP_PHY_LDPC_GET WMI_HECAP_PHY_LDPC_GET_D2
  29872. #define WMI_HECAP_PHY_LDPC_SET WMI_HECAP_PHY_LDPC_SET_D2
  29873. #define WMI_HECAP_PHY_TXLDPC_GET WMI_HECAP_PHY_TXLDPC_GET_D2
  29874. #define WMI_HECAP_PHY_TXLDPC_SET WMI_HECAP_PHY_TXLDPC_SET_D2
  29875. #define WMI_HECAP_PHY_RXLDPC_GET WMI_HECAP_PHY_RXLDPC_GET_D2
  29876. #define WMI_HECAP_PHY_RXLDPC_SET WMI_HECAP_PHY_RXLDPC_SET_D2
  29877. #define WMI_HECAP_PHY_LTFGIFORHE_GET WMI_HECAP_PHY_LTFGIFORHE_GET_D2
  29878. #define WMI_HECAP_PHY_LTFGIFORHE_SET WMI_HECAP_PHY_LTFGIFORHE_SET_D2
  29879. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET_D2
  29880. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET_D2
  29881. #define WMI_HECAP_PHY_LTFGIFORNDP_GET WMI_HECAP_PHY_LTFGIFORNDP_GET_D2
  29882. #define WMI_HECAP_PHY_LTFGIFORNDP_SET WMI_HECAP_PHY_LTFGIFORNDP_SET_D2
  29883. #define WMI_HECAP_PHY_TXSTBC_GET WMI_HECAP_PHY_TXSTBC_GET_D2
  29884. #define WMI_HECAP_PHY_TXSTBC_SET WMI_HECAP_PHY_TXSTBC_SET_D2
  29885. #define WMI_HECAP_PHY_RXSTBC_GET WMI_HECAP_PHY_RXSTBC_GET_D2
  29886. #define WMI_HECAP_PHY_RXSTBC_SET WMI_HECAP_PHY_RXSTBC_SET_D2
  29887. #define WMI_HECAP_PHY_TXDOPPLER_GET WMI_HECAP_PHY_TXDOPPLER_GET_D2
  29888. #define WMI_HECAP_PHY_TXDOPPLER_SET WMI_HECAP_PHY_TXDOPPLER_SET_D2
  29889. #define WMI_HECAP_PHY_RXDOPPLER_GET WMI_HECAP_PHY_RXDOPPLER_GET_D2
  29890. #define WMI_HECAP_PHY_RXDOPPLER_SET WMI_HECAP_PHY_RXDOPPLER_SET_D2
  29891. #define WMI_HECAP_PHY_UL_MU_MIMO_GET WMI_HECAP_PHY_UL_MU_MIMO_GET_D2
  29892. #define WMI_HECAP_PHY_UL_MU_MIMO_SET WMI_HECAP_PHY_UL_MU_MIMO_SET_D2
  29893. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2
  29894. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2
  29895. #define WMI_HECAP_PHY_DCMTX_GET WMI_HECAP_PHY_DCMTX_GET_D2
  29896. #define WMI_HECAP_PHY_DCMTX_SET WMI_HECAP_PHY_DCMTX_SET_D2
  29897. #define WMI_HECAP_PHY_DCMRX_GET WMI_HECAP_PHY_DCMRX_GET_D2
  29898. #define WMI_HECAP_PHY_DCMRX_SET WMI_HECAP_PHY_DCMRX_SET_D2
  29899. #define WMI_HECAP_PHY_ULHEMU_GET WMI_HECAP_PHY_ULHEMU_GET_D2
  29900. #define WMI_HECAP_PHY_ULHEMU_SET WMI_HECAP_PHY_ULHEMU_SET_D2
  29901. #define WMI_HECAP_PHY_SUBFMR_GET WMI_HECAP_PHY_SUBFMR_GET_D2
  29902. #define WMI_HECAP_PHY_SUBFMR_SET WMI_HECAP_PHY_SUBFMR_SET_D2
  29903. #define WMI_HECAP_PHY_SUBFME_GET WMI_HECAP_PHY_SUBFME_GET_D2
  29904. #define WMI_HECAP_PHY_SUBFME_SET WMI_HECAP_PHY_SUBFME_SET_D2
  29905. #define WMI_HECAP_PHY_MUBFMR_GET WMI_HECAP_PHY_MUBFMR_GET_D2
  29906. #define WMI_HECAP_PHY_MUBFMR_SET WMI_HECAP_PHY_MUBFMR_SET_D2
  29907. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2
  29908. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2
  29909. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D2
  29910. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D2
  29911. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D2
  29912. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D2
  29913. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D2
  29914. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D2
  29915. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D2
  29916. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D2
  29917. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D2
  29918. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D2
  29919. #define WMI_HECAP_PHY_CODBK42SU_GET WMI_HECAP_PHY_CODBK42SU_GET_D2
  29920. #define WMI_HECAP_PHY_CODBK42SU_SET WMI_HECAP_PHY_CODBK42SU_SET_D2
  29921. #define WMI_HECAP_PHY_CODBK75MU_GET WMI_HECAP_PHY_CODBK75MU_GET_D2
  29922. #define WMI_HECAP_PHY_CODBK75MU_SET WMI_HECAP_PHY_CODBK75MU_SET_D2
  29923. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D2
  29924. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D2
  29925. #define WMI_HECAP_PHY_HEERSU_GET WMI_HECAP_PHY_HEERSU_GET_D2
  29926. #define WMI_HECAP_PHY_HEERSU_SET WMI_HECAP_PHY_HEERSU_SET_D2
  29927. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D2
  29928. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D2
  29929. #define WMI_HECAP_PHY_PETHRESPRESENT_GET WMI_HECAP_PHY_PETHRESPRESENT_GET_D2
  29930. #define WMI_HECAP_PHY_PETHRESPRESENT_SET WMI_HECAP_PHY_PETHRESPRESENT_SET_D2
  29931. #define WMI_HECAP_PHY_SRPSPRESENT_GET WMI_HECAP_PHY_SRPSPRESENT_GET_D2
  29932. #define WMI_HECAP_PHY_SRPPRESENT_SET WMI_HECAP_PHY_SRPPRESENT_SET_D2
  29933. #define WMI_HECAP_PHY_PWRBOOSTAR_GET WMI_HECAP_PHY_PWRBOOSTAR_GET_D2
  29934. #define WMI_HECAP_PHY_PWRBOOSTAR_SET WMI_HECAP_PHY_PWRBOOSTAR_SET_D2
  29935. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D2
  29936. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D2
  29937. #define WMI_HECAP_PHY_MAXNC_GET WMI_HECAP_PHY_MAXNC_GET_D2
  29938. #define WMI_HECAP_PHY_MAXNC_SET WMI_HECAP_PHY_MAXNC_SET_D2
  29939. #define WMI_HECAP_PHY_STBCTXGT80_GET WMI_HECAP_PHY_STBCTXGT80_GET_D2
  29940. #define WMI_HECAP_PHY_STBCTXGT80_SET WMI_HECAP_PHY_STBCTXGT80_SET_D2
  29941. #define WMI_HECAP_PHY_STBCRXGT80_GET WMI_HECAP_PHY_STBCRXGT80_GET_D2
  29942. #define WMI_HECAP_PHY_STBCRXGT80_SET WMI_HECAP_PHY_STBCRXGT80_SET_D2
  29943. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D2
  29944. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D2
  29945. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D2
  29946. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D2
  29947. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D2
  29948. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D2
  29949. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D2
  29950. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D2
  29951. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D2
  29952. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D2
  29953. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET_D2
  29954. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET_D2
  29955. #define WMI_HECAP_MAC_HECTRL_GET WMI_HECAP_MAC_HECTRL_GET_D2
  29956. #define WMI_HECAP_MAC_HECTRL_SET WMI_HECAP_MAC_HECTRL_SET_D2
  29957. #define WMI_HECAP_MAC_TWTREQ_GET WMI_HECAP_MAC_TWTREQ_GET_D2
  29958. #define WMI_HECAP_MAC_TWTREQ_SET WMI_HECAP_MAC_TWTREQ_SET_D2
  29959. #define WMI_HECAP_MAC_TWTRSP_GET WMI_HECAP_MAC_TWTRSP_GET_D2
  29960. #define WMI_HECAP_MAC_TWTRSP_SET WMI_HECAP_MAC_TWTRSP_SET_D2
  29961. #define WMI_HECAP_MAC_HEFRAG_GET WMI_HECAP_MAC_HEFRAG_GET_D2
  29962. #define WMI_HECAP_MAC_HEFRAG_SET WMI_HECAP_MAC_HEFRAG_SET_D2
  29963. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET WMI_HECAP_MAC_MAXFRAGMSDU_GET_D2
  29964. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET WMI_HECAP_MAC_MAXFRAGMSDU_SET_D2
  29965. #define WMI_HECAP_MAC_MINFRAGSZ_GET WMI_HECAP_MAC_MINFRAGSZ_GET_D2
  29966. #define WMI_HECAP_MAC_MINFRAGSZ_SET WMI_HECAP_MAC_MINFRAGSZ_SET_D2
  29967. #define WMI_HECAP_MAC_TRIGPADDUR_GET WMI_HECAP_MAC_TRIGPADDUR_GET_D2
  29968. #define WMI_HECAP_MAC_TRIGPADDUR_SET WMI_HECAP_MAC_TRIGPADDUR_SET_D2
  29969. #define WMI_HECAP_MAC_MTID_GET WMI_HECAP_MAC_MTID_GET_D2
  29970. #define WMI_HECAP_MAC_MTID_SET WMI_HECAP_MAC_MTID_SET_D2
  29971. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET WMI_HECAP_MAC_AMSDUINAMPDU_GET_D2
  29972. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET WMI_HECAP_MAC_AMSDUINAMPDU_SET_D2
  29973. #define WMI_HECAP_MAC_HELKAD_GET WMI_HECAP_MAC_HELKAD_GET_D2
  29974. #define WMI_HECAP_MAC_HELKAD_SET WMI_HECAP_MAC_HELKAD_SET_D2
  29975. #define WMI_HECAP_MAC_AACK_GET WMI_HECAP_MAC_AACK_GET_D2
  29976. #define WMI_HECAP_MAC_AACK_SET WMI_HECAP_MAC_AACK_SET_D2
  29977. #define WMI_HECAP_MAC_ULMURSP_GET WMI_HECAP_MAC_ULMURSP_GET_D2
  29978. #define WMI_HECAP_MAC_ULMURSP_SET WMI_HECAP_MAC_ULMURSP_SET_D2
  29979. #define WMI_HECAP_MAC_BSR_GET WMI_HECAP_MAC_BSR_GET_D2
  29980. #define WMI_HECAP_MAC_BSR_SET WMI_HECAP_MAC_BSR_SET_D2
  29981. #define WMI_HECAP_MAC_BCSTTWT_GET WMI_HECAP_MAC_BCSTTWT_GET_D2
  29982. #define WMI_HECAP_MAC_BCSTTWT_SET WMI_HECAP_MAC_BCSTTWT_SET_D2
  29983. #define WMI_HECAP_MAC_32BITBA_GET WMI_HECAP_MAC_32BITBA_GET_D2
  29984. #define WMI_HECAP_MAC_32BITBA_SET WMI_HECAP_MAC_32BITBA_SET_D2
  29985. #define WMI_HECAP_MAC_MUCASCADE_GET WMI_HECAP_MAC_MUCASCADE_GET_D2
  29986. #define WMI_HECAP_MAC_MUCASCADE_SET WMI_HECAP_MAC_MUCASCADE_SET_D2
  29987. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D2
  29988. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D2
  29989. #define WMI_HECAP_MAC_GROUPMSTABA_GET WMI_HECAP_MAC_GROUPMSTABA_GET_D2
  29990. #define WMI_HECAP_MAC_GROUPMSTABA_SET WMI_HECAP_MAC_GROUPMSTABA_SET_D2
  29991. #define WMI_HECAP_MAC_OMI_GET WMI_HECAP_MAC_OMI_GET_D2
  29992. #define WMI_HECAP_MAC_OMI_SET WMI_HECAP_MAC_OMI_SET_D2
  29993. #define WMI_HECAP_MAC_OFDMARA_GET WMI_HECAP_MAC_OFDMARA_GET_D2
  29994. #define WMI_HECAP_MAC_OFDMARA_SET WMI_HECAP_MAC_OFDMARA_SET_D2
  29995. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D2
  29996. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D2
  29997. #define WMI_HECAP_MAC_AMSDUFRAG_GET WMI_HECAP_MAC_AMSDUFRAG_GET_D2
  29998. #define WMI_HECAP_MAC_AMSDUFRAG_SET WMI_HECAP_MAC_AMSDUFRAG_SET_D2
  29999. #define WMI_HECAP_MAC_FLEXTWT_GET WMI_HECAP_MAC_FLEXTWT_GET_D2
  30000. #define WMI_HECAP_MAC_FLEXTWT_SET WMI_HECAP_MAC_FLEXTWT_SET_D2
  30001. #define WMI_HECAP_MAC_MBSS_GET WMI_HECAP_MAC_MBSS_GET_D2
  30002. #define WMI_HECAP_MAC_MBSS_SET WMI_HECAP_MAC_MBSS_SET_D2
  30003. #define WMI_HECAP_MAC_BSRPAMPDU_GET WMI_HECAP_MAC_BSRPAMPDU_GET_D2
  30004. #define WMI_HECAP_MAC_BSRPAMPDU_SET WMI_HECAP_MAC_BSRPAMPDU_SET_D2
  30005. #define WMI_HECAP_MAC_QTP_GET WMI_HECAP_MAC_QTP_GET_D2
  30006. #define WMI_HECAP_MAC_QTP_SET WMI_HECAP_MAC_QTP_SET_D2
  30007. #define WMI_HECAP_MAC_ABQR_GET WMI_HECAP_MAC_ABQR_GET_D2
  30008. #define WMI_HECAP_MAC_ABQR_SET WMI_HECAP_MAC_ABQR_SET_D2
  30009. #define WMI_HECAP_MAC_SRRESP_GET WMI_HECAP_MAC_SRRESP_GET_D2
  30010. #define WMI_HECAP_MAC_SRRESP_SET WMI_HECAP_MAC_SRRESP_SET_D2
  30011. #define WMI_HECAP_MAC_OPS_GET WMI_HECAP_MAC_OPS_GET_D2
  30012. #define WMI_HECAP_MAC_OPS_SET WMI_HECAP_MAC_OPS_SET_D2
  30013. #define WMI_HECAP_MAC_NDPFDBKRPT_GET WMI_HECAP_MAC_NDPFDBKRPT_GET_D2
  30014. #define WMI_HECAP_MAC_NDPFDBKRPT_SET WMI_HECAP_MAC_NDPFDBKRPT_SET_D2
  30015. #define WMI_HECAP_MAC_MBAHECTRL_GET WMI_HECAP_MAC_MBAHECTRL_GET_D2
  30016. #define WMI_HECAP_MAC_MBAHECTRL_SET WMI_HECAP_MAC_MBAHECTRL_SET_D2
  30017. #define WMI_HECAP_MAC_MURTS_GET WMI_HECAP_MAC_MURTS_GET_D2
  30018. #define WMI_HECAP_MAC_MURTS_SET WMI_HECAP_MAC_MURTS_SET_D2
  30019. #define WMI_HECAP_PHY_CBMODE_GET WMI_HECAP_PHY_CBMODE_GET_D2
  30020. #define WMI_HECAP_PHY_CBMODE_SET WMI_HECAP_PHY_CBMODE_SET_D2
  30021. #define WMI_HECAP_PHY_OLTF_GET WMI_HECAP_PHY_OLTF_GET_D2
  30022. #define WMI_HECAP_PHY_OLTF_SET WMI_HECAP_PHY_OLTF_SET_D2
  30023. #define WMI_HECAP_PHY_SUBFMESTS_GET WMI_HECAP_PHY_SUBFMESTS_GET_D2
  30024. #define WMI_HECAP_PHY_SUBFMESTS_SET WMI_HECAP_PHY_SUBFMESTS_SET_D2
  30025. #define WMI_HECAP_PHY_PADDING_GET WMI_HECAP_PHY_PADDING_GET_D2
  30026. #define WMI_HECAP_PHY_PADDING_SET WMI_HECAP_PHY_PADDING_SET_D2
  30027. #define WMI_HECAP_PHY_DLOFMAMUMIMO_GET WMI_HECAP_PHY_DLOFMAMUMIMO_GET_D2
  30028. #define WMI_HECAP_PHY_DLOFDMAMUMIO_SET WMI_HECAP_PHY_DLOFDMAMUMIO_SET_D2
  30029. #define WMI_HECAP_PHY_32GI_GET WMI_HECAP_PHY_32GI_GET_D2
  30030. #define WMI_HECAP_PHY_32GI_SET WMI_HECAP_PHY_32GI_SET_D2
  30031. #define WMI_HECAP_PHY_NOSUNDIMENS_GET WMI_HECAP_PHY_NOSUNDIMENS_GET_D2
  30032. #define WMI_HECAP_PHY_NOSUNDIMENS_SET WMI_HECAP_PHY_NOSUNDIMENS_SET_D2
  30033. #define WMI_HECAP_PHY_40MHZNSS_GET WMI_HECAP_PHY_40MHZNSS_GET_D2
  30034. #define WMI_HECAP_PHY_40MHZNSS_SET WMI_HECAP_PHY_40MHZNSS_SET_D2
  30035. #define WMI_HECAP_PHY_ULOFDMA_GET WMI_HECAP_PHY_ULOFDMA_GET_D2
  30036. #define WMI_HECAP_PHY_ULOFDMA_SET WMI_HECAP_PHY_ULOFDMA_SET_D2
  30037. #define WMI_HECAP_PHY_DCM_GET WMI_HECAP_PHY_DCM_GET_D2
  30038. #define WMI_HECAP_PHY_DCM_SET WMI_HECAP_PHY_DCM_SET_D2
  30039. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET WMI_HECAP_PHY_NSTSLT80MHZ_GET_D2
  30040. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET WMI_HECAP_PHY_NSTSLT80MHZ_SET_D2
  30041. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET WMI_HECAP_PHY_NSTSGT80MHZ_GET_D2
  30042. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET WMI_HECAP_PHY_NSTSGT80MHZ_SET_D2
  30043. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D2
  30044. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D2
  30045. #define WMI_HECAP_MAC_PUNCSOUNDING_GET WMI_HECAP_MAC_PUNCSOUNDING_GET_D2
  30046. #define WMI_HECAP_MAC_PUNCSOUNDING_SET WMI_HECAP_MAC_PUNCSOUNDING_SET_D2
  30047. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET WMI_HECAP_MAC_HTVHTTRIGRX_GET_D2
  30048. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET WMI_HECAP_MAC_HTVHTTRIGRX_SET_D2
  30049. #endif /* SUPPORT_11AX_D3 */
  30050. /****** 11BE EHT PHY Capabilities Information field ******/
  30051. /* Bit 0: reserved */
  30052. /* Bit 1: support for 320Mhz in 6ghz */
  30053. #define WMI_EHTCAP_PHY_320MHZIN6GHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 1, 1)
  30054. #define WMI_EHTCAP_PHY_320MHZIN6GHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 1, 1, value)
  30055. /* Bit 2: support for 242-tone RU in BW wider than 20Mhz */
  30056. #define WMI_EHTCAP_PHY_242TONERUBWLT20MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 2, 1)
  30057. #define WMI_EHTCAP_PHY_242TONERUBWLT20MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 2, 1, value)
  30058. /* Bit 3: NDP with 4x EHT-LTF and 3.2us GI */
  30059. #define WMI_EHTCAP_PHY_NDP4XEHTLTFAND320NSGI_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 3, 1)
  30060. #define WMI_EHTCAP_PHY_NDP4XEHTLTFAND320NSGI_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 3, 1, value)
  30061. /* Bit 4: partial bandwidth UL MU-MIMO */
  30062. #define WMI_EHTCAP_PHY_PARTIALBWULMU_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 4, 1)
  30063. #define WMI_EHTCAP_PHY_PARTIALBWULMU_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 4, 1, value)
  30064. /* Bit 5: SU beamformer */
  30065. #define WMI_EHTCAP_PHY_SUBFMR_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 5, 1)
  30066. #define WMI_EHTCAP_PHY_SUBFMR_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 5, 1, value)
  30067. /* Bit 6: SU beamformee */
  30068. #define WMI_EHTCAP_PHY_SUBFME_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 6, 1)
  30069. #define WMI_EHTCAP_PHY_SUBFME_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 6, 1, value)
  30070. /* Bit 7-9: beamformee SS (<=80Mhz) */
  30071. #define WMI_EHTCAP_PHY_BFMESSLT80MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 7, 3)
  30072. #define WMI_EHTCAP_PHY_BFMESSLT80MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 7, 3, value)
  30073. /* Bit 10-12: beamformee SS (=160Mhz) */
  30074. #define WMI_EHTCAP_PHY_BFMESS160MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 10, 3)
  30075. #define WMI_EHTCAP_PHY_BFMESS160MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 10, 3, value)
  30076. /* Bit 13-15: beamformee SS (=320Mhz) */
  30077. #define WMI_EHTCAP_PHY_BFMESS320MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 13, 3)
  30078. #define WMI_EHTCAP_PHY_BFMESS320MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 13, 3, value)
  30079. /* Bit 16-18: number of sounding dimensions (<=80Mhz) */
  30080. #define WMI_EHTCAP_PHY_NUMSOUNDLT80MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 16, 3)
  30081. #define WMI_EHTCAP_PHY_NUMSOUNDLT80MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 16, 3, value)
  30082. /* Bit 19-21: number of sounding dimensions (=160Mhz) */
  30083. #define WMI_EHTCAP_PHY_NUMSOUND160MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 19, 3)
  30084. #define WMI_EHTCAP_PHY_NUMSOUND160MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 19, 3, value)
  30085. /* Bit 22-24: number of sounding dimensions (=320Mhz) */
  30086. #define WMI_EHTCAP_PHY_NUMSOUND320MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 22, 3)
  30087. #define WMI_EHTCAP_PHY_NUMSOUND320MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 22, 3, value)
  30088. /* Bit 25: ng = 16 SU feedback */
  30089. #define WMI_EHTCAP_PHY_NG16SUFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 25, 1)
  30090. #define WMI_EHTCAP_PHY_NG16SUFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 25, 1, value)
  30091. /* Bit 26: ng = 16 MU feedback */
  30092. #define WMI_EHTCAP_PHY_NG16MUFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 26, 1)
  30093. #define WMI_EHTCAP_PHY_NG16MUFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 26, 1, value)
  30094. /* Bit 27: codebook size {4,2} SU feedback */
  30095. #define WMI_EHTCAP_PHY_CODBK42SUFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 27, 1)
  30096. #define WMI_EHTCAP_PHY_CODBK42SUFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 27, 1, value)
  30097. /* Bit 28: codebook size {7,5} MU feedback */
  30098. #define WMI_EHTCAP_PHY_CODBK75MUFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 28, 1)
  30099. #define WMI_EHTCAP_PHY_CODBK75MUFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 28, 1, value)
  30100. /* Bit 29: triggered SU beamforming feedback */
  30101. #define WMI_EHTCAP_PHY_TRIGSUBFFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 29, 1)
  30102. #define WMI_EHTCAP_PHY_TRIGSUBFFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 29, 1, value)
  30103. /* Bit 30: triggered MU beamforming partial BW feedback */
  30104. #define WMI_EHTCAP_PHY_TRIGMUBFPARTBWFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 30, 1)
  30105. #define WMI_EHTCAP_PHY_TRIGMUBFPARTBWFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 30, 1, value)
  30106. /* Bit 31: triggered CQI feedback */
  30107. #define WMI_EHTCAP_PHY_TRIGCQIFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 31, 1)
  30108. #define WMI_EHTCAP_PHY_TRIGCQIFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 31, 1, value)
  30109. /* Bit 32: partial bandwidth DL MU-MIMO */
  30110. #define WMI_EHTCAP_PHY_PARTBWDLMUMIMO_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 0, 1)
  30111. #define WMI_EHTCAP_PHY_PARTBWDLMUMIMO_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 0, 1, value)
  30112. /* Bit 33: PSR-based SR support */
  30113. #define WMI_EHTCAP_PHY_PSRSR_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 1, 1)
  30114. #define WMI_EHTCAP_PHY_PSRSR_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 1, 1, value)
  30115. /* Bit 34: power boost factor support */
  30116. #define WMI_EHTCAP_PHY_PWRBSTFACTOR_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 2, 1)
  30117. #define WMI_EHTCAP_PHY_PWRBSTFACTOR_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 2, 1, value)
  30118. /* Bit 35: EHT MU PPDU with 4xEHT-LTF and 0.8us GI */
  30119. #define WMI_EHTCAP_PHY_4XEHTLTFAND800NSGI_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 3, 1)
  30120. #define WMI_EHTCAP_PHY_4XEHTLTFAND800NSGI_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 3, 1, value)
  30121. /* Bit 36-39: max NC */
  30122. #define WMI_EHTCAP_PHY_MAXNC_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 4, 4)
  30123. #define WMI_EHTCAP_PHY_MAXNC_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 4, 4, value)
  30124. /* Bit 40: non-triggered CQI feedback */
  30125. #define WMI_EHTCAP_PHY_NONTRIGCQIFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 8, 1)
  30126. #define WMI_EHTCAP_PHY_NONTRIGCQIFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 8, 1, value)
  30127. /* Bit 41: Tx 1024-QAM and 4096-QAM < 242-tone RU support */
  30128. #define WMI_EHTCAP_PHY_TX1024AND4096QAMLS242TONERU_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 9, 1)
  30129. #define WMI_EHTCAP_PHY_TX1024AND4096QAMLS242TONERU_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 9, 1, value)
  30130. /* Bit 42: Rx 1024-QAM and 4096-QAM < 242-tone RU support */
  30131. #define WMI_EHTCAP_PHY_RX1024AND4096QAMLS242TONERU_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 10, 1)
  30132. #define WMI_EHTCAP_PHY_RX1024AND4096QAMLS242TONERU_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 10, 1, value)
  30133. /* Bit 43: PPE thresholds present */
  30134. #define WMI_EHTCAP_PHY_PPETHRESPRESENT_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 11, 1)
  30135. #define WMI_EHTCAP_PHY_PPETHRESPRESENT_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 11, 1, value)
  30136. /* Bit 44-45: common nominal packet padding */
  30137. #define WMI_EHTCAP_PHY_CMNNOMPKTPAD_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 12, 2)
  30138. #define WMI_EHTCAP_PHY_CMNNOMPKTPAD_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 12, 2, value)
  30139. /* Bit 46-50: max number of supported EHT-LTFs */
  30140. #define WMI_EHTCAP_PHY_MAXNUMEHTLTF_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 14, 5)
  30141. #define WMI_EHTCAP_PHY_MAXNUMEHTLTF_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 14, 5, value)
  30142. /* Bit 51-54: support of MCS 15 */
  30143. #define WMI_EHTCAP_PHY_SUPMCS15_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 19, 4)
  30144. #define WMI_EHTCAP_PHY_SUPMCS15_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 19, 4, value)
  30145. /* Bit 55: support of EHT DUP in 6ghz */
  30146. #define WMI_EHTCAP_PHY_EHTDUPIN6GHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 23, 1)
  30147. #define WMI_EHTCAP_PHY_EHTDUPIN6GHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 23, 1, value)
  30148. /* Bit 56: support for 20Mhz operating STA receiving NDP with wider bandwidth */
  30149. #define WMI_EHTCAP_PHY_20MHZOPSTARXNDPWIDERBW_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 24, 1)
  30150. #define WMI_EHTCAP_PHY_20MHZOPSTARXNDPWIDERBW_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 24, 1, value)
  30151. /* Bit 57: non-OFDMA UL MU-MIMO (bw <= 80Mhz) */
  30152. #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMOLT80MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 25, 1)
  30153. #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMOLT80MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 25, 1, value)
  30154. /* Bit 58: non-OFDMA UL MU-MIMO (bw = 160Mhz) */
  30155. #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMO160MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 26, 1)
  30156. #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMO160MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 26, 1, value)
  30157. /* Bit 59: non-OFDMA UL MU-MIMO (bw = 320Mhz) */
  30158. #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMO320MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 27, 1)
  30159. #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMO320MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 27, 1, value)
  30160. /* Bit 60: MU beamformer (bw <= 80Mhz) */
  30161. #define WMI_EHTCAP_PHY_MUBFMRLT80MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 28, 1)
  30162. #define WMI_EHTCAP_PHY_MUBFMRLT80MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 28, 1, value)
  30163. /* Bit 61: MU beamformer (bw = 160Mhz) */
  30164. #define WMI_EHTCAP_PHY_MUBFMR160MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 29, 1)
  30165. #define WMI_EHTCAP_PHY_MUBFMR160MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 29, 1, value)
  30166. /* Bit 62: MU beamformer (bw = 320Mhz) */
  30167. #define WMI_EHTCAP_PHY_MUBFMR320MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 30, 1)
  30168. #define WMI_EHTCAP_PHY_MUBFMR320MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 30, 1, value)
  30169. /* Bit 63: reserved */
  30170. /****** End of 11BE EHT PHY Capabilities Information field ******/
  30171. /****** 11BE EHT MAC Capabilities Information field ******/
  30172. /* Bit 0: NSEP priority access supported */
  30173. #define WMI_EHTCAP_MAC_NSEPPRIACCESS_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 0, 1)
  30174. #define WMI_EHTCAP_MAC_NSEPPRIACCESS_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 0, 1, value)
  30175. /* Bit 1: EHT OM control support */
  30176. #define WMI_EHTCAP_MAC_EHTOMCTRL_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 1, 1)
  30177. #define WMI_EHTCAP_MAC_EHTOMCTRL_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 1, 1, value)
  30178. /* Bit 2: triggered TXOP support */
  30179. #define WMI_EHTCAP_MAC_TRIGTXOP_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 2, 1)
  30180. #define WMI_EHTCAP_MAC_TRIGTXOP_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 2, 1, value)
  30181. /* Bit 3-15: reserved */
  30182. /****** End of 11BE EHT MAC Capabilities Information field ******/
  30183. typedef struct {
  30184. /** TLV tag and len; tag equals
  30185. * WMITLV_TAG_STRUC_wmi_cfr_capture_event_fixed_param */
  30186. A_UINT32 tlv_header;
  30187. /* Method used to capture CFR - of type WMI_PEER_CFR_CAPTURE_METHOD */
  30188. A_UINT32 capture_method;
  30189. /* VDEV identifier */
  30190. A_UINT32 vdev_id;
  30191. /* Peer MAC address. In AP mode, this is the address of the connected peer
  30192. * for which CFR capture is needed. In case of STA mode, this is the address
  30193. * of the AP to which the STA is connected
  30194. */
  30195. wmi_mac_addr mac_addr;
  30196. /* primary 20 MHz channel frequency in mhz */
  30197. A_UINT32 chan_mhz;
  30198. /* BW of measurement - of type WMI_PEER_CFR_CAPTURE_BW */
  30199. A_UINT32 bandwidth;
  30200. /* phy mode WLAN_PHY_MODE of the channel defined in wlan_defs.h*/
  30201. A_UINT32 phy_mode;
  30202. /* Center frequency 1 in MHz*/
  30203. A_UINT32 band_center_freq1;
  30204. /* Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
  30205. A_UINT32 band_center_freq2;
  30206. /* Number of spatial streams */
  30207. A_UINT32 sts_count;
  30208. /* Bits 31:0: address of data from wmi_dma_buf_release_entry [31:0] */
  30209. A_UINT32 correlation_info_1;
  30210. /* Bits 11:0: address of data from wmi_dma_buf_release_entry [43:32]
  30211. * Bits 15:12: reserved (set to 0x0)
  30212. * Bits 31:16: hardware PPDU ID [15:0]
  30213. */
  30214. A_UINT32 correlation_info_2;
  30215. /* Bits 1:0: TX status (if any); values defined in enum
  30216. * WMI_FRAME_TX_STATUS
  30217. * Bits 30:2: reserved (set to 0x0)
  30218. * Bit 31: Status of the CFR capture of the peer
  30219. * 1 (True) - Successful; 0 (False) - Not successful
  30220. */
  30221. A_UINT32 status;
  30222. /* Timestamp in microseconds at which the CFR was captured in the hardware.
  30223. * The clock used for this timestamp is private to the target and
  30224. * is not visible to the host i.e., Host can interpret only the
  30225. * relative timestamp deltas from one message to the next,
  30226. * but can't interpret the absolute timestamp from a single message.
  30227. */
  30228. A_UINT32 timestamp_us;
  30229. /*
  30230. * Count of the current CFR capture from FW.
  30231. * This is helpful to identify any drops in FW.
  30232. */
  30233. A_UINT32 counter;
  30234. /* Per chain RSSI of the peer, for up to WMI_MAX_CHAINS.
  30235. * Each chain's entry reports the RSSI for different bands in dBm units.
  30236. * Use WMI_UNIFIED_CHAIN_RSSI_GET to extract the value for a particular
  30237. * band.
  30238. * A band value of 0x80 (-128) is invalid.
  30239. */
  30240. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  30241. /* Carrier frequency offset
  30242. It is Difference between down conversion oscillator frequency at the receiver
  30243. versus carrier frequency of the received signal. To convert to ppm, below
  30244. equation needs to be used. Here, Fc is carrier frequency (primary 20 channel frequency) in Hz:
  30245. PPM = cfo_measurement(13 bits)/((2^13)/(800e-9)/2/Fc*1e6)
  30246. PPM ranges from -40 to +40
  30247. Bits 0 : 0 Set to 1 to indicate cfo mesurement value is valid
  30248. Bits 1 : 14 14 bits cfo measurement raw data. 14 bit is signed bit.
  30249. For the above ppm equation , use the first 13 bits to calculate.
  30250. */
  30251. A_UINT32 cfo_measurement_valid :1,
  30252. cfo_measurement :14,
  30253. reserved :17;
  30254. /* RX packet start timestamp.
  30255. * It reports the time the first L-STF ADC sample arrived at RX antenna
  30256. * It is in units of 480 MHz clock, i.e. number of clock cycles at 480 MHz.
  30257. */
  30258. A_UINT32 rx_start_ts;
  30259. /*
  30260. * The rx_ts_reset flag will be set to 1 upon every reset of rx_start_ts.
  30261. */
  30262. A_UINT32 rx_ts_reset;
  30263. /*
  30264. * MCS and Guard Interval.
  30265. * MCS: For legacy mode only
  30266. * 0: 48 Mbps
  30267. * 1: 24 Mbps
  30268. * 2: 12 Mbps
  30269. * 3: 6 Mbps
  30270. * 4: 54 Mbps
  30271. * 5: 36 Mbps
  30272. * 6: 18 Mbps
  30273. * 7: 9 Mbps
  30274. * 8-254: reserved
  30275. * 255: invalid entry
  30276. *
  30277. * GI: For Legacy mode only
  30278. * 0: 0.8 us
  30279. * 1: 0.4 us
  30280. * 2: 1.6 us
  30281. * 3: 3.2 us
  30282. * 4-254: reserved
  30283. * 255: invalid entry
  30284. *
  30285. * Bits 0:7 mcs
  30286. * Bits 8:15 gi_type
  30287. * Bits 16:31 reserved
  30288. */
  30289. A_UINT32 mcs_gi_info;
  30290. } wmi_peer_cfr_capture_event_fixed_param;
  30291. #define WMI_CFR_MCS_GET(mcs_gi_info) \
  30292. WMI_GET_BITS(mcs_gi_info, 0, 8)
  30293. #define WMI_CFR_MCS_SET(mcs_gi_info, value) \
  30294. WMI_SET_BITS(mcs_gi_info, 0, 8, value)
  30295. #define WMI_CFR_GI_TYPE_GET(mcs_gi_info) \
  30296. WMI_GET_BITS(mcs_gi_info, 8, 8)
  30297. #define WMI_CFR_GI_TYPE_SET(mcs_gi_info, value) \
  30298. WMI_SET_BITS(mcs_gi_info, 8, 8, value)
  30299. #define WMI_UNIFIED_CHAIN_PHASE_MASK 0x0000ffff
  30300. #define WMI_UNIFIED_CHAIN_PHASE_GET(tlv, chain_idx) \
  30301. ((A_UINT16) ((tlv)->chain_phase[chain_idx] & WMI_UNIFIED_CHAIN_PHASE_MASK))
  30302. #define WMI_UNIFIED_CHAIN_PHASE_SET(tlv, chain_idx, value) \
  30303. (tlv)->chain_phase[chain_idx] = (WMI_UNIFIED_CHAIN_PHASE_MASK & (value))
  30304. #define WMI_CFR_AGC_GAIN_CHAINS_PER_U32 4
  30305. #define WMI_UNIFIED_AGC_GAIN_MASK 0x000000ff
  30306. #define WMI_UNIFIED_AGC_GAIN_GET(tlv, chain_idx) \
  30307. ((A_UINT8) ((tlv)->agc_gain_index[(chain_idx)/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] >> \
  30308. ((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8) & WMI_UNIFIED_AGC_GAIN_MASK)
  30309. #define WMI_UNIFIED_AGC_GAIN_SET(tlv, chain_idx, value) \
  30310. (tlv)->agc_gain_index[chain_idx/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] = \
  30311. (tlv)->agc_gain_index[chain_idx/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] & \
  30312. ~(0xff << (((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8)) | \
  30313. (((value)<<((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8))
  30314. typedef struct {
  30315. /** TLV tag and len; tag equals
  30316. * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_event_phase_fixed_param */
  30317. A_UINT32 tlv_header;
  30318. /* Per chain AoA phase data of the Peer, for up to WMI_MAX_CHAINS.
  30319. * USE WMI_UNIFIED_CHAIN_PHASE_GET to extract the phase value for
  30320. * a particular chain.
  30321. * Only lower 2 bytes will contain phase data for a particular chain.
  30322. * The values in phase data will be from 0 1023 as mapping of
  30323. * 0-359 degrees using the formula -
  30324. * phase data = phase in degrees * 1024 / 360
  30325. *
  30326. * Target will set 0xFFFF for all invalid chains.
  30327. *
  30328. * The WMI_UNIFIED_CHAIN_PHASE_GET/SET macros can be used to access
  30329. * the valid portion of the 4-byte word containing the chain phase data.
  30330. */
  30331. A_UINT32 chain_phase[WMI_MAX_CHAINS];
  30332. /* agc_gain_index
  30333. * It shows an index in the AGC gain LUT.
  30334. * agc gain should be in range between 0 to 62.
  30335. * 4 AGC gain index values are packed into each A_UINT32 word;
  30336. * use the WMI_UNITIFED_AGC_GAIN_GET/SET macros to read/write
  30337. * the AGC gain indices for individual chains.
  30338. */
  30339. A_UINT32 agc_gain_index[WMI_MAX_CHAINS/WMI_CFR_AGC_GAIN_CHAINS_PER_U32];
  30340. } wmi_peer_cfr_capture_event_phase_fixed_param;
  30341. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_OK 0x80000000
  30342. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_OK_S 31
  30343. /* Failed to capture CFR as peer is in power save mode */
  30344. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_PS_FAILED 0x40000000
  30345. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_PS_FAILED_S 30
  30346. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_TX 0x00000003
  30347. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_TX_S 0
  30348. /**
  30349. * wmi_cold_boot_cal_data config flags
  30350. * BIT 0 : 1 means more data will come, 0 means last event
  30351. * BIT 1-31 : Reserved
  30352. */
  30353. #define WMI_COLD_BOOT_CAL_DATA_SET_IS_MORE_DATA(flags, val) WMI_SET_BITS(flags, 0, 1, val)
  30354. #define WMI_COLD_BOOT_CAL_DATA_GET_IS_MORE_DATA(flags) WMI_GET_BITS(flags, 0, 1)
  30355. typedef struct {
  30356. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_cold_boot_cal_data_fixed_param */
  30357. A_UINT32 data_len; /** length in byte of data[]. */
  30358. A_UINT32 flags; /** config flags : Only 0th bit is used, bit 1-31 are reserved */
  30359. /* Following this structure is the TLV:
  30360. * A_UINT8 data[]; <-- length in byte given by field data_len.
  30361. * This data array contains cold boot data calibration raw data.
  30362. */
  30363. } wmi_cold_boot_cal_data_fixed_param;
  30364. typedef struct {
  30365. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_rap_info_event_fixed_param */
  30366. /** pdev_id for identifying the MAC, the default value is WMI_PDEV_ID_SOC
  30367. * See macros starting with WMI_PDEV_ID_ for values.
  30368. */
  30369. A_UINT32 pdev_id;
  30370. A_UINT32 type; /** type of the rogue ap, see WMI_ROGUE_AP_TYPE */
  30371. wmi_mac_addr bssid; /** bssid of the rogue ap */
  30372. } wmi_pdev_rap_info_event_fixed_param;
  30373. /*
  30374. * WMI API for Firmware to indicate iface combinations which Firmware
  30375. * support to Host
  30376. */
  30377. typedef struct {
  30378. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_wlanfw_iface_cmb_ind_event_fixed_param */
  30379. /* common part */
  30380. /* Consider DBS/DBDC for this new implementation */
  30381. A_UINT32 pdev_n;
  30382. /* iface combinations part -
  30383. * Use subsequent TLV arrays to list supported combinations of interfaces.
  30384. */
  30385. /*
  30386. * The TLVs listing interface combinations, will follow this TLV.
  30387. * The number of combinations can be calculated by dividing the
  30388. * TLV array length by the TLV array element length.
  30389. *
  30390. * The fixed_param TLV is directly followed by a list of
  30391. * wlanfw_iface_combination elements:
  30392. * wlanfw_iface_combination combinations[0];
  30393. * wlanfw_iface_combination combinations[1];
  30394. * ...
  30395. * wlanfw_iface_combination combinations[N];
  30396. *
  30397. * After the list of wlanfw_iface_combinations is a list of interface limits.
  30398. * The cmb_limits field of each wlanfw_iface_combination show which of the
  30399. * limits within the "wlanfw_ifact_limit limits" list belong to that
  30400. * iface_combination:
  30401. * limits[0] <- cmb 0, limit 0
  30402. * ...
  30403. * limits[cmb[0].cmb_limits-1] <- cmb 0, limit N
  30404. * limits[cmb[0].cmb_limits] <- cmb 1, limit 0
  30405. * ...
  30406. * limits[cmb[0].cmb_limits+cmb[1].cmb_limits-1] <- cmb 1, limit N
  30407. * limits[cmb[0].cmb_limits+cmb[1].cmb_limits] <- cmb 2, limit 0
  30408. * ...
  30409. */
  30410. } wmi_wlanfw_iface_cmb_ind_event_fixed_param;
  30411. typedef struct {
  30412. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_wlanfw_iface_limit_param */
  30413. /*
  30414. * How many vdevs can work as below vdev_type/vdev_subtype
  30415. * in one combination.
  30416. */
  30417. A_UINT32 vdev_limit_n;
  30418. /*
  30419. * Indicate what role above vdevs can work as.
  30420. * Refer to "WMI_VDEV_TYPE_xx, WMI_UNIFIED_VDEV_SUBTYPE_xx"
  30421. * for roles definition.
  30422. */
  30423. A_UINT32 vdev_type;
  30424. A_UINT32 vdev_subtype;
  30425. } wlanfw_iface_limit;
  30426. /**
  30427. * @brief specific configuration of valid_fields for host.
  30428. * These flags are used for indicating which fields in wlanfw_iface_combination
  30429. * contains valid value for Host Driver.
  30430. * 0: Host can ignore this field
  30431. * 1: field contains valid value for Host Driver
  30432. */
  30433. #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_S 0
  30434. #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_M 0x1
  30435. #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_S 1
  30436. #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_M 0x2
  30437. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_S 2
  30438. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_M 0x4
  30439. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_S 3
  30440. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_M 0x8
  30441. #define WMI_CMB_VALID_FIELDS_FLAG_SET(word32, flag, value) \
  30442. do { \
  30443. (word32) &= ~WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M; \
  30444. (word32) |= ((value) << WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _S) & \
  30445. WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M; \
  30446. } while (0)
  30447. #define WMI_CMB_VALID_FIELDS_FLAG_GET(word32, flag) \
  30448. (((word32) & WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M) >> \
  30449. WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _S)
  30450. #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_SET(word32, value) \
  30451. WMI_CMB_VALID_FIELDS_FLAG_SET((word32), PEER_MAX, (value))
  30452. #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_GET(word32) \
  30453. WMI_CMB_VALID_FIELDS_FLAG_GET((word32), PEER_MAX)
  30454. #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_SET(word32, value) \
  30455. WMI_CMB_VALID_FIELDS_FLAG_SET((word32), STA_AP_BCN_INT_MATCH, (value))
  30456. #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_GET(word32) \
  30457. WMI_CMB_VALID_FIELDS_FLAG_GET((word32), STA_AP_BCN_INT_MATCH)
  30458. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_SET(word32, value) \
  30459. WMI_CMB_VALID_FIELDS_FLAG_SET((word32), BCN_INT_MIN, (value))
  30460. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_GET(word32) \
  30461. WMI_CMB_VALID_FIELDS_FLAG_GET((word32), BCN_INT_MIN)
  30462. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_SET(word32, value) \
  30463. WMI_CMB_VALID_FIELDS_FLAG_SET((word32), BCN_INT_N, (value))
  30464. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_GET(word32) \
  30465. WMI_CMB_VALID_FIELDS_FLAG_GET((word32), BCN_INT_N)
  30466. typedef struct {
  30467. A_UINT32 tlv_header;
  30468. /*
  30469. * Max num Peers can be supported in this combination.
  30470. * It excludes the self-peers associated with each vdev.
  30471. * It's the number of real remote peers.
  30472. * eg: when working as AP mode, indicating how many clients can be
  30473. * supported to connect with this AP.
  30474. */
  30475. A_UINT32 peer_max;
  30476. /* Home Channels supported on one single phy concurrently */
  30477. A_UINT32 channel_n;
  30478. /*
  30479. * The number of "wlanfw_iface_limit" for a specified combination.
  30480. * eg: there is 2 vdev, including 1 AP vdev and 1 STA vdev, then this
  30481. * cmb_limits will be 2 for this combination.
  30482. */
  30483. A_UINT32 cmb_limits;
  30484. /*
  30485. * Beacon intervals for STA and AP types need to be match or not.
  30486. * 1: need to be match
  30487. * 0: not need
  30488. */
  30489. A_UINT32 sta_ap_bcn_int_match;
  30490. /*
  30491. * This combination supports different beacon intervals or not.
  30492. * 0: Beacon interval is same for all interface
  30493. * !0: STA Beacon interval AND GCD of AP Beacon intervals
  30494. * should be greater or equal to this value.
  30495. */
  30496. A_UINT32 bcn_int_min;
  30497. /*
  30498. * Number of different Beacon intervals
  30499. */
  30500. A_UINT32 bcn_int_n;
  30501. /*
  30502. * This indicates which field in this struct
  30503. * contains valid value for Host Driver.
  30504. * Refer to definitions for "WMI_CMB_VALID_FIELDS_FLAG_xx".
  30505. */
  30506. A_UINT32 valid_fields;
  30507. } wlanfw_iface_combination;
  30508. typedef struct {
  30509. /** TLV tag and len; tag equals
  30510. * WMITLV_TAG_STRUC_wmi_set_elna_bypass_cmd_fixed_param */
  30511. A_UINT32 tlv_header;
  30512. /* VDEV identifier */
  30513. A_UINT32 vdev_id;
  30514. /** 1-Enable, 0-Disable */
  30515. A_UINT32 en_dis;
  30516. } wmi_set_elna_bypass_cmd_fixed_param;
  30517. typedef struct {
  30518. /** TLV tag and len; tag equals
  30519. * WMITLV_TAG_STRUC_wmi_get_elna_bypass_cmd_fixed_param */
  30520. A_UINT32 tlv_header;
  30521. /* VDEV identifier */
  30522. A_UINT32 vdev_id;
  30523. } wmi_get_elna_bypass_cmd_fixed_param;
  30524. typedef struct {
  30525. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_elna_bypass_event_fixed_param */
  30526. /* VDEV identifier */
  30527. A_UINT32 vdev_id;
  30528. /** 1-Enable, 0-Disable */
  30529. A_UINT32 en_dis;
  30530. } wmi_get_elna_bypass_event_fixed_param;
  30531. typedef struct {
  30532. /** TLV tag and len; tag equals
  30533. * WMITLV_TAG_STRUC_wmi_get_channel_ani_cmd_fixed_param
  30534. */
  30535. A_UINT32 tlv_header;
  30536. /**
  30537. * TLV (tag length value) parameters follow the
  30538. * structure. The TLV's are:
  30539. * list of channels (center freq of primary 20 MHz of the channel, in MHz)
  30540. * A_UINT32 channel_list[];
  30541. */
  30542. } wmi_get_channel_ani_cmd_fixed_param;
  30543. typedef struct {
  30544. /** TLV tag and len; tag equals
  30545. * WMITLV_TAG_STRUC_wmi_get_channel_ani_event_fixed_param
  30546. */
  30547. A_UINT32 tlv_header;
  30548. /**
  30549. * TLV (tag length value) parameters follow the
  30550. * structure. The TLV's are:
  30551. * wmi_channel_ani_info_tlv_param ani_info[];
  30552. */
  30553. } wmi_get_channel_ani_event_fixed_param;
  30554. typedef struct {
  30555. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_ani_info_tlv_param */
  30556. A_UINT32 tlv_header;
  30557. /** channel freq (center of 20 MHz primary channel) in MHz */
  30558. A_UINT32 chan_freq;
  30559. /**
  30560. * ANI (noise interference) level corresponding to the channel.
  30561. * Values range from [0-9], with higher values indicating more
  30562. * noise interference.
  30563. */
  30564. A_UINT32 ani_level;
  30565. } wmi_channel_ani_info_tlv_param;
  30566. /* This command is to specify to enable/disable audio frame aggr */
  30567. typedef struct {
  30568. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_enable_cmd_fixed_param */
  30569. A_UINT32 aggr_enable; /* enable aggregation for audio frame */
  30570. A_UINT32 tbd_enable; /* enable time_based discarding for audio frame */
  30571. A_UINT32 vdev_id;
  30572. } wmi_audio_aggr_enable_cmd_fixed_param;
  30573. typedef struct wmi_audio_aggr_rate_set_s {
  30574. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_audio_aggr_rate_set */
  30575. A_UINT32 mcs;
  30576. A_UINT32 bandwidth; /* 0 for 20M, 1 for 40M and 2 for 80M, etc. */
  30577. A_UINT32 vdev_id;
  30578. } WMI_AUDIO_AGGR_RATE_SET_T;
  30579. typedef struct {
  30580. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_add_group */
  30581. A_UINT32 group_id; /* id of audio group */
  30582. wmi_mac_addr multicast_addr; /* multicast address of audio group */
  30583. A_UINT32 vdev_id;
  30584. } wmi_audio_aggr_add_group_cmd_fixed_param;
  30585. typedef struct {
  30586. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_del_group */
  30587. A_UINT32 group_id;
  30588. A_UINT32 vdev_id;
  30589. } wmi_audio_aggr_del_group_cmd_fixed_param;
  30590. typedef struct {
  30591. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_set_group_rate */
  30592. A_UINT32 group_id;
  30593. A_UINT32 vdev_id;
  30594. /**
  30595. * TLV (tag length value) parameters follow the
  30596. * structure. The TLV's are:
  30597. * WMI_AUDIO_AGGR_RATE_SET_T rate_set[];
  30598. **/
  30599. } wmi_audio_aggr_set_group_rate_cmd_fixed_param;
  30600. typedef struct {
  30601. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_set_group_retry */
  30602. A_UINT32 group_id;
  30603. A_UINT32 retry_thresh;
  30604. A_UINT32 vdev_id;
  30605. } wmi_audio_aggr_set_group_retry_cmd_fixed_param;
  30606. typedef struct {
  30607. A_UINT32 tlv_header;
  30608. A_UINT32 vdev_id;
  30609. A_UINT32 group_id;
  30610. /*
  30611. * bit0: if set, Enable HT20
  30612. * bit1: if set, Enable HT40
  30613. * bit2, bit3: Reserved
  30614. * bit4: if set, Enable VHT20
  30615. * bit5: if set, Enable VHT40
  30616. * bit6: if set, Enable VHT80
  30617. * bit7 ~ bit31: Reserved
  30618. */
  30619. A_UINT32 bw;
  30620. A_UINT32 mcs_min;
  30621. A_UINT32 mcs_max;
  30622. A_UINT32 mcs_offset;
  30623. A_UINT32 nss;
  30624. } wmi_audio_aggr_set_group_auto_rate_cmd_fixed_param;
  30625. typedef struct {
  30626. A_UINT32 tlv_header;
  30627. A_UINT32 vdev_id;
  30628. A_UINT32 group_id;
  30629. A_UINT32 interval;
  30630. } wmi_audio_aggr_set_group_probe_cmd_fixed_param;
  30631. typedef struct {
  30632. /**
  30633. * TLV tag and len;
  30634. * tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_update_sta_group_info */
  30635. A_UINT32 tlv_header;
  30636. /* vdev id */
  30637. A_UINT32 vdev_id; /* which STA/vdev's group membership is being specified */
  30638. /* bitmap that indicates which groups this sta belongs to */
  30639. A_UINT32 group_bmap;
  30640. /*
  30641. * This fixed_param struct is followed by a TLV array of wmi_mac_addr,
  30642. * which specifies the multi-cast MAC address used for each group.
  30643. * The number of elements within the TLV array matches the number of bits
  30644. * set within group_bmap.
  30645. */
  30646. } wmi_audio_aggr_update_sta_group_info_cmd_fixed_param;
  30647. typedef struct {
  30648. /** TLV tag and len **/
  30649. A_UINT32 tlv_header;
  30650. /* VDEV identifier */
  30651. A_UINT32 vdev_id;
  30652. /*
  30653. * Identifier from Host to indicate how many this cmd been sent to FW.
  30654. * This value will be echoed back in the response_id field
  30655. * of the WMI_AUDIO_AGGR_REPORT_STATISTICS_EVENTID.
  30656. */
  30657. A_UINT32 request_id;
  30658. } wmi_audio_aggr_get_statistics_cmd_fixed_param;
  30659. typedef struct {
  30660. /** TLV tag and len **/
  30661. A_UINT32 tlv_header;
  30662. /* VDEV identifier */
  30663. A_UINT32 vdev_id;
  30664. } wmi_audio_aggr_reset_statistics_cmd_fixed_param;
  30665. typedef struct {
  30666. /** TLV tag and len **/
  30667. A_UINT32 tlv_header;
  30668. /* VDEV identifier */
  30669. A_UINT32 vdev_id;
  30670. /*
  30671. * The user_mode and user_profile fields are passed through
  30672. * the host driver to the target FW, but are never interpreted
  30673. * by the host driver. The values for these fields are opaque
  30674. * to the host, and are only interpreted by the FW.
  30675. */
  30676. A_UINT32 user_mode;
  30677. A_UINT32 user_profile;
  30678. } wmi_audio_aggr_set_rtscts_config_cmd_fixed_param;
  30679. typedef enum {
  30680. /* audio aggr scheduler method list */
  30681. WMI_AUDIO_AGGR_SCHED_METHOD_HOST_CONTROL = 1,
  30682. WMI_AUDIO_AGGR_SCHED_METHOD_HOST_CONTROL_PER_CYCLE = 2,
  30683. WMI_AUDIO_AGGR_SCHED_METHOD_MAX,
  30684. } WMI_AUDIO_AGGR_SCHED_METHOD_TYPE;
  30685. typedef enum {
  30686. /* audio aggr RTS-CTS Config */
  30687. WMI_AUDIO_AGGR_RTS_CTS_CONFIG_DISABLED = 0,
  30688. WMI_AUDIO_AGGR_RTS_CTS_CONFIG_PPDU = 1,
  30689. WMI_AUDIO_AGGR_RTS_CTS_CONFIG_CYCLE = 2,
  30690. WMI_AUDIO_AGGR_RTS_CTS_MAX,
  30691. } WMI_AUDIO_AGGR_RTS_CTS_CONFIG_TYPE;
  30692. typedef struct {
  30693. /* TLV tag and len */
  30694. A_UINT32 tlv_header;
  30695. /* VDEV identifier */
  30696. A_UINT32 vdev_id;
  30697. /* selected audio aggr scheduler method
  30698. * valid methods can be found in WMI_AUDIO_AGGR_SCHED_METHOD_TYPE
  30699. */
  30700. A_UINT32 sched_method;
  30701. /* rts-cts config
  30702. * valid config can be found in WMI_AUDIO_AGGR_RTS_CTS_CONFIG_TYPE
  30703. */
  30704. A_UINT32 rtscts_config;
  30705. } wmi_audio_aggr_set_sched_method_cmd_fixed_param;
  30706. typedef struct {
  30707. /* TLV tag and len */
  30708. A_UINT32 tlv_header;
  30709. /* VDEV identifier */
  30710. A_UINT32 vdev_id;
  30711. } wmi_audio_aggr_get_sched_method_cmd_fixed_param;
  30712. typedef struct {
  30713. /** TLV tag and len; tag equals
  30714. * WMITLV_TAG_STRUC_wmi_set_ocl_cmd_fixed_param */
  30715. A_UINT32 tlv_header;
  30716. /* VDEV identifier */
  30717. A_UINT32 vdev_id;
  30718. /** enable/disable OCL, 1 - enable, 0 - disable*/
  30719. A_UINT32 en_dis_chain;
  30720. } wmi_set_ocl_cmd_fixed_param;
  30721. typedef struct {
  30722. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_sync_qtimer */
  30723. A_UINT32 vdev_id;
  30724. A_UINT32 qtimer_l32;
  30725. A_UINT32 qtimer_u32;
  30726. } wmi_audio_sync_qtimer_cmd_fixed_param;
  30727. typedef struct {
  30728. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_sync_trigger */
  30729. A_UINT32 vdev_id;
  30730. /* agg_relation:
  30731. * indicates whether host needs only one pair of Qmaster and Qslave,
  30732. * or Qmaster and Qslave pairs derived for each FTM frame exchange.
  30733. * 0 indicates one pair for each FTM frame exchanged
  30734. * 1 indicates only one pair of Qmaster and Qslave times.
  30735. */
  30736. A_UINT32 agg_relation;
  30737. } wmi_audio_sync_trigger_cmd_fixed_param;
  30738. typedef struct {
  30739. /** TLV tag and len; tag equals
  30740. * WMITLV_TAG_STRUC_wmi_pdev_mec_aging_timer_config_cmd_fixed_param
  30741. */
  30742. A_UINT32 tlv_header;
  30743. /** SOC level Command. pdev_id - WMI_PDEV_ID_SOC is used.
  30744. */
  30745. A_UINT32 pdev_id;
  30746. /* The Threshold for mec aging timer in ms
  30747. */
  30748. A_UINT32 mec_aging_timer_threshold;
  30749. } wmi_pdev_mec_aging_timer_config_cmd_fixed_param;
  30750. #define WMI_CFR_GROUP_TA_ADDR_VALID_BIT_POS 0
  30751. #define WMI_CFR_GROUP_TA_ADDR_MASK_VALID_BIT_POS 1
  30752. #define WMI_CFR_GROUP_RA_ADDR_VALID_BIT_POS 2
  30753. #define WMI_CFR_GROUP_RA_ADDR_MASK_VALID_BIT_POS 3
  30754. #define WMI_CFR_GROUP_BW_VALID_BIT_POS 4
  30755. #define WMI_CFR_GROUP_NSS_VALID_BIT_POS 5
  30756. #define WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_BIT_POS 6
  30757. #define WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_BIT_POS 7
  30758. #define WMI_CFR_GROUP_DATA_SUBTYPE_VALID_BIT_POS 8
  30759. /* The bits in this mask mapped to WMI_PEER_CFR_CAPTURE_BW enum */
  30760. #define WMI_CFR_GROUP_BW_MASK_NUM_BITS 5
  30761. #define WMI_CFR_GROUP_BW_BIT_POS 0
  30762. /* The bits in this mask correspond to the values as below
  30763. * bit 0 -> Nss 1
  30764. * bit 1 -> Nss 2
  30765. * ...
  30766. * bit 7 -> Nss 8
  30767. */
  30768. #define WMI_CFR_GROUP_NSS_MASK_NUM_BITS 8
  30769. #define WMI_CFR_GROUP_NSS_BIT_POS 16
  30770. #define WMI_CFR_GROUP_TA_ADDR_VALID_SET(param, value) \
  30771. WMI_SET_BITS(param, WMI_CFR_GROUP_TA_ADDR_VALID_BIT_POS, 1, value)
  30772. #define WMI_CFR_GROUP_TA_ADDR_VALID_GET(param) \
  30773. WMI_GET_BITS(param, WMI_CFR_GROUP_TA_ADDR_VALID_BIT_POS, 1)
  30774. #define WMI_CFR_GROUP_TA_ADDR_MASK_VALID_SET(param, value) \
  30775. WMI_SET_BITS(param, WMI_CFR_GROUP_TA_ADDR_MASK_VALID_BIT_POS, 1, value)
  30776. #define WMI_CFR_GROUP_TA_ADDR_MASK_VALID_GET(param) \
  30777. WMI_GET_BITS(param, WMI_CFR_GROUP_TA_ADDR_MASK_VALID_BIT_POS, 1)
  30778. #define WMI_CFR_GROUP_RA_ADDR_VALID_SET(param, value) \
  30779. WMI_SET_BITS(param, WMI_CFR_GROUP_RA_ADDR_VALID_BIT_POS, 1, value)
  30780. #define WMI_CFR_GROUP_RA_ADDR_VALID_GET(param) \
  30781. WMI_GET_BITS(param, WMI_CFR_GROUP_RA_ADDR_VALID_BIT_POS, 1)
  30782. #define WMI_CFR_GROUP_RA_ADDR_MASK_VALID_SET(param, value) \
  30783. WMI_SET_BITS(param, WMI_CFR_GROUP_RA_ADDR_MASK_VALID_BIT_POS, 1, value)
  30784. #define WMI_CFR_GROUP_RA_ADDR_MASK_VALID_GET(param) \
  30785. WMI_GET_BITS(param, WMI_CFR_GROUP_RA_ADDR_MASK_VALID_BIT_POS, 1)
  30786. #define WMI_CFR_GROUP_BW_VALID_SET(param, value) \
  30787. WMI_SET_BITS(param, WMI_CFR_GROUP_BW_VALID_BIT_POS, 1, value)
  30788. #define WMI_CFR_GROUP_BW_VALID_GET(param) \
  30789. WMI_GET_BITS(param, WMI_CFR_GROUP_BW_VALID_BIT_POS, 1)
  30790. #define WMI_CFR_GROUP_NSS_VALID_SET(param, value) \
  30791. WMI_SET_BITS(param, WMI_CFR_GROUP_NSS_VALID_BIT_POS, 1, value)
  30792. #define WMI_CFR_GROUP_NSS_VALID_GET(param) \
  30793. WMI_GET_BITS(param, WMI_CFR_GROUP_NSS_VALID_BIT_POS, 1)
  30794. #define WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_SET(param, value) \
  30795. WMI_SET_BITS(param, WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_BIT_POS, 1, value)
  30796. #define WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_GET(param) \
  30797. WMI_GET_BITS(param, WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_BIT_POS, 1)
  30798. #define WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_SET(param, value) \
  30799. WMI_SET_BITS(param, WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_BIT_POS, 1, value)
  30800. #define WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_GET(param) \
  30801. WMI_GET_BITS(param, WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_BIT_POS, 1)
  30802. #define WMI_CFR_GROUP_DATA_SUBTYPE_VALID_SET(param, value) \
  30803. WMI_SET_BITS(param, WMI_CFR_GROUP_DATA_SUBTYPE_VALID_BIT_POS, 1, value)
  30804. #define WMI_CFR_GROUP_DATA_SUBTYPE_VALID_GET(param) \
  30805. WMI_GET_BITS(param, WMI_CFR_GROUP_DATA_SUBTYPE_VALID_BIT_POS, 1)
  30806. #define WMI_CFR_GROUP_BW_SET(param, value) \
  30807. WMI_SET_BITS(param, WMI_CFR_GROUP_BW_BIT_POS, WMI_CFR_GROUP_BW_MASK_NUM_BITS, value)
  30808. #define WMI_CFR_GROUP_BW_GET(param) \
  30809. WMI_GET_BITS(param, WMI_CFR_GROUP_BW_BIT_POS, WMI_CFR_GROUP_BW_MASK_NUM_BITS)
  30810. #define WMI_CFR_GROUP_NSS_SET(param, value) \
  30811. WMI_SET_BITS(param, WMI_CFR_GROUP_NSS_BIT_POS, WMI_CFR_GROUP_NSS_MASK_NUM_BITS, value)
  30812. #define WMI_CFR_GROUP_NSS_GET(param) \
  30813. WMI_GET_BITS(param, WMI_CFR_GROUP_NSS_BIT_POS, WMI_CFR_GROUP_NSS_MASK_NUM_BITS)
  30814. typedef struct {
  30815. /** TLV tag and len; tag equals
  30816. * WMITLV_TAG_STRUC_wmi_cfr_filter_group_config */
  30817. A_UINT32 tlv_header;
  30818. /* Filter group number for which the below filters needs to be applied */
  30819. A_UINT32 filter_group_id;
  30820. /* Indicates which of the below filter's value is valid
  30821. * Bit 0: Ta_addr is valid if set
  30822. * Bit 1: Ta_addr_mask is valid if set
  30823. * Bit 2: Ra_addr is valid if set
  30824. * Bit 3: Ra_addr_mask is valid if set
  30825. * Bit 4: Bandwidth is valid if set
  30826. * Bit 5: NSS is valid if set
  30827. * Bit 6: Mgmt_subtype is valid if set
  30828. * Bit 7: Ctrl_subtype is valid if set
  30829. * Bit 8: Data_subtype is valid if set
  30830. * Bits 31:9 Reserved for future use
  30831. */
  30832. A_UINT32 filter_set_valid_mask;
  30833. /* ta_addr:
  30834. * Packets matching the TA_mac addr will be filtered in by MAC
  30835. * for CFR capture.
  30836. */
  30837. wmi_mac_addr ta_addr;
  30838. /* ta_addr_mask:
  30839. * Packets matching the TA_mac addr Mask will be filtered in by MAC
  30840. * for CFR capture.
  30841. */
  30842. wmi_mac_addr ta_addr_mask;
  30843. /* ra_addr:
  30844. * Packets matching the RA_mac addr will be filtered in by MAC
  30845. * for CFR capture.
  30846. */
  30847. wmi_mac_addr ra_addr;
  30848. /* ra_addr_mask:
  30849. * Packets matching the RA_mac addr Mask will be filtered in by MAC
  30850. * for CFR capture.
  30851. */
  30852. wmi_mac_addr ra_addr_mask;
  30853. /* bw_nss_filter:
  30854. * Indicates which bw and nss packets will be filtered for CFR capture
  30855. * Bits 4:0 CFR capture will be done for packets matching the bandwidths
  30856. * specified within this bitmask
  30857. * Bits 15:5 Reserved for future
  30858. * Bits 23:16 CFR capture will be done for packets matching the Nss
  30859. * specified within this bitmask
  30860. * Bits 31:24 Reserved for future
  30861. */
  30862. A_UINT32 bw_nss_filter;
  30863. /* mgmt_subtype_filter:
  30864. * Managments Packets matching the subtype filter categories will be
  30865. * filtered in by MAC for CFR capture.
  30866. * This is a bitmask, in which each bit represents the corresponding
  30867. * mgmt subtype value as per ieee80211_defs.h
  30868. */
  30869. A_UINT32 mgmt_subtype_filter;
  30870. /* ctrl_subtype_filter:
  30871. * Control Packets matching the subtype filter category will be
  30872. * filtered in by MAC for CFR capture.
  30873. * This is a bitmask, in which each bit represents the corresponding
  30874. * ctrl subtype value as per ieee80211_defs.h
  30875. */
  30876. A_UINT32 ctrl_subtype_filter;
  30877. /* data_subtype_filter:
  30878. * Data Packets matching the subtype filter category will be
  30879. * filtered in by MAC for CFR capture.
  30880. * This is a bitmask, in which each bit represents the corresponding
  30881. * data subtype value as per ieee80211_defs.h
  30882. */
  30883. A_UINT32 data_subtype_filter;
  30884. } wmi_cfr_filter_group_config;
  30885. #define WMI_CFR_DIRECTED_FTM_ACK_EN_BIT_POS 0
  30886. #define WMI_CFR_ALL_FTM_ACK_EN_BIT_POS 1
  30887. #define WMI_CFR_NDPA_NDP_DIRECTED_EN_BIT_POS 2
  30888. #define WMI_CFR_NDPA_NDP_ALL_EN_BIT_POS 3
  30889. #define WMI_CFR_TA_RA_TYPE_FILTER_EN_BIT_POS 4
  30890. #define WMI_CFR_ALL_PACKET_EN_BIT_POS 5
  30891. #define WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_BIT_POS 6
  30892. #define WMI_CFR_CAPTURE_INTERVAL_NUM_BITS 24
  30893. #define WMI_CFR_CAPTURE_INTERVAL_BIT_POS 0
  30894. #define WMI_CFR_CAPTURE_DURATION_NUM_BITS 24
  30895. #define WMI_CFR_CAPTURE_DURATION_BIT_POS 0
  30896. #define WMI_CFR_FILTER_GROUP_BITMAP_NUM_BITS 16
  30897. #define WMI_CFR_FILTER_GROUP_BITMAP_BIT_POS 0
  30898. #define WMI_CFR_UL_MU_USER_UPPER_NUM_BITS 5
  30899. #define WMI_CFR_UL_MU_USER_UPPER_BIT_POS 0
  30900. #define WMI_CFR_FREEZE_DELAY_CNT_EN_MASK 1
  30901. #define WMI_CFR_FREEZE_DELAY_CNT_EN_BIT_POS 0
  30902. #define WMI_CFR_FREEZE_DELAY_CNT_THR_NUM_BITS 8
  30903. #define WMI_CFR_FREEZE_DELAY_CNT_THR_BIT_POS 1
  30904. #define WMI_CFR_CAPTURE_COUNT_NUM_BITS 16
  30905. #define WMI_CFR_CAPTURE_COUNT_BIT_POS 0
  30906. #define WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_NUM_BITS 1
  30907. #define WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_BIT_POS 16
  30908. #define WMI_CFR_DIRECTED_FTM_ACK_EN_SET(param, value) \
  30909. WMI_SET_BITS(param, WMI_CFR_DIRECTED_FTM_ACK_EN_BIT_POS, 1, value)
  30910. #define WMI_CFR_DIRECTED_FTM_ACK_EN_GET(param) \
  30911. WMI_GET_BITS(param, WMI_CFR_DIRECTED_FTM_ACK_EN_BIT_POS, 1)
  30912. #define WMI_CFR_ALL_FTM_ACK_EN_SET(param, value) \
  30913. WMI_SET_BITS(param, WMI_CFR_ALL_FTM_ACK_EN_BIT_POS, 1, value)
  30914. #define WMI_CFR_ALL_FTM_ACK_EN_GET(param) \
  30915. WMI_GET_BITS(param, WMI_CFR_ALL_FTM_ACK_EN_BIT_POS, 1)
  30916. #define WMI_CFR_NDPA_NDP_DIRECTED_EN_SET(param, value) \
  30917. WMI_SET_BITS(param, WMI_CFR_NDPA_NDP_DIRECTED_EN_BIT_POS, 1, value)
  30918. #define WMI_CFR_NDPA_NDP_DIRECTED_EN_GET(param) \
  30919. WMI_GET_BITS(param, WMI_CFR_NDPA_NDP_DIRECTED_EN_BIT_POS, 1)
  30920. #define WMI_CFR_NDPA_NDP_ALL_EN_SET(param, value) \
  30921. WMI_SET_BITS(param, WMI_CFR_NDPA_NDP_ALL_EN_BIT_POS, 1, value)
  30922. #define WWMI_CFR_NDPA_NDP_ALL_EN_GET WMI_CFR_NDPA_NDP_ALL_EN_GET
  30923. #define WMI_CFR_NDPA_NDP_ALL_EN_GET(param) \
  30924. WMI_GET_BITS(param, WMI_CFR_NDPA_NDP_ALL_EN_BIT_POS, 1)
  30925. #define WMI_CFR_TA_RA_TYPE_FILTER_EN_SET(param, value) \
  30926. WMI_SET_BITS(param, WMI_CFR_TA_RA_TYPE_FILTER_EN_BIT_POS, 1, value)
  30927. #define WMI_CFR_TA_RA_TYPE_FILTER_EN_GET(param) \
  30928. WMI_GET_BITS(param, WMI_CFR_TA_RA_TYPE_FILTER_EN_BIT_POS, 1)
  30929. #define WWMI_CFR_ALL_PACKET_EN_SET WMI_CFR_ALL_PACKET_EN_SET
  30930. #define WMI_CFR_ALL_PACKET_EN_SET(param, value) \
  30931. WMI_SET_BITS(param, WMI_CFR_ALL_PACKET_EN_BIT_POS, 1, value)
  30932. #define WMI_CFR_ALL_PACKET_EN_GET(param) \
  30933. WMI_GET_BITS(param, WMI_CFR_ALL_PACKET_EN_BIT_POS, 1)
  30934. #define WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_SET(param, value) \
  30935. WMI_SET_BITS(param, WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_BIT_POS, 1, value)
  30936. #define WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_GET(param) \
  30937. WMI_GET_BITS(param, WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_BIT_POS, 1)
  30938. #define WMI_CFR_CAPTURE_INTERVAL_SET(param, value) \
  30939. WMI_SET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_NUM_BITS, value)
  30940. #define WMI_CFR_CAPTURE_INTERVAL_GET(param) \
  30941. WMI_GET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_NUM_BITS)
  30942. #define WMI_CFR_CAPTURE_DURATION_SET(param, value) \
  30943. WMI_SET_BITS(param, WMI_CFR_CAPTURE_DURATION_BIT_POS, WMI_CFR_CAPTURE_DURATION_NUM_BITS, value)
  30944. #define WMI_CFR_CAPTURE_DURATION_GET(param) \
  30945. WMI_GET_BITS(param, WMI_CFR_CAPTURE_DURATION_BIT_POS, WMI_CFR_CAPTURE_DURATION_NUM_BITS)
  30946. #define WMI_CFR_FILTER_GROUP_BITMAP_SET(param, value) \
  30947. WMI_SET_BITS(param, WMI_CFR_FILTER_GROUP_BITMAP_BIT_POS, WMI_CFR_FILTER_GROUP_BITMAP_NUM_BITS, value)
  30948. #define WMI_CFR_FILTER_GROUP_BITMAP_GET(param) \
  30949. WMI_GET_BITS(param, WMI_CFR_FILTER_GROUP_BITMAP_BIT_POS, WMI_CFR_FILTER_GROUP_BITMAP_NUM_BITS)
  30950. #define WMI_CFR_UL_MU_USER_UPPER_SET(param, value) \
  30951. WMI_SET_BITS(param, WMI_CFR_UL_MU_USER_UPPER_BIT_POS, WMI_CFR_UL_MU_USER_UPPER_NUM_BITS, value)
  30952. #define WMI_CFR_UL_MU_USER_UPPER_GET(param) \
  30953. WMI_GET_BITS(param, WMI_CFR_UL_MU_USER_UPPER_BIT_POS, WMI_CFR_UL_MU_USER_UPPER_NUM_BITS)
  30954. #define WMI_CFR_FREEZE_DELAY_CNT_EN_SET(param, value) \
  30955. WMI_SET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_EN_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_EN_MASK, value)
  30956. #define WMI_CFR_FREEZE_DELAY_CNT_EN_GET(param) \
  30957. WMI_GET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_EN_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_EN_MASK)
  30958. #define WMI_CFR_FREEZE_DELAY_CNT_THR_SET(param, value) \
  30959. WMI_SET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_THR_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_THR_NUM_BITS, value)
  30960. #define WMI_CFR_FREEZE_DELAY_CNT_THR_GET(param) \
  30961. WMI_GET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_THR_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_THR_NUM_BITS)
  30962. #define WMI_CFR_CAPTURE_COUNT_SET(param, value) \
  30963. WMI_SET_BITS(param, WMI_CFR_CAPTURE_COUNT_BIT_POS, WMI_CFR_CAPTURE_COUNT_NUM_BITS, value)
  30964. #define WMI_CFR_CAPTURE_COUNT_GET(param) \
  30965. WMI_GET_BITS(param, WMI_CFR_CAPTURE_COUNT_BIT_POS, WMI_CFR_CAPTURE_COUNT_NUM_BITS)
  30966. #define WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_SET(param, value) \
  30967. WMI_SET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_NUM_BITS, value)
  30968. #define WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_GET(param) \
  30969. WMI_GET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_NUM_BITS)
  30970. typedef struct {
  30971. /** TLV tag and len; tag equals
  30972. * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_filter_cmd_fixed_param */
  30973. A_UINT32 tlv_header;
  30974. /** pdev_id for identifying the MAC
  30975. * See macros starting with WMI_PDEV_ID_ for values.
  30976. * In non-DBDC case host should set it to 0
  30977. */
  30978. A_UINT32 pdev_id;
  30979. /* filter_type:
  30980. * Indicates the type of filter to be enabled
  30981. * Bit 0: Filter Directed FTM ACK frames for CFR capture
  30982. * Bit 1: Filter All FTM ACK frames for CFR capture
  30983. * Bit 2: Filter NDPA NDP Directed Frames for CFR capture
  30984. * Bit 3: Filter NDPA NDP All Frames for CFR capture
  30985. * Bit 4: Filter Frames based on TA/RA/Subtype as provided
  30986. * in CFR Group config
  30987. * Bit 5: Filter in All packets for CFR Capture
  30988. * Bit 6: Filter in TA/RA frames as FP if this bit is set else as MO
  30989. * Bits 31:7 Reserved for future use
  30990. */
  30991. A_UINT32 filter_type;
  30992. /* capture_interval:
  30993. * Capture interval field which is time in between consecutive
  30994. * CFR capture, in microsecond units
  30995. * Bits 23:0 Capture interval
  30996. * Bits 31:24 Reserved for future use
  30997. */
  30998. A_UINT32 capture_interval;
  30999. /* capture_duration:
  31000. * Capture Duration field for which CFR capture has to happen,
  31001. * in microsecond units
  31002. * Bits 23:0 Capture Duration
  31003. * Bits 31:24 Reserved for future use
  31004. */
  31005. A_UINT32 capture_duration;
  31006. /* Bitfields set indicates which of the CFR group config is enabled
  31007. * Bits 15:0 Filter Group enable Bits
  31008. * Bits 31:16 Reserved for future use
  31009. * If Bit 0 is set, then CFR filter group 0 alone is enabled and so on
  31010. */
  31011. A_UINT32 filter_group_bitmap;
  31012. /* ul_mu_user_mask_lower:
  31013. * Bitfields indicates which of the users in the current UL MU
  31014. * tranmission are enabled for CFR capture.
  31015. * Bits 31 to 0 indicates user indexes for 32 users in a UL MU transmission.
  31016. * If bit 0 is set, then the CFR capture will happen for user index 0
  31017. * in the current UL MU Transmission.
  31018. * If bits 0,2 are set, then CFR capture for UL MU TX corresponds to
  31019. * user indices 0 and 2.
  31020. */
  31021. A_UINT32 ul_mu_user_mask_lower;
  31022. /* ul_mu_user_mask_upper:
  31023. * This is contiuation of the above lower mask.
  31024. * Bits 4:0 Bitfields indicates user indices from 33 to 37 users.
  31025. * Bits 31:5 Reserved for future use
  31026. * If bit 0 is set, then CFR capture is enabled for user index 33
  31027. * in a UL MU transmission.
  31028. */
  31029. A_UINT32 ul_mu_user_mask_upper;
  31030. /* freeze_tlv_delay_cnt
  31031. * Indicates the number of consecutive Rx packets to be skipped
  31032. * before CFR capture is enabled again.
  31033. * Bits 8:0 Freeze Delay Count value
  31034. * Bits 31:9 Reserved for future use
  31035. */
  31036. A_UINT32 freeze_tlv_delay_cnt;
  31037. /* capture_count:
  31038. * Indicates the number of consecutive packets for which CFR capture
  31039. * is to be enabled.
  31040. * Interpretation of capture_interval_mode_select (bit 16):
  31041. * Value 0: capture_interval + capture_duration fields are used
  31042. * to capture CFR for capture_duration after every
  31043. * capture_interval.
  31044. * Value 1: capture_interval + capture_count fields are used to
  31045. * capture CFR for capture_count+1 number of packets
  31046. * after every capture interval
  31047. * Bit 15:0 : capture_count
  31048. * Refer to WMI_CFR_CAPTURE_COUNT_GET/SET macros.
  31049. * Bit 16 : capture_interval_mode_select
  31050. * Refer to WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_GET/SET macros.
  31051. * Bits 31:17 : Reserved
  31052. */
  31053. A_UINT32 capture_count;
  31054. /*
  31055. * A variable-length TLV array of wmi_cfr_filter_group_config will
  31056. * follow this fixed_param TLV
  31057. * wmi_cfr_filter_group_config filter_group_config[];
  31058. */
  31059. } wmi_cfr_capture_filter_cmd_fixed_param;
  31060. typedef struct {
  31061. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_data_event_fixed_param */
  31062. A_UINT32 data_len; /** length in byte of data[]. */
  31063. /* Following this structure is the TLV:
  31064. * A_UINT8 data[]; <-- length in byte given by field data_len.
  31065. * This data array contains OEM data, the payload begins with a field to tell the HOST regarding the kind of the OEM data.
  31066. */
  31067. } wmi_oem_data_event_fixed_param;
  31068. #define WMI_VLAN_TX_BIT_POS 0
  31069. #define WMI_VLAN_RX_BIT_POS 1
  31070. #define WMI_TX_INSERT_OR_STRIP_BIT_POS 2
  31071. #define WMI_TX_STRIP_INSERT_VLAN_INNER_BIT_POS 3
  31072. #define WMI_TX_STRIP_INSERT_VLAN_OUTER_BIT_POS 4
  31073. #define WMI_RX_STRIP_VLAN_C_TAG_BIT_POS 5
  31074. #define WMI_RX_STRIP_VLAN_S_TAG_BIT_POS 6
  31075. #define WMI_RX_INSERT_VLAN_C_TAG_BIT_POS 7
  31076. #define WMI_RX_INSERT_VLAN_S_TAG_BIT_POS 8
  31077. #define WMI_TX_INSERT_VLAN_INNER_TCI_NUM_BITS 16
  31078. #define WMI_TX_INSERT_VLAN_INNER_TCI_BIT_POS 0
  31079. #define WMI_TX_INSERT_VLAN_OUTER_TCI_NUM_BITS 16
  31080. #define WMI_TX_INSERT_VLAN_OUTER_TCI_BIT_POS 16
  31081. #define WMI_VLAN_TX_SET(param, value) \
  31082. WMI_SET_BITS(param, WMI_VLAN_TX_BIT_POS, 1, value)
  31083. #define WMI_VLAN_TX_GET(param) \
  31084. WMI_GET_BITS(param, WMI_VLAN_TX_BIT_POS, 1)
  31085. #define WMI_VLAN_RX_SET(param, value) \
  31086. WMI_SET_BITS(param, WMI_VLAN_RX_BIT_POS, 1, value)
  31087. #define WMI_VLAN_RX_GET(param) \
  31088. WMI_GET_BITS(param, WMI_VLAN_RX_BIT_POS, 1)
  31089. #define WMI_TX_INSERT_OR_STRIP_SET(param, value) \
  31090. WMI_SET_BITS(param, WMI_TX_INSERT_OR_STRIP_BIT_POS, 1, value)
  31091. #define WMI_TX_INSERT_OR_STRIP_GET(param) \
  31092. WMI_GET_BITS(param, WMI_TX_INSERT_OR_STRIP_BIT_POS, 1)
  31093. #define WMI_TX_STRIP_INSERT_VLAN_INNER_SET(param, value) \
  31094. WMI_SET_BITS(param, WMI_TX_STRIP_INSERT_VLAN_INNER_BIT_POS, 1, value)
  31095. #define WMI_TX_STRIP_INSERT_VLAN_INNER_GET(param) \
  31096. WMI_GET_BITS(param, WMI_TX_STRIP_INSERT_VLAN_INNER_BIT_POS, 1)
  31097. #define WMI_TX_STRIP_INSERT_VLAN_OUTER_SET(param, value) \
  31098. WMI_SET_BITS(param, WMI_TX_STRIP_INSERT_VLAN_OUTER_BIT_POS, 1, value)
  31099. #define WMI_TX_STRIP_INSERT_VLAN_OUTER_GET(param) \
  31100. WMI_GET_BITS(param, WMI_TX_STRIP_INSERT_VLAN_OUTER_BIT_POS, 1)
  31101. #define WMI_RX_STRIP_VLAN_C_TAG_SET(param, value) \
  31102. WMI_SET_BITS(param, WMI_RX_STRIP_VLAN_C_TAG_BIT_POS, 1, value)
  31103. #define WMI_RX_STRIP_VLAN_C_TAG_GET(param) \
  31104. WMI_GET_BITS(param, WMI_RX_STRIP_VLAN_C_TAG_BIT_POS, 1)
  31105. #define WMI_RX_STRIP_VLAN_S_TAG_SET(param, value) \
  31106. WMI_SET_BITS(param, WMI_RX_STRIP_VLAN_S_TAG_BIT_POS, 1, value)
  31107. #define WMI_RX_STRIP_VLAN_S_TAG_GET(param) \
  31108. WMI_GET_BITS(param, WMI_RX_STRIP_VLAN_S_TAG_BIT_POS, 1)
  31109. #define WMI_RX_INSERT_VLAN_C_TAG_SET(param, value) \
  31110. WMI_SET_BITS(param, WMI_RX_INSERT_VLAN_C_TAG_BIT_POS, 1, value)
  31111. #define WMI_RX_INSERT_VLAN_C_TAG_GET(param) \
  31112. WMI_GET_BITS(param, WMI_RX_INSERT_VLAN_C_TAG_BIT_POS, 1)
  31113. #define WMI_RX_INSERT_VLAN_S_TAG_SET(param, value) \
  31114. WMI_SET_BITS(param, WMI_RX_INSERT_VLAN_S_TAG_BIT_POS, 1, value)
  31115. #define WMI_RX_INSERT_VLAN_S_TAG_GET(param) \
  31116. WMI_GET_BITS(param, WMI_RX_INSERT_VLAN_S_TAG_BIT_POS, 1)
  31117. #define WMI_TX_INSERT_VLAN_INNER_TCI_SET(param, value) \
  31118. WMI_SET_BITS(param, WMI_TX_INSERT_VLAN_INNER_TCI_BIT_POS, WMI_TX_INSERT_VLAN_INNER_TCI_NUM_BITS, value)
  31119. #define WMI_TX_INSERT_VLAN_INNER_TCI_GET(param) \
  31120. WMI_GET_BITS(param, WMI_TX_INSERT_VLAN_INNER_TCI_BIT_POS, WMI_TX_INSERT_VLAN_INNER_TCI_NUM_BITS)
  31121. #define WMI_TX_INSERT_VLAN_OUTER_TCI_SET(param, value) \
  31122. WMI_SET_BITS(param, WMI_TX_INSERT_VLAN_OUTER_TCI_BIT_POS, WMI_TX_INSERT_VLAN_OUTER_TCI_NUM_BITS, value)
  31123. #define WMI_TX_INSERT_VLAN_OUTER_TCI_GET(param) \
  31124. WMI_GET_BITS(param, WMI_TX_INSERT_VLAN_OUTER_TCI_BIT_POS, WMI_TX_INSERT_VLAN_OUTER_TCI_NUM_BITS)
  31125. typedef struct {
  31126. /** TLV tag and len; tag equals
  31127. * WMITLV_TAG_STRUC_wmi_peer_config_vlan_cmd_fixed_param */
  31128. A_UINT32 tlv_header;
  31129. /** peer MAC address */
  31130. wmi_mac_addr peer_macaddr;
  31131. /* peer_vlan_config_mask:
  31132. * Field indicates VLAN settings that need to set in RX and TX peer
  31133. * Bit 0: Indicates if the settings are present for TX peer
  31134. * [1 - present for TX peer]
  31135. * Bit 1: Indicates if the settings are present for RX peer
  31136. * [1 - present for RX peer]
  31137. * Bit 2: Setting the insert_or_strip bit in TX peer
  31138. * [0 - Strip, 1 - Insert]
  31139. * Bit 3: Setting the strip_insert_vlan_inner bit in TX peer
  31140. * [0 - Strip, 1 - Insert]
  31141. * Bit 4: Setting the strip_insert_vlan_outer bit in TX peer
  31142. * [0 - Strip, 1 - Insert]
  31143. * Bit 5: Setting the strip_vlan_c_tag_decap bit in RX peer [1 - Strip]
  31144. * Bit 6: Setting the strip_vlan_s_tag_decap bit in RX peer [1 - Strip]
  31145. * Bit 7: Setting the rx_insert_vlan_c_tag_padding bit in RX peer
  31146. * [1 - Insert]
  31147. * Bit 8: Setting the rx_insert_vlan_s_tag_padding bit in RX peer
  31148. * [1 - Insert]
  31149. */
  31150. A_UINT32 peer_vlan_config_mask;
  31151. /* insert_vlan_tci:
  31152. * Field indicates the word that needs to be inserted in the
  31153. * inner or outer tag, if insertion is enabled by the
  31154. * TX peer strip_insert_vlan_{inner,outer} fields along with
  31155. * insert_or_strip field
  31156. * Bits 0:15 insert_vlan_inner_tci
  31157. * Bits 16:31 insert_vlan_outer_tci
  31158. */
  31159. A_UINT32 insert_vlan_tci;
  31160. /* VDEV identifier */
  31161. A_UINT32 vdev_id;
  31162. } wmi_peer_config_vlan_cmd_fixed_param;
  31163. typedef struct {
  31164. /** TLV tag and len; tag equals
  31165. * WMITLV_TAG_STRUC_wmi_peer_config_ppe_ds_cmd_fixed_param */
  31166. A_UINT32 tlv_header;
  31167. wmi_mac_addr peer_macaddr;
  31168. A_UINT32 ppe_routing_enable; /* enum WMI_PPE_ROUTING_TYPE */
  31169. /* The processing stages in PPE that this packet buffer need to go through
  31170. * and on to which PPE queues these buffers should be mapped to.
  31171. * Refer pkg/ppe/src/ppe_sc.h for service code types
  31172. */
  31173. A_UINT32 service_code;
  31174. A_UINT32 priority_valid;
  31175. /* Unique number that represents a VAP's vdev_id in PPE domain */
  31176. A_UINT32 src_info;
  31177. /* VDEV identifier */
  31178. A_UINT32 vdev_id;
  31179. } wmi_peer_config_ppe_ds_cmd_fixed_param;
  31180. typedef enum {
  31181. WMI_PPE_ROUTING_DISABLED = 0,
  31182. WMI_AST_USE_PPE_ENABLED = 1,
  31183. WMI_AST_USE_PPE_DISABLED = 2,
  31184. WMI_PPE_ROUTING_TYPE_MAX,
  31185. } WMI_PPE_ROUTING_TYPE;
  31186. typedef struct {
  31187. /** TLV tag and len; tag equals
  31188. * WMITLV_TAG_STRUC_wmi_pdev_multiple_vdev_restart_resp_event_fixed_param */
  31189. A_UINT32 tlv_header;
  31190. A_UINT32 pdev_id; /* ID of the pdev this response belongs to */
  31191. A_UINT32 requestor_id;
  31192. /** Return status. As per WMI_VDEV_START_RESPONSE_XXXXX */
  31193. A_UINT32 status;
  31194. /* The TLVs follows this structure:
  31195. * A_UINT32 vdev_ids_bitmap[]; <--- Array of VDEV id bitmap.
  31196. */
  31197. } wmi_pdev_multiple_vdev_restart_resp_event_fixed_param;
  31198. /** WMI event for Firmware to report soundbar audio frame statistics to Host **/
  31199. typedef struct {
  31200. /** TLV tag and len **/
  31201. A_UINT32 tlv_header;
  31202. A_UINT32 vdev_id; /* ID of the vdev this response belongs to */
  31203. /** identify which request this resposend to **/
  31204. A_UINT32 response_id;
  31205. /* audio frame statistics part -
  31206. * Use subsequent TLV arrays to list group_stats and peer_stats.
  31207. */
  31208. /*
  31209. * The TLVs listing group_stats, will follow this TLV.
  31210. * The number of group_stats can be calculated by dividing the
  31211. * TLV array length by the TLV array element length.
  31212. *
  31213. * The fixed_param TLV is directly followed by a list of
  31214. * wmi_audio_aggr_group_stats elements:
  31215. * wmi_audio_aggr_group_stats group_stats[0];
  31216. * wmi_audio_aggr_group_stats group_stats[1];
  31217. * ...
  31218. * wmi_audio_aggr_group_stats group_stats[N];
  31219. *
  31220. * After the list of wmi_audio_aggr_group_stats is a list of peer_stats.
  31221. * wmi_audio_aggr_peer_stats peer_stats[0];
  31222. * wmi_audio_aggr_peer_stats peer_stats[1];
  31223. * ...
  31224. * wmi_audio_aggr_peer_stats peer_stats[N];
  31225. *
  31226. */
  31227. } wmi_audio_aggr_statistics_event_fixed_param;
  31228. typedef struct {
  31229. /** TLV tag and len **/
  31230. A_UINT32 tlv_header;
  31231. /* Group mac_address */
  31232. wmi_mac_addr group_addr;
  31233. /* Group indentify */
  31234. A_UINT32 group_id;
  31235. /* Multicast MSDU Data Packets received from Host for this Group */
  31236. A_UINT32 mcast_tx;
  31237. /*
  31238. * Multicast MSDU Data Packets sent to OTA.
  31239. * Customer defined SW Retry Packets not included, as these
  31240. * SW Retry packets generated in FW locally, but not from Host.
  31241. */
  31242. A_UINT32 mcast_tx_ok;
  31243. /*
  31244. * Multicast MSDU Data Packets sent to OTA.
  31245. * Only include Customer defined SW Retry Packets.
  31246. */
  31247. A_UINT32 mcast_tx_ok_retry;
  31248. /*
  31249. * Multicast MSDU Data Packets not sent to OTA,
  31250. * discarded by tbd function due to timeout.
  31251. * Customer defined SW Retry Packets not included.
  31252. */
  31253. A_UINT32 mcast_tx_tbd_lost;
  31254. /*
  31255. * Multicast MSDU Data Packets not sent to OTA,
  31256. * discarded by tbd function due to timeout.
  31257. * Only include Customer defined SW Retry Packets.
  31258. */
  31259. A_UINT32 mcast_tx_tbd_lost_retry;
  31260. } wmi_audio_aggr_group_stats;
  31261. typedef struct {
  31262. /** TLV tag and len **/
  31263. A_UINT32 tlv_header;
  31264. /* STA mac_address */
  31265. wmi_mac_addr peer_addr;
  31266. /* Unicast MSDU Data Packets received from peer STA */
  31267. A_UINT32 ucast_rx;
  31268. /* Unicast MSDU Data Packets received from Host for Peer STA */
  31269. A_UINT32 ucast_tx;
  31270. /*
  31271. * Unicast MSDU Data Packets received from Host,
  31272. * and SW retry times for these packets.
  31273. */
  31274. A_UINT32 ucast_tx_retry;
  31275. /*
  31276. * Unicast MSDU Data Packets received from Host,
  31277. * and sent to Peer STA successfully.
  31278. */
  31279. A_UINT32 ucast_tx_ok;
  31280. /*
  31281. * Unicast MSDU Data Packets received from Host,
  31282. * but sent to Peer STA fail. not OTA, or no ACK from Peer.
  31283. */
  31284. A_UINT32 ucast_tx_lost;
  31285. /*
  31286. * Periodic NULL Data frames for multicast tx rate auto control.
  31287. * Generated by FW locally, and sent to Peer STA successfully.
  31288. */
  31289. A_UINT32 null_frame_tx;
  31290. /*
  31291. * Periodic NULL Data frames for multicast tx rate auto control.
  31292. * Generated by FW locally, but sent to Peer STA fail.
  31293. */
  31294. A_UINT32 null_frame_tx_lost;
  31295. } wmi_audio_aggr_peer_stats;
  31296. typedef struct {
  31297. /** TLV tag and len **/
  31298. A_UINT32 tlv_header;
  31299. /* ID of the vdev this response belongs to */
  31300. A_UINT32 vdev_id;
  31301. /* selected audio aggr scheduler method
  31302. * valid methods can be found in WMI_AUDIO_AGGR_SCHED_METHOD_TYPE
  31303. */
  31304. A_UINT32 sched_method;
  31305. /* rts-cts config
  31306. * valid config can be found in WMI_AUDIO_AGGR_RTS_CTS_CONFIG_TYPE
  31307. */
  31308. A_UINT32 rtscts_config;
  31309. } wmi_audio_aggr_sched_method_event_fixed_param;
  31310. typedef struct {
  31311. /** TLV tag and len; tag equals
  31312. *WMITLV_TAG_STRUC_wmi_pdev_srg_bss_color_bitmap_cmd_fixed_param */
  31313. A_UINT32 tlv_header;
  31314. /** pdev_id for identifying the MAC
  31315. * See macros starting with WMI_PDEV_ID_ for values.
  31316. * In non-DBDC case host should set it to 0
  31317. */
  31318. A_UINT32 pdev_id;
  31319. /* 64 bit bss color bitmap used by SRG based spatial reuse feature
  31320. * bitmap[0] contains lower 32 bits and bitmap[1] contains
  31321. * upper 32 bits.
  31322. */
  31323. A_UINT32 srg_bss_color_bitmap[2];
  31324. } wmi_pdev_srg_bss_color_bitmap_cmd_fixed_param;
  31325. typedef struct {
  31326. /** TLV tag and len; tag equals
  31327. *WMITLV_TAG_STRUC_wmi_pdev_srg_partial_bssid_bitmap_cmd_fixed_param */
  31328. A_UINT32 tlv_header;
  31329. /** pdev_id for identifying the MAC
  31330. * See macros starting with WMI_PDEV_ID_ for values.
  31331. * In non-DBDC case host should set it to 0
  31332. */
  31333. A_UINT32 pdev_id;
  31334. /* 64 bit partial bssid bitmap used by SRG based spatial reuse feature
  31335. * bitmap[0] contains lower 32 bits and bitmap[1] contains
  31336. * upper 32 bits.
  31337. */
  31338. A_UINT32 srg_partial_bssid_bitmap[2];
  31339. } wmi_pdev_srg_partial_bssid_bitmap_cmd_fixed_param;
  31340. typedef struct {
  31341. /** TLV tag and len; tag equals
  31342. * WMITLV_TAG_STRUC_wmi_pdev_srg_obss_color_enable_bitmap_cmd_fixed_param */
  31343. A_UINT32 tlv_header;
  31344. /** pdev_id for identifying the MAC
  31345. * See macros starting with WMI_PDEV_ID_ for values.
  31346. * In non-DBDC case host should set it to 0
  31347. */
  31348. A_UINT32 pdev_id;
  31349. /* 64 bit SRG obss color enable bitmap used by SRG based spatial reuse feature
  31350. * bitmap[0] contains lower 32 bits and bitmap[1] contains
  31351. * upper 32 bits.
  31352. */
  31353. A_UINT32 srg_obss_en_color_bitmap[2];
  31354. } wmi_pdev_srg_obss_color_enable_bitmap_cmd_fixed_param;
  31355. typedef struct {
  31356. /** TLV tag and len; tag equals
  31357. * WMITLV_TAG_STRUC_wmi_pdev_srg_obss_bssid_enable_bitmap_cmd_fixed_param */
  31358. A_UINT32 tlv_header;
  31359. /** pdev_id for identifying the MAC
  31360. * See macros starting with WMI_PDEV_ID_ for values.
  31361. * In non-DBDC case host should set it to 0
  31362. */
  31363. A_UINT32 pdev_id;
  31364. /* 64 bit obss bssid enable bitmap used by SRG based spatial reuse feature
  31365. * bitmap[0] contains lower 32 bits and bitmap[1] contains
  31366. * upper 32 bits.
  31367. */
  31368. A_UINT32 srg_obss_en_bssid_bitmap[2];
  31369. } wmi_pdev_srg_obss_bssid_enable_bitmap_cmd_fixed_param;
  31370. typedef struct {
  31371. /** TLV tag and len; tag equals
  31372. * WMITLV_TAG_STRUC_wmi_pdev_non_srg_obss_color_enable_bitmap_cmd_fixed_param */
  31373. A_UINT32 tlv_header;
  31374. /** pdev_id for identifying the MAC
  31375. * See macros starting with WMI_PDEV_ID_ for values.
  31376. * In non-DBDC case host should set it to 0
  31377. */
  31378. A_UINT32 pdev_id;
  31379. /* 64 bit Non_SRG obss color enable bitmap used by Non_SRG based spatial reuse feature
  31380. * bitmap[0] contains lower 32 bits and bitmap[1] contains
  31381. * upper 32 bits.
  31382. */
  31383. A_UINT32 non_srg_obss_en_color_bitmap[2];
  31384. } wmi_pdev_non_srg_obss_color_enable_bitmap_cmd_fixed_param;
  31385. typedef struct {
  31386. /** TLV tag and len; tag equals
  31387. * WMITLV_TAG_STRUC_wmi_pdev_non_srg_obss_bssid_enable_bitmap_cmd_fixed_param */
  31388. A_UINT32 tlv_header;
  31389. /** pdev_id for identifying the MAC
  31390. * See macros starting with WMI_PDEV_ID_ for values.
  31391. * In non-DBDC case host should set it to 0
  31392. */
  31393. A_UINT32 pdev_id;
  31394. /* 64 bit obss bssid enable bitmap used by Non_SRG based spatial reuse feature
  31395. * bitmap[0] contains lower 32 bits and bitmap[1] contains
  31396. * upper 32 bits.
  31397. */
  31398. A_UINT32 non_srg_obss_en_bssid_bitmap[2];
  31399. } wmi_pdev_non_srg_obss_bssid_enable_bitmap_cmd_fixed_param;
  31400. typedef struct {
  31401. /** TLV tag and len; tag equals
  31402. * WMITLV_TAG_STRUC_wmi_pdev_enable_duration_based_tx_mode_selection_cmd_fixed_param
  31403. */
  31404. A_UINT32 tlv_header;
  31405. /** pdev_id for identifying the MAC
  31406. * See macros starting with WMI_PDEV_ID_ for values.
  31407. * In non-DBDC case host should set it to 0
  31408. */
  31409. A_UINT32 pdev_id;
  31410. /* enable/disable Duration based Tx Mode selection */
  31411. A_UINT32 duration_based_tx_mode_selection;
  31412. } wmi_pdev_enable_duration_based_tx_mode_selection_cmd_fixed_param;
  31413. typedef enum {
  31414. /* Simulation test command types */
  31415. WMI_SIM_TEST_FRAME_CONTENT_CHANGE_CMD,
  31416. WMI_SIM_TEST_DROP_FRAME_CMD,
  31417. WMI_SIM_TEST_DELAY_FRAME_CMD,
  31418. WMI_SIM_TEST_CONFIGURATION_CMD,
  31419. WMI_SIM_TEST_CMD_UNKNOWN = 255,
  31420. } WMI_SIMULATION_TEST_CMD_TYPE;
  31421. typedef enum {
  31422. /* Simulation test sub-command types */
  31423. WMI_SIM_TEST_SUB_CMD_UNKNOWN = 255,
  31424. } WMI_SIMULATION_TEST_SUB_CMD_TYPE;
  31425. #define WMI_SIM_FRAME_TYPE_BIT_POS 0
  31426. #define WMI_SIM_FRAME_SUBTYPE_BIT_POS 8
  31427. #define WMI_SIM_FRAME_SEQ_BIT_POS 16
  31428. #define WMI_SIM_FRAME_OFFSET_BIT_POS 0
  31429. #define WMI_SIM_FRAME_LENGTH_BIT_POS 16
  31430. #define WMI_SIM_FRAME_TYPE_SET(param, value) \
  31431. WMI_SET_BITS(param, WMI_SIM_FRAME_TYPE_BIT_POS, 8, value)
  31432. #define WMI_SIM_FRAME_TYPE_GET(param) \
  31433. WMI_GET_BITS(param, WMI_SIM_FRAME_TYPE_BIT_POS, 8)
  31434. #define WMI_SIM_FRAME_SUBTYPE_SET(param, value) \
  31435. WMI_SET_BITS(param, WMI_SIM_FRAME_SUBTYPE_BIT_POS, 8, value)
  31436. #define WMI_SIM_FRAME_SUBTYPE_GET(param) \
  31437. WMI_GET_BITS(param, WMI_SIM_FRAME_SUBTYPE_BIT_POS, 8)
  31438. #define WMI_SIM_FRAME_SEQ_SET(param, value) \
  31439. WMI_SET_BITS(param, WMI_SIM_FRAME_SEQ_BIT_POS, 8, value)
  31440. #define WMI_SIM_FRAME_SEQ_GET(param) \
  31441. WMI_GET_BITS(param, WMI_SIM_FRAME_SEQ_BIT_POS, 8)
  31442. #define WMI_SIM_FRAME_OFFSET_SET(param, value) \
  31443. WMI_SET_BITS(param, WMI_SIM_FRAME_OFFSET_BIT_POS, 16, value)
  31444. #define WMI_SIM_FRAME_OFFSET_GET(param) \
  31445. WMI_GET_BITS(param, WMI_SIM_FRAME_OFFSET_BIT_POS, 16)
  31446. #define WMI_SIM_FRAME_LENGTH_SET(param, value) \
  31447. WMI_SET_BITS(param, WMI_SIM_FRAME_LENGTH_BIT_POS, 16, value)
  31448. #define WMI_SIM_FRAME_LENGTH_GET(param) \
  31449. WMI_GET_BITS(param, WMI_SIM_FRAME_LENGTH_BIT_POS, 16)
  31450. typedef struct {
  31451. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_simulation_test_cmd_fixed_param */
  31452. A_UINT32 tlv_header;
  31453. /** pdev_id for identifying the MAC.
  31454. * See macros starting with WMI_PDEV_ID_ for values.
  31455. * In non-DBDC case host should set it to 0.
  31456. */
  31457. A_UINT32 pdev_id;
  31458. /** vdev_id for identifying the vap simulation command needs to be applied.
  31459. * This is for future purpose, currently only 1 vap is supported for
  31460. * simulation test mode.
  31461. * Host will always set it to 0 for now.
  31462. */
  31463. A_UINT32 vdev_id;
  31464. /** peer MAC address for identifying the peer for which the simulation
  31465. * command needs to be applied.
  31466. * peer_macaddr needs to be set to '0' for simulation commands which
  31467. * needs to be applied at pdev or vdev level.
  31468. */
  31469. wmi_mac_addr peer_macaddr;
  31470. /** test command type, as per WMI_SIMULATION_TEST_CMD_TYPE */
  31471. A_UINT32 test_cmd_type;
  31472. /** test command type, as per WMI_SIMULATION_TEST_SUB_CMD_TYPE */
  31473. A_UINT32 test_subcmd_type;
  31474. /**
  31475. * The frame type, frame subtype, and frame sequence number
  31476. * are stored as bitfields within the below A_UINT32 "word".
  31477. * Use the WMI_SIM_xxx_GET/SET macros to read and
  31478. * write these bitfields.
  31479. **/
  31480. A_UINT32 frame_type_subtype_seq;
  31481. /**
  31482. * The frame offset and frame length,
  31483. * are stored as bitfields within the below A_UINT32 "word".
  31484. * Use the WMI_SIM_xxx_GET/SET macros to read and
  31485. * write these bitfields.
  31486. **/
  31487. A_UINT32 frame_offset_length;
  31488. /** buf_len: Buffer length in bytes
  31489. * In some cases buf_len == frame_length, but not always.
  31490. * For example, a DELAY_FRAME command will not involve any frame
  31491. * contents, so frame_length will be zero, but buf_len will be
  31492. * non-zero because it will contain command-specific parameters.
  31493. */
  31494. A_UINT32 buf_len;
  31495. /* This TLV is followed by array of bytes:
  31496. * A_UINT8 bufp[];
  31497. * For FRAME_CONTENT_CHANGE commands, bufp contains the first 64 bytes
  31498. * of the frame.
  31499. */
  31500. } wmi_simulation_test_cmd_fixed_param;
  31501. typedef struct {
  31502. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_rsnxe */
  31503. A_UINT32 tlv_header;
  31504. /* rsnxe_param
  31505. * Override RSNXE Used bit in FT reassoc request.
  31506. * Possible values from host are:
  31507. * 0 use default value based on capability
  31508. * 1 override with 1
  31509. * 2 override with 0
  31510. */
  31511. A_UINT32 rsnxe_param;
  31512. } wmi_wfa_config_rsnxe;
  31513. typedef struct {
  31514. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_csa */
  31515. A_UINT32 tlv_header;
  31516. /* ignore_csa
  31517. * Ignore CSA from AP and keep STA in current channel and don't deauth AP.
  31518. * Possible values from host are:
  31519. * 0 default behavior
  31520. * 1 ignore CSA
  31521. */
  31522. A_UINT32 ignore_csa;
  31523. } wmi_wfa_config_csa;
  31524. typedef enum {
  31525. WMI_WFA_CONFIG_OCV_FRMTYPE_SAQUERY_REQ = 0x00000001,
  31526. WMI_WFA_CONFIG_OCV_FRMTYPE_SAQUERY_RSP = 0x00000002,
  31527. WMI_WFA_CONFIG_OCV_FRMTYPE_FT_REASSOC_REQ = 0x00000004,
  31528. WMI_WFA_CONFIG_OCV_FRMTYPE_FILS_REASSOC_REQ = 0x00000008,
  31529. } WMI_WFA_CONFIG_OCV_FRMTYPE;
  31530. typedef struct {
  31531. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_ocv */
  31532. A_UINT32 tlv_header;
  31533. /* frame_types
  31534. * Override OCI channel number in specified frames.
  31535. * Possible frame types from host are enum WMI_WFA_CONFIG_OCV_FRMTYPE.
  31536. */
  31537. A_UINT32 frame_types;
  31538. /* Frequency value in mhz to override in specified frame type */
  31539. A_UINT32 chan_freq;
  31540. } wmi_wfa_config_ocv;
  31541. typedef struct {
  31542. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_saquery */
  31543. A_UINT32 tlv_header;
  31544. /* remain_connect_on_saquery_timeout
  31545. * Don't send deauth on SA Query response timeout.
  31546. * Possible values from host are:
  31547. * 0 default behavior
  31548. * 1 don't send deauth on SA Query response timeout
  31549. */
  31550. A_UINT32 remain_connect_on_saquery_timeout;
  31551. } wmi_wfa_config_saquery;
  31552. typedef struct {
  31553. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_cmd_fixed_param */
  31554. A_UINT32 tlv_header;
  31555. /** VDEV identifier */
  31556. A_UINT32 vdev_id;
  31557. /* The below TLV arrays follow this structure:
  31558. * wmi_wfa_config_rsnxe wfa_config_rsnxe[]; (0 or 1 elements)
  31559. * wmi_wfa_config_csa wfa_config_csa[]; (0 or 1 elements)
  31560. * wmi_wfa_config_ocv wfa_config_ocv[]; (0 or 1 elements)
  31561. * wmi_wfa_config_saquery wfa_config_saquery[]; (0 or 1 elements)
  31562. */
  31563. } wmi_wfa_config_cmd_fixed_param;
  31564. #define WMI_TWT_SESSION_FLAG_FLOW_ID_GET(_var) WMI_GET_BITS(_var, 0, 16)
  31565. #define WMI_TWT_SESSION_FLAG_FLOW_ID_SET(_var, _val) WMI_SET_BITS(_var, 0, 16, _val)
  31566. #define WMI_TWT_SESSION_FLAG_BCAST_TWT_GET(_var) WMI_GET_BITS(_var, 16, 1)
  31567. #define WMI_TWT_SESSION_FLAG_BCAST_TWT_SET(_var, _val) WMI_SET_BITS(_var, 16, 1, _val)
  31568. #define WMI_TWT_SESSION_FLAG_TRIGGER_TWT_GET(_var) WMI_GET_BITS(_var, 17, 1)
  31569. #define WMI_TWT_SESSION_FLAG_TRIGGER_TWT_SET(_var, _val) WMI_SET_BITS(_var, 17, 1, _val)
  31570. #define WMI_TWT_SESSION_FLAG_ANNOUN_TWT_GET(_var) WMI_GET_BITS(_var, 18, 1)
  31571. #define WMI_TWT_SESSION_FLAG_ANNOUN_TWT_SET(_var, _val) WMI_SET_BITS(_var, 18, 1, _val)
  31572. #define WMI_TWT_SESSION_FLAG_TWT_PROTECTION_GET(_var) WMI_GET_BITS(_var, 19, 1)
  31573. #define WMI_TWT_SESSION_FLAG_TWT_PROTECTION_SET(_var, _val) WMI_SET_BITS(_var, 19, 1, _val)
  31574. #define WMI_TWT_SESSION_FLAG_TWT_INFO_FRAME_DISABLED_GET(_var) WMI_GET_BITS(_var, 20, 1)
  31575. #define WMI_TWT_SESSION_FLAG_TWT_INFO_FRAME_DISABLED_SET(_var, _val) WMI_SET_BITS(_var, 20, 1, _val)
  31576. #define WMI_TWT_SESSION_FLAG_TWT_PM_RESPONDER_MODE_VALID_GET(_var) WMI_GET_BITS(_var, 21, 1)
  31577. #define WMI_TWT_SESSION_FLAG_TWT_PM_RESPONDER_MODE_VALID_SET(_var, _val) WMI_SET_BITS(_var, 21, 1, _val)
  31578. #define WMI_TWT_SESSION_FLAG_TWT_PM_RESPONDER_MODE_GET(_var) WMI_GET_BITS(_var, 22, 1)
  31579. #define WMI_TWT_SESSION_FLAG_TWT_PM_RESPONDER_MODE_SET(_var, _val) WMI_SET_BITS(_var, 22, 1, _val)
  31580. typedef struct {
  31581. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_session_stats_info */
  31582. A_UINT32 tlv_hdr;
  31583. A_UINT32 vdev_id;
  31584. wmi_mac_addr peer_mac;
  31585. A_UINT32 event_type; /* event type - defined in enum wmi_twt_session_stats_type */
  31586. /*
  31587. * Flags to provide information on TWT session and session types.
  31588. * This field is filled with the bitwise combination of the flag values
  31589. * defined by WMI_TWT_SESSION_FLAG_xxx
  31590. */
  31591. A_UINT32 flow_id_flags;
  31592. A_UINT32 dialog_id;
  31593. A_UINT32 wake_dura_us;
  31594. A_UINT32 wake_intvl_us;
  31595. /* this long time after TWT resumed the 1st Service Period will start */
  31596. A_UINT32 sp_offset_us;
  31597. /* service period start TSF */
  31598. A_UINT32 sp_tsf_us_lo; /* bits 31:0 */
  31599. A_UINT32 sp_tsf_us_hi; /* bits 63:32 */
  31600. } wmi_twt_session_stats_info;
  31601. enum wmi_twt_session_stats_type {
  31602. WMI_TWT_SESSION_SETUP = 1,
  31603. WMI_TWT_SESSION_TEARDOWN = 2,
  31604. WMI_TWT_SESSION_UPDATE = 3,
  31605. };
  31606. typedef struct {
  31607. /** TLV tag and len; tag equals
  31608. * WMITLV_TAG_STRUC_wmi_pdev_twt_session_stats_event_fixed_param */
  31609. A_UINT32 tlv_header;
  31610. A_UINT32 pdev_id; /* ID of the pdev this response belongs to */
  31611. /* The TLVs follows this structure:
  31612. * wmi_twt_session_stats_info twt_sessions[]; <--- Array of twt_session.
  31613. */
  31614. } wmi_pdev_twt_session_stats_event_fixed_param;
  31615. typedef struct wmi_pdev_vendor_event
  31616. {
  31617. /* type is WMI_PDEV_VENDOR_EVENTID */
  31618. A_UINT32 tlv_header;
  31619. /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. */
  31620. A_UINT32 pdev_id;
  31621. /* Any vendor specialization cases will need to add sub_type enum defs. */
  31622. A_UINT32 sub_type;
  31623. wmi_pdev_vendor_event_val evt;
  31624. /* NOTE:
  31625. * Future changes may increase the size of pdev_vendor_event.
  31626. * Consequently, no fields can be added here after pdev_vendor_event,
  31627. * because their offsets within wmi_pdev_vendor_event_fixed_param
  31628. * would change, causing backwards incompatibilities.
  31629. */
  31630. } wmi_pdev_vendor_event_fixed_param;
  31631. typedef struct wmi_vdev_vendor_event
  31632. {
  31633. /* type is WMI_VDEV_VENDOR_EVENTID */
  31634. A_UINT32 tlv_header;
  31635. /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. */
  31636. A_UINT32 pdev_id;
  31637. /* unique id identifying the VDEV, generated by the caller */
  31638. A_UINT32 vdev_id;
  31639. /* Any vendor specialization cases will need to add sub_type enum defs. */
  31640. A_UINT32 sub_type;
  31641. wmi_vdev_vendor_event_val evt;
  31642. /* NOTE:
  31643. * Future changes may increase the size of vdev_vendor_event.
  31644. * Consequently, no fields can be added here after vdev_vendor_event,
  31645. * because their offsets within wmi_vdev_vendor_event_fixed_param
  31646. * would change, causing backwards incompatibilities.
  31647. */
  31648. } wmi_vdev_vendor_event_fixed_param;
  31649. typedef struct wmi_peer_vendor_event
  31650. {
  31651. /* type is WMI_PEER_VENDOR_EVENTID */
  31652. A_UINT32 tlv_header;
  31653. /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. */
  31654. A_UINT32 pdev_id;
  31655. /* unique id identifying the VDEV, generated by the caller */
  31656. A_UINT32 vdev_id;
  31657. /* peer MAC address */
  31658. wmi_mac_addr peer_macaddr;
  31659. /* Any vendor specialization cases will need to add sub_type enum defs. */
  31660. A_UINT32 sub_type;
  31661. wmi_peer_vendor_event_val evt;
  31662. /* NOTE:
  31663. * Future changes may increase the size of peer_vendor_event.
  31664. * Consequently, no fields can be added here after peer_vendor_event,
  31665. * because their offsets within wmi_peer_vendor_event_fixed_param
  31666. * would change, causing backwards incompatibilities.
  31667. */
  31668. } wmi_peer_vendor_event_fixed_param;
  31669. typedef struct wmi_pdev_vendor_cmd
  31670. {
  31671. /* type is WMI_PDEV_VENDOR_CMDID */
  31672. A_UINT32 tlv_header;
  31673. /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. */
  31674. A_UINT32 pdev_id;
  31675. /* Any vendor specialization cases will need to add sub_type enum defs. */
  31676. A_UINT32 sub_type;
  31677. wmi_pdev_vendor_cmd_val cmd;
  31678. /* NOTE:
  31679. * Future changes may increase the size of pdev_vendor_cmd.
  31680. * Consequently, no fields can be added here after pdev_vendor_cmd,
  31681. * because their offsets within wmi_pdev_vendor_cmd_fixed_param
  31682. * would change, causing backwards incompatibilities.
  31683. */
  31684. } wmi_pdev_vendor_cmd_fixed_param;
  31685. typedef struct wmi_vdev_vendor_cmd
  31686. {
  31687. /* type is WMI_VDEV_VENDOR_CMDID */
  31688. A_UINT32 tlv_header;
  31689. /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. */
  31690. A_UINT32 pdev_id;
  31691. /* unique id identifying the VDEV, generated by the caller */
  31692. A_UINT32 vdev_id;
  31693. /* Any vendor specialization cases will need to add sub_type enum defs. */
  31694. A_UINT32 sub_type;
  31695. wmi_vdev_vendor_cmd_val cmd;
  31696. /* NOTE:
  31697. * Future changes may increase the size of vdev_vendor_cmd.
  31698. * Consequently, no fields can be added here after vdev_vendor_cmd,
  31699. * because their offsets within wmi_vdev_vendor_cmd_fixed_param
  31700. * would change, causing backwards incompatibilities.
  31701. */
  31702. } wmi_vdev_vendor_cmd_fixed_param;
  31703. typedef struct wmi_peer_vendor_cmd
  31704. {
  31705. /* type is WMI_PEER_VENDOR_CMDID */
  31706. A_UINT32 tlv_header;
  31707. /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. */
  31708. A_UINT32 pdev_id;
  31709. /* unique id identifying the VDEV, generated by the caller */
  31710. A_UINT32 vdev_id;
  31711. /* peer MAC address */
  31712. wmi_mac_addr peer_macaddr;
  31713. /* Any vendor specialization cases will need to add sub_type enum defs. */
  31714. A_UINT32 sub_type;
  31715. wmi_peer_vendor_cmd_val cmd;
  31716. /* NOTE:
  31717. * Future changes may increase the size of peer_vendor_cmd.
  31718. * Consequently, no fields can be added here after peer_vendor_cmd,
  31719. * because their offsets within wmi_peer_vendor_cmd_fixed_param
  31720. * would change, causing backwards incompatibilities.
  31721. */
  31722. } wmi_peer_vendor_cmd_fixed_param;
  31723. typedef enum {
  31724. WMI_MLO_LINK_FORCE_ACTIVE = 1, /* Force specific links active */
  31725. WMI_MLO_LINK_FORCE_INACTIVE = 2, /* Force specific links inactive */
  31726. WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM = 3, /* Force active a number of links, firmware to decide which links to inactive */
  31727. WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM = 4, /* Force inactive a number of links, firmware to decide which links to inactive */
  31728. WMI_MLO_LINK_NO_FORCE = 5, /* Cancel the force operation of specific links, allow firmware to decide */
  31729. } WMI_MLO_LINK_FORCE_MODE;
  31730. typedef enum {
  31731. WMI_MLO_LINK_FORCE_REASON_NEW_CONNECT = 1, /* Set force specific links because of new connection */
  31732. WMI_MLO_LINK_FORCE_REASON_NEW_DISCONNECT = 2, /* Set force specific links because of new dis-connection */
  31733. } WMI_MLO_LINK_FORCE_REASON;
  31734. typedef struct wmi_mlo_link_set_active_cmd
  31735. {
  31736. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_set_active_cmd_fixed_param; */
  31737. A_UINT32 tlv_header;
  31738. /** enum WMI_MLO_LINK_FORCE_MODE */
  31739. A_UINT32 force_mode;
  31740. /** reason of force link active / inactive, enum WMI_MLO_LINK_FORCE_REASON */
  31741. A_UINT32 reason;
  31742. /* The TLVs follows this structure:
  31743. * wmi_mlo_set_active_link_number_param link_number_param[];
  31744. * Link number parameters, optional TLV.
  31745. * Present when force type is WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
  31746. * WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM.
  31747. * In other cases the length of array should be 0.
  31748. * A_UINT32 vdev_id_bitmap[];
  31749. * Optional TLV, present when force type is WMI_MLO_LINK_FORCE_ACTIVE
  31750. * or WMI_MLO_LINK_FORCE_INACTIVE or WMI_MLO_LINK_NO_FORCE,
  31751. * to specific the vdevs to configure.
  31752. * In other cases the length of the array should be 0.
  31753. */
  31754. } wmi_mlo_link_set_active_cmd_fixed_param;
  31755. typedef struct wmi_mlo_set_active_link_number_param
  31756. {
  31757. /** TLV tag and len; */
  31758. A_UINT32 tlv_header;
  31759. /** number of link to be config */
  31760. A_UINT32 num_of_link;
  31761. /** VDEV type, see values for vdev_type (WMI_VDEV_TYPE_AP,WMI_VDEV_TYPE_STA,
  31762. * WMI_VDEV_TYPE_IBSS, WMI_VDEV_TYPE_MONITOR,WMI_VDEV_TYPE_NAN,WMI_VDEV_TYPE_NDI ...)
  31763. */
  31764. A_UINT32 vdev_type;
  31765. /** VDEV subtype, see values for vdev_subtype (WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE,
  31766. * WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT, WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO ...)*/
  31767. A_UINT32 vdev_subtype;
  31768. /** home channel frequency in MHz of the vdev*/
  31769. A_UINT32 home_freq;
  31770. } wmi_mlo_set_active_link_number_param;
  31771. typedef struct wmi_mlo_link_set_active_resp_event
  31772. {
  31773. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_set_active_resp_event_fixed_param; */
  31774. A_UINT32 tlv_header;
  31775. /** Return status. 0 for success, non-zero otherwise */
  31776. A_UINT32 status;
  31777. /* The TLVs follows this structure:
  31778. * A_UINT32 force_active_vdev_bitmap[]; <-- current force active vdev.
  31779. * A_UINT32 force_inactive_vdev_bitmap[]; <-- current force inactive vdevs
  31780. */
  31781. } wmi_mlo_link_set_active_resp_event_fixed_param;
  31782. typedef struct {
  31783. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_setup_cmd_fixed_param; */
  31784. A_UINT32 tlv_header;
  31785. /** Unique ID reprsenting the hw_links part of the MLD */
  31786. A_UINT32 mld_group_id;
  31787. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  31788. A_UINT32 pdev_id;
  31789. /*
  31790. * Followed by TLVs:
  31791. * A_UINT32 hw_link_ids[];
  31792. */
  31793. } wmi_mlo_setup_cmd_fixed_param;
  31794. typedef struct {
  31795. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_setup_complete_event_fixed_param; */
  31796. A_UINT32 tlv_header;
  31797. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  31798. A_UINT32 pdev_id;
  31799. /** Return status. 0 for success, non-zero otherwise */
  31800. A_UINT32 status;
  31801. } wmi_mlo_setup_complete_event_fixed_param;
  31802. typedef struct {
  31803. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_ready_cmd_fixed_param; */
  31804. A_UINT32 tlv_header;
  31805. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  31806. A_UINT32 pdev_id;
  31807. } wmi_mlo_ready_cmd_fixed_param;
  31808. typedef enum wmi_mlo_tear_down_reason_code_type {
  31809. WMI_MLO_TEARDOWN_SSR_REASON,
  31810. } WMI_MLO_TEARDOWN_REASON_TYPE;
  31811. typedef struct {
  31812. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_teardown_fixed_param; */
  31813. A_UINT32 tlv_header;
  31814. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  31815. A_UINT32 pdev_id;
  31816. /** reason_code: of type WMI_TEARDOWN_REASON_TYPE */
  31817. A_UINT32 reason_code;
  31818. } wmi_mlo_teardown_fixed_param;
  31819. typedef struct {
  31820. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_teardown_complete_fixed_param; */
  31821. A_UINT32 tlv_header;
  31822. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  31823. A_UINT32 pdev_id;
  31824. /** Return status. 0 for success, non-zero otherwise */
  31825. A_UINT32 status;
  31826. } wmi_mlo_teardown_complete_fixed_param;
  31827. #define WMI_IGMP_OFFLOAD_SUPPORT_DISABLE_BITMASK 0x0
  31828. #define WMI_IGMP_V1_OFFLOAD_SUPPORT_BITMASK 0x1
  31829. #define WMI_IGMP_V2_OFFLOAD_SUPPORT_BITMASK 0x2
  31830. #define WMI_IGMP_V3_OFFLOAD_SUPPORT_BITMASK 0x4
  31831. #define WMI_IGMP_OFFLOAD_SUPPORT_ALL_VERSION 0x7
  31832. typedef struct {
  31833. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_igmp_offload_fixed_param */
  31834. A_UINT32 vdev_id; /** VDEV identifier */
  31835. A_UINT32 enable; /** IGMP offload support enable/disable */
  31836. A_UINT32 version_support_bitmask; /** IGMP version support v1, v2 and/or v3*/
  31837. /* Following this structure are the TLVs:
  31838. * WMI_IPV4_ADDR grp_ip_address[num_mcast_ipv4_addr];
  31839. */
  31840. } wmi_igmp_offload_fixed_param;
  31841. typedef struct {
  31842. /** TLV tag and len; tag equals
  31843. * WMITLV_TAG_STRUC_wmi_vdev_smart_monitor_event_fixed_param */
  31844. A_UINT32 tlv_header;
  31845. /* VDEV identifier */
  31846. A_UINT32 vdev_id;
  31847. /** Average RSSI value of Data Frames */
  31848. A_INT32 avg_rssi_data_dbm;
  31849. } wmi_vdev_smart_monitor_event_fixed_param;
  31850. typedef struct {
  31851. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_multiple_vdev_set_param_cmd_fixed_param */
  31852. A_UINT32 pdev_id;
  31853. /** parameter id */
  31854. A_UINT32 param_id;
  31855. /** parameter value */
  31856. A_UINT32 param_value;
  31857. /* The TLVs follows this structure:
  31858. * A_UINT32 vdev_ids[]; <--- Array of VDEV ids.
  31859. */
  31860. } wmi_pdev_multiple_vdev_set_param_cmd_fixed_param;
  31861. /* ADD NEW DEFS HERE */
  31862. /*****************************************************************************
  31863. * The following structures are deprecated. DO NOT USE THEM!
  31864. */
  31865. /** Max number of channels in the schedule. */
  31866. #define OCB_CHANNEL_MAX (5)
  31867. /* NOTE: Make sure these data structures are identical to those
  31868. * defined in sirApi.h */
  31869. typedef struct
  31870. {
  31871. /** Arbitration Inter-Frame Spacing. Range: 2-15 */
  31872. A_UINT32 aifsn;
  31873. /** Contention Window minimum. Range: 1 - 10 */
  31874. A_UINT32 cwmin;
  31875. /** Contention Window maximum. Range: 1 - 10 */
  31876. A_UINT32 cwmax;
  31877. } wmi_qos_params_t;
  31878. typedef struct
  31879. {
  31880. /** Channel frequency in MHz */
  31881. A_UINT32 chan_freq;
  31882. /** Channel duration in ms */
  31883. A_UINT32 duration;
  31884. /** Start guard interval in ms */
  31885. A_UINT32 start_guard_interval;
  31886. /** End guard interval in ms */
  31887. A_UINT32 end_guard_interval;
  31888. /** Transmit power in dBm, range 0 - 23 */
  31889. A_UINT32 tx_power;
  31890. /** Transmit datarate in Mbps */
  31891. A_UINT32 tx_rate;
  31892. /** QoS parameters for each AC */
  31893. wmi_qos_params_t qos_params[WLAN_MAX_AC];
  31894. /** 1 to enable RX stats for this channel, 0 otherwise */
  31895. A_UINT32 rx_stats;
  31896. } wmi_ocb_channel_t;
  31897. typedef struct {
  31898. /** TLV tag and len; tag equals
  31899. * WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */
  31900. A_UINT32 tlv_header;
  31901. /* VDEV identifier */
  31902. A_UINT32 vdev_id;
  31903. /** Number of valid channels in the channels array */
  31904. A_UINT32 num_channels;
  31905. /** The array of channels */
  31906. wmi_ocb_channel_t channels[OCB_CHANNEL_MAX];
  31907. /** 1 to allow off-channel tx, 0 otherwise */
  31908. A_UINT32 off_channel_tx; /* Not supported */
  31909. } wmi_ocb_set_sched_cmd_fixed_param;
  31910. typedef struct {
  31911. /** Return status. 0 for success, non-zero otherwise */
  31912. A_UINT32 status;
  31913. } wmi_ocb_set_sched_event_fixed_param;
  31914. /*****************************************************************************
  31915. * END DEPRECATED
  31916. */
  31917. /* ADD NEW DEFS ABOVE THIS DEPRECATED SECTION */
  31918. #ifdef __cplusplus
  31919. }
  31920. #endif
  31921. #endif /*_WMI_UNIFIED_H_*/
  31922. /**@}*/